text:
# EmailFetchAndProcess

This little gem encapsulates some logic distilled and extracted from a bunch of different scripts used to access a mailbox, find an email, and get the file attachment from it.

It is currently very focused and limited to that job and that job only, but with a little TLC it could become a more general email access/extract/process tool.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'email-fetch-and-process'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install email-fetch-and-process

## Usage

```
require 'email-fetch-and-process'

jobs = []
jobs << EmailFetchAndProcess::Job.new({fetch: ['SUBJECT', 'Some subject line']})

r = EmailFetchAndProcess.new({host: 'imap.gmail.com',port: 993, id: 'YOURID', password: 'YOURPASSWORD'})
r.run(jobs)
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/wyhaines/email-fetch-and-process.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

repository: wyhaines/email-fetch-and-process

repo_name: wyhaines/email-fetch-and-process


text:
[![Build Status](https://travis-ci.org/zeebe-io/zeebe-client-csharp.svg?branch=master)](https://travis-ci.org/zeebe-io/zeebe-client-csharp)
[![](https://img.shields.io/nuget/v/zb-client.svg)](https://www.nuget.org/packages/zb-client/)
[![](https://img.shields.io/nuget/dt/zb-client)](https://www.nuget.org/stats/packages/zb-client?groupby=Version)
[![](https://img.shields.io/github/license/zeebe-io/zeebe-client-csharp.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/zeebe-io/zeebe-client-csharp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/zeebe-io/zb-csharp-client/alerts/)
[![](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)](https://github.com/camunda-community-hub/community)
[![](https://img.shields.io/badge/Lifecycle-Stable-brightgreen)](https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#stable-)

# Zeebe C# client

The Zeebe C# client is a C# wrapper implementation around the GRPC (https://github.com/grpc/grpc) generated Zeebe client.
It makes it possible to communicate with Zeebe Broker via the GRPC protocol, see the [Zeebe documentation](https://docs.zeebe.io/)
for more information about the Zeebe project.

## Requirements

 * .net standard 2.0 or higher, which means
   * .net core 2.1 or higher or
   * .net framework 4.7.1 or higher
 * latest [Zeebe release](https://github.com/zeebe-io/zeebe/releases/)

## How to use

The Zeebe C# client is available via nuget (https://www.nuget.org/packages/zb-client/).

Please have a look at the [API documentation](https://zeebe-io.github.io/zeebe-client-csharp/).

## Camunda Cloud

The Zeebe C# Client is Camunda Cloud ready.
To get an example how to use the Zeebe C# Client with the Cloud take a look at [Client.Examples/CloudExample.cs.md](Client.Examples/CloudExample.cs.md).

## How to build

Simply run `msbuild Zeebe.sln` or `dotnet build Zeebe.sln`

repository: aalzehla/zeebe-client-csharp

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: aalzehla/zeebe-client-csharp


text:
# Generic functions

## Creating generic functions

Let's create `get` function. We will start by writing this function in Scala.
```scala
def head[T](list: java.util.List[T]): T =
  list.get(0)
```
When we try to compile this we will see that it has type
`List[Unknown] -> Unknown`. In order to have better typing information
we need to create new subclass of TypingFunction, that will calculate type of
head's result, and attach it to the function.
```scala
@GenericType(typingFunction = classOf[HeadGenericFunction])
def head[T](list: java.util.List[T]): T =
  list.get(0)

private class HeadGenericFunction extends TypingFunction {
  override def computeResultType(arguments: List[TypingResult]):
    ValidatedNel[GenericFunctionTypingError, TypingResult] = ???
}
```
Now we need to implement `computeResultType` function that takes list of
argument types and return type of the result or some errors. Our function
gets exactly one parameter - list of elements of type `T` and returns type `T`
otherwise we will return validation error that signals we expected other
arguments.
```scala
private val listClass = classOf[java.util.List[_]]

override def computeResultType(arguments: List[TypingResult]):
  ValidatedNel[GenericFunctionTypingError, TypingResult] = {
  arguments match {
    case TypedClass(`listClass`, t :: Nil) :: Nil => t.validNel
    case _ => ArgumentTypeError.invalidNel
  }
}
```
Now head function is ready, and we can run nussknacker and see that
`head(List[Int]) = Int` or `head(List[String]) = String`.

## Specifying parameters

Sometimes we want to use parameters that are more specific than what Scala or
Java can offer. In such cases we need to manually specify types of
the parameters and the result. We will write a custom `plus` that will work with
integers, floats and strings.

We will start implementing the function itself and declaring typing function
for it.
```scala
@GenericType(typingFunction = classOf[PlusGenericFunction])
def plus(left: Any, right: Any): Any = (left, right) match {
  case (left: Int, right: Int) => left + right
  case (left: Double, right: Double) => left + right
  case (left: String, right: String) => left + right
  case _ => throw new AssertionError("should not be reached")
}

private class PlusGenericFunction() extends TypingFunction {
  ???
}
```

Next we add function that calculates type of result. It will check number
of parameters and if there are exactly two then it will remove their values
and match them with supported types.
```scala
private val numberType = Typed.typedClass[Number]
private val intType = Typed.typedClass[Int]
private val doubleType = Typed.typedClass[Double]
private val stringType = Typed.typedClass[String]

override def computeResultType(arguments: List[TypingResult]):
  ValidatedNel[GenericFunctionTypingError, TypingResult] = arguments match {
  case left :: right :: Nil =>
    (left.withoutValue, right.withoutValue) match {
      case (`intType`, `intType`) =>
        intType.validNel
      case (`doubleType`, `doubleType`) =>
        doubleType.validNel
      case (l, r) if List(l, r).forall(_.canBeSubclassOf(numberType)) =>
        OtherError(s"Addition of ${l.display} and ${r.display} is not supported").invalidNel
      case (`stringType`, `stringType`) =>
        stringType.validNel
      case _ =>
        ArgumentTypeError.invalidNel
    }
  case _ => ArgumentTypeError.invalidNel
}
```

This function will work as long as we provide it with correct arguments,
but when we try to use it with types int and string we get error
"expected (Object, Object), found (Int, String)", which doesn't look
like a real error. To fix it we have to specify what types this function
can accept. We will add two possible signatures `(Number, Number) -> Number`
and `(String, String) -> String`.
```scala
override def signatures: Option[NonEmptyList[MethodTypeInfo]] =
  Some(NonEmptyList.of(
    MethodTypeInfo.withoutVarargs(
      Parameter("left", numberType) :: Parameter("right", numberType) :: Nil,
      numberType
    ),
    MethodTypeInfo.withoutVarargs(
      Parameter("left", stringType) :: Parameter("right", stringType) :: Nil,
      stringType
    )
))
```
Now when we try to use this function with string and int we will get much
more reasonable error saying that two numbers or two strings were expected.

## Working with objects
Now let's create a function that processes typed objects instead of simpler
types. We will make a function that takes two objects and merges them,
creating one object with fields from both arguments. Again, let's start
with implementation. Here it's worth noting that objects are represented
as maps with string keys, so our function needs to accept this type.
```scala
@GenericType(typingFunction = classOf[UnionGenericFunction])
def union(x: java.util.Map[String, Any], y: java.util.Map[String, Any]):
  java.util.Map[String, Any] = {
  val res = new java.util.HashMap[String, Any](x)
  res.putAll(y)
  res
}

private class UnionGenericFunction extends TypingFunction {
  ???
}
```
Then we create typing function. It should check if it got two typed objects
as arguments and if it did, then it checks if they have common file and
either returns an error or calculates their union.

```scala
override def computeResultType(arguments: List[TypingResult]):
  ValidatedNel[GenericFunctionTypingError, TypingResult] = arguments match {
  case TypedObjectTypingResult(x, _, infoX) :: TypedObjectTypingResult(y, _, infoY) :: Nil =>
    if (x.keys.exists(y.keys.toSet.contains))
      OtherError("Argument maps have common field").invalidNel
    else
      TypedObjectTypingResult(x ++ y, Typed.typedClass[java.util.HashMap[_, _]], infoX ++ infoY).validNel
  case _ =>
    ArgumentTypeError.invalidNel
}
```

## Using static arguments

Let's continue working with typed objects. Now we will create function
that takes an object, name of a field and returns values of this field.

Here we make use of types that hold their value. We need to know the value
of second argument during compilation so that we can calculate type of
result, therefore we match second argument with `TypedObjectWithValue`
and return error when it is a simple string.

```scala
@GenericType(typingFunction = classOf[GetFieldGenericFunction])
def getField(obj: java.util.Map[String, Any], name: String): Any =
  obj.get(name)

private class GetFieldGenericFunction extends TypingFunction {
  private val stringType = Typed.typedClass[String]

  override def computeResultType(arguments: List[TypingResult]):
    ValidatedNel[GenericFunctionTypingError, TypingResult] = arguments match {
    case TypedObjectTypingResult(fields, _, _) :: TypedObjectWithValue(`stringType`, name: String) :: Nil =>
      fields.get(name) match {
        case Some(v) => v.validNel
        case None => OtherError("No field with given name").invalidNel
      }
    case TypedObjectTypingResult(_, _, _) :: x :: Nil if x.canBeSubclassOf(stringType) =>
      OtherError("Expected string with known value").invalidNel
    case _ =>
      ArgumentTypeError.invalidNel
  }
}
```

## Using varargs
Function with varargs can be used just like regular functions. While in many
cases they do not need typing function to work properly, it sometimes can
still be useful. Let's create a function that takes multiple varargs and
returns list of all of them.

```scala
@GenericType(typingFunction = classOf[ToListGenericFunction])
@varargs
def toList[T](elems: T*): java.util.List[T] =
  elems.asJava

