text:
play-partials
=============

[![Build Status](https://travis-ci.org/hmrc/play-partials.svg?branch=master)](https://travis-ci.org/hmrc/play-partials) [ ![Download](https://api.bintray.com/packages/hmrc/releases/play-partials/images/download.svg) ](https://bintray.com/hmrc/releases/play-partials/_latestVersion)

A library used to retrieve HTML partials to use when composing HTML Play frontend applications.

In supports caching the partials.

## Adding to your service

Include the following dependency in your SBT build

```scala
resolvers += Resolver.bintrayRepo("hmrc", "releases")

libraryDependencies += "uk.gov.hmrc" %% "play-partials" % "x.x.x"
```

## The `HtmlPartial` type

Use this type to read an HTTP response containing a partial, and safely
handle the possible outcomes:

* For success (2xx) status codes, an `HtmlPartial.Success`
is returned, which contains the HTML body and optionally a hint on the title that
should be used on the page.
* For non-success (400 -> 599) status codes, an `HtmlPartial.Failure` is returned
* A handler is also supplied which translates connection-related exceptions into an
`HtmlPartial.Failure`

#### Examples

```scala
import HtmlPartial._

object Connector {
	def somePartial(): Future[HtmlPartial] =
	  http.GET[HtmlPartial](url("/some/url")) recover connectionExceptionsAsHtmlPartialFailure
}

// Elsewhere in your service:
Connector.partial.map(p =>
  Ok(views.html.my_view(partial = p successfulContentOrElse Html("Sorry, there's been a problem retrieving ...")))
)

// or, if you just want to blank out a missing partial:
Connector.partial.map(p =>
  Ok(views.html.my_view(partial = p successfulContentOrEmpty))
)

// or, if you want to have finer-grained control:
Connector.partial.map {
  case HtmlPartial.Success(Some(title), content) =>
    Ok(views.html.my_view(message = content, title = title))
  case HtmlPartial.Success(None, content)        =>
    Ok(views.html.my_view(message = content, title = "A fallback title"))
  case HtmlPartial.Failure                       =>
    Ok(views.html.my_view(message = Html("Sorry, there's been a technical problem retrieving your info"), title = "A fallback title"))
}
```

## Using cached static partials

If you need to use a static cached partial, use the `CachedStaticHtmlPartialRetriever` trait. It will retrieve the partial from the given URL and cache it (the cache key is the partial URL) for the defined period of time. You can also pass through a map of parameters used to replace placeholders in the retrieved partial. Placeholders have the form of `{{parameterKey}}`.

You can manage the cache parameters by overriding `refreshAfter`, `expireAfter` and `maximumEntries` attributes.

### A simple example of using the partials provider

```scala
object CachedStaticHtmlPartialProvider extends CachedStaticHtmlPartial {
  override val httpGet = ???
}

val partial = CachedStaticHtmlPartialProvider.get("http://my.partial")
```

### Using HTML Form partials

A special case of the static partials are HTML forms. By using `FormPartialRetriever` a `{{csrfToken}}` placeholder will be replaced with the Play CSRF token value.

## License ##

This code is open source software licensed under the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html").

repository: bambuchaAdm/play-partials

gha_language: Scala

repo_name: bambuchaAdm/play-partials


text:
# ibus-daemon

SystemD user service for IBus.

## Description

This is source code and PKGBUILD for [ibus-daemon](https://aur.archlinux.org/packages/ibus-daemon/) AUR package.

## Installation

```sh
yay -S ibus-daemon
```

## License

[MIT](https://git.io/JJmcK) © [Hoàng Văn Khải](https://github.com/KSXGitHub/).

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: Shell

gha_license_id: MIT

license_type: permissive


text:
The _Image_ widget is a control that allows us to embed an image within a page. You can set the dimensions the image using the styling attributes of the component and also attach page events. The _Image_ control obtains its image data from one of various sources including:
* a static file resource specified by the UPL attributes _src_ or _srcBinding_,
* a _byte[]_ array in memory referenced by the property the control binds to,
* and an _ImageGenerator_ component referenced by the property the control binds to.

The static file resource option has a precedence over the two other image source options.

<img src="images/webcomponents/controls/image.png" width="180" alt="Image" align="center">

Listing 1: Image control with static file resource UPL

```upl
!ui-image:profileImg
    src:$s{web/images/profile.png}
    style:$s{width:240px;height:420px;}
```

Use the _byte[]_ array option where your image is stored in memory.

Listing 2: Image control using byte array UPL

```upl
!ui-image:profileImg
    binding:profileImage
    style:$s{width:240px;height:420px;}
```

Listing 3: Profile page bean using byte array

```java
ProfilePageBean pageBean = ...
byte[] profileImg = ...
pageBean.setProfileImage(profileImg);
```

The _ImageGenerator_ option is useful when you want to generate images, to be embedded in a page, on the fly.

Listing 4: Image control using image generator UPL

```upl
!ui-image:profileImg
    binding:imageGenerator
    style:$s{width:240px;height:420px;}
```

Listing 5:  Profile page bean using image generator

```java
ProfilePageBean pageBean = ...
ImageGenerator imageGenerator = ...
pageBean.setImageGenerator(imageGenerator);
```

## Attributes

| Name | Required | Type | Description |
|------|----------|------|-------------|
| src | false | String | Specifies the source of the image which is name of the image file resource or scope attribute to be rendered by this control. |
| srcBinding | false | String | Specifies the bean property or container scope attribute whose value is the source of the image. |
| scope | false | String | Specifies the image source scope if the source string value is enclosed in the context scope tag $o{}. The value of this attribute can be any string in the set: {APPLICATION,SESSION}. |
| clearOnRead | false | Boolean | Indicates if image source should be cleared from context when read. It is taken into consideration only when the image source is scoped. Defaults to 'true'. |
| debounce | true | boolean | Indicates if widget should participate in debounce action. Defaults to 'false'. |

repository: tcdng/unify-framework

gha_language: Java

repo_name: tcdng/unify-framework


text:
---
title: "purrr Tricks with All Subset Regression"
author: 'thug-r.life'
date: '2017-08-24'
slug: purrr-tricks-with-all-subset-r
link: http://thug-r.life/post/2017-08-24-purrr-tricks-with-all-subset-regression/
categories:
- bloglink
tags:
  - modeling
  - thugrlife
---

All Subsets Regression What is all subsets regression? It’s a technique for model building which involves taking a set of independent variables \(X_1..i\) and regressing them in sets of \(k\), where \(k\) is in \(\{1,2,\dots,i\}\), against the response variable \(Y\). The ‘all’ part of ‘all subsets’ means it’s every combination of \(X_{1..i}\) being drawn \(k\) at a[... <i class="fas fa-external-link-alt"></i>](http://thug-r.life/post/2017-08-24-purrr-tricks-with-all-subset-regression/)

repository: mkearney/data-scribers

repo_name: mkearney/data-scribers


text:
# Fraktal-Storage

[![Discord Support Server](https://canary.discordapp.com/api/guilds/431951677671604234/widget.png)](https://discord.gg/yMVYAkz)

Fraktal-Storage is the storage module for Fraktal: an open-source podcast manager built with [Electron](https://electronjs.org/).

repository: Fraktal-JS/fraktal-storage

repo_name: Fraktal-JS/fraktal-storage


text:
---
title: Yellow Concrete Powder
layout: document
---
## Detail

|Kind|Content|
|---|---|
|Description|Yellow Concrete Powder|
|Type|[Blocks](Blocks)|
|Production Tool|[Crafting Table](Crafting_Table)|

If there is nothing in the space below it falls down.

When water is applied to [Yellow Concrete Powder](Yellow_Concrete_Powder), it becomes hardened into [Yellow Concrete](Yellow_Concrete).

## Recipe

|Result|Materials|
|---|---|
|[Yellow Concrete Powder](Yellow_Concrete_Powder)x1|[Sand](Sand)x4,[Gravel](Gravel)x4,[Dandelion Yellow](Dandelion_Yellow)x1|

## What can be created

[Yellow Concrete](Yellow_Concrete),

branch_name: refs/heads/main


text:
jFlowLib
========

jFlowLib is a Java library to parse and generate sFlow and IPFIX data. For this,
jFlowLib consists of two parts:

**jsFlow:** jsFlow is Java library for [sFlow](http://www.sflow.org/) (version 5). sFlow
is an industry standard to monitor switches and routers.

So far, jsFlow implements all the headers as used by
[Force10 E-series](http://www.dell.com/us/business/p/force10-e-series) and
[Alcatel Lucent 7750](http://www.alcatel-lucent.com/products/7750-service-router-0) switches. However,
the jsFlow architecture is designed to be easily extensible which means it should be easy
to implement support for additional vendors and switch models.

**jIPFIX:** jIPFIX is Java library for [IPFIX](http://tools.ietf.org/wg/ipfix/). IPFIX is
an IETF protocol and it was created based on the need for a common, universal standard of
export for Internet Protocol flow information from routers, probes and other devices that
are used by mediation systems, accounting/billing systems and network management systems
to facilitate services such as measurement, accounting and billing.

The current version of jIPFIX supports all headers as used by the
[Alcatel Lucent 7750](http://www.alcatel-lucent.com/products/7750-service-router-0)
configured to export IPFIX based on the L2-IP flow template. However, the jIPFIX
architecture is designed to be easily extensible so that other flow templates can be
easily added.

Which use cases are covered by jFlowLib?
----------------------------------------

The abstract use case for jFlowLib is to work with sFlow and IPFIX data. jFlowLib can be
used as sFlow agent or IPFIX exporter and as sFlow or IPFIX collector. Additional and
more specific use cases are listed in the following:

* Transparent sFlow or IPFIX proxy: In case you want to modify the sFlow or IPFIX data
that is sent by switches or routers jFlowLib can be used as a transparent sFlow or IPFIX
proxy.
* sFlow or IPFIX multiplexer: Typically, routers and switches support only a limited
number of sFlow or IPFIX collectors. In case the sFlow or IPFIX traffic should be
received by more than this number of sFlow or IPFIX collectors a multiplexer can be used
to distribute the sFlow or IPFIX data to any number of sFlow or IPFIX collectors.
* Randomizer: Removing personal data such as IP addresses by randomizing specific data fields.

What do you need to run jFlowLib?
---------------------------------
A Java Runtime Environment (version 6 or higher) is required to be able to use the
jFlowLib library.

Under which License is jFlowLib available?
------------------------------------------
The jFlowLib library is released under the
[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).

Who develops and maintains the jFlowLib library?
------------------------------------------------
The initial version of the jFlowLib library has been developed during an internal
project at the [DE-CIX Management GmbH](https://www.de-cix.net). In case you have any
questions regarding this project please contact Thomas King (thomas.king@de-cix.net).

repository: chinghanyu/jFlowLib

repo_name: chinghanyu/jFlowLib


text:
---
script:
  basepath: data
---

# Describe

```markdown remark type=info
The difference with between `describe` and `list` command: if `datapackage.json` is not provided `describe` will load a sample from every tabular data file in a dataset and infer a schema while `list` is a very lean and quick command operating only with available metadata and not touching actual data files.
```

With Frtictionless `describe` command you can get a metadata of file or a dataset.

## Normal Mode

By default, it outputs metadata visually formatted:

```bash script tabs=CLI
frictionless describe tables/*.csv
```

## Yaml/Json Mode

It's possible to output as `YAML` or `JSON`, for example:

```bash script tabs=CLI
frictionless describe tables/*.csv --yaml
```

repository: frictionlessdata/frictionless-py

gha_language: Python

repo_name: frictionlessdata/frictionless-py


text:
# Protocols to run OT diagnostic stations

## Station C

station-C-qpcr-map.py is a template that we edit for different station C variants.

The qPCR build map is defined in the two `MAP` constants at the top, `MASTER_MIX_MAP` and `SAMPLE_MAP`, with a tab-separated list of which wells get which master mixes and samples. The tab-separated maps can be filled by directly copying a 12x8 grid of cells from a google sheet; see
https://docs.google.com/spreadsheets/d/1EF5goRfT6f6d0IyCboaYNDJns9UazWaFNT4N8_CPyzQ/edit?usp=sharing for an example.

To run a new experiment, create a dated and named experiment in the `/experiments` directory of this repository, and copy the protocol into it. Modify the MAP variables to reflect the experiment being performed. This creates a long term record of the protocol and plate layout used during that experiment.

Depending on the qPCR machine you plan to use, you may also need to modify the labware used for the qPCR build plate. Modify the `QPCR_LABWARE` constant if this is the case. If you need to add a custom labware definition, place it in the `/labware` directory of this repository.


text:
---
layout: post
title:  "HiddenVM — Use any desktop OS without leaving a trace"
date:   2020-03-11
categories: technology code os software privacy
video: false
---

Sick toolage.

HiddenVM is an innovation in computing privacy.

[1]

[1]: //github.com/aforensics/HiddenVM

extension: markdown

gha_language: HTML


text:
[![Build Status](https://travis-ci.com/Seeed-Studio/Seeed_Arduino_rpcWiFi.svg?branch=master)](https://travis-ci.com/Seeed-Studio/Seeed_Arduino_rpcWiFi)

Seeed Arduino rpcWiFi software library calls Seeed Arduino rpcUnified to implement WiFi function compatibility with Arduino-ESP32. To reduce the cost of using the software, you can import your favorite ESP32 wifi app directly, with minor changes, and then use it. You'll find that your favorite ESP32 app has 5G features, runs on ARM and other architectures.  Hope you like this software and let us know if you have any feedback.

### **Feature**

- Maximum Compatible with ESP32 wifi library
- Powered by Realtek RTL8720DN
- Dual Band 2.4Ghz / 5Ghz Wi-Fi (802.11 a/b/g/n)
- low power consumption

[**More detailed documentation**](https://wiki.seeedstudio.com/Wio-Terminal-Wi-Fi/)

## **License**

This software is written by seeed studio and is licensed under The MIT License. Check License.txt for more information.

Contributing to this software is warmly welcomed. You can do this basically by forking, committing modifications and then pulling requests (follow the links above for operating guide). Adding change log and your contact into file header is encouraged. Thanks for your contribution.

repository: egouvernante/sensorterminal-quickstart

repo_name: egouvernante/sensorterminal-quickstart


text:
# image-viewer
Simple image viewer that allows to upload images to AWS S3.

# install
Install dependencies:
```
npm install
```

Bundle:

```
webpack
```

Open `dist/index.html`.

# contributing
Feel free to contribute to this project and make it better, I'll respond quickly to pull requests.

repository: johnib/image-viewer

repo_name: johnib/image-viewer


text:
---
uid: Guides.ExceptionHandling
title: Exception handling
---

# Exception handling
Gw2Sharp aims to be as friendly as possible when unexpected status codes are received from the Guild Wars 2 API.
Whenever a request fails, a custom exception will be thrown for you to catch.

The following exceptions can be thrown from Gw2Sharp:
- [`RequestException`](../api/Gw2Sharp.WebApi.Exceptions.RequestException.html): An exception occured during the request
  - [`RequestCanceledException`](../api/Gw2Sharp.WebApi.Exceptions.RequestCanceledException.html): The request has been canceled
  - [`UnexpectedStatusException`](../api/Gw2Sharp.WebApi.Exceptions.UnexpectedStatusException.html): An unexpected HTTP status code was returned from the server
    - [`BadRequestException`](../api/Gw2Sharp.WebApi.Exceptions.BadRequestException.html) (400): The client sent an invalid request
      - [`ListTooLongException`](../api/Gw2Sharp.WebApi.Exceptions.ListTooLongException.html) (400): The list of requested resources is too long
      - [`PageOutOfRangeException`](../api/Gw2Sharp.WebApi.Exceptions.PageOutOfRangeException.html) (400): The requested page is out of range
    - [`AuthorizationRequiredException`](../api/Gw2Sharp.WebApi.Exceptions.AuthorizationRequiredException.html) (401, 403): The client is unauthorized
      - [`InvalidAccessTokenException`](../api/Gw2Sharp.WebApi.Exceptions.InvalidAccessTokenException.html) (401, 403): The access token is invalid
      - [`MissingScopesException`](../api/Gw2Sharp.WebApi.Exceptions.MissingScopesException.html) (403): The access token does not have the required scopes
      - [`MembershipRequiredException`](../api/Gw2Sharp.WebApi.Exceptions.MembershipRequiredException.html) (403): The user is not a member of the guild
      - [`RestrictedToGuildLeadersException`](../api/Gw2Sharp.WebApi.Exceptions.RestrictedToGuildLeadersException.html) (403): The user is not a leader of the guild
    - [`NotFoundException`](../api/Gw2Sharp.WebApi.Exceptions.NotFoundException.html) (404): The requested resource has not been found
    - [`TooManyRequestsException`](../api/Gw2Sharp.WebApi.Exceptions.TooManyRequestsException.html) (429): Too many requests have been issued in a short period of time
    - [`ServerErrorException`](../api/Gw2Sharp.WebApi.Exceptions.ServerErrorException.html) (500): The server encountered an error
    - [`ServiceUnavailableException`](../api/Gw2Sharp.WebApi.Exceptions.ServiceUnavailableException.html) (503): The server is temporarily unavailable

> [!TIP]
> As you can see, all custom exceptions inherit from `RequestException`.
> This makes it easier to have a generic catch-all statement for Gw2Sharp.
> However, certain exceptions may provide extra details as to why it has occured.
> If you need that information, it's recommended to catch the specific exceptions first, before the more generic ones.


text:
# kgalli VIM configuration and used plugins
This git repository contains my vim configuration file(s) which I use for daily work.

# General setup
Clone the configs repository. If you do not want to use https replacing https:// with git:// (ssh) protocol should also work.

```bash
cd $HOME
git clone https://github.com/kgalli/dev-bootstrap.git
```

## Automatic vim setup

The manual setup steps for linux can be executed at once using the install.sh script.

```bash
cd $HOME/dev-bootstrap/vim
./setup
```

## Manual vim setup

Symlink vim directory to ~/.vim

```bash
ln -nfs $HOME/dev-bootstrap/vim/ ~/.vim
```

Symlink vimrc configuration file to ~/.vimrc

```bash
ln -nfs $HOME/dev-bootstrap/vim/vimrc ~/.vimrc
```

Note: For Windows you have to copy the files into the user directory of your windows account (Windows 7: c:\Users\<username>\). Attention use vimfiles instead of .vim as VIM working directory and \_vim for .vim (\_vimrc for .vimrc) as configuration file. Otherwise it won't work.

### Plugins

Be aware that git://github.com/tpope/vim-pathogen.git is used to handle
vim plugins.

repository: kgalli/dev-bootstrap

repo_name: kgalli/dev-bootstrap


text:
---
title: Domain Storytelling
subtitle: Learn domain language. Talk about requirements. Tell domain stories.
date: 2018-11-07T20:41:32.665Z
authors:
  - hofstef
  - sherl0cks
area: discovery-loop-outcomes
icon: /images/dst_logo-1-.png
jumbotron: /images/dst_logo.png
jumbotronAlt: Domain Storytelling Logo
people: 2-20
time: 10-30 min per Domain Story
difficulty: moderate
participants:
  - moderator
  - domain experts
  - developers
  - product owner
  - business analysts
---
## What is it?

A workshop format that helps participants understand how people and/or software systems work together. Both existing or future state business processes can be analysed.

Domain Storytelling is driven by domain experts who share typical examples of how they work. These examples are known as Domain Stories. While listening, the moderator records the domain stories using a pictographic language, so domain experts can see immediately if the moderator understands their story correctly. The moderator guides the domain experts by asking questions, for example _who_ – _does what_ – _with what_ – _why_.

A Domain Story covers _one concrete example_. It shows something that _actually_ happens, rather than all things that could _possibly_ happen. After several stories, the participants are able to talk about the people, activities, tools, work objects, and events in that domain.
 Often, the conversation that was started with Domain Storytelling is later continued with [user stories](https://openpracticelibrary.com/practice/user-story-mapping/), example mapping, [event storming](https://openpracticelibrary.com/practice/event-storming/), etc.

## Why use it?

* learn about a new domain and pick up its language
* elicit requirements
* bridge gaps between departments
* find boundaries for (micro)services or bounded contexts ([domain-driven design](https://openpracticelibrary.com/practice/domain-driven-design/))
* show how new software systems will change current business processes

Domain Storytelling is versatile and can facilitation adapted for the purpose, for example:

* the level of detail (e.g. "big picture" or detailed workflows)
* the number of participants
* the tools (e.g pen & paper, sticky notes, digital modeling tools)

## Further Information

http://domainstorytelling.org

branch_name: refs/heads/staging


text:
# LocaMon project
[![Build Status](https://travis-ci.org/efiku/locamon.svg?branch=master)](https://travis-ci.org/efiku/locamon)

LocaMon is class which allow you to simple convert time into localized names.
For example month numbers into names.
```php
   $locaMon = new LocaMon();
   $monthNumber = 3;
   $timestamp = mktime(0,0,0,$monthNumber);

   $locaMon
    ->setLocale('pl_PL')
    ->setFormat('LLLL')
    ->setData($timestamp);

    echo $locaMon->getResult(); // marzec

```
About format: [datetime](http://userguide.icu-project.org/formatparse/datetime)

repository: efiku/locamon

repo_name: efiku/locamon


text:
# Slots Migration

Goals:
- Simple
- Fast

The migration process is based on the following Redis commands:
- SCAN
- DUMP
- PTTL
- RESTORE
- DEL

The SCAN command has a great property that
it can guarantee that all the keys set before the first SCAN command will finally be returned,
for multiple times sometimes though. We can perform a 3 stage migration to mimic the replication.

- Wait for all the commands to be finished by Redis.
- Redirect all the read and write operation to destination Redis.
  The destination Redis will need to dump the data of the key from the source Redis
  before processing the commands if the key does not exist.
- Start the scanning and forward the data to peer Redis.

## Detailed Steps
- The migrating proxy check whether the importing proxy
  has also received the migration task by a `PreCheck` command.
- The migrating proxy blocks all the newly added commands to `Queue`,
  and wait for the existing commands to be finished.
- The migrating proxy send a `TmpSwitch` command to importing proxy.
  Upon receiving this command,
  the import proxy start to process the keys inside the importing slot ranges.
  When the command returns, the migrating proxy release all the commands inside `Queue` and redirect them to the importing proxy.
- The migrating proxy use `SCAN`, `PTTL`, `DUMP`, `RESTORE`, `DEL`
  to forward all the data inside the migrating slot ranges to peer importing Redis.
  The `RESTORE` does not set the `REPLACE` flag.
- When the importing proxy processes commands, no matter read or write operation, it will first
  - If the command will not delete the key, get the `key lock`,
    - Send `EXISTS` and the processed command to local importing Redis,
      if `EXISTS` returns true, forward the command to the local importing Redis.
    - If `EXISTS` returns false,
      send `DUMP` and `PTTL`to migrating Redis to get the data,
      and `RESTORE` the data and forward the command to local Redis.
      Then finally forward the command to the local importing Redis.
  - If the command can possibly delete the key,
    get the `key lock` and
    send `UMSYNC` to the migrating proxy to let the migrating proxy
    use `DUMP`, `PTTL`, `RESTORE`, `DEL` to transfer the key to the importing proxy.
    Then finally forward the command to the local importing Redis
- When the migrating proxy finishes the scanning,
  it proposes the `CommitSwitch` to the importing proxy.
  Then the importing proxy will only need to process the command in local Redis.
- Notify `coordinator` and wait for the final commit by `UMCTL SETCLUSTER`.

## Why it's designed in this way.
The overall migration process is based on the following command `SCAN`, `PTTL`, `DUMP`, `RESTORE`, `DELETE`.
Only the `RESTORE` command is sent to importing server proxy, so for better performance,
this scanning and transferring should be executed in the migrating server proxy.

Since the scanning and transferring occupy a lot of CPU resource on both server proxy and Redis,
other workload should better be processed on the importing proxy.
So at the very beginning we transferred all the slots directly to the importing proxy.

At this point, the importing proxy still only have a small part of the data.
When it needs to process the commands on the newly added slots,
it needs to use `PTTL`, `DUMP`, `RESTORE` to pull the data from the migrating server proxy
before processing the requests.
It also need to send `DELETE` to remove the key.

Note that for any commands that won't delete the key,
it would still be correct to `RESTORE` multiple times for the same key since it's idempotent.
So just letting the importing proxy to pull the data won't cause any inconsistency.

But for those commands that could possibly remove the keys such as `DEL`, `EXPIRE`, `LPOP`,
just letting importing proxy pull the data could result in the following cases:
- The key get deleted
- There's another `RESTORE` command recovers the key.

So when pulling the data it needs to be isolated from
- Other `RESTORE` commands in the importing proxy.
- `SCAN` and `RESTORE` in the migrating proxy.

Thus we need key lock in the importing proxy,
and need the migrating proxy help us to send the data instead of pulling from the importing proxy
so that the operation for this key could only be processed in a sequential way.

## The Performance.
As a result, during the migration, the workload for the migrating and importing proxies is quite balanced.
The migrating proxy uses 130% of the CPU and the importing proxy uses 80% of the CPU.

And it only took **less a minute** to migrate 1G data.

In the test, during the migration while benchmarking,
the throughput reduces from 50k to 28k and gradually increases to 40k.
This is because the `SCAN`, `DUMP`, `RESTORE` costs a lot of throughput
in Redis in both the migrating and importing proxy.
But once the key get migrated to the importing server proxy,
it only need to send an additional `EXISTS` command before the request.

After committing the migration, the throughput will double.

repository: doyoubi/undermoon

gha_language: Rust

repo_name: doyoubi/undermoon


text:
# Building Documentation

To build the documentation, you will need to have [installed doxygen](https://www.doxygen.nl/download.html) (making it available on your path).
[The installation instructions](https://www.doxygen.nl/manual/install.html) could be helpful as well.
To check that doxygen is on your path, run this command and make sure it does not return an error:

    doxygen --version

Then run the command

	doxygen

or

    doxygen Doxyfile

in the `docs/` directory.

## Read the Docs

Read the Docs virtual machines read the [sphinx](https://www.sphinx-doc.org/) `conf.py` file and generate the documentation accordingly.
We have injected the call to doxygen into this file.
The doxygen binary is then executed in the docs directory and generates files in the `docs/html/` directory, replacing the generated sphinx html files with those build by doxygen.

The latest generated code documentation is available at https://omniphotos.readthedocs.io/en/latest/.

# Writing Documentation

## Getting started

In order to create a doxygen code stump, one can use the **Doxygen Comments** extension found in the Visual Studio online extension manager.
It is not necessary to use this, but it seems to be the easiest option:

<img src='images/vs_screenshot_1.png'/>

The extension will generate a stub whenever you type `/**` and press enter above a function, variable or class.

The stumps can be customized via Tools->Options and selecting Doxygen in the left-hand pane.

**Other Option:**
Use the Visual Studio Plugin **1-Click Docs**.
You can use the **1-Click Docs** extension to call `doxygen.exe` in Visual Studio.
For more information please refer to https://www.doxygen.nl/manual/starting.html.

There is a demo project (https://github.com/yuanmingze/codestyle_demo) for Doxygen use.

## Doxygen Conventions

### 1. C/C++

All documentation for classes should be located in the header files.

The convention that has been used for the documentation has been the javadoc style:

	/**
	* A brief history of JavaDoc-style (C-style) comments.
	*
	* This is the typical JavaDoc-style C-style comment. It starts with two
	* asterisks.
	*
	* @param theory Even if there is only one possible unified theory. it is just
	* a set of rules and equations.
	*/
	void cstyle(int theory);

The source code and further elaboration on this style can be found here:
https://www.doxygen.nl/manual/docblocks.html

Each class method should have a documentation string one line above it, as shown above.
The description for the function should be succinct and define what purpose of the function, the @param that are being used and why it is there.
If there is a @return value, this should be explained here as well.
The “@” symbol has been used to designate the fields.

Single line comments should be added before class variables as well:

	/** List of supported rendering methods. */
	std::vector<std::string> methods;

Note that for a class to appear as "documented" in the "Class Index" list and "Class Hiearchy" lists in Doxygen, one needs to add a `@brief` descriptor in the line directly before the class declaration (in the header).

	/**
	 * @brief This is a class for ...
	 */
	class MyClass
	{
	}
The `@brief` notation is not strictly necessary here, but might be important to be explicit.

### 2. Python

The convention of coding is based on the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html).

If you use Visual Studio Code, please refer to the official guide to configure the [automatic linting functionality](https://code.visualstudio.com/docs/python/linting).

repository: zhixiongzuo/OmniPhotos

repo_name: zhixiongzuo/OmniPhotos


text:
[![image](/images/f5_logo.png)](https://github.com/yangsec888/f5-admin)
=====================

- [Introduction](#introduction)
  - [What's F5 Configuration Object](#whats-f5-single-configuration-object)
  - [Where Are the Sample Code](#where-are-the-sample-code)
- [Example 1 - Fetch F5 Configuration](#example-1-fetch-f5-configuration)
- [Example 2 - Filter F5 Object](#example-2-filter-f5-object)
- [Example 3 - Deploy F5 object](#deploy-f5-object)
  - [A) Verify F5 objects](#a-verify-f5-objects)
  - [B) Deploy After Validation](#b-deploy-after-validation)
- [Example 4 - Deploy an ASM Policy](#example-4-deploy-an-asm-policy)
- [Want more?](#want-more)

---

## Introduction
Here you will find information on how to use some custom build utilities in the first hand. Before we start though, I want to review / warm-up on some basic F5 concepts.

### What's F5 Single Configuration Object
You can use the TMOS Shell (tmsh) to define all BIG-IP configuration elements in Single Configuration File or [SCF](https://support.f5.com/csp/article/K13408).  SCF is actually a plain text file with F5 special syntax for configuration definition. All native BIG-IP system configuration elements are defined in various SCFs. In addition, F5 module configuration / underlining OS(Linux) configuration /device trust certs are translated into SCFs and managed by F5. In a nutshell, SCF is the standard abstract configuration layer in F5 world.

Within the SCF, there are composed of F5 objects, I would call them Single Configuration Object (SCO). Examples of F5 SCOs can be found in a simple SCF below:
```
ltm node sam-1  {
    address xx.xx.224.50
}

ltm node sam-2  {
    address xx.xx.224.51
}

ltm pool sam-pool-3  {
    members {
        sam-1:https {
            address xx.xx.224.50
        }
        sam-2:https {
            address xx.xx.224.51
        }
    }
}

ltm virtual virt-svr-sam1  {
    description "test only"
    destination xx.xx.220.70:http
    ip-protocol tcp
    mask <IP_ADDRESS>
    pool sam-pool-3
    source <IP_ADDRESS>/0
    translate-address enabled
    translate-port enabled
    vlans {
        dev_int_vlan703
    }
    vlans-enabled
    vs-index 3
}
```
In the above example SCF, we're building a load balancer for a typical web server cluster behind F5. There are 4 F5 SCOs defined there, confined by the curly brackets. The first and second objects are F5 node; the third object is F5 pool; the last object is F5 virtual server. The configuration file have a [multi-layer structure](TREE.md), where the virtual server object contains the pool object; and the pool object contains node object.

From a programmer's perspective, the F5 security administrator's job is to build and maintain the F5 SCOs. Of course, the tasks can be easily accomplished by using the standard F5 web GUI. However, F5 Admin API provides a more direct and scalable alternative to get the job done programmatically.

### Where Are the Sample Code
There are some common tools bundled with this Python package. The tools are the best illustration on how we can use the API to manipulate SCFs within the F5 world. The tools can be found under the [source directory](/src/bin/).

In general, you can use the tool command switch "-h" to inquire about its usage, such as below:

```bash
$ f5-fetch -h
...
usage: f5-fetch [-h] [-l] [-n NODE] [-u USER] [-p PASSWORD [PASSWORD ...]]
                [-v] [-a] [-f FILE]

This program will retrieve F5 running configuration for you.

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            (Optional) List of available F5 configuration files
                        under the local cache directory.
  -n NODE, --node NODE  (Optional) Remote F5 hostname or IP address
  -u USER, --user USER  (Optional) F5 box logon user ID. Default to root.
  -p PASSWORD [PASSWORD ...], --password PASSWORD [PASSWORD ...]
                        (Optional) F5 box root password
  -v, --verbose         (Optional) Verbose mode
  -a, --all             (Optional) Fetech all the F5 running configuration in
                        the local cache directory.
  -f FILE, --file FILE  (Optional) File with list of F5 box as program input -
                        to be fetched.

```

## Example 1 - Fetch F5 Configuration
Fetch F5 running configuration file for the first time. It will be placed in your local file system as cache.

```bash
$ sudo f5-fetch -n xx-rhwebdev1 -u sli
Password:
...

Loading cache_config:  /Library/Python/2.7/site-packages/f5-0.0.5-py2.7.egg/f5/conf/xx-rhwebdev1/xx-rhwebdev1.txt
Loading complete
Fetch the running configuration on:  xx-rhwebdev1
Setting up remote SSH session to host: xx-rhwebdev1
Please enter the F5 password:
Execution on the remote SSH host:  list
Command execution complete.

F5 running configuration is saved to file:  /Library/Python/2.7/site-packages/f5-0.0.5-py2.7.egg/f5/conf/xx-rhwebdev1/xx-rhwebdev1.txt
```

## Example 2 - Filter F5 Object
Filter out interesting F5 running configuration objects. This will be done from your command line by working on the cache file:

```bash
$ f5-get -n xx-gtmprd1 -f1 corpdir.mask.com
...
Parsing the f5 running configurations ...
Parsing done.

Total Number of Top Level objects: 210
Filtering F5 objects ...
Filtering done.

Found Total Number of Filtered objects: 2
gtm pool a corpdir.mask.com-int {
 alternate-mode global-availability
 fallback-mode none
 load-balancing-mode topology
 members {
 xx-rhwebprd:/Common/corpdir-http-int {
 member-order 0
 }
 xx-rhwebprd:/Common/corpdir-http-int {
 member-order 1
 }
 }
}
gtm wideip a corpdir-int.glb.mask.com {
 pools {
 corpdir.mask.com-int {
 order 0
 }
 }
}

All done. Bye!
```

## Example 3 - Deploy F5 object
The object(s) could be defined in a configuration file. Then the configuration file can be deployed from your workstation.

Note that when you exam your object definition, please make sure all references are already properly defined / deployed. Or the F5 will throw out the exception during the deployment.

### A) Verify F5 objects
It's a good idea to test the integrity of your configuration object(s), by using the F5 build-in integrity checker. A dry run example is illustrated below:

```bash
$ f5-put -r -n xx-rhwebdev1 -p MASKED -f f5/src/inc/splunk-log.inc

Execute shell command: sshpass -p MASKED scp -q f5/src/inc/splunk-log.inc root@xx-rhwebdev1:/var/tmp/splunk-log.inc
Parsing the f5 running configurations ...
Parsing done.

Setting up remote SSH session to host: xx-rhwebdev1
Execution on the remote SSH host: tmsh load sys config verify file /var/tmp/splunk-log.inc

Task complete.

Validating system configuration...
 /defaults/asm_base.conf
 /defaults/config_base.conf
 /defaults/ipfix_ie_base.conf
 /defaults/ipfix_ie_f5base.conf
 /defaults/low_profile_base.conf
 /defaults/low_security_base.conf
 /defaults/policy_base.conf
 /defaults/wam_base.conf
 /defaults/analytics_base.conf
 /defaults/apm_base.conf
 /defaults/apm_saml_base.conf
 /defaults/app_template_base.conf
 /defaults/classification_base.conf
 /var/libdata/dpi/conf/classification_update.conf
 /defaults/urlcat_base.conf
 /defaults/daemon.conf
 /defaults/pem_base.conf
 /defaults/profile_base.conf
 /defaults/sandbox_base.conf
 /defaults/security_base.conf
 /defaults/urldb_base.conf
 /usr/share/monitors/base_monitors.conf
 /usr/local/gtm/include/gtm_base_region_isp.conf
 /usr/share/monitors/gtm_base_monitors.conf
Validating configuration...
 /var/tmp/splunk-log.inc
Execution on the remote SSH host: rm -rf /var/tmp/splunk-log.inc

Task complete.

All done. Bye!
```
If you see any error message from the above dry run, you might want to go back to your configuration file. Exam and correct the error before next dry run.

### B) Deploy After Validation
Once the object(s) are properly verified from the above step, it'll be safe to be deployed:
```bash
$ f5-put -n xx-rhwebdev1 -p MASKED -f f5/src/inc/splunk-log.inc

Execute shell command: sshpass -p MASKED scp -q f5/src/inc/splunk-log.inc root@xx-rhwebdev1:/var/tmp/splunk-log.inc
Parsing the f5 running configurations ...
Parsing done.

Setting up remote SSH session to host: xx-rhwebdev1
Execution on the remote SSH host: tmsh load sys config merge file /var/tmp/splunk-log.inc

Task complete.

Loading configuration...
 /var/tmp/splunk-log.inc
Execution on the remote SSH host: tmsh save /sys config partitions all

Task complete.

Saving running configuration...
 /config/bigip.conf
 /config/bigip_base.conf
 /config/bigip_user.conf
Execution on the remote SSH host: rm -rf /var/tmp/splunk-log.inc

Task complete.

All done. Bye!
```

## Example 4 - Deploy an ASM Policy
The ASM policy file should be in the XML format, residing in your local file system. This could be the ASM policy exported from a different F5 node. Or it could be an enhance policy file being pushed back to the same F5 node.

```bash
$ asm_put -n xx-rhwebdev1 -f wordpress_template_08232018.xml

...
Policy name:  wordpress_template
File path:  /var/tmp/wordpress_template_08232018.xml
Setting up remote SSH session to host: xx-rhwebdev1
Please enter the F5 root password:
Execute shell command:  sshpass -p MASKED scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q wordpress_template_08232018.xml root@xx-rhwebdev1:/var/tmp/wordpress_template_08232018.xml
Execution on the remote SSH host:  tmsh load asm policy wordpress_template overwrite file /var/tmp/wordpress_template_08232018.xml

Task complete.

Execution on the remote SSH host:  tmsh modify asm policy wordpress_template active

Task complete.

Execution on the remote SSH host:  rm -rf /var/tmp/wordpress_template_08232018.xml

Task complete.

All done. Bye!
```

## Want more?
Want to explore more from here? You can find more information of the [API document](/API.md).


text:
---
layout: post
title: Unsupervised Gene Clustering of Grape Berries While Ripening
category: analysis
---

Grape berry development is a dynamic process that involves a complex series of molecular genetic and biochemical changes. In this blog, we will do an unsupervised clustering using expression profile of grapes while ripening.

### Dataset

The dataset I am using is from a microarray experiment monitoring 16604 gene expression profile in whole fruit tissues of Cabernet Sauvignon grape berry while ripening over 112 days. You can download the dataset [here](https://github.com/jinzhenfan/jinzhenfan.github.io/tree/master/scripts/Clustering/Deluc_Grapes_Dataset1.txt). This data set contains 16604 rows and 8 columns. Each row contains gene expression profile of one particular gene on 7 specific days(21th, 42th, 49th, 56th, 63th, 84th, and 112th). The first row in the file is the header (geneID/days in time series). The paper that describes the methods and results is can be found [here](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2220006/)(Deluc2007).

There are several tool boxes to perform clustering, including the open source clustering software Cluster 3.0, which uses a Perl script for clustering that can be found here:
[http://bonsai.hgc.jp/~mdehoon/software/cluster/software.htm](http://bonsai.hgc.jp/~mdehoon/software/cluster/software.htm)
or WEKA, a collection of machine learning algorithms for data mining in Java that can be found here:
[http://www.cs.waikato.ac.nz/ml/weka/](http://www.cs.waikato.ac.nz/ml/weka/)

### Unsupervised Clustering Tools

For this exercise we will use the R statistical programming language and Bioconductor. The package "cluster" that we are using here is part of Bioconductor includes several methods for unsupervised clustering. We can use one of the methods _agnes_, _diana_ and
_mona_ to perform hierarchical clustering and the methods _pam_, _clara_ and _fanny_, to perform partitioning (non-hierarchical clustering). The reference manual for the package is under cluster.pdf and can be accessed from:

[http://cran.r-project.org/web/packages/cluster/index.html](http://cran.r-project.org/web/packages/cluster/index.html)

### Non-hierarchical Clustering/Partitioning of Genes During Berry Development

We use _pam_ to cluster the Deluc_Grapes_Dataset1, for number of clusters k=5,10,20.

Below is my R script of calling the pam methods:

```r
library("cluster")
raw.data <- read.table("Deluc_Grapes_Dataset1.txt", sep="\t",header= TRUE, skip=1)
head(raw.data)
dim(raw.data)
k<-5
head(raw.data)
pamx<-pam(raw.data[,-1],k)
pamx
summary(pamx)
plot(pamx)
```

Below is the overview of clustering with a serie of cluster numbers.

k=5
![alt text](https://rawgit.com/jinzhenfan/jinzhenfan.github.io/master/images/clustering/k5.png)

k=10
![alt text](https://rawgit.com/jinzhenfan/jinzhenfan.github.io/master/images/clustering/k10.png)

k=20
![alt text](https://rawgit.com/jinzhenfan/jinzhenfan.github.io/master/images/clustering/k20.png)

### Results and Future works

In this [link](https://github.com/jinzhenfan/jinzhenfan.github.io/blob/master/scripts/Clustering/Q3-1.docx) I report (a) the top 3 genes, (b) the cluster center, and (c) the number of genes in the cluster for a pivot study of gene expression profiles during grape ripening. Future works will include hierarchical clustering methods, and use BIC or AIC to calculate the number of clusters that optimize the objective functions.

url: https://raw.githubusercontent.com/jinzhenfan/jinzhenfan.github.io/63c2e2404693d6f1f8ebf033c563b0239421a2ce/_posts/2016-10-25-Unsupervised Gene Clustering of Grape Berries While Ripening.md


text:
#node-postgres

[![Build Status](https://secure.travis-ci.org/brianc/node-postgres.png?branch=master)](http://travis-ci.org/brianc/node-postgres)

PostgreSQL client for node.js.  Pure JavaScript and native libpq bindings.

## Installation

    npm install pg

### Windows

 1. Install Visual Studio C++ (successfully built with Express 2010). Express is free.
 2. Add your Postgre Installation's `bin` folder to the system path (i.e. `C:\Program Files\PostgreSQL\9.3\bin`).
 3. Make sure that both `libpq.dll` and `pg_config.exe` are in that folder.
 4. `npm install pg`

## Examples

### Client pooling

Typically you will access the PostgreSQL server through a pool of clients.  node-postgres ships with a built in pool to help get you up and running quickly.

```javascript
var pg = require('pg');
var conString = "postgres://username:password@localhost/database";

pg.connect(conString, function(err, client, done) {
  if(err) {
    return console.error('error fetching client from pool', err);
  }
  client.query('SELECT $1::int AS number', ['1'], function(err, result) {
    //call `done()` to release the client back to the pool
    done();

    if(err) {
      return console.error('error running query', err);
    }
    console.log(result.rows[0].number);
    //output: 1
  });
});

```

### Simple

Sometimes you may not want to use a pool of connections.  You can easily connect a single client to a postgres instance, run a query, and disconnect.

```javascript
var pg = require('pg');
//or native libpq bindings
//var pg = require('pg').native

var conString = "postgres://username:password@localhost/database";

var client = new pg.Client(conString);
client.connect(function(err) {
  if(err) {
    return console.error('could not connect to postgres', err);
  }
  client.query('SELECT NOW() AS "theTime"', function(err, result) {
    if(err) {
      return console.error('error running query', err);
    }
    console.log(result.rows[0].theTime);
    //output: Tue Jan 15 2013 19:12:47 GMT-600 (CST)
    client.end();
  });
});

```

## Documentation

Documentation is a work in progress primarily taking place on the github WIKI

### [Documentation](https://github.com/brianc/node-postgres/wiki)

## Native Bindings

node-postgres contains a pure JavaScript driver and also exposes JavaScript bindings to libpq.  You can use either interface.  I personally use the JavaScript bindings as they are quite fast, and I like having everything implemented in JavaScript.

To use native libpq bindings replace `require('pg')` with `require('pg').native`.  If you __do not__ need or want the native bindings at all, consider using [node-postgres-pure](https://github.com/brianc/node-postgres-pure) instead which does not include them.

The two share the same interface so __no other code changes should be required__.  If you find yourself having to change code other than the require statement when switching from `pg` to `pg.native` or `pg.js`, please report an issue.

## Features

* pure JavaScript client and native libpq bindings share _the same api_
* optional connection pooling
* extensible js<->postgresql data-type coercion
* supported PostgreSQL features
  * parameterized queries
  * named statements with query plan caching
  * async notifications with `LISTEN/NOTIFY`
  * bulk import & export with `COPY TO/COPY FROM`

## Contributing

__I love contributions.__

You are welcome contribute via pull requests.  If you need help getting the tests running locally feel free to email me or gchat me.

I will __happily__ accept your pull request if it:
- _has tests_
- looks reasonable
- does not break backwards compatibility
- satisfies jshint

Information about the testing processes is in the [wiki](https://github.com/brianc/node-postgres/wiki/Testing).

If you need help or have questions about constructing a pull request I'll be glad to help out as well.

## Support

If at all possible when you open an issue please provide
- version of node
- version of postgres
- smallest possible snippet of code to reproduce the problem

Usually I'll pop the code into the repo as a test.  Hopefully the test fails.  Then I make the test pass.  Then everyone's happy!

If you need help or run into _any_ issues getting node-postgres to work on your system please report a bug or contact me directly.  I am usually available via google-talk at my github account public email address.

I usually tweet about any important status updates or changes to node-postgres.
Follow me [@briancarlson](https://twitter.com/briancarlson) to keep up to date.

## Extras

node-postgres is by design _low level_ with the bare minimum of abstraction.  These might help out:

- [brianc/node-pg-query-stream](https://github.com/brianc/node-pg-query-stream) - Query results from node-postgres as a readable (object) stream
- [brianc/node-pg-cursor](https://github.com/brianc/node-pg-cursor) - Query cursor extension for node-postgres
- [brianc/node-pg-copy-streams](https://github.com/brianc/node-pg-copy-streams) - COPY FROM / COPY TO for node-postgres. Stream from one database to another, and stuff.
- [brianc/node-postgres-pure](https://github.com/brianc/node-postgres-pure) - node-postgres without any of the C/C++ stuff
- [brianc/node-pg-types](https://github.com/brianc/node-pg-types) - Type parsing for node-postgres
- [Suor/pg-bricks](https://github.com/Suor/pg-bricks) - A higher level wrapper around node-postgres to handle connection settings, sql generation, transactions and ease data access.
- [grncdr/node-any-db](https://github.com/grncdr/node-any-db) - Thin and less-opinionated database abstraction layer for node.
- [brianc/node-sql](https://github.com/brianc/node-sql) - SQL generation for node.js
- [hiddentao/suqel](https://hiddentao.github.io/squel/) - SQL query string builder for Javascript
- [CSNW/sql-bricks](https://github.com/CSNW/sql-bricks) - Transparent, Schemaless SQL Generation

## Production Use
* [yammer.com](http://www.yammer.com)
* [bayt.com](http://bayt.com)
* [Vendly](http://www.vend.ly)
* [SaferAging](http://www.saferaging.com)
* [CartoDB](http://www.cartodb.com)
* [Heap](https://heapanalytics.com)
* [zoomsquare](http://www.zoomsquare.com/)
* [WhenToManage](http://www.whentomanage.com)

_If you use node-postgres in production and would like your site listed here, fork & add it._

## License

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

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

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

repository: grahamjenson/yeahnah

gha_language: CoffeeScript

repo_name: grahamjenson/yeahnah


text:
![Heat Ledger logo](http://i.imgur.com/rvQ8XR4.png "Heat Ledger logo")

# Heat Ledger Client Framework
In this `README` you will find step by step instructions to get up and running developing **heat-ui** applications.
Heat-ui framework is a complete end to end development setup.

In heat-ui you find:

- **Visual Studio Code** configuration and setup
- **TypeScript** configuration for Visual Studio Code
- Full **code completion** for all Angular, Angular Material and all our own code
- **Gulp development and build** setup
- **Gulp TypeScript** configurations
- Local **development server** TypeScript bindings
- TypeScript client side services
  1. **cryptography**
  2. networking, **real-time push pull and pubsub**
  3. byte/binary support (**object mappers**)
  4. **user/key** management
  5. **settings** framework (with ui bindings)
  6. create, inspect or verify **HEAT Ledger transactions**
- UI components
  1. **real-time update** on web socket events
  2. **advanced dialog support** (standard, input, multi page wizard)
  3. **auto complete** support (see server results as you type)
- Angular Material and the **Google Material Design** rules
- Coded in **Angular 2 style** :sunglasses:
- **Bootstrapper** that injects Angular 2 compatible `Component`, `Service`, `Inject` (and others) TypeScript decorators.
- High **compatibility with Angular 2** through our very own **Angular 1 to Angular 2 bridge**

## Note

At Heat Ledger Ltd we currently do our client and server development on Debian/Ubuntu desktops, we find it to be an excellent open source free! and secure platform. While we try and help new developers coming to heat-ui as best as possible, it is unfortunately not possible to include detailed step by step instructions for platforms that are not Debian based. Looking at you here Windows and Mac.

In time it is our goal to include detailed step by step instructions for all platforms. So if you are using heat-ui and you are on Windows or Mac? Please be so kind to record the steps that it involved and provide those to us so we can share them with any other new user/developer that comes after you.

That said, we will be including links to documents describing the various steps for all supported platforms.

## Installation

To get started developing heat-ui applications you really need your own copy of heat-ui. Easiest is to simply git clone the repo. This way you have everything in place to share back changes you made to heat-ui and to easily download upstream changes to heat-ui to your local development copy.

To clone heat-ui to your own machine open a terminal and `cd` to where you want your heat-ui folder to appear. Now type the following to clone heat-ui.

`git clone https://github.com/Heat-Ledger-Ltd/heat-ui.git`

### Visual Studio Code

Visual Studio Code is a Microsoft Open Source project that provides you with a cross platform (Windows, Linux, Mac) free advanced development suite. It offers a file explorer, debugging support, git integration and excellent support for the Open Source Microsoft TypeScript language.

![VS Code screenshot](http://i.imgur.com/43Yp5zV.png "VS Code screenshot")

One of the main reasons why creating applications with heat-ui goes so fast is because of the powerfull tooling provided by Visual Studio Code and it's of TypeScript. Unlike any other Javascript application you've made before, through VS Code we get the same productivity boost one finds when using an IDE for Java, C++, C# or any other strongly typed language.

Please go ahead to https://code.visualstudio.com and install the latest version for your platform.

### Node-JS

Heat-ui makes extensive use of nodejs. We use if for dependency managemnt, to power our builds and to assist in development through auto-recompiling and to power up your local development server.

Complete installation instructions for nodejs are out of the scope of this document since those instructions depend largely on the platform you are on.

Windows and Mac users please look at anyone of these links:

- https://www.google.com/search?q=how+to+install+nodejs (GIYF)
- https://howtonode.org/how-to-install-nodejs

Debian/Ubuntu users please follow these steps

```
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
```

### Gulp

Heat-ui uses http://gulpjs.com/ as its main build tool, we prefer gulp over its rivals because of the speed it offers. The streaming and paralel architecture of gulp allows us to perform builds almost instantly, together with the strong error checking in Visual Studio Code and the instant feedback development goes a lot faster than standard JavaScript apps.

Follow these steps to install gulp requirements.

```
npm install --global gulp-cli
```

### Auto install dependencies

Now that you have nodejs, npm and gulp installed we can initialize all heat-ui development tools and dependent libraries by running the provided `package.json` with npm.

Installing the dependencies

```
cd /my/path/to/heat-ui
npm install
```

The initial installation of all dependencies could take a while, several minutes.

### Start the development server

Heat-ui comes with a fully configured development server, the server auto compiles from TypeScript to Javascript whenever you change a file. The development server allows you to access your compiled app at a localhost address, straight from your browser. Hit refresh to load your latest changes.

To start the development server

```
cd /my/path/to/heat-ui
gulp play
```

Now to access your app go to

http://localhost:9001/dist

We recommend using Goolgle Chrome Debugger which comes with Chrome to inspect any running code. Since browsers don't understand TypeScript it had to be compiled to JavaScript. To still be able to find the TypeScript line on which a JavaScript error occured, the console uses source maps that map the TypeScript to the JavaScript.

### Building desktop versions

Heat-ui uses Electron from Github to provide users with an installable desktop application. Electron and therefor heat-ui works on all modern operating systems. (Fun fact, Visual Studio Code is also built on Electron).

To build the actual desktop releases we use https://github.com/electron-userland/electron-packager. Note that you need Node.js > 4.0 to use electron-packager.

Examples:

```
# To build a windows package
$ electron-packager ./dist --platform=win32 --arch=x64

# To build a linux package
$ electron-packager ./dist --platform=linux --arch=x64
```

### Native operating system installer/updater

Heat-ui desktop edition comes with installers for Windows, Mac and Linux.

https://github.com/electron-userland/electron-builder

```
npm install electron-builder --save-dev
```

When building on Linux look here for dependencies https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux

### Links

https://github.com/sindresorhus/awesome-electron.

*To be continued..*

repository: polinom/heat-ui

repo_name: polinom/heat-ui


text:
# MyEMS Admin

## Introduction
MyEMS 系统管理面板，用于项目配置和系统管理
Providing admin panel  for MyEMS system administration and configuration

## Prerequisites
nginx-1.18.0 or later

## Option 1: Install on NGINX Server

* Install NGINX Server

refer to http://nginx.org/en/docs/install.html

* Configure NGINX
```
$ sudo nano /etc/nginx/nginx.conf
```
In the 'http' section, add some directives:
```
http{
    client_header_timeout 600;
    client_max_body_size 512M;
    gzip on;
    gzip_min_length 512;
    gzip_proxied any;
    gzip_types *;
    gzip_vary on;
    ...

}
```

Add a new 'server' section with direstives as below:
```
  server {
      listen                 8001;
      server_name     myems-admin;
      location / {
          root    /var/www/html/admin;
          index index.html index.htm;
      }
      -- To avoid CORS issue, use Nginx to proxy myems-api to path /api
      -- Add another location /api in 'server ', replace demo address http://<IP_ADDRESS>:8000/ with actual url
      location /api {
          proxy_pass http://<IP_ADDRESS>:8000/;
          proxy_connect_timeout 75;
          proxy_read_timeout 600;
          send_timeout 600;
      }
  }
```

* Download myems
```
$ cd ~
$ git clone https://github.com/MyEMS/myems.git
```

* Install myems-admin :
  If the server can not connect to the internet, please compress the myems/admin folder and upload it to the server and extract it to ~/myems/admin
```
$ sudo cp -r ~/myems/admin  /var/www/html/admin
$ sudo chmod 0755 -R /var/www/html/admin
```
  Check the config file and change it if necessary:
```
$ sudo nano /var/www/html/admin/app/api.js
```

## NOTE:
The 'upload' folder is for user uploaded files. DO NOT delete/move/overwrite the 'upload' folder when you upgraded myems-admin.
```
 /var/www/html/admin/upload
```

## Option 2: Install on Apache2 Server
* Install Apache2 Server

refer to https://httpd.apache.org/docs/2.4/install.html

* Configure Apache2
```
  $ sudo vi /etc/apache2/ports.conf
```
Add a Listen
```
Listen 8001
```
```
$ sudo vi /etc/apache2/sites-available/000-default.conf
```
Add a new 'VirtualHost' as below
```
<VirtualHost <IP_ADDRESS>:8001>
        ServerAdmin MyEMS-admin
        DocumentRoot /var/www/admin

        <Directory "var/www/admin">
                Options FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```

* Download myems-admin
```
$ cd ~
$ git clone https://github.com/MyEMS/myems.git
```

* Install myems-admin :
  If the server can not connect to the internet, please compress the myems/admin folder and upload it to the server and extract it to ~/myems/admin
```
$ sudo cp -r ~/myems/admin  /var/www/html/admin
$ sudo chmod 0755 -R /var/www/html/admin
```
  Check the config file and change it if necessary:
```
$ sudo nano /var/www/html/admin/app/api.js
```

repository: RichardZhong/myems-carbon

repo_name: RichardZhong/myems-carbon


text:
this is a simple [maubot](https://github.com/maubot/maubot) plugin which interacts with a [matrix-registration](https://github.com/zeratax/matrix-registration) deployment and generates invite tokens.

###Warning
this bot currently only works with matrix-registration versions 0.7.x. Newer implementations (currently in development as of this comment) use different api endpoints and logic, and I haven't written those changes into this code. PRs are welcomed!

modify the config to point to your matrix-registration url, include your admin secret to authenticate, and ensure that you're in the list of approved users.

once your bot is running, simply use the command

    !invite generate

to generate a token with some generic text you can copy-paste when sharing it with your invitee!

to check the status of a specific token, use

    !invite status MyTokenName

and similarly to list all tokens in the database, use

    !invite list

to revoke a token, use

    !invite revoke MyTokenName

please note: i haven't made the json output of those responses pretty. sorry not sorry.

repository: miniconfig/maubot-invite

repo_name: miniconfig/maubot-invite


text:
# semantic-release

![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)
![github-actions](https://github.com/caos/semantic-release/workflows/Release/badge.svg)

## What is it

We often use `semantic-release` in differents `CI systems` like `Gitlab` & `Github`. In order to reduce the effort of setting up and maintaining a lot of pipelines, we use this image as starting point for `semantic-release`.

## How to use

Nothing simpler than this. Just run `docker run docker.pkg.github.com/caos/semantic-release/semantic-release:latest semantic-release`.
The last command `semantic-release` is important. Because the `entrypoint` in the docker images points to `npx`.

### Gitlab CI

You can use the image as stage e.g `version`. We usualy use the `only: - branches` option so that it not triggers itself.
To run it, simply pass `npx semantic-release` along.

```yaml
semantic_release:
  stage: version
  image: docker.pkg.github.com/caos/semantic-release/semantic-release:latest
  only:
    - branches
  script:
    - npx semantic-release
```

### Github Actions

To use this this image with `Github Actions` you can create a `step` which invokes the command `npx semantic-release` within the image.

```yaml
jobs:
  semantic-release:
      runs-on: ubuntu-18.04
    steps:
    - name: Source checkout
      uses: actions/checkout@v1
    - name: Create Version
      uses<EMAIL_ADDRESS>    - name: Check if Version Tag is available
      if: env.CAOS_NEXT_VERSION == ''
      run: exit 1
```

For `--dry-run` just pass the argument to substitute the `CMD` command from the image.

```yaml
jobs:
  semantic-release:
      runs-on: ubuntu-18.04
    steps:
    - name: Source checkout
      uses: actions/checkout@v1
    - name: Create Version
      uses<EMAIL_ADDRESS>      args: "semantic-release --dry-run"
```

If you would like to use the generated version in later steps, just use the env. var `$CAOS_NEXT_VERSION` with the `.releaserc.js` example below.

```js
module.exports = {
    branch: 'master',
    plugins: [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
        "@semantic-release/github",
        ["@semantic-release/exec", {
            "prepareCmd": "echo '::set-env name=CAOS_NEXT_VERSION::v${nextRelease.version}'"
            }],
    ]
  };
```

## License

As usual Apache-2.0 see [here](./LICENSE)

repository: caos/semantic-release

gha_language: JavaScript

repo_name: caos/semantic-release


text:
---
id: 106
title: 'How much does living in Bangkok cost? Figures inside…'
excerpt: I would say, that you can live comfortably with around 700 EUR per month. But it really depends on your lifestyle.
date: 2017-05-30T07:13:50+00:00
author: viliam
layout: post
guid: http://vili.am/?p=106
permalink: /living-in-bangkok-cost/
swp_pinterest_image_url:
  - ""
swp_cache_timestamp:
  - "421679"
img: living.jpg
categories:
  - travel
  - living abroad
---
It has been more than a month here already.

And I think this may be interesting. Especially for people living on a budget. But hey, guys, I am one of you. Still working my way up. Started from Brezno, now I am here (one very good player said this, haha)

# Condominium? Never heard of that pokémon

I live in a condominium. Maybe you know what it is.

But in case you do not. It is like a flat. But there is also a lobby down there. So I think it has higher security and also many other advantages, which I am going to tell you in a sec.

Ok so I live in a studio flat. Cannot tell you the area (Google translate gives me this word, lol). But it is pretty small. I would say just enough for one Eastern European guy, lol.

So I sleep, eat and work in the same room. This may not be good for some people. But it works for me pretty well.

And obviously there is a bathroom with a shower.  Yeah, we consider ourselves as highly evolved species but most of us still do not use water after toilet, lol.

Haha, and we smile when we see this squatting toilets. Well, they exist for some reason. But I am gonna write an article about it later. Back to the topic.

# But how much do you pay for the rent?

Just for the rent I pay: 12 000 THB (~ 315 EUR)

Electricity+water: about 2 000 THB (~ 52 EUR)

Internet: 800 THB (~ 21 EUR)

Ok so total price is around **400 EUR** per month.

I think it is a very good price.

Oh and I live in a area that is very close to city center. But I may be wrong on this one, cause I have never been there, lol.

You can definitely find a rent for half the price, or maybe even 1/4 of the price. But it is like living on a village then. You would live like 30 kilometers from the downtown, lol.

I do not think it is convenient, cause there is nothing to do at suburbs.

# You gotta eat something!

Haha, this is a tough one, cause I have never calculated this one actually.

Ok, but I can make some approximations, I guess.

I used to eat street food, but I stopped eating it regularly, cause I do not think it is very healthy.

 Not saying that I do not eat it at all.  But just from time to time, haha.

So I have been cooking for myself most of the time and lets say you can live with prices similar to Slovakia.

I would say it ranges between 100-200 EUR. Obviously depends on your metabolism, will, goals and idk what else.

I want to gain some weight, so I eat like champion. But I am getting kind of bored and exhausted by cooking, so I am looking for some alternatives now.

When I eat the street food/at food court, the prices are something like this:

soup: 40-50 baht. And they have a ton of soups out there!

rice+something (and something could be really anything, lol): 50-80 baht

Man, I am really tired of calculating this, haha. Lets just stick with simple math: 1 EUR is about 36 baht. So lets say 100 baht is ~3 EUR. Yeah and you can go from here.

When you are sick and tired of asian foods, you can get some western meals, for sure. But it is kind of pricy compared to local cuisine.

But man, I can tell you, that you cannot eat Thai food all the time, haha.

So you can get Pizza, Kebap, Tacos, Nachos, Sushi and everything you can imagine. Not sure about prices here, cause I ate this just once. Next time I am gonna write them prices down.

# Prices of groceries right here

Ok, lets keep this simple.

Dairy products are super expensive, cause they are imported. And everything what is imported is super expensive. Opposite to my home country (everything who has at least average IQ knows which one makes more sense).

2 litres of milk is: ~100 baht

cheese: no idea, never had it here, haha

chicken breast: 99 baht for 1 kg

peanut butter: 200 baht for 500 g

beer: it depends. Hoe Gaarden is 130 baht for 330 ml (super expensive, lol). But you got these local beers which are like 50-60 baht for 500-620ml. And they are kind of good.

Most famous local brands are: Leo, Singha, Chang. And everybody prefers something else. I have no clue which one rocks, haha. I just go with the feeling.

# Staff in stores is very, very, very polite and nice

And you know what? They also pack all of your groceries into a bag for you! This, for me, guy from Slovakia, was like – WOW, I am staying here, haha. It is like a paradise.

But when you want to find something, prepare for some adventure. They speak little to no english. At least from my experience.

So I learned it the hard way, haha. And I realized it is easier to ask my friend Google translate. Or asking people who look european, american or anything else than local is a good idea as well. Cause there is a big chance they speak english and also a big chance that they know where is the product you need.

# Do they even have “normal” stores?

Man, I have been shopping to Tesco, haha.

It is actually called Tesco LOTUS.

And it is Tesco as any other Tescos out there.

You can also go to these 24/7 stores. It is basically a non stop shop.

For people like me – when I want to buy a beer+chips at 2am, no problem, haha,

Their names are: Family Mart and Seven Eleven. I heard that Seven Eleven is better, and I really believe it is. But man, it is on the other side of the road, so I just stick with Family Mart.

Well, now you will think – omg, this boy is so lazy. Well, try to cross the road when it has 6 lines for cars and there is no zebra crossing 😀

# Drinking, clubbing…

Beer is about 100 baht.

Shots or cocktails? No friggin idea man, never had it in a club.

Entrance fees: it depends. Some are free. But better clubs want about 300 baht entrance fee.

And there is also this district called Thonglor. I think it has the most fancy clubs in Bangkok (I may be wrong, haha) but it is like a Monte Carlo.

 Literally! Trust me on that one.

Super rich Mercedes, Lambo, Ferrari, Porsche and idk what else. Cause I am as good with cars as I am with hungarian language. And man I can just swear in hungarian, haha.

# Total figures

Too lazy to count it, but lets say that you need about 700 EUR approximately to live okay.

Obviously if you wanna travel and live like a king it is a different story. But about this later. Cause I am still just a homeboy, man.

With something like 1000 EUR a month you can live like a semiking.


text:
Usage
=====

If using version 0.5.11 of RPi.GPIO you must run tests with sudo

   sudo nosetests -v

If using version 0.6x of RPi.GPIO sudo is no longer required to access the GPIO
on Raspbian Jessie.  Seems to still me needed on Wheezy.  Your mileage may vary.

To use nose on Python3 try the following

    python3 -m "nose" -v

NOTE: You must  adapt your TRIG_PIN and ECHO_PIN setup in sensor_tests


text:
---
layout: post
title:  "ConfigMgr: Task sequence error 0x00004005 when using USMT"
date:   2014-06-09 22:00:00 +0000
categories: ConfigMgr
tags: [configmgr, tasksequence, usmt]
---

If you are using USMT in your SCCM task sequence and receive error 0x00004005 when it requests the state store, then you will want to read this.

Here’s a strange one that took me a while to figure out.  I was incorporating USMT into a new task sequence and it kept failing right at the start of the USMT section: ‘Request State Store’ where it would hang for a couple of minutes until it timed out and presented me with the error: 0x00004005

![1-8](/assets/images/1-8.PNG)

I checked the *smsts.log* on the client computer and could see where it had tried the computer account and failed on credentials (as expected), and then said that it was about to try the Network Access account.  When it did so, it showed the error: ‘Cannot connect to *http//servername SMP root share.*‘  No mention of credentials being wrong.

What’s more, to contradict that error, I could manually connect to the SMP share that the log was whining about using the Network Access Account.

I had tried resetting the Network Access account password, removing the SMP role and adding it back, rebooting the server and the perusal of several log files as well as trying drastic things out such as giving excessive permissions to the Network access account just to rule it out.  Even Google couldn’t help me.

The solution – and it took a while for me to figure this one out, was that I was trying this all out in Hyper-V.  It suddenly dawned on me that I had not tried to run the task sequence on a real ie physical computer and as soon as I did –  bingo!  Success!

---

**Get my books:**

[ConfigMgr - An Administrator's Guide to Deploying Applications using PowerShell](https://leanpub.com/configmgr-DeployUsingPS)

---

"Understanding Microsoft Intune: Deploying Applications Using PowerShell" is available for purchase at all good book stores and online outlets. Don't miss out on the opportunity to take your application deployment skills to the next level. Get your copy today!

[Amazon.co.uk](https://www.amazon.co.uk/Understanding-Microsoft-Intune-Applications-PowerShell/dp/1484288491/ref=asc_df_1484288491/?tag=googshopuk-21&linkCode=df0&hvadid=606535180727&hvpos=&hvnetw=g&hvrand=12156935864725452536&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9045778&hvtargid=pla-1897625803371&psc=1&th=1&psc=1)

[Amazon.com](https://www.amazon.com/Understanding-Microsoft-Intune-Applications-PowerShell/dp/1484288491/ref=sr_1_1?crid=2K98Q1E7TIKLJ&keywords=understanding+intune&qid=1682103272&sprefix=understanding+intune%2Caps%2C157&sr=8-1)

[Apress](https://link.springer.com/book/10.1007/978-1-4842-8850-4?source=shoppingads&locale=en-gb&gclid=CjwKCAjw6IiiBhAOEiwALNqncSKm2i93L3ZU_g23RICE6TxylXFk6HPq6YS6HLgsqr_vtCFbzQJMORoCFXUQAvD_BwE)

![](/assets/images/Apress_Intune.png)


text:
---
id: 819
title: Customize and Style the Contact Form 7 WordPress Plugin
date: 2013-08-02T03:24:36+00:00
author: Eli Overbey
layout: post
guid: http://elioverbey.net/?p=819
permalink: /customize-and-style-the-contact-form-7-wordpress-plugin/
fsb_social_twitter:
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
fsb_social_google:
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
fsb_social_facebook:
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
fsb_social_pinterest:
  - "1"
  - "1"
  - "1"
  - "1"
  - "1"
  - "1"
fsb_social_linkedin:
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
dsq_thread_id:
  - "2690243676"
  - "2690243676"
  - "2690243676"
ninja_forms_form:
  - "0"
categories:
  - Web Design
---
Contact 7 form is one of my favorite plugins for WP – in fact – I use it on all the sites I run. Gravity forms is an awesome alternative, but since it is free, and runs on WP Multisite, I stick with contact form 7. The only problem: Contact Form 7 needs customization and style. This tutorial will teach you how to create a contact form that goes from (the default css):

[](/images/wp-uploads/2013/08/Screen-Shot-2013-08-01-at-11.18.05-PM.png)

To something a little more eye catching. This tutorial will add a bit of style and color to Contact Form 7. Feel free to change the colors in the process:

[](/images/wp-uploads/2013/08/Screen-Shot-2013-08-09-at-2.22.50-PM.png)

Let’s begin! First, you need to download the Contact Form 7 plugin.

### Installing Contact Form 7

Installing the WordPress plugin could not be easier. Always make sure you have a recent backup of your database before you install or update anything on your site (I say this, but hardly every do it). After you backup you site, here’s how to install Contact Form 7.

  1. Log-in to Your WordPress website.
  2. Under “Plugins” click on “Add New”.
  3. Under ”Search” enter “Contact Form 7” .
  4. After the page reloads Click on “Install Now” under Contact Form 7.
  5. Click “OK” when you get the “Are You Sure” alert.
  6. After the plugin downloads click “Activate Plugin”.
  7. You’ll now have a “Contact” tab in the menu on the left side of the screen.
  8. Click the “Contact” tab.

We are going to be working with the default contact form. If you need to add fields, that is fine — just make sure they are in the same class.

### Customizing the Contact Form 7 Plugin

Here’s the code to get it looking good.

There are a few things you need to keep in mind.

  1. You may need to adjust the width of the input and textarea. Every theme is different.
  2. Make sure you change the border color of the input, textarea, and .text to match your site.

### The HTML

The default HTML for Contact Form 7 is below:

**We want to change that too:** Below, are we are doing is removing the Titles. We removed “Your Name (required)”, “Your Email (required)”, “Subject”, and “Message”. It is okay to remove those. We are going to add text inside the input boxes. Contact Form 7 calls this “placeholder text” – but we will get to that shortly.

Now, if you are following along, your form should look something like this:

[](/images/wp-uploads/2013/08/Screen-Shot-2013-08-02-at-12.11.34-AM.png)

You will notice that all of the titles have been removed. We did this to streamline everything. When working with customers, the shorter the CTA (the form), the better. If there are unneeded breakspaces and text, remove them.

Next up: Add the placeholders. The placeholders are the text that go inside the input boxes. They are “suggestions”. If you are confused, just look down below and it will make more sense.

You will notice in this step all we did was add placeholder text. Placeholder text goes inside the input areas and give hints or suggestions. These placeholders replace the need for “Titles”.

[](/images/wp-uploads/2013/08/Screen-Shot-2013-08-02-at-12.19.41-AM.png)

At this point, we are ready to start styling the form. Don’t worry if your form doesn’t look just like mine (each theme has different default stylings)! We will get to that in the next step. The important part is that we have the structure down.

### The CSS

Just add the following:

repository: elioverbey/elioverbey

branch_name: refs/heads/develop

repo_name: elioverbey/elioverbey


text:
# KMachines - Distributed Fine-Grained Finite State Machines with Kafka

[![Build Status][github-actions-shield]][github-actions-link]
[![Maven][maven-shield]][maven-link]
[![Javadoc][javadoc-shield]][javadoc-link]

[github-actions-shield]: https://github.com/rayokota/kmachines/workflows/build/badge.svg?branch=master
[github-actions-link]: https://github.com/rayokota/kmachines/actions
[maven-shield]: https://img.shields.io/maven-central/v/io.kmachine/kmachines-core.svg
[maven-link]: https://search.maven.org/#search%7Cga%7C1%7Cio.kmachine
[javadoc-shield]: https://javadoc.io/badge/io.kmachine/kmachines-core.svg?color=blue
[javadoc-link]: https://javadoc.io/doc/io.kmachine/kmachines-core

KMachines is a client layer for distributed processing of fine-grained finite state machines with Apache Kafka.

## Installing

Releases of KMachines are deployed to Maven Central.

```xml
<dependency>
    <groupId>io.kmachine</groupId>
    <artifactId>kmachines-core</artifactId>
    <version>0.0.2</version>
</dependency>
```

For more info on KMachines, see this [blog post](https://yokota.blog/2021/08/02/the-enterprise-is-made-of-events-not-things/).

repository: whatvn/kmachines

repo_name: whatvn/kmachines


text:
Currently working on [Datasette](https://datasette.readthedocs.io/) and associated projects. Read [my blog](https://simonwillison.net/) or [follow @simonw on Twitter](https://twitter.com/simonw).

### Recent releases

[swarm-to-sqlite 0.3.2](https://github.com/dogsheep/swarm-to-sqlite/releases/tag/0.3.2) - 2020-10-12

[evernote-to-sqlite 0.2](https://github.com/dogsheep/evernote-to-sqlite/releases/tag/0.2) - 2020-10-12

[xml-analyser 1.0](https://github.com/simonw/xml-analyser/releases/tag/1.0) - 2020-10-11

[datasette-json-preview 0.1](https://github.com/simonw/datasette-json-preview/releases/tag/0.1) - 2020-10-11

[datasette 0.50.2](https://github.com/simonw/datasette/releases/tag/0.50.2) - 2020-10-10

[datasette-cluster-map 0.12.4](https://github.com/simonw/datasette-cluster-map/releases/tag/0.12.4) - 2020-10-01

[datasette-edit-schema 0.3](https://github.com/simonw/datasette-edit-schema/releases/tag/0.3) - 2020-10-01

[datasette-dateutil 0.2.1](https://github.com/simonw/datasette-dateutil/releases/tag/0.2.1) - 2020-09-30

More [recent releases](https://github.com/simonw/simonw/blob/main/releases.md)

### On my blog

[Weeknotes: Mainly Datasette 0.50](http://simonwillison.net/2020/Oct/10/weeknotes-mainly-datasette-050/) - 2020-10-10

[Datasette 0.50: The annotated release notes](http://simonwillison.net/2020/Oct/9/datasette-0-50/) - 2020-10-09

[Git scraping: track changes over time by scraping to a Git repository](http://simonwillison.net/2020/Oct/9/git-scraping/) - 2020-10-09

[Weeknotes: Datasette column actions, plus three new plugins](http://simonwillison.net/2020/Oct/2/datasette-column-actions/) - 2020-10-02

[Weeknotes: software carpentry, compiling modules for SQLite](http://simonwillison.net/2020/Sep/26/weeknotes-software-carpentry-sqlite/) - 2020-09-26

More on [simonwillison.net](https://simonwillison.net/)

### TIL

[Upgrading Python Homebrew packages using pip](https://til.simonwillison.net/til/til/homebrew_upgrading-python-homebrew-packages.md) - 2020-10-14

[Searching for repositories by topic using the GitHub GraphQL API](https://til.simonwillison.net/til/til/github_graphql-search-topics.md) - 2020-10-10

[Running Datasette on DigitalOcean App Platform](https://til.simonwillison.net/til/til/digitalocean_datasette-on-digitalocean-app-platform.md) - 2020-10-07

[Manipulating query strings with URLSearchParams](https://til.simonwillison.net/til/til/javascript_manipulating-query-params.md) - 2020-10-04

[Using async/await in JavaScript in Selenium](https://til.simonwillison.net/til/til/selenium_async-javascript-in-selenium.md) - 2020-10-02

More on [til.simonwillison.net](https://til.simonwillison.net/)

 How this works

repository: Aaroneld/simonw

repo_name: Aaroneld/simonw


text:
## Requirements

This workshop contains a vast amount of topics and will be performed at a very fast pace. The recommendation is to observe the commands I will be executing and concentrate on understanding the logic behind them. Everything will be posted online after the workshop and you will be able to repeat it later on at your own pace. If you agree with the recommendation, you will not be required to bring anything.

On the other hand, you are welcome to follow along and try to reproduce everything during the workshop. If you choose that approach, you will need:

* [Git](https://git-scm.com/)
* GitBash (if using Windows, it's installed with Git)
* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
* [Minikube](https://github.com/kubernetes/minikube/releases)

If you are a Windows user, please make sure that your Git client is configured to check out the code *AS-IS*. Otherwise, Windows might change carriage returns to the Windows format.


text:
Twitter Kit is the easiest way to bring real-time conversational content to your apps. Growing an app’s user base and retaining end users can be a challenge for any developer. To keep users engaged, you need rich, unique content that feels natural to your app’s experience.

To install, add `TwitterKit` to your `Podfile` and run `pod install`. If you already have `TwitterKit` just run `pod update TwitterKit`.

### Show a Single Tweet

To show a single Tweet, you first need to load that Tweet from the network and then create and configure a `TWTRTweetView` with that `TWTRTweet` model object. Then it may be added to the view hierarchy:

```swift
    import TwitterKit

    TWTRAPIClient().loadTweetWithID("20") { tweet, error in
      if let t = tweet {
        let tweetView = TWTRTweetView(tweet: t)
        tweetView.center = view.center
        view.addSubview(tweetView)
      } else {
        print("Failed to load Tweet: \(error)")
      }
    }
```

#### Configuring Tweet View Colors & Themes
To change the colors of a Tweet view you can either set properties directly on the `TWTRTweetView` instances or on the `UIAppearanceProxy` of the `TWTRTweetView`.

```swift
  // Set the theme directly
  tweetView.theme = .Dark

  // Use custom colors
  tweetView.primaryTextColor = .yellowColor()
  tweetView.backgroundColor = .blueColor()
```

Set visual properties using the `UIAppearanceProxy` for `TWTRTweetView`.

```
  // Set all future tweet views to use dark theme using UIAppearanceProxy
  TWTRTweetView.appearance().theme = .Dark
```

### Show a TableView of Tweets

```swift
import TwitterKit

class UserTimelineViewController: TWTRTimelineViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let client = TWTRAPIClient.clientWithCurrentUser()
        self.dataSource = TWTRUserTimelineDataSource(screenName: "twitterdev", APIClient: client)
        self.showTweetActions = true
    }

}
```

### Compose Tweets
To allow users to composer their own Tweets from within your app, simply create a `TWTRComposer` and call `show(from: UIViewController, completion:)` on the instance. This class automatically handles presenting a log in controller if there are no logged in sessions.

```swift

let composer = TWTRComposer()

composer.setText("just setting up my Twitter Kit")
composer.setImage(UIImage(named: "twitterkit"))

// Called from a UIViewController
composer.show(from: self.navigationController!) { (result in
    if (result == .done) {
        print("Successfully composed Tweet")
    } else {
        print("Cancelled composing")
    }
}
```

## Resources

 * [Documentation](https://dev.twitter.com/twitterkit/ios/overview)
 * [Forums](https://twittercommunity.com/c/publisher/twitter)
 * Follow us on Twitter: [@TwitterDev](https://twitter.com/TwitterDev)

repository: AamirAnwar/BotSocial-iOS

gha_language: Swift

repo_name: AamirAnwar/BotSocial-iOS


text:
# instagram-image

Make an image like this for Instagram!

![sample](./assets/sample.jpg)

For more details, see:

https://hashrocket.com/blog/posts/generate-images-for-instagram

### Setup

```
$ git clone https://github.com/jwworth/instagram-image
$ cd instagram-image
$ gem install bundler
$ bundle
```

Install [ImageMagick](https://imagemagick.org/) via your method of choice.

### Webserver

```
$ ruby app.rb
```

Visit http://localhost:4567 and provide your data  Break up a long title with
newlines.

### CLI

Find a cool image on [Unsplash](https://unsplash.com). Copy it to the root of
this project. Then:

```
$ ruby ./cli generate --source your-file.jpg --title "Find your Ruby"
```

### License

This project is released under the MIT License.

repository: jwworth/instagram-image

gha_language: Ruby

repo_name: jwworth/instagram-image


text:
# A Structured Self-attentive Sentence Embedding

Tensorflow Implementation of "[A Structured Self-attentive Sentence Embedding](https://arxiv.org/abs/1703.03130)" (ICLR 2017).

![image](https://user-images.githubusercontent.com/15166794/41864478-21cbf7c8-78e5-11e8-94d2-5aa035a65c8b.png)

## Usage

### Data
* AG's news topic classification dataset.
* The csv files (in my [data directory](https://github.com/roomylee/self-attention-tf/tree/master/data)) were available from [here](https://github.com/mhjabreel/CharCNN/tree/master/data/ag_news_csv).

### Train
* "[GoogleNews-vectors-negative300](https://code.google.com/archive/p/word2vec/)" is used as pre-trained word2vec model.
* Display help message:
	```bash
	$ python train.py --help
	```

	```bash
	train.py:
		--[no]allow_soft_placement: Allow device soft device placement
			(default: 'true')
		--batch_size: Batch Size
			(default: '64')
			(an integer)
		--checkpoint_every: Save model after this many steps
			(default: '100')
			(an integer)
		--d_a_size: Size of W_s1 embedding
			(default: '350')
			(an integer)
		--dev_sample_percentage: Percentage of the training data to use for validation
			(default: '0.1')
			(a number)
		--display_every: Number of iterations to display training info.
			(default: '10')
			(an integer)
		--embedding_dim: Dimensionality of word embedding
			(default: '300')
			(an integer)
		--evaluate_every: Evaluate model on dev set after this many steps
			(default: '100')
			(an integer)
		--fc_size: Size of fully connected layer
			(default: '2000')
			(an integer)
		--hidden_size: Size of LSTM hidden layer
			(default: '256')
			(an integer)
		--learning_rate: Which learning rate to start with.
			(default: '0.001')
			(a number)
		--[no]log_device_placement: Log placement of ops on devices
			(default: 'false')
		--max_sentence_length: Max sentence length in train/test data
			(default: '50')
			(an integer)
		--num_checkpoints: Number of checkpoints to store
			(default: '5')
			(an integer)
		--num_epochs: Number of training epochs
			(default: '10')
			(an integer)
		--p_coef: Coefficient for penalty
			(default: '1.0')
			(a number)
		--r_size: Size of W_s2 embedding
			(default: '30')
			(an integer)
		--train_dir: Path of train data
			(default: 'data/train.csv')
		--word2vec: Word2vec file with pre-trained embeddings
	```

* **Train Example (with word2vec):**
    ```bash
	$ python train.py --word2vec "GoogleNews-vectors-negative300.bin"
	```

### Evalutation
* You must give "**checkpoint_dir**" argument, path of checkpoint(trained neural model) file, like below example.
* If you don't want to visualize the attention, give option like `--visualize False`.

* **Evaluation Example:**
	```bash
	$ python eval.py --checkpoint_dir "runs/1523902663/checkpoints/"
	```

## Results
#### 1) Accuracy test data = 0.920789
#### 2) Visualization of Self Attention
![viz](https://user-images.githubusercontent.com/15166794/41875853-1dea6f28-7907-11e8-94e9-398e2699aca5.png)

## Reference
* A Structured Self-attentive Sentence Embedding (ICLR 2017), Z Lin et al. [[paper]](https://arxiv.org/abs/1703.03130)
* flrngel's [Self-Attentive-tensorflow](https://github.com/flrngel/Self-Attentive-tensorflow) github repository

repository: jinsongpan/self-attentive-emb-tf

repo_name: jinsongpan/self-attentive-emb-tf


text:
You can use ETW real time traces with VBA. I've provided 4 files:

* ETWModule.bas: a reusable VBA module to add support for ETW real time traces to a VB/VBA project. This module is for VB/VBA version higher than version 7.
* ETWModule32.bas: same as ETWModule but for VB/VBA lower than version 7 (and therefore only for 32-bit VB/VBA)
* Module1.bas: demonstrates how to use ETWModule
* EtwSample.xlsm: an excel file with a spreasheet and buttons that includes ETWModule.bas and Module1.bas. You can use this to test the system

Don't forget to declare your ETW provider guid in TraceSpy (and enable ETW traces in TraceSpy) if you want to test the whole thing.

repository: johnchanck/TraceSpy

repo_name: johnchanck/TraceSpy


text:
# ChatRegulator [![WorkFlow Status](https://img.shields.io/github/workflow/status/4drian3d/ChatRegulator/ChatRegulator%20Maven%20Build?&style=flat-square)](https://github.com/4drian3d/ChatRegulator/actions/workflows/ChatRegulatorBuild.yml) [![Version](https://img.shields.io/github/v/release/4drian3d/ChatRegulator?color=FFF0&style=flat-square)](https://github.com/4drian3d/ChatRegulator/releases)

A global chat regulator for Velocity

[![Banner](https://i.imgur.com/F4lxNBq.jpg)](https://polymart.org/resource/chatregulator)

## Features

- Message control via regex
- Control of messages sent in specific commands
- Controls the number of consecutive equal characters allowed
- Controls the repetition of the same messages or commands several times in a row.
- Sends warning messages, actionbars o titles to the offender in MiniMessage format

## Commands

Check the plugin commands from [Commands](https://github.com/4drian3d/ChatRegulator/wiki/Commands)

## Configuration

Check the configuration and function of each option here [Configuration](https://github.com/4drian3d/ChatRegulator/wiki/Configuration)

## Plugin API

The plugin offers you several methods and events to interact in the detections and with the infraction players. Check the plugin API and its usage at [API](https://github.com/4drian3d/ChatRegulator/wiki/Plugin-API)

repository: Espryth/ChatRegulator

repo_name: Espryth/ChatRegulator


text:
---
title: NPM Commands
date: "2015-05-06T23:46:37.121Z"
description: "An NPM cheatsheet for quick reference 😊"
---
I have put together a short table of NPM commands to use as a quick reference guide.  These are the commands I found I used most often, perhaps forgot most often. I am a newish programmer so I have excluded more advanced commands. Send 📝 me any you feel are missing! 😊

### NPM commands

| **Command**                 | **Use**                  |
|:--------------------------- | ------------------------:|
|npm i packageName            |Install                   |
|npm i packageName -D         |Shorthand -save -dev 1970 |
|npm init          |Generates a default package json file|
|npm init -y      | Same, y = yes, skips set-up questions|
|npm list   | Shows installed packages in current project|
|npm list -g   |        Lists globally installed packages|
|npm list -g --depth=0|Excludes dependencies in tree view|
|npm outdated|     Lists outdated dependencies in project|
|npm run                      |     Lists scripts to run |
|npm update packageName       |    Updates named package |
|npm update all |Updates all packages in current project |
|npm un packageName  |Shorthand; Uninstalls named package|
|npm home packageName|Opens website of package in browser|
|npm view   | Lists all project dependencies w/ version #|
----------------------------------------------------------

🍓🍓🍓

### NPM Scripts
    note: a script must be set up in your package json to run these commands

| **Script command**          | **Use**                  |
|:--------------------------- | ------------------------:|
|npm start|Starts [http server](https://github.com/http-party/http-server)|
|Note: control + c            |         Stops http server|
|npm test                     |       Runs test w/ Mocha |
----------------------------------------------------------

repository: didionconsult/blog

repo_name: didionconsult/blog


text:
# MQTT notification service for Home Assistant.

[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs)

The `notify_mqtt` notification platform allows you to publish notifications from Home Assistant to an MQTT topic. This is primarily intended to help those who have an existing notification infrastructure set up in [Node-RED](https://nodered.org/) or another MQTT-friendly tool, but may find other uses.

To enable the `notify_mqtt` notification platform in your installation, add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yaml entry
notify:
  - name: NOTIFIER_NAME
    platform: notify_mqtt
    topic: MQTT/TOPIC
```

**name:** Setting the optional parameter `name` allows multiple notifiers to be created. The notifier will bind to the service `notify.NOTIFIER_NAME`.
  * required: false
  * default: notify
  * type: string

**topic:** The MQTT topic that will receive the notification.
  * required: true
  * type: string

Notifications will be delivered to the MQTT topic as a string representation of a JSON object containing the message, title, and other data send to the notification service.