private class ToListGenericFunction extends TypingFunction {
  override def computeResultType(arguments: List[TypingResult]):
    ValidatedNel[GenericFunctionTypingError, TypingResult] = {
    val supertypeFinder = new CommonSupertypeFinder(SupertypeClassResolutionStrategy.AnySuperclass, true)
    val commonSupertype = arguments
      .reduceOption(supertypeFinder.commonSupertype(_, _)(NumberTypesPromotionStrategy.ToSupertype))
      .getOrElse(Unknown)
    Typed.genericTypeClass[java.util.List[_]](commonSupertype :: Nil).validNel
  }
}
```

Here we use `supertypeFinder` to get best type for elements of result list.
We specify supertype class resolution strategy `AnySuperclass` and
number types promotion strategy `ToSupertype` as they are the closest to
expected behaviour of types in list. In other circumstances we could freely
use any other strategy.

repository: TouK/nussknacker

branch_name: refs/heads/staging

gha_language: Scala

repo_name: TouK/nussknacker


text:
---
published: true
date: '2017-09-26 08:04 -0700'
title: NCS1002 Configuration Automation with YDK
author: Viktor Osipchuk
excerpt: NCS1002 Configuration Automation with YDK
tags:
  - iosxr
  - automation
  - YDK
  - programmability
  - NCS1002
  - NCS1k
---

This tutorial is the next one in our series of documents, devoted to automation of configuration of Cisco optical products. We will give here exact examples and explanations of how to use OpenConfig models and YDK infrastructure to configure a slice on [NCS1002 (terminal device)](http://www.cisco.com/c/en/us/products/collateral/optical-networking/network-convergence-system-1000-series/datasheet-c78-733699.html). You can refer to the [previous tutorial](https://xrdocs.github.io/programmability/tutorials/2017-08-22-ncs1002-configuration-automation-overview/) to refresh information about different modes of NCS1002 slices and corresponding OpenConfig models.

There are many ways to configure a device using OpenConfig models. This document describes how you can automate configuration with help of YDK.
[YANG Development Kit (YDK)](http://ydk.io) is a powerful, open-source tool that generates APIs using YANG models. YDK supports different programming languages and has several built-in components that isolate you from the protocol, transport and encoding specifics. There is no need to code protocol specifics (e.g. [NETCONF](https://tools.ietf.org/html/rfc6241), [RESTCONF](https://tools.ietf.org/html/rfc8040)) or manipulate serialized data (e.g. [XML](https://www.w3.org/XML/) or [JSON](http://www.json.org/)) directly, as YDK has this integrated. With YDK you can focus your attention on the data structures and automation logic. YDK supports Python and C++ today with more languages coming soon (e.g., Go Lang, Ruby, etc.).
YDK performs local validation of your code based on information embedded in the YANG model. The tool checks types, values, semantics, deviations, etc to make sure that some possible errors are found locally, before applying configuration on a device.

## Slice configuration overview

In our introduction tutorial, we talked about five different slice modes (three modes for 100G client ports and two modes for 10G clients).
Let’s have a look on a configuration procedure for the simplest case, a [2x100GE-2x100G](https://xrdocs.github.io/programmability/tutorials/2017-08-22-ncs1002-configuration-automation-overview/#1openconfig-configuration-for-2x100ge--2x100g-slice-mode) mode. Full YDK configuration examples for all modes can be found on [GitHub](https://github.com/CiscoDevNet/ydk-py-samples/tree/master/samples/basic/netconf/models/openconfig/openconfig-terminal-device).
As you remember, in “2x100GE2x100G” mode, the speed of each line port equals to the speed of any client port and this allows to have direct 1-to-1 mappings between client ports and line (trunk) ports.
The code provided below is very basic by the intention to make it easier. Slice number, wavelengths and power levels are predefined in the code, but nothing prevents you from modifying this code according to your needs.

There are three major OpenConfig models needed to configure a slice:
1. [openconfig-interfaces](https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-interfaces.yang)
2. [openconfig-terminal-device](https://github.com/openconfig/public/blob/master/release/models/optical-transport/openconfig-terminal-device.yang)
3. [openconfig-platform](https://github.com/openconfig/public/blob/master/release/models/platform/openconfig-platform.yang)

They are complementary to each other (or, in other words, there are interdependences). That means that you need to commit configurations from all of them at the same time.
Let’s start with the first model listed, “openconfig-interfaces”. The task of this model is to make sure that line ports (trunks) are “UP”. This operation should be done on each port you have in the slice (if you like to follow [schemes](https://xrdocs.github.io/xrdocs-images/assets/tutorial-images/vosipchu/2_100_2_100.png), you can see that these ports correspond to “Transceivers on Line Ports”)

interface = oc_interface.Interface()
interface.name = 'Optics0/0/0/5'
if_config = interface.Config()
if_config.name = 'Optics0/0/0/5'
if_config.type = iana_if_type.OpticalchannelIdentity()
if_config.enabled = True  ## ”True” means “no shut”
interface.config = if_config
oc_interface.interface.append(interface)

(the code, that you will see on [GitHub](https://github.com/CiscoDevNet/ydk-py-samples/blob/master/samples/basic/netconf/models/openconfig/openconfig-terminal-device/nc-edit-config-oc-terminal-device-20-ydk.py)) will have several enhancements to remove repetitive configuration, but the overall logic stays the same as in this document)

In the second model (“openconfig-terminal-device”) you need to define:
- Logical Ethernet Channels and map them to the client ports.
- Mappings between Ethernet Logical Channels and OTN Logical Channels.
- Mappings between OTN Logical Channels and Optical Channels.

Our final goal is to map the first client port to the first line port, and the last client port should be mapped to the second line port. You can find all the configurations for the first client/line ports pair below. Code will be similar for the second pair, and full configuration is available on [GitHub](https://github.com/CiscoDevNet/ydk-py-samples/blob/master/samples/basic/netconf/models/openconfig/openconfig-terminal-device/nc-edit-config-oc-terminal-device-20-ydk.py)

a) At this step, you need to define Ethernet Logical Channels and make proper mapping between them and Transceivers. You also need to specify the speed, status, and Ethernet mode of the channel:

channel = oc_logical_channel.logical_channels.Channel()
channel.index = 1 ## indexing can be any, except 0
channel_config = channel.Config()
channel_config.rate_class = oc_tr_types.Trib_Rate_100GIdentity()
channel_config.admin_state = oc_tr_types.AdminStateTypeEnum.ENABLED
channel_config.trib_protocol = oc_tr_types.Prot_100G_MlgIdentity()
channel_config.logical_channel_type = oc_tr_types.Prot_EthernetIdentity()
channel.config = channel_config
channel_ingress = channel.Ingress()
channel_ingress_tr = channel_ingress.Config()
channel_ingress_tr.transceiver = '0/0-Optics0/0/0/0'
channel_ingress.config = channel_ingress_tr
channel.ingress = channel_ingress

b) After you created Ethernet Logical Channels, you need to map them to OTN Logical Channels (will be created in the next step). At this step, you need to define the speed of the mapped Ethernet Logical Channel inside the OTN channel (things are easy for this mode, but with [5x100GE-2x250G]( https://xrdocs.github.io/programmability/tutorials/2017-08-22-ncs1002-configuration-automation-overview/#3openconfig-configuration-for-5x100ge--2x250g-slice-mode) mode you will need to split middle Ethernet Logical Channel into two different OTN Logical Channels in a 50/50 ratio)

channel_assignment = channel.logical_channel_assignments.Assignment()
channel_assignment.index = 1
channel_assignment_config = channel_assignment.Config()
channel_assignment_config.allocation = Decimal64('100')
channel_assignment_config.assignment_type = channel_assignment.config.AssignmentTypeEnum. LOGICAL_CHANNEL
channel_assignment_config.logical_channel = 51
channel_assignment.config = channel_assignment_config
channel.logical_channel_assignments.assignment.append(channel_assignment)
oc_logical_channel.logical_channels.channel.append(channel)

c) At this step, you need to define OTN logical channels, their speed and map them to Optical Channels (that are defined in the final step using “openconfig-platform” model):

channel = oc_logical_channel.logical_channels.Channel()
channel.index = 51
channel_config = channel.Config()
channel_config.admin_state = oc_tr_types.AdminStateTypeEnum.ENABLED
channel_config.logical_channel_type = oc_tr_types.Prot_OtnIdentity()
channel.config = channel_config
channel_assignment = channel.logical_channel_assignments.Assignment()
channel_assignment.index = 1
channel_assignment_config = channel_assignment.Config()
channel_assignment_config.allocation = Decimal64('100')
channel_assignment_config.assignment_type = channel_assignment.config. AssignmentTypeEnum.OPTICAL_CHANNEL
channel_assignment_config.optical_channel = '0/0-OpticalChannel0/0/0/5’
channel_assignment.config = channel_assignment_config
channel.logical_channel_assignments.assignment.append(channel_assignment)
oc_logical_channel.logical_channels.channel.append(channel)

Finally, in the “openconfig-platform” model you need to create Optical Channels and map them with real line ports on the slice. You also define power level, wavelength and FEC mode (mode1 = 7% or mode2 = 20%) for each trunk. Please consider, that in the “openconfig-platform” model power levels are defined in "0.01dM" and frequency is expressed in "MHz".

component = oc_component.Component()
component.name = '0/0-OpticalChannel0/0/0/5'
optical_channel_config = component.optical_channel.Config()
optical_channel_config.line_port = '0/0-Optics0/0/0/5'
optical_channel_config.operational_mode = 2
optical_channel_config.target_output_power = 0
optical_channel_config.frequency = 191300000
component.optical_channel.config = optical_channel_config
oc_component.component.append(component)

At this step, we configured the main logic of our code, let’s have a look at other parts of the YDK code.

## Connecting to NCS1002

For a successful connection of your YDK code to a NCS1002, you need to have this configured on your device:

xml agent tty
!
netconf agent tty
 session timeout 500
!
netconf-yang agent
 ssh
!
ssh server v2   ## requires key generation

YDK code uses built-in NCCLIENT client module to handle the NETCONF connection establishment:

from ydk.services import NetconfService
from ydk.providers import NetconfServiceProvider

provider = NetconfServiceProvider(address=device.hostname,
                                   port=device.port,
                                   username=device.username,
                                   password=device.password,
                                   protocol=device.scheme)

YDK will wrap-up the configuration based on OpenConfig models to XML format before sending to a NCS1002. Here is an example of such an output for 2x100GE2x100G mode that was explained in this document:

```
VOSIPCHU-M-C1GV:vosipchu$ python nc-create-oc-ncs1002-40-ydk.py<EMAIL_ADDRESS>-v
2017-09-11 19:02:57,687 - ydk.providers.netconf_provider - INFO - NetconfServiceProvider connected to <IP_ADDRESS>:None using ssh
2017-09-11 19:02:57,687 - ydk.services.netconf_service - INFO - Executing edit-config RPC
2017-09-11 19:02:57,704 - ydk.services.executor_service - INFO - Executor operation initiated
2017-09-11 19:02:57,712 - ydk.providers._provider_plugin - DEBUG -
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:aded4537-5078-403c-a0ef-f205bdc10bf9">
  <edit-config>
    <target>
      <candidate></candidate>
    </target>
    <config>
      <interfaces xmlns="http://openconfig.net/yang/interfaces">
        <interface>
          <name>Optics0/0/0/5</name>
          <config>
            <enabled>true</enabled>
            <name>Optics0/0/0/5</name>
            <type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:opticalChannel</type>
          </config>
        </interface>
        <interface>
          <name>Optics0/0/0/6</name>
          <config>
            <enabled>true</enabled>
            <name>Optics0/0/0/6</name>
            <type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:opticalChannel</type>
          </config>
        </interface>
      </interfaces>
    </config>
  </edit-config>
</rpc>

2017-09-11 19:02:58,000 - ydk.providers._provider_plugin - DEBUG -
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:aded4537-5078-403c-a0ef-f205bdc10bf9">
  <ok/>
</rpc-reply>

2017-09-11 19:02:58,001 - ydk.services.executor_service - INFO - Executor operation completed
2017-09-11 19:02:58,001 - ydk.services.netconf_service - INFO - Executing edit-config RPC
2017-09-11 19:02:58,016 - ydk.services.executor_service - INFO - Executor operation initiated
2017-09-11 19:02:58,020 - ydk.providers._provider_plugin - DEBUG -
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:cbb88133-ef42-4eb1-b3ca-c8ef6472e52e">
  <edit-config>
    <target>
      <candidate></candidate>
    </target>
    <config>
      <terminal-device xmlns="http://openconfig.net/yang/terminal-device">
        <logical-channels>
          <channel>
            <index>100</index>
            <config>
              <admin-state>ENABLED</admin-state>
              <logical-channel-type xmlns:idx="http://openconfig.net/yang/transport-types">idx:PROT_ETHERNET</logical-channel-type>
              <rate-class xmlns:idx="http://openconfig.net/yang/transport-types">idx:TRIB_RATE_100G</rate-class>
              <trib-protocol xmlns:idx="http://openconfig.net/yang/transport-types">idx:PROT_100G_MLG</trib-protocol>
            </config>
            <ingress>
              <config>
                <transceiver>0/0-Optics0/0/0/0</transceiver>
              </config>
            </ingress>
            <logical-channel-assignments>
              <assignment>
                <index>1</index>
                <config>
                  <allocation>100</allocation>
                  <assignment-type>LOGICAL_CHANNEL</assignment-type>
                  <logical-channel>200</logical-channel>
                </config>
              </assignment>
            </logical-channel-assignments>
          </channel>
          <channel>
            <index>101</index>
            <config>
              <admin-state>ENABLED</admin-state>
              <logical-channel-type xmlns:idx="http://openconfig.net/yang/transport-types">idx:PROT_ETHERNET</logical-channel-type>
              <rate-class xmlns:idx="http://openconfig.net/yang/transport-types">idx:TRIB_RATE_100G</rate-class>
              <trib-protocol xmlns:idx="http://openconfig.net/yang/transport-types">idx:PROT_100G_MLG</trib-protocol>
            </config>
            <ingress>
              <config>
                <transceiver>0/0-Optics0/0/0/4</transceiver>
              </config>
            </ingress>
            <logical-channel-assignments>
              <assignment>
                <index>1</index>
                <config>
                  <allocation>100</allocation>
                  <assignment-type>LOGICAL_CHANNEL</assignment-type>
                  <logical-channel>201</logical-channel>
                </config>
              </assignment>
            </logical-channel-assignments>
          </channel>
          <channel>
            <index>200</index>
            <config>
              <admin-state>ENABLED</admin-state>
              <logical-channel-type xmlns:idx="http://openconfig.net/yang/transport-types">idx:PROT_OTN</logical-channel-type>
            </config>
            <logical-channel-assignments>
              <assignment>
                <index>1</index>
                <config>
                  <allocation>100</allocation>
                  <assignment-type>OPTICAL_CHANNEL</assignment-type>
                  <optical-channel>0/0-OpticalChannel0/0/0/5</optical-channel>
                </config>
              </assignment>
            </logical-channel-assignments>
          </channel>
          <channel>
            <index>201</index>
            <config>
              <admin-state>ENABLED</admin-state>
              <logical-channel-type xmlns:idx="http://openconfig.net/yang/transport-types">idx:PROT_OTN</logical-channel-type>
            </config>
            <logical-channel-assignments>
              <assignment>
                <index>1</index>
                <config>
                  <allocation>100</allocation>
                  <assignment-type>OPTICAL_CHANNEL</assignment-type>
                  <optical-channel>0/0-OpticalChannel0/0/0/6</optical-channel>
                </config>
              </assignment>
            </logical-channel-assignments>
          </channel>
        </logical-channels>
      </terminal-device>
    </config>
  </edit-config>
</rpc>

2017-09-11 19:02:58,309 - ydk.providers._provider_plugin - DEBUG -
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:cbb88133-ef42-4eb1-b3ca-c8ef6472e52e">
  <ok/>
</rpc-reply>

2017-09-11 19:02:58,309 - ydk.services.executor_service - INFO - Executor operation completed
2017-09-11 19:02:58,309 - ydk.services.netconf_service - INFO - Executing edit-config RPC
2017-09-11 19:02:58,320 - ydk.services.executor_service - INFO - Executor operation initiated
2017-09-11 19:02:58,321 - ydk.providers._provider_plugin - DEBUG -
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:0358444c-6097-4a80-8062-3232b3a87550">
  <edit-config>
    <target>
      <candidate></candidate>
    </target>
    <config>
      <components xmlns="http://openconfig.net/yang/platform">
        <component>
          <name>0/0-OpticalChannel0/0/0/5</name>
          <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
            <config>
              <frequency>191300000</frequency>
              <line-port>0/0-Optics0/0/0/5</line-port>
              <operational-mode>2</operational-mode>
              <target-output-power>0</target-output-power>
            </config>
          </optical-channel>
        </component>
        <component>
          <name>0/0-OpticalChannel0/0/0/6</name>
          <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
            <config>
              <frequency>196100000</frequency>
              <line-port>0/0-Optics0/0/0/6</line-port>
              <operational-mode>2</operational-mode>
              <target-output-power>0</target-output-power>
            </config>
          </optical-channel>
        </component>
      </components>
    </config>
  </edit-config>
</rpc>

2017-09-11 19:02:58,610 - ydk.providers._provider_plugin - DEBUG -
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:0358444c-6097-4a80-8062-3232b3a87550">
  <ok/>
</rpc-reply>

2017-09-11 19:02:58,610 - ydk.services.executor_service - INFO - Executor operation completed
2017-09-11 19:02:58,610 - ydk.services.netconf_service - INFO - Executing commit RPC
2017-09-11 19:02:58,612 - ydk.services.executor_service - INFO - Executor operation initiated
2017-09-11 19:02:58,613 - ydk.providers._provider_plugin - DEBUG -
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:dad37f83-ee8d-4049-be33-f7b4dbc595ac">
  <commit/>
</rpc>

2017-09-11 19:03:00,353 - ydk.providers._provider_plugin - DEBUG -
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:dad37f83-ee8d-4049-be33-f7b4dbc595ac">
  <ok/>
</rpc-reply>

2017-09-11 19:03:00,353 - ydk.services.executor_service - INFO - Executor operation completed
2017-09-11 19:03:00,817 - ydk.providers.netconf_provider - INFO - NetconfServiceProvider disconnected from <IP_ADDRESS> using ssh
```
As you can see, YDK connects to the device, does its job, commits, and exits. You can also use non-verbose version (without “-v” in the command line) with less output to the console.

You can also check the updated configuration on a NCS1002 using “show” commands. New lines of config will be seen after your code successfully commits intended configuration.
When you configure a slice using OpenConfig models, show output in CLI will be different, comparing to the output you have after configuration of a slice through CLI. That change was done to reflect OpenConfig logic. Proper protection mechanisms are implemented on NCS1002 to make sure that a slice configured through CLI cannot be configured again using OpenConfig models and vice versa (mutual exclusion).

## CLI view from a NCS1002

Here is an output of Slice #0 configuration using OpenConfig models on a NCS1002:

!
controller Optics0/0/0/5
 transmit-power 0
 dwdm-carrier 100MHz-grid frequency 1913000
!
controller Optics0/0/0/6
 transmit-power 0
 dwdm-carrier 100MHz-grid frequency 1961000
!
terminal-device
 logical-channel 100
  rate-class 100G
  admin-state enable
  ingress-client-port Optics0/0/0/0
  trib-protocol 100G-MLG
  logical-channel-type Ethernet
  assignment-id 1
   allocation 100
   assignment-type logical
   assigned-logical-channel 200
  !
 !
 logical-channel 101
  rate-class 100G
  admin-state enable
  ingress-client-port Optics0/0/0/4
  trib-protocol 100G-MLG
  logical-channel-type Ethernet
  assignment-id 1
   allocation 100
   assignment-type logical
   assigned-logical-channel 201
  !
 !
 logical-channel 200
  admin-state enable
  logical-channel-type Otn
  assignment-id 1
   allocation 100
   assignment-type optical
   assigned-optical-channel 0_0-OpticalChannel0_0_0_5
  !
 !
 logical-channel 201
  admin-state enable
  logical-channel-type Otn
  assignment-id 1
   allocation 100
   assignment-type optical
   assigned-optical-channel 0_0-OpticalChannel0_0_0_6
  !
 !
 optical-channel 0_0-OpticalChannel0_0_0_5
  line-port Optics0/0/0/5
  operational-mode 2
 !
 optical-channel 0_0-OpticalChannel0_0_0_6
  line-port Optics0/0/0/6
  operational-mode 2
!

Several helpful CLI “show” commands are listed here to check the configuration status using OC models:

a) A command to display accepted configuration layout with logical channels and their mappings:

RP/0/RP0/CPU0:ios#show terminal-device layout
Thu Sep  12 09:36:28.139 UTC

Slice Id:                      0
Status:                        Config Accepted
Client Bitrate:                100G
Line Bitrate:                  100G

Client [Lane]     Logical Channel Logical Channel Optical Channel     Line
                    (Ethernet)      (Coherent)
Optics0/0/0/0 [0]     100             200 0_0-OpticalChannel0_0_0_5         Optics0/0/0/5
Optics0/0/0/4 [0]     101             201 0_0-OpticalChannel0_0_0_6         Optics0/0/0/6

b) A command to display configuration details either for all logical channels or for a specific one:

RP/0/RP0/CPU0:ios#show terminal-device logical-channel number 100
Thu Sep  12 09:36:28.139 UTC
Logical Channel Index:      100
Name:                       HundredGigECtrlr0/0/0/0
Admin-State:                Enable
Loopback-Mode:              None
Type of Logical Channel:    Logical Level 1
Trib-Rate:                  100G tributary signal rate
Trib-Protocol:              100G MLG protocol
Protocol-Type:              Ethernet protocol framing
Ingress Client Port:        Optics0/0/0/0
Ingress Physical Channel:   0
Logical Assignment Index:   1
Logical Assignment Name:    NA
Logical Channel:            200
Optical Channel:            NA
Allocation:                 100G
Assignment Type:            Logical

c) A command to display supported operational modes:

RP/0/RP0/CPU0:ios#show terminal-device operational-modes
Thu Sep  12 09:36:28.139 UTC
Operational Mode:       1
Description:            FEC Mode 7
Vendor:                 Cisco Systems, Inc.

Operational Mode:       2
Description:            FEC Mode 20
Vendor:                 Cisco Systems, Inc.

Openconfig models for slice configuration came with IOS XR 6.2.1 release.
Python 2.7 and YDK version 0.5.4 were used for scripts.

## Conclusion

YDK is a great tool that helps you to make configuration easier. In our example, we configured a full NCS1002 slice using OpenConfig models with a basic YDK script.  Try all example codes, modify them as you need and stay tuned for our next updates!

license: MIT

repository: xrdocs/programmability

branch_name: refs/heads/gh-pages

gha_language: SCSS

gha_license_id: MIT

repo_name: xrdocs/programmability


text:
# HDE Discord

`HDE Discord` is a small library that simplify the generation of an embed to add default data that will be already present in the embed when generating it.
⚠ Only work with [Discord.JS](https://www.npmjs.com/package/discord.js) library.

# Installation

Use [npm](https://www.npmjs.com/) manager to install `HDE Discord`.
Make sure to have [discord.js](https://www.npmjs.com/package/discord.js) installed too.

```bash
npm install hde-discord
```
or
```bash
npm i hde-discord
```

# Usage

```js
const Discord = require("discord.js")
const HDE = require("hde-discord")
Discord.MessageEmbed = HDE.embed

HDE.setup({
    author: {   // .setAuthor
        title: "",
        url: ""
    },
    title: "",  // .setTitle
    description: "",    // .setDescription
    thumbnail: "",  // .setThumbnail
    color: "",  // .setColor
    timestamp: true,    // or false || .setTimestamp
    image: "",   // .setImage
    footer: {   // .setFooter
        title: "",
        url: ""
    }
})
```

Remember that define all parameters is optional, you can do :
```
HDE.setup({title: "test"})
```

# Contributing

If there is a problem with the library or you want to contribute the library, send me a DM on Discord to `Tsumiki#0001`.

# License

MIT

repository: TsumikiVR/hde-discord

branch_name: refs/heads/main

repo_name: TsumikiVR/hde-discord


text:
# LidgrenUdpNet

[![NuGet Status](http://img.shields.io/nuget/v/LidgrenUdpNet.svg?style=flat)](https://www.nuget.org/packages/LidgrenUdpNet/)
[![Build status](https://ci.appveyor.com/api/projects/status/ietq5cnljm94nlku?svg=true)](https://ci.appveyor.com/project/veblush/lidgrenudpnet)
[![Coverage Status](https://coveralls.io/repos/github/SaladLab/LidgrenUdpNet/badge.svg?branch=master)](https://coveralls.io/github/SaladLab/LidgrenUdpNet?branch=master)

Modified version of [lidgren-network-gen3](https://github.com/lidgren/lidgren-network-gen3)
- Support .NET 3.5 in the nuget package.
- Support UnityPackage.
- Add NetConnection.MessageHandler to handle incoming messages quickly.
- Add Connection ID to handle change of peer address under mobile environment.

repository: SaladLab/LidgrenUdpNet

repo_name: SaladLab/LidgrenUdpNet


text:
# GoapSet
The `GoapSet` contains all available `Goals` and `Actions` that an agent can use. Different agents can use different `GoapSets`. This allows for different agents to have different `Goals` and `Actions`.

![Screenshot of GoapSetConfig](../images/goap-set.png)

## GoapSet Config
The `GoapSetConfig` is used to configure a `GoapSet`. It contains the following properties:

### goals
The `goals` is a list of `GoalConfigs` that are available to the `Agent`.

### actions
The `actions` is a list of `ActionConfigs` that are available to the `Agent`.

### targetSensors
The `targetSensors` is a list of `TargetSensorConfigs` that are available to the `Agent`.

### worldSensors
The `worldSensors` is a list of `WorldSensorConfigs` that are available to the `Agent`.

## Agent Debugger Class
By defining an agent debugger class you can customize the data show in the node viewer in the `Agent data` box. The agent debugger class must inherit from `IAgentDebugger` and be assigned to the property.

{% code title="AgentDebugger.cs" lineNumbers="true" %}
```csharp
using CrashKonijn.Goap.Interfaces;
using Demos.Shared.Behaviours;

public class AgentDebugger : IAgentDebugger
{
    public string GetInfo(IMonoAgent agent, IComponentReference references)
    {
        var hunger = references.GetCachedComponent<HungerBehaviour>();

        return $"Hunger: {hunger.hunger}";
    }
}
```
{% endcode %}

repository: crashkonijn/GOAP

gha_language: C#

repo_name: crashkonijn/GOAP


text:
# Corynabutilon hirsutum (Phil.) A.E.Martic. SPECIES

#### Status
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Anoda hirsuta Phil.

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
---
description: ThumbnailGridView.fmt
solution: Experience Manager
title: ThumbnailGridView.fmt

feature: Dynamic Media Classic,Viewers,SDK/API,eCatalog Search
role: Developer,User
exl-id: ff57762e-05f5-41c1-956f-39280941eeb1
---
# ThumbnailGridView.fmt{#thumbnailgridview-fmt}

 [!DNL `[ThumbnailGridView.|<containerId>_gridView.]fmt=jpg|jpeg|png|png-alpha|gif|gif-alpha`]

  jpg|jpeg|png|png-alpha|gif|gif-alpha

Specifies the image format that the component uses for loading images from Image Server. It can be any value that Image Server and the client browser supports. If the specified format ends with  -alpha, the component renders images as transparent content. For all other image formats the component treats images as opaque.

## Properties {#section-ffe8ccc3a5f2474db47a68c2ad9a96d6}

Optional.

## Default {#section-502c098dbae1452180c7f575a1d9dc8b}

[!DNL `jpeg`]

## Example {#section-5cde7b856ba646c293cfd3d79e47c507}

[!DNL `fmt-png-alpha`]


text:
---
layout: post
title:  "Getting Started with Jekyll and Foundation"
date:   2016-11-25 12:30:00
comments: true
categories: jekyll foundation
---

Over the past few weeks I have come to love working with Foundation 6 as a front-end framework
on a fairly large project. With a new framework working its way into my toolset, I figured I
would integrate it into the personal blog I am starting. At the end of this article you should
have a Github Pages blog running with Jekyll and Foundation 6.

We will start from the ground up and by the end hopefully have a skeleton where you can get up
and running making your own Github Page. This blog and skeleton uses Matt Swansons Lagom theme
as inspiration (which can be found [here][lagom-link]. If you want to skip to the finished product,
the source is available [HERE][source-link].

#### Prerequsites

* Ruby
* Terminal or Powershell
* [Jekyll][jekyll-link]
* [Github Pages][github-pages-link]
* [Foundation 6][foundation-link]
* [Node.js][node-link]

#### Making a new project with Jekyll and Github Pages

First we will need to make a repository on github, so head over there and make a repository that
has the name `USERNAME.github.io` . This will allow you to automatically have a page deployed of the same name.

Now we're ready to setup Jekyll. Clone and cd into the repository via your terminal. Once there run
{% highlight text %}
> gem install jekyll bundler
> jekyll new my-blog
> mv my-blog/* .
> rm my-blog
> bundle exec jekyll serve
{% endhighlight %}

This creates a Jekyll site and moves it to the repository root to be deployed when commited.
The last command runs the jekyll site locally at `localhost:4000` .

Jekyll creates a page that utilizes markdown and their own default styling. While markdown is
nice to create blog posts, I find having the page constructed in html and sass to be much more
familiar. From here, we will construct a different skeleton while integrating Foundation.

#### Refactoring Jekyll with Foundation

First we will need to add to the folder structure in order to override jekyll defaults and have
a place for some foundation assets. In the root of your project you will need to add:
* assets/
* _includes/
* _layouts/
* _sass/
* css/
* js/

The simplest way I have found to grab Foundation will be running these commands from your repository:
{% highlight text %}
> npm install foundation-sites
> mv node_modules/foundation-sites/scss _sass/
> mv node_modules/foundation-sites/dist/foundation.min.js js/
> mv node_modules/jquery/dist/jquery.min.js js/
> rm node_modules/
> touch css/main.scss
{% endhighlight %}

In the newly created `css/main.scss` file you will need to include foundation and the
hyphen notation to ensure the files run through the SASS processor:

**css/main.scss**
{% highlight scss %}
---
---

@import '../_sass/scss/foundation';
@include foundation-everything;
{% endhighlight %}

Make sure to add this to your `_config.yml` to ensure SASS processing:

**_config.yml**
{% highlight yaml %}
sass:
   sass_dir: _sass
   style: compressed
{% endhighlight %}

Now delete `about.md` and `index.md` and create `index.html` and `_layouts/default.html`.
Our default layout will form the structure for our blog and the index.html content will be
the basis for the content on the main page.

Add this simple code to the new `_layouts/default.html` to setup our html and grid:

**_layouts/default.html**
{% highlight html %}
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{% raw %}{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}{% endraw %}</title>
    <meta name="description" content="{% raw %}{{ site.description }}{% endraw %}">

    <link rel="stylesheet" href="{% raw %}{{ "/css/main.css" | prepend: site.baseurl }}{% endraw %}">
    <link rel="canonical" href="{% raw %}{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}{% endraw %}">

            {% raw %}{% include sidebar.html %}{% endraw %}

          {% raw %}{{ content }}{% endraw %}

        {% raw %}{% include footer.html %}{% endraw %}

{% endhighlight %}

And this snippet is to be added to `index.html` to give us content:

**index.html**
{% highlight html %}
---
layout: default
--

Posts

    {% raw %}{% for post in site.posts %}{% endraw %}

          {% raw %}{{ post.title }}{% endraw %}

        {% raw %}{{ post.date | date: "%b %-d, %Y" }}{% endraw %}
        {% raw %}{% if post.content contains '' %}{% endraw %}

            {% raw %}{{ post.content | split:'' | first }}{% endraw %}

          Read More
        {% raw %}{% else %}{% endraw %}
          Read More
        {% raw %}{% endif %}{% endraw %}

    {% raw %}{% endfor %}{% endraw %}

{% endhighlight %}

From here, we should create the two files I reference in the default layout:
`_includes/sidebar.html` and `_includes/footer.html`. This will give us
a column sidebar and a footer that initalizes Foundation.

**_includes/sidebar.html**
{% highlight html %}

Bork.

I'm Andrew Boorde.

Musings of a Mediocre Coder

{% endhighlight %}

**_includes/footer.html**
{% highlight html %}

    The postings on this site are my own and don't necessarily represent my
    employer’s positions, strategies or opinions.

    © 2016 — built with Jekyll

{% endhighlight %}

We are almost done! Now we just need to create a layout for our
individual posts. Let's create `_layouts/post.html` and add:

**_layouts/post.html**
{% highlight html %}
---
layout: default
---

{% raw %}{{ page.title }}{% endraw %}

      {% raw %}{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} •
      {{ page.author }}{% endif %}{% if page.meta %} •
      {{ page.meta }}{% endif %}{% endraw %}

    {% raw %}{{ content }}{% endraw %}

{% endhighlight %}

Finished! Here are some shots of the finished product:

![alt text](/assets/getting-started-jekyll-foundation/finishHome.JPG "finished home page")
![alt text](/assets/getting-started-jekyll-foundation/finishPost.JPG "finihsed post page")
Now I know it isn't pretty by any means but that's for you
to do! I have included a [finished website][aboorde-link] made from this blog as well.
The blog I currently use is a variation of this skeleton I have created. Feel free to use
anything you find useful.

[jekyll-link]: https://jekyllrb.com/
[github-pages-link]: https://pages.github.com/
[foundation-link]: http://foundation.zurb.com/sites.html
[source-link]: https://github.com/aboorde/aboorde.github.io
[node-link]: https://nodejs.org/en/
[lagom-link]: https://github.com/swanson/lagom
[aboorde-link]: https://aboorde.github.io/


text:
---
layout: post
section-type: post
title: SSD + RAM Upgrade
category: tech
tags: [ 'tutorial']
---

This week, I decided to give my Macbook Pro (mid-2012) a hardware upgrade. Although I was patient enough to tolerate the intense lags when I used SolidWorks or Quartus, when it began to take too long to open up the new versions of Microsoft Office, I knew it was time for an upgrade.

For a more detailed specs of what I used to have, check out: Macbook Pro (15-inch, Mid-2012)

List of Parts

• Samsung 850 EVO - 500 GB

• Crucial 16GB kit

• StarTech USB 3.0 to 2.5" SATA Cable

• Philips #00 Screwdriver

• Torx T6 Screwdriver

• USB Stick

Preparations

In case the procedure goes wrong, I backed up my data to an external hard drive first. Some people use Carbon Copy Cloner or similar software to clone all the data, but I'm a poor recent college grad, so I just used Apple's Time Machine. While the data was being backed up, I made a bootable USB with a copy of El Capitan OS X.

First, the USB stick has to be properly formatted. Access Disk Utility, select the USB, and click Erase with the correct Format: Mac OS X Extended (journaled) and GUID Partition Table. A step-by-step guide with pictures are found here. I left the USB Untitled. Next, I redownloaded the El Capitan Installer from the App Store. Finally, open Terminal and run the following code to complete the process:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

Make sure you can boot off the USB before trying anything else. Otherwise you will get a screen with a gray, crossed out circle indicating that the Mac cannot find an OS.

 Installing the SSD

I followed the directions here to install my SSD, but before you close the lid up, also install the new RAM.

 Installing the RAM

Now you have a faster Macbook that's good as new!

gha_language: HTML


text:
# pirateflix

> Stream piratebay movies directly from CLI

<img src="./preview.png" />

## Install from npm package
```sh
$ npm install -g<EMAIL_ADDRESS>```

## Install from git repo

```sh
# the output of "node -v" is referred as $NODE_VERSION
$ node -v
```

```sh
$ git clone https://github.com/Lisheng2016/pirateflix.git

# brew node is installed @ /usr/local/Cellar/node/$NODE_VERSION
# if you install node by itself, change node path accordingly
# to install pirateflix locally
$ npm install

# run pirateflix manually as testing
$ cd /path/to/pirateflix
$ node bin/cli.js

# enable pirateflix globally by creating symlink /usr/local/Cellar/node/$NODE_VERSION/bin/pirateflix => /usr/local/Cellar/node/$NODE_VERSION/node_modules/pirateflix/bin/cli.js
$ npm install -g

# make sure pirateflix is correctly placed and reachable via $PATH
$ which pirateflix
  /usr/local/Cellar/node/$NODE_VERSION/bin/pirateflix
```

## Options

```sh
$ pirateflix --help
  Follow the steps by the wizard and
  make sure you have VLC installed.

  Options:
    --search Optional value to start the query.
    --history Starts with the history of watched torrents.
    --clear Clears history of watched torrents.

  Usage:
    pirateflix [options]
```

## Usage

```sh
$ pirateflix # will open movie wizard
$ pirateflix --search="Interstellar" # will perform a search
```

## Overview

Make sure you have VLC installed, it might take a while until the movie starts depeding on the number
of seeders/leechers. The movie will start streaming at `http://localhost:8888` you can always
manually access and check it out.

## Related

* [peerflix](https://github.com/mafintosh/peerflix)

## License
MIT © 2016 [Weslley Araujo](https://twitter.com/_weslleyaraujo)\
MIT © 2018 [Jim Li](https://lisheng2016.github.io/wavejsblog)

repository: foobarjimmy/pirateFlix

repo_name: foobarjimmy/pirateFlix


text:
# Steemhunt Posting Guidelines

Steemhunt is a ranking community run by early-adopters who hunt "effortlessly cool products." Please follow these guidelines when making a post. If your post fails to follow these guidelines, it may be excluded from the ranking by the moderators.

## 1. Post a "Product," not a "Business."
A business is larger and more vague than a product. For example, you may post a new Samsung Galaxy S9 phone - this is a product. You can’t post "Samsung" itself - this is a business. Also, you can’t post a local product. Steemhunt is a global community, so you should bring something that everyone can enjoy.

## 2. Types of Products to Post
Steemhunt generally covers unique IT or hardware products, including:
* Web services
* Mobile apps
* API, IT solutions, bots, open sources or other types of software
* Tech gadgets, hardware, IoT/connected/wearable devices
* Games
* Innovative Engineering/Design Products

## 3. Product Link
We only accept these four product links:
1. Official product website
2. Major app store link (AppStore, PlayStore, etc)
3. Crowdfunding sites (Kickstarter, Indiegogo, etc)
4. Github, Bitbucket repositories for open source proejcts

We do not accept any other product links including e-commerce sites ( e.g. Amazon, ebay, etc.), affiliate marketing sites (e.g. Canopy, Awesome Invention, etc.), newspaper or blog articles, and social media posts, etc.

Also, hunters must put the official product website as a main priority. If you’ve listed an app store or Kickstarter link when the product has an official website, moderators can ask you to change it.

Regarding KickStarter & Indiegogo: if the project was not funded, it won't be accepted on SteemHunt.

Lastly, the product link website must be written in proper English, and use modern website standards like HTML5. Older standards (like HTML 4 or Adobe flash) will be checked and may be hidden by moderators.

## 4. Language - English Only
Steemhunt runs a single ranking board globally, so please post and comment in English. The product website should also be in English.

## 5. Plagiarism and Copyrights
Write a short description and hunter’s comment with your own words. Do not copy and paste from the product’s website or other sites. You can however quote some content from a site, but you must use quotation marks and cite the source properly.

## 6. Post "New" Products
Steemhunt is about cool "new" products. Please make sure that your hunt is something recently introduced. If the product is not new, there must be a strong reason to post. For example, the product must be substantially updated or upgraded in a way that has a positive effect on users. Even though the set period of time to define whether it is newly launched is subjective, the moderators may ask if the product is widely considered to be a “new product” (or substantially updated).

## 7. Post “Cool” Products
In Steemhunt, the coolness is decided by hunter’s upvotes. If many people think that a product is really cool, then the ranking is likely to be higher than other products. However, all products that are hunted in the first place should be somewhat cooler than other products. When a hunter decides to introduce the product to our community, it must not be a generic product. It should have some killer features that make people say “wow.” If your product is considered to be ordinary, the moderators may hide your hunt.

## 8. Quality of the Post
As a hunter, you need to post a cool product with well-structured comments and screenshots so that the users can see the benefit of the product quickly without needing to check the products website. Your post will be hidden if you:
* use non-related words/descriptions about the product.
* write wrong name of product or duplicate product name in the short description.
* attach non-related screenshot images or videos.
* attach low quality product images.
* share any scams or highly suspicious cryptocurrency/fin-tech products.
* share porn or anything under the #nsfw category.
* share illegal products.
* share an ICO which currently has no live product.
* share a product that is no longer available (except for pre-order stage).

## 9. No Duplication Allowed
Steemhunt does not allow the same product to be posted twice. The website automatically checks the URL, but it is still your responsibility to check that the product has not been posted earlier. If your product has already been featured from the same brand, the duplication is allowed only when:
1. The product is a newer model (V2) or has been majorly updated from the original one.
2. They are both main products (not accessories or sub-products).

## 10. Post Only Main Products
When it comes to a maker/brand, they usually have main and sub product. Steemhunt allows only the main product lines from the maker. For example, you cannot post an iPad Smart Cover because it is not from its main product line. However, you may be able to post an innovative iPad Smart Cover from a renowned accessory brand like Belkin because it is the brand's main product line (but in this case your product may not be under "cool product" in section 7).

## 11. Games
There are countless games worldwide, and many of them have narrow target customers. If we accept all new games in Steemhunt, our ranking board may be dominated by games. So, Steemhunt will only accept games that are:
* downloadable/purchasable from major app stores or console game markets
* run on their own website
* a game platform itself, rather than a single game inside the platform.

These specific types of games will not be acceptable:
* A single arcade game
* A single flash / HTML game
* A generic gambling game

With respect to “new” games we will consider them based on the original title’s release date. No other release dates based on additions of new platforms or newly released patches will be considered.

## 12. Mobile/Web Extention Apps
Like games, there are tons of mobile/web extention applications nowadays, and many of them are too generic to be featured on Steemhunt. If you share the following apps, we may delist your hunting post:
* Apps that only have web browsing or read-only features.
* Apps that already have many downloads/reviews (with the exception of apps that have released a completely new version).
* Copy cat of a renowned app.
* Apps considered extremely similar to previously hunted apps.

## Moderation
All hunts posted on Steemhunt.com are verified by Steemhunt moderators first. Once our moderators check that your hunt meets all the criteria in the posting guidelines, your hunt will be approved and considered for the ranking competition and @steemhunt's upvote. Your post will be hidden by the moderators if it does not meet the posting guidelines, in which case your hunt will be delisted from the ranking board. Posts may not be processed before the cutoff time. In this scenario your post will automatically roll over to the next day's competition and will be verified that day.

Please note that since we can not predict every possible product, category, and/or situation, our moderation team will have the final say on all approved and/or delisted posts and will be prepared to give an explanation regarding why a product has been delisted. Our main goal is to uphold a quality posting and product standard for hunters and visitors alike and all decisions will be made with fairness and objectivity.

These posting guidelines were updated on June 10, 2018, and are being continuously developed by our community. Feel free to suggest any opinions on how to make Steemhunt a cooler ranking community. You can join our [Discord Chat](https://discord.gg/mWXpgks) and make suggestions.

repository: iqbaladan/web

repo_name: iqbaladan/web


text:
# MTCNN

`pytorch` implementation of **inference stage** of face detection algorithm described in
[Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks](https://arxiv.org/abs/1604.02878).

## Example
![example of a face detection](images/example.png)

## How to use it
Install the package using pip:
```bash
pip install mtcnn-pytorch
```

Example usage:
```python
from mtcnn import detect_faces
import cv2

image = cv2.imread('image.jpg')
bounding_boxes, landmarks = detect_faces(image)
```
For examples see `test_on_images.ipynb`.

## Requirements
* pytorch 1.0
* opencv-python, numpy

* Pillow for visualization_utils

## Credit
This implementation is heavily inspired by:
* [pangyupo/mxnet_mtcnn_face_detection](https://github.com/pangyupo/mxnet_mtcnn_face_detection)

repository: benesjan/mtcnn-pytorch

repo_name: benesjan/mtcnn-pytorch


text:
# Commercetools app

The Commercetools app allows editors to select products from their Commercetools account and reference them inside of Contentful entries.

## Usage

### Step 1: Install

This app can be installed for fields of type `Short text` or `List of short text`.

To install this app you have to:

- Sign up with Commercetools and [create a read-only API client](https://docs.commercetools.com/getting-started) to acquire the necessary credentials.
- Fill in all data pertaining to your Commercetools account in the installation screen.
- Select all fields for which you'd like to install the Commercetools app from the list of available fields.
- Click on `Install`

This will modify the fields in the selected content types and change their appearance to use the Commercetools app.

### Step 2: Navigate to entries and start adding products

After a successful installation you can directly navigate to the content entries where the Commercetools app is set up.

You will be able to link plain `Short text` fields to a single product in your Commercetools account.

Lists of `Short text` fields can be linked to a selection of many products.

license: MIT,ISC

repository: joedooley/extensions

detected_licenses: MIT ISC

gha_license_id: ISC

repo_name: joedooley/extensions


text:
---
layout: page
title: ACF Regionals
nav_order: 2
last_updated: March 22, 2022
---

**ACF Regionals** is a difficult tournament that serves as a qualifier for ACF Nationals. ACF Regionals prepares teams to ramp up to Nationals difficulty while still providing a rigorous qualifying experience. Many players will find ACF Regionals to be a significant but rewarding challenge.

# Table of Contents
{: .no_toc}
* A markdown unordered list which will be replaced with the ToC, excluding the "Contents header" from above
{:toc}

# 2022 ACF Regionals
[2022 ACF Regionals](https://hsquizbowl.org/forums/viewtopic.php?f=8&t=25467) was held on January 29, 2022.

## Editors
2022 ACF Regionals is head-edited by Taylor Harvey and edited by Jaimie Carlson, Ganon Evans, Alex Hardwick, Nick Jensen, Arjun Nageswaran, Grant Peet, Graham Reid, Jonathen Settle, Chandler West, and Annabelle Yang.

Editor | Subjects
- | -
Taylor Harvey | Religion, Philosophy, Other Fine Arts (Auditory), Music
Jaimie Carlson | British and European Literature
Ganon Evans | Other Fine Arts (Visual), Geography, Pop Culture, General Knowledge
Alex Hardwick | World Literature, Social Science (Linguistics)
Nick Jensen | World History, Biology, and Social Science (excluding Linguistics)
Arjun Nageswaran | American History
Grant Peet | British/Commonwealth History, European History, Other History
Graham Reid | Chemistry
Jonathen Settle | Physics, Other Science, Current Events
Chandler West | American Literature, Painting/Sculpture
Annabelle Yang | Mythology

## Format
We hope that ACF Regionals can be held in person wherever possible. However, we acknowledge that many schools are uncertain about the possibility of allowing large events due to the ongoing COVID-19 pandemic. Thus, it is possible that some mirrors of ACF Regionals will be held online, and we will work to create the most authentic and engaging quizbowl experience possible under these circumstances.

## Qualification
ACF is allowing for in-person and online sites for 2022 ACF Regionals. Only teams who attend in-person ACF Regionals sites will be able to qualify for ACF Nationals by A-value. Teams that are not located near any in-person ACF Regionals sites can apply for a wildcard bid. Hosts of in-person and online sites can apply for wildcard bids. The process for ACF Nationals qualification is described [here](/nationals-qualification).

## Packet submission
Any team with at least two people on it who played a mainstream, collegiate, academic quizbowl tournament\* (either as a college student or as a high school student) prior to September 1, 2020, is required to submit a half-packet. Email [regionals<EMAIL_ADDRESS>if you are unsure whether your team is required to submit a half-packet. A team that is not required to submit a packet may submit an optional packet by the no-penalty deadline for a $50 discount.

<small>\* For these purposes, all ACF tournaments, NAQT SCT (Division I or Division II), NAQT ICT, and typical college-level academic invitationals count as mainstream collegiate academic tournaments. Pop culture or “hybrid” tournaments, HCASC, and tournaments played on NAQT’s Collegiate Novice series sets do not count.</small>

If your team is obligated to submit a half-packet or wishes to do so, email [regionals<EMAIL_ADDRESS>by January 2, 2022. A half-packet distribution will be mailed to you. Emailing to request a half-packet does not constitute registration for ACF Regionals, which will be set up after sites are announced.

In an effort to reduce the number of submitted questions that cannot be used for distributional reasons, the editors may include suggested subtopics along with your half-packet distribution. For example, if the social science editor has received many economics questions already, but few anthropology questions, you may see a note like “We suggest that you write this question on an anthropology topic” in your distribution. Teams who abide by these suggestions are more likely to see their questions used, but they are not obliged to write on the suggested subtopic if they do not feel comfortable doing so.

The submission schedule is as follows:

Submission deadline | Packet discount
- | -
November 16, 2021 | −$50
November 28, 2021 | −$25
December 12, 2021 | −$0 (no penalty)
January 2, 2022 | +$25
January 9, 2022 | +$50

After January 9, 2022, teams will be required to pay an additional $10 per day their packet is late. Teams that have not submitted a packet by January 16, 2022, will be dropped from the tournament, with no exceptions.

The submission discounts and penalties – but not the schedule – may differ for teams attending sites outside of the United States, and will be detailed on the relevant site’s forum post.

In order to meet a deadline, you must submit your half-packet to [regionals<EMAIL_ADDRESS>before 11:59 p.m. Pacific Time on that date. Half-packets should be submitted in .docx format. Please do not submit packets as PDFs. If a team wishes to outsource part of its packet to a player not expected to play on that team (e.g., a student who has graduated), it must first receive approval from the head editor. Teams should email in their submissions separately and should not collaborate on packets; i.e., a school’s A team and B team should not write two half-packets together. However, if anyone who works on a packet or has access to that packet ends up playing on a different team (e.g. if someone originally intended to be on your school’s B team instead plays for your school’s A team) please let the head editor and your local TD know as soon as possible.

## Fees

Team entry fee or discount         |
-                                  | -
Base fee per team                  | $150
New to quizbowl discount           | −$100
Shorthanded discount (1–2 players) | −$75
Travel discount                    | −$10 per 200 miles traveled one-way
Buzzers                            | −$10 per functional buzzer system
Staffers                           | −$15 per staffer with functional laptop. Staffers must register with ACF in advance.

Staffers must register with ACF in advance and affirm that they have completed ACF’s [moderator training](https://hsquizbowl.org/forums/viewtopic.php?f=9&t=24545) (note: staffers who have not completed the training may scorekeep).

The "new to quizbowl" discount is intended for schools that have not sent a team to any mainstream collegiate academic tournament (exclusively Novice tournaments do not count) since September 2020, and have no one on the team(s) claiming this discount who played those tournaments for another school.

Host sites will bill teams as soon as possible after the teams register. Teams should pay their host sites by whatever method is convenient for the hosts, who will in turn pay ACF by check, cash, or PayPal.

## Distribution
ACF Regionals uses the [standard ACF distribution](/distribution).

## Accessibility
This tournament is intended to be close in difficulty to ACF Regionals 2021. While writing submissions, please keep the following in mind:

* Around 50% of tossup answerlines should be on things that can be tossed up at ACF Fall or below.
* The remaining tossup answerlines should be on things that can be tossed up at Regionals difficulty (“three dots”). If you do not know what sort of answerlines this entails, I encourage you to look at [ACF Regionals questions from recent years](#past-tournaments) to get a feel for them. You should feel free to submit tossups with unconventional answerlines that are still accessible, but tossup answerlines themselves are usually not the place for “canon expansion.”
* Easy parts for bonuses should be genuinely easy, gettable by around 90% of teams. However, try and avoid “curved yellow fruit” style easy parts that (a) don’t reward knowledge and (b) can actually obfuscate an answer.
* Hard parts for bonuses should be genuinely hard, but gettable by around 10% of teams. That 10% is important – but a Regionals hard part is not a Nationals hard part. It may be canon-expanding, but should still be something that someone with an interest in the bonus topic could organically know, rather than an ultra-specific detail or some random piece of arcanum.
* Tossups will be capped at 7 lines, 10-point Times New Roman with 1-inch margins. Please do not submit tossups that run into the 9th line or are shorter than 6 full lines. Bonuses do not have explicit length limits, but try to keep things concise and only add extra clues when they are meaningfully necessary.
* Submissions that flagrantly disregard the length or difficulty guidelines will be sent back to teams and will be considered unsubmitted for the purposes of packet discounts. If you would like to request an extension for your deadline, please submit your request and explanation to [regionals@acf-quizbowl.com](mailto:regionals@acf-quizbowl.com).

## Registration
To register for 2022 ACF Regionals, fill out the central [2022 ACF Regionals registration form](https://forms.gle/4D4gUwZ1a7uKf9hA8) with all relevant information.

## Field
The field for each site can be found [here](https://docs.google.com/spreadsheets/d/1IL449gIL0_BoG_Ood8U-SosWIPVQKl8ljRw0ii6ioVw/edit#gid=583264051).

## Staffing
To staff ACF Regionals, please fill out the [staffer registration form](https://forms.gle/duddCiY37pQWc5PQ9).

## Hosting
If you are interested in hosting a mirror of ACF Regionals, fill out [this form](https://forms.gle/984e3DiihqH78r5B9). If you have any questions about hosting or about the form, email ACF’s Site Coordinator at [hosting<EMAIL_ADDRESS>and CC [regionals@acf-quizbowl.com](mailto:regionals@acf-quizbowl.com). Hosts must abide by [ACF’s Hosting Guidelines](/hosting-guidelines).

## Sites
Mirrors will by default be regional. If any sites end up being online, ACF reserves the right to move teams and staffers between sites. ACF intends to mirror 2022 ACF Regionals in the following [regions](/hosting-guidelines#regions-according-to-acf):

Region              | Site | Type
-                   | -    | -
Northeast           | [Brown](https://hsquizbowl.org/forums/viewtopic.php?t=25606) | in person
Upper Mid-Atlantic  | [Penn State](https://hsquizbowl.org/forums/viewtopic.php?t=25613) | in person
Upper Mid-Atlantic  | [Stony Brook](https://hsquizbowl.org/forums/viewtopic.php?t=25607) | online
Lower Mid-Atlantic  | [Duke/UNC](https://hsquizbowl.org/forums/viewtopic.php?t=25603) | in person
Southeast           | [Vanderbilt](https://hsquizbowl.org/forums/viewtopic.php?t=25597) | in person
Florida             | [Florida](https://hsquizbowl.org/forums/viewtopic.php?t=25586) | in person
Great Lakes         | [Kentucky](https://hsquizbowl.org/forums/viewtopic.php?t=25588) | in person
Midwest             | [Chicago](https://hsquizbowl.org/forums/viewtopic.php?t=25639) | in person
North               | [Minnesota](https://hsquizbowl.org/forums/viewtopic.php?t=25587) | in person
South Central       | [UT Austin](https://hsquizbowl.org/forums/viewtopic.php?t=25589) | in person
Overflow            | [Nebraska](https://hsquizbowl.org/forums/viewtopic.php?t=25610) | online
Eastern Canada      | [Toronto](https://hsquizbowl.org/forums/viewtopic.php?t=25596) | online
United Kingdom      | [Warwick](https://hsquizbowl.org/forums/viewtopic.php?t=25609) | in person

If you have any questions, email [regionals@acf-quizbowl.com](mailto:regionals@acf-quizbowl.com).

## Past tournaments
Sample questions from previous iterations of ACF Regionals are on the [Collegiate Quizbowl Packet Archive](http://hsquizbowl.org/db/questionsets/search/?name=ACF+Regionals&col=1&season=&archived=y).

Announcements and information about previous iterations of ACF Regionals are archived below:

* [2021 ACF Regionals announcement](/tournaments/archive/2020/ACF%20Regionals)

## Dates of note

Event | Date
- | -
ACF dates announced     | June 7, 2021
ACF Regionals announced | October 11, 2021
Bidding opened          | November 14, 2021
Bidding closed          | November 26, 2021
Host sites announced    | December 1, 2021
Registration opened     | December 1, 2021
Registration closed     | January 24, 2022
ACF Regionals held      | January 29, 2022

filename: ACF Regionals.md


text:
# Introduction to Network Protocols

A short course intended to introduce junior analysts to network protocols.

## Syllabus

This course is designed to be taught over a period of five days.  Each day is subdivided into four sessions. The first and third sessions each day are traditional classroom lectures. The second and fourth sessions are time for students to do hands-on exercises that reinforce the material covered in the lectures.

| | Morning Lecture | Morning Exercise | Afternoon Lecture | Afternoon Exercise |
| :-- | :-- | :-- | :-- | :-- |
| **Day 1** | Introduction to Computer Networks | Using Network Utilities | Low-Level Protocols | Exploring the Lab Network |
| **Day 2** | The TCP/IP Protocol Suite | Inspecting Network Traffic | Socket Programming | Generating Network Traffic |
| **Day 3** | [SSL/TLS Handshake](./LectureSlides/ssl_tls_handshake.pdf) | Dissecting the SSL/TLS Handshake | SSL/TLS Certificates | Generating and Verifying Certificates |
| **Day 4** | [SSL/TLS Encryption](./LectureSlides/ssl_tls_encryption.pdf) | Implementing a SSL/TLS Cipher Suite | TLS 1.3 | Dissecting the TLS 1.3 Handshake |
| **Day 5** | HTTP over SSL/TLS | Inspecting HTTPS Traffic | Attacks on SSL/TLS | Exploring Well-Known Attacks |


text:
# AIVMC - Media center interface for Amazon Instant Video

This userscript converts the standard web pages for Amazon Instant Video into a simpler interface designed for large screens (also known as a 10-foot interface).

The script uses the YUI3 framework.

Written by and copyright Mark Johnson<EMAIL_ADDRESS>Released under the MIT license.

repository: marxjohnson/lfmc

repo_name: marxjohnson/lfmc


text:
# generator-generate-wisdom-polymer [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> Yeoman Generator

## Installation

First, install [Yeoman](http://yeoman.io) and generator-generate-wisdom-polymer using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).

```bash
npm install -g yo
npm install -g generator-generate-wisdom-polymer
```

Then generate your new project:

```bash
yo generate-wisdom-polymer
```

## Getting To Know Yeoman

 * Yeoman has a heart of gold.
 * Yeoman is a person with feelings and opinions, but is very easy to work with.
 * Yeoman can be too opinionated at times but is easily convinced not to be.
 * Feel free to [learn more about Yeoman](http://yeoman.io/).

## License

MIT © [Ming-der Wang]()

[npm-image]: https://badge.fury.io/js/generator-generate-wisdom-polymer.svg
[npm-url]: https://npmjs.org/package/generator-generate-wisdom-polymer
[travis-image]: https://travis-ci.org/mingderwang/generator-generate-wisdom-polymer.svg?branch=master
[travis-url]: https://travis-ci.org/mingderwang/generator-generate-wisdom-polymer
[daviddm-image]: https://david-dm.org/mingderwang/generator-generate-wisdom-polymer.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/mingderwang/generator-generate-wisdom-polymer
[coveralls-image]: https://coveralls.io/repos/mingderwang/generator-generate-wisdom-polymer/badge.svg
[coveralls-url]: https://coveralls.io/r/mingderwang/generator-generate-wisdom-polymer


text:
The project is moved to [https://github.com/repeats/Repeat](https://github.com/repeats/Repeat).
======

Repeat
======

Tired of cliking the same spot on your screen again and again? Got bored of typing the same phrase over and over again during your day? Repeat yourself with some intelligence.

Demo
====
[Task creation](https://youtu.be/AwkZt7mqLSg)

Features
=======
1. Record and replay computer activity.
2. Store recorded task and replay them later.
3. Write your own task so you have more control over the computer.
4. Assign multiple arbitrary hotkey combinations to activate a stored task.
5. Assign multiple mouse gestures to activate a stored task.
6. Manage your Repeat tasks (either recorded or written).

Disclaimer
==========
1. This is not a password storage program. Source code written is not encrypted.
2. This program executes your own code. Use the advanced compile - replay feature carefully. Test your task before adding it to the list.

Installation
============
Just download the [latest version](https://github.com/hptruong93/Repeat/releases/latest), put the jar in a separate directory, and run it with java. That's it! You may need appropriate priviliges since Repeat needs to listen to and/or control the mouse and keyboard.

Known issues
============
1. <del> Home/End buttons can only be used if numlocks is off </del> (This is a feature, not a bug)
2. <del> Some source code files are not getting cleaned up. However, they're all in the data/source folder </del> [Since 1.7.3](https://github.com/hptruong93/Repeat/releases/tag/1.7.3) --> Provide a menu for user to clean up unused source files.
3. <del>Python language is not fully supported. I'll have to write a better controller (mouse & keyboard) library for python.</del> Fully integrated python module [Since 2.0](https://github.com/hptruong93/Repeat/releases/tag/v2.0).
4. If application is not initialized correctly, it may not exit and has to be killed. This rarely happens. I've not seen such thing for a very long time.
5. <del> Does not catch error if hotkeys collide for different tasks. (i.e. you are responsible for not violating your hotkey assignment) </del> [Since 1.8](https://github.com/hptruong93/Repeat/releases/tag/1.8) --> Does not allow user to have overlapping keys.

FAQ
===

## What is the difference between this and [AutoHotkey](https://autohotkey.com/)?
1. This runs on any platform that supports Java and is non [headless](https://en.wikipedia.org/wiki/Headless_software). AutoHotkey is written for Windows. Repeat works fine on your Linux machine at work as well as your Window gaming setup at home.
2. The only limit to your hotkey power is your knowledge of the language you write your tasks in (e.g. Java, Python or C#). You don't have to learn a new meta language provided by AutoHotkey. This allows you to leverage your expertise in the language chosen and/or the immense support from the internet.

## Why is this not available in non headless system?
It does not make sense to listen to keyboard and mouse events in a headless system. How can you move your mouse if you have no screen? What would typing a key mean in such system?

## How do I change the global hotkeys (e.g. run task, start recording, stop recording)?
You can change global hotkeys: In menu Settings --> Hotkey

## How do I start recording?
Record: Press record (default hotkey F9) to start recording and stop at any time by pressing the same button again (or press default recording button F9)

## How do I replay what I just recorded?
Replay: Press replay (default hotkey F11) to start replaying and stop at any time by pressing the same button again (or press default replay button F11)

## How do I compile my code?
Compile your code and play it: the buttons are right under the record and replay section. (F12 for play/stop compiled code)

## What do the buttons on the right hand side mean?
Manage your tasks: using the buttons on the right hand side of the windows to Add, Override, Remove or Reorganize (move up/down, change group) your tasks.

## How do I assign a hotkey for my task?
Change hotkey for your task: just left click on the hotkey column of your task's row in the table and input the new hotkey

## My task is shown as enabled. How do I disable it?
Enabling/disabling task: click on the column in the table that shows enabled/disabled.

## I accidentally activated an infinite loop in my program with a hotkey. How do I stop the program?
By default, pressing escape will iterrupt the running tasks. However, you can disable this feature in Setting --> Halt tasks by escape.

## There's a button with text "default". What is it?
It's the button to manage task group.

## How do I manage my task groups?
Manage task group: click on the button next to Task group on the top right corner at any time to manage the task group.

## My Java program won't compile even if I use the default template. What's wrong?
Change Java class path: Settings --> Set compiler path. Choose the directory where your JDK is installed (not JRE). For example, mine is at C:\Program Files\Java\jdk1.8.0_25
More explanation: Usually the jar will get started by JRE. Obviously you can't compile anything with JRE.

## My python code won't load even if I use default template. What's wrong?
Similar to Java, you need to identify where the python interpreter is at. First switch to Python using Tool --> Compiling Language --> Python. Then configure python interpreter path using Settings --> Set compiler path. For example in my Linux machine my python interpreter is at /usr/bin/python

## Are you serious? I still can't load my python code even after I've configured my python interpreter.
You need to start Python submodule first. Go to Tool --> Native modules and click on the python IPC line, then click on the play button to start it.
You can achieve the same thing by just restarting the application. Python module will be automatically started if you've configured python interpreter correctly.

## I am running a Linux machine. Will the C# module get started at application start time?
C# module is disabled if you are on a non Windows OS. Nothing from C# module will get started.

## It's 2016. Why Java Swing?
At the time I was desperately in need of a tool to liberate myself from the repetitive tasks at work. I could have used JavaFX but I would take more time since I was not that proficient at JavaFX.

## Why can't this be a web service? It's a lot of effort downloading the JAR and run it.
 If I could do such thing from a web browser, some hackers must have got your personal information, passwords, bank account number by now.

## Why is there no support for Javascript?
It's coming. I will get it done when I have time.

Code examples
=============
Type out 100! = 1 * 2 * 3 * ... * 100
-------------------------------------
    /* Write your code beneath "Begin generated code" */
    controller.blockingWait(100); //To make sure the hotkey has been fully released
    key.type("100! = ");
    for (int i = 1; i <= 100; i++) {
        key.type(i + "");
        if (i != 100)
            key.type(" * ");
    }

Libraries used
==============
1. jnativehook Global Hooks library at https://github.com/kwhat/jnativehook
2. Argo JSON library at http://argo.sourceforge.net/
3. Jama - A Java matrix package at http://math.nist.gov/javanumerics/jama/

gha_language: Java


text:
## 1.0.6
* Ruby 3.2.0 removed File.exists? method. Change to File.exist?

## 1.0.5
* Wrap values inside single quotes indead of double quotes. If saved values
are reloaded in a form, special shell characters could get expanded and
corrupt data.  Please update to v1.0.5.
(Mar-15-2023)

## 1.0.4
* Previously only the OK/Yes button read input from forms, menus and lists.
If an extra button is used, it was treated the same as the Cancel/No
button, and no output from the form/menu/list was returned to the caller.

This PR changes the various user input dialogs to treat the Extra button
the same way as the OK/Yes button, and to return the dialog's input to the
caller.

Thanks to https://github.com/OtherJohnGray for pull request.

(Jun-22-2022)

## 1.0.3
* Added accessor `rc_file`. It specifies the DIALOGRC file to use.  Default is $HOME/.dialogrc
* Added accessor `cancel_label`. It specifies the label to use for the 'Cancel' button.
* Added accessor `yes_label`. It specifies the label to use for the 'Yes' button.
* Added accessor `no_label`. It specifies the label to use for the 'No' button.
* Added accessor `help_button`. It specifies that a help button should be added to the dialog.
* Added accessor `help_label`. It specifies the label to use for the 'Help' button.
* Added accessor `extra_button`. It specifies that an extra button should be added to the dialog.
* Added accessor `extra_label`. It specifies the label to use for the 'Extra' button.
* Fully implemented @exit_code. The @exit_code variable wasn't being set on all dialog styles.

## 1.0.2

* Added accessor `notags`. It can be used with checklist for example. The default value is false.

 ```
 dialog = MRDialog.new()
 dialog.notags = true
 ```
* Added accessor `dialog_options`. It can be used to pass any valid dialog option. `man dialog` and look at the **OPTIONS** section. It is the caller's responsibily to specify correct options, no validation will be done. Example:

```
dialog = MRDialog.new()
dialog.dialog_options = "--no-tags"
```
This ia exactly same as `dialog.notags = true`

(Apr-16-2016 )

## 1.0.1

* Juwelier support for making the gem.

Implemented methods for:

*  'buildlist' (--buildlist)
*  'editbox' (--editbox)
*  'form' (--form)
*  'gauge' (--gauge). Thanks to Mike Morgan.
*  'mixedform' (--mixedform)
*  'passwordform' (--mixedform)
*  'pause' (--pasue)
*  'prgbox' (--prgbox)
*  'progressbox' (--progressbox)
*  'progambox' (--programbox)
*  'treeview' (--treeview)

* Added accessors:
    "logger", "clear", "ok_label <label>", "insecure", "ascii_lines"
* Added methods to check dialog's exit code
    dialog_ok, dialog_cancel, dialog_help, dialog_extra,
    dialog_item_help, dialog_esc

Implemented examples for:

* buildlist
* calendar
* checklist
* editbox
* form
* fselect
* gauge
* infobox
* inputbox
* menu
* msgbox
* passwordbox
* pause
* prgbox
* progressbox
* programbox
* radiolist
* timebox
* treeview
* yesno

Note: The examples use Struct class, making the examples clean and
easy to understand.

# bug fixes:

* raise exception if 'dialog' program is not found.
* title in the option string was not quoted
* timebox syntax is different now.
etc..

--<EMAIL_ADDRESS>, Apr-05-2014, first cut

## 0.5.0

* original base code

repository: muquit/mrdialog

gha_language: Ruby

repo_name: muquit/mrdialog


text:
---
layout: posts
title: "Fine-tuning for this World: Moving through states"
categories: Life
author: Uzziel Perez
meta: "Abstract stuff notes for my future unwell self"
math: true
---

**"Diversified enough to survive, concentrated enough to matter"** - [James Clear](https://jamesclear.com/3-2-1/august-26-2021)

Nothing much for this weekend because I'm tired and need deep rest.

* Excitement and Predictability
* Safety and Growth
* Comfort and Pushing your Limits

We need both.

* Deep Rest. Deep Work.
* Intentionality and Flow.
* Comfort and Challenge

There's a difference between "pushing yourself to the limit" and "pushing yourself past your limit".
Knowing your limit is part of knowing yourself.
Expanding or scaling down your limit is part of 'creating yourself'.

Knowing and creating oneself. There's a rhythm to it.

-------
Just a short set of notes that I want to share.
I've a long day tomorrow.
I just feel super relaxed and sleepy now after a swim in the lake.

-------
Sometimes we need to relax in such a way that we give the "time-travelling, introspection" networks of our brain all the energy it needs. The kind of thing where we could comfortably pause, take a step back and say 'wait a minute, there must be a more clever way to do this.'

And then, there must be days where we give all our energies to the task-oriented networks when we've figured it out, or even when we haven't figured things out. In fact, specially when you haven't figured things out and have stayed too long in that state.

Both brain networks matter.

* Exteriorize. Interiorize.
* Zoom in. Zoom out.

Good night.


text:
# scVAE: Single-cell variational auto-encoders #

This software tool implements two variants of variational auto-encoders: one with a Gaussian prior and another with a Gaussian-mixture prior. In addition, several discrete probability functions and derivations are included to handle sparse count data like single-cell gene expression data. Easy access to recent single-cell and traditional gene expression data sets are also provided. Lastly, the tool can also produce relevant analytics of the data sets and the models.

The methods used by this tool is described and examined in the paper ["scVAE: Variational auto-encoders for single-cell gene expression data"][scVAE-paper] by [Christopher Heje Grønbech][Chris], [Maximillian Fornitz Vording][Max], [Pascal Nordgren Timshel][Pascal], [Casper Kaae Sønderby][Casper], [Tune Hannes Pers][Tune], and [Ole Winther][Ole].

The tool has been developed by Christopher and Maximillian at [Section for Cognitive Systems][CogSys] at [DTU Compute][] with help from Casper and [Lars Maaløe][Lars] supervised by Ole and in collaboration with [Pers Lab][]. It is being further developed by Christopher at [Centre for Genomic Medicine][GM] (only available in Danish) at [Rigshospitalet][RH].

[scVAE-paper]: https://www.biorxiv.org/content/10.1101/318295v2
[Chris]: https://github.com/chgroenbech
[Max]: https://github.com/maximillian91
[Pascal]: https://github.com/pascaltimshel
[Casper]: https://casperkaae.github.io
[Tune]: http://cbmr.ku.dk/research/section-for-metabolic-genetics/pers-group/
[Ole]: http://cogsys.imm.dtu.dk/staff/winther/

[Lars]: http://github.com/larsmaaloee

[CogSys]: https://github.com/DTUComputeCognitiveSystems
[DTU Compute]: http://compute.dtu.dk
[Pers Lab]: https://github.com/perslab
[GM]: https://www.rigshospitalet.dk/afdelinger-og-klinikker/diagnostisk/genomisk-medicin/Sider/default.aspx
[RH]: https://www.rigshospitalet.dk/english/Pages/default.aspx

## Setup ##

The tool is implemented in Python (versions 3.3--3.6) using [TensorFlow][]. [Pandas][], [PyTables][], [Beautiful Soup][], and the [stemming][] package are used for importing and preprocessing data. Analyses of the models and the results are performed using [NumPy][], [SciPy][], and [scikit-learn][], and figures are made using [matplotlib][], [Seaborn][], and [Pillow][].

[TensorFlow]: https://www.tensorflow.org
[Pandas]: http://pandas.pydata.org
[PyTables]: http://www.pytables.org
[Beautiful Soup]: https://www.crummy.com/software/BeautifulSoup/
[stemming]: https://bitbucket.org/mchaput/stemming
[NumPy]: http://www.numpy.org
[SciPy]: https://www.scipy.org
[scikit-learn]: http://scikit-learn.org
[matplotlib]: http://matplotlib.org
[Seaborn]: http://seaborn.pydata.org
[Pillow]: http://python-pillow.org

All included data sets are downloaded and processed automatically as needed.

## Installation ##

This tool is not available as a Python package yet. In the meantime you will first need to install its dependencies by yourself. This can be done by running

	$ pip install numpy scipy scikit-learn kneed tensorflow-gpu tensorflow-probability-gpu pandas tables beautifulsoup4 stemming matplotlib seaborn pillow

(If you do not have a GPU supported by TensorFlow, install the standard version by replacing `tensorflow-gpu` and `tensorflow-probability-gpu` with `tensorflow` and `tensorflow-probability`, respectively.)

After this, you can clone this tool to an appropriate folder:

	$ git clone https://github.com/chgroenbech/scVAE.git

## Running ##

The standard configuration of the model using the synthetic data set, can be run by just running the `main.py` script. Be aware that it might take some time to load and preprocess the data the first time for large data sets. Also note that to load and analyse the largest data set, which is made available by 10x Genomics and consists of 1.3 million mouse brain cells, 47 GB of memory is required (32 GB for the original data set in sparse representation and 15 GB for the reconstructed test set).

Per default, data is downloaded to the subfolder `data/`, models are saved in the subfolder `log/`, and results are saved in the subfolder `results/`.

To see how to change the standard configuration or use another data set, run the following command:

	$ ./main.py -h

### Examples ###

To reproduce the main results from our paper, you can run the following commands:

* Combined [PBMC data set][PBMC] (under "Single Cell 3′ Paper: Zheng et al. 2017") from 10x Genomics:

		$ ./main.py -i 10x-PBMC-PP -m GMVAE -r negative_binomial -l 100 -H 100 100 -w 200 -e 500 --decomposition-methods pca tsne

* [TCGA data set][TCGA]:

		$ ./main.py -i TCGA-RSEM --map-features --feature-selection keep_highest_variances 5000 -m GMVAE -r negative_binomial -l 50 -H 1000 1000 -e 500 --decomposition-methods pca tsne

* [MBC data set][MBC] from 10x Genomics:

		$ ./main.py -i 10x-MBC -m GMVAE -K 10 -r zero_inflated_negative_binomial -l 25 -H 250 250 -e 500 --decomposition-methods pca tsne

[PBMC]: https://support.10xgenomics.com/single-cell-gene-expression/datasets/
[TCGA]: https://xenabrowser.net/datapages/?dataset=tcga_gene_expected_count&host=https://toil.xenahubs.net
[MBC]: https://support.10xgenomics.com/single-cell-gene-expression/datasets/1.3.0/1M_neurons

You can change the model setup using the following argument options:

* `-m`: The model type, either `VAE` or `GMVAE`.
* `-r`: Likelihood function (or reconstruction distribution). Choose from:
	* `poisson`,
	* `negative binomial`,
	* `zero_inflated_poisson`,
	* `zero_inflated_negative binomial`,
	* `constrained_poisson`,
	* `bernoulli`,
	* `gaussian`,
	* `log_normal`, and
	* `lomax`.
* `-k`: The threshold for the piecewise categorical distibution (denoted by *K* in the paper).
* `-l`: The dimension of the latent variable.
* `-H`: The number of hidden units in each layer separated by spaces. For example, `-H 200 100` will make both the inference (encoder) and the generative (decoder) networks two-layered with the first inference layer and the last generative layer consisting of 200 hidden units and the last inference layer and the first generative layer consisting of 100 hidden units.
* `-K`: The number of components for the GMVAE (if possible, this is inferred from labelled data, but it can be overridden using this option).
* `-e`: The number of epochs to train the model.
* `-w`: The number of epochs during training where the warm-up optimisation scheme is used.

By default, a number of analyses are conducted of the models and saved in the subdirectory `results/`. These can be skipped using the option `--skip-analyses`. Among the anlyses are visualisations of the latent representations and the reconstructions, and the method to visualise these can be customised using the option `--decomposition-methods`.

You can also model the MNIST data set. Three different versions are supported: [the original][MNIST-original], [the normalised][MNIST-normalised], and [the binarised][MNIST-binarised]. To run the GMVAE model for, e.g., the binarised version, issue the following command:

	$ ./main.py -i mnist_binarised -m GMVAE -r bernoulli -l 10 -H 200 200 -e 500 --decomposition-methods pca tsne

[MNIST-original]: http://yann.lecun.com/exdb/mnist/
[MNIST-normalised]: http://deeplearning.net/data/mnist/
[MNIST-binarised]: http://www.cs.toronto.edu/~larocheh/publications/icml-2008-discriminative-rbm.pdf

### Comparisons ###

The script `cross_analysis.py` is provided to compare different models. After running several different models with different network architectures and likelihood functions, this can be run to compare these models.

It requires the relative path to the results folder, so using the standard configuration, it is run using the following command:

	$ ./cross_analysis.py -R $RESULT_DIRECTORY

where  `$RESULT_DIRECTORY` should be replaced by the path to the results directory. By default, scVAE saves results in the subdirectory `results/`.

Logs can be saved by adding the `-s` argument, and these are saved together with produced figures in the results folder specified. Data sets, models, and prediction methods can also be included or excluded using specific arguments. For documentation on these, use the command `./cross_analysis.py -h`.