text:
# Build the Generated CMake Project on Linux

One of the features VS Code Digital Twin tooling provides is generating stub code based on the Device Capability Model (DCM) you specified.

Follow the steps to use the generated code with the Azure IoT Device C SDK source to compile a device app.

For more details about setting up your development environment for compiling the C Device SDK. Check the [instructions](https://github.com/Azure/azure-iot-sdk-c/blob/master/iothub_client/readme.md#compiling-the-c-device-sdk) for each platform.

## Prerequisite
1. Make sure all dependencies are installed before building the SDK. For Ubuntu, you can use apt-get to install the right packages.
    ```bash
    sudo apt-get update
    sudo apt-get install -y git cmake build-essential curl libcurl4-openssl-dev libssl-dev uuid-dev
    ```

1. Verify that **CMake** is at least version **2.8.12** and **gcc** is at least version **4.4.7**.
    ```bash
    cmake --version
    gcc --version
    ```

## Set up environment

In order to providion a device as an IoT Plug and Play using X.509 certificate, we need :

1. Azure IoT SDK C, Public Preview (As of 6/30/2020)

1. Generate a X.509 certificate and a private key

    In this instruction, we will use self-signed certificate using script files from Azure IoT SDK

    When the certificate is generated, registration id (or device id) is used for the common name.
    The default name is `PostmanDevice001`.  In you prefer to use a different name, please edit line #3 in `prep.sh`

    ```bash
    REGISTRATION_ID='PostmanDevice001'
    ```

1. Modify and build a custom HSM library based on `custom_hsm_example`

    Change `COMMON_NAME` in `custom_hsm_example.c` in `custom_hsm` folder.

    > [!IMPORTANT]
    > The name has to match to what is specified for the certificate above.

    ```c
    static const char* COMMON_NAME = "PostmanDevice001";
    ```

1. Certificate files

    The custom HSM library reads certificate from `cert.pem` and the private key from `key.pem`.

    With self-signed certificate, 2 PEM files are generated and copied into `cmake` folder for the executable to read from the PEM files.

    - `certificate/certs/new-device.cert.pem` => `cmake/new-device.cert.pem`
    - `certificate/private/new-device.key.pem` => `cmake/new-device.key.pem`

    > [!TIP]
    > For production scenarios, you may hard code certificate or read from a secure storage, or read from SIM card, for example.

## Run `prep.sh` script

This script does :

1. Clone Azure IoT SDK C
1. Copy scripts to generate certificates to `certificate` folder
1. Copy generated certificate file and private key file to `cmake` folder
1. Copy `custom_hsm_example.c` to `azure-iot-sdk-c/provisioning_client/samples/custom_hsm_example`

## Create a new device identity

### IoT Central

You can manually create a new device in your IoT Central application, or use Postman collection to create a new device identity.

#### Instructions to create enrollment entries in IoT Central

Group Enrollment : <https://docs.microsoft.com/en-us/azure/iot-central/core/concepts-get-connected#connect-devices-using-x509-certificates>

Individual Enrollment : <https://docs.microsoft.com/en-us/azure/iot-central/core/concepts-get-connected#individual-enrollment-based-device-connectivity>

### Device Provisioning Service (DPS)

Create individual enrollment in DPS

#### Instructions to create enrollment entries in DPS

Group Enrollment : <https://docs.microsoft.com/en-us/azure/iot-dps/tutorial-group-enrollments>

Individual Enrollment : <https://docs.microsoft.com/en-us/azure/iot-dps/quick-create-simulated-device-x509#create-a-device-enrollment-entry-in-the-portal>

## Automatically associate a device template based on IoT Plug and Play Model ID

As a part of provisioning, IoT Plug and Play enabled device app communicates Model ID.  Based on this information, IoT Central can associate the appropriate device template.

> [!IMPORTANT]
> With Public Preview, IoT central can associate the device template only if the specified device capability model is published to global repository.  If the DCM is not publised to the global repository, you need to create a device template with matching Model ID in your IoT Central application

Reference : <https://docs.microsoft.com/en-us/azure/iot-central/core/concepts-get-connected#automatically-associate-with-a-device-template>

> [!NOTE] (as of 6/30/2020)
> It seems the device template must be added to IoT Central app for automatic association to work.  Without the device template, their first provisioning succeeds but the device is not assigned to the device template.  On the 2nd provisioning, the association is made.

Please ensure you specify the correct Capability Model ID in main.c line #45

```c
static const char *digitalTwinSample_CustomProvisioningData = "{"
                                                              "\"__iot:interfaces\":"
                                                              "{"
                                                              "\"CapabilityModelId\": \"urn:iotcpnptest:postmansample:1\" ,"
                                                              "\"CapabilityModel\": \"" DIGITALTWIN_DEVICE_CAPABILITY_MODEL_INLINE_DATA "\""
                                                              "}"
                                                              "}";
```

## Assigning certificates to device identity

In order for a device to be authenticated using X.509, the certificate must be assigned to the device identity.

You can manually upload the certificate (new-device.cert.pem, in our example), but this requires device template assignment.  In other words, you need to know which certificate belongs to which device and which device template the device is supposed to use.  In certain scenarios, this prevents zero touch provisioning (e.g. the end user simply turns on the device)

Without device template association, you can not browse to device's page to click `Connect` button

![IoTC-001](media/IoTC-001.png)

Once you are in device's overview page, you can click `Connect` button

![IoTC-002](media/IoTC-002.png)

This is the UI to upload `certificate`

![IoTC-003](media/IoTC-003.png)

If the scenario requires automatic device template association, please set certificate using REST API

## Device Identity and certificate using REST API

This requires following REST API calls

1. Create a device template

    This step is required only if the DCM is not published to the public repository
    <https://docs.microsoft.com/en-us/rest/api/iotcentral/devicetemplates/set>

    Example :

    - Device Template Id : `PostmanDeviceTemplate`
    - DCM ID : urn:iotcpnptest:postmansample:1

    - Method : PUT

    - URL : https://iotpnp-with-meshsystems.azureiotcentral.com/api/preview/deviceTemplates/PostmanDeviceTemplate

    - Headers
    Authorization : API Key from IoT Central
    Content-Type : application/json

    - Body :

        ```json
        {
          "types": [
            "DeviceModel"
          ],
          "displayName": "IoT Central Postman Sample",
          "capabilityModel": {
            "@id": "urn:iotcpnptest:postmansample:1",
            "@type": [
              "CapabilityModel"
            ],
            "implements": [
              {
                "@id": "urn:iotcpnptest:DeviceInfo:2",
            "@type": [

              :
              :
            ```

1. Create a new device identify

    <https://docs.microsoft.com/en-us/rest/api/iotcentral/devices/set>

    Example :

    - Device Id (or Registration ID) : `PostmanDevice001`
    - Method : PUT

    - URL : https://my-iot-central.azureiotcentral.com/api/preview/devices/PostmanDevice001

    - Headers
    Authorization : API Key from IoT Central
    Content-Type : application/json

    - Body :

        ```json
        {
          "displayName": "Postman Test Device",
          "simulated": false,
          "approved": true
        }
        ```

1. Assign a certificate to the new device identity

    <https://docs.microsoft.com/en-us/rest/api/iotcentral/devices/setattestation>

    - Method : PUT

    - URL : https://my-iot-central.azureiotcentral.com/api/preview/devices/PostmanDevice001/attestation

    - Headers
    Authorization : API Key from IoT Central
    Content-Type : application/json

    - Body :

        Send base64 encoded certificate value in the body.  This is the contents of `new-device.cert.pem`

        ```json
        {
          "type": "X509Attestation",
          "x509": {
            "clientCertificates": {
              "primary": {
                "certificate": "<Base64 Certificate contents in a single line>"
              }
            }
          }
        }
        ```

        > [!TIP]
        > Make sure to format base64 encoded certificate value in a single line.
        >  "certificate": "MIIFwzCCA6ugAwIBAgIBAjANBg........"

### Make REST API calls with Postman

You may import Postman collection and environment variables to make REST API calls to IoT Central.

To use the Postman collection, please configure environment variables

1. Import Postman Collection from these json files
    `./Postman/DeviceFirstProvision.postman_collection.json`
    `./Postman/IoTCentral.postman_environment.json.json`

1. Ensure the environment `IoTCentral` is selected

    ![Postman-001](media/Postman-001.png)

1. Add values
    ![Postman-002](media/Postman-002.png)

| Variable             | Value                         | Notes                                                                                |
|----------------------|-------------------------------|--------------------------------------------------------------------------------------|
| IoTCDeviceTemplateId | Device Template ID            |                                                                                |
| IoTCAppUrl           | IoT Central Application URL   | from `Administration` -> `Your application`                                          |
| IoTCDeviceId         | Device Id for the device      | This must match to the device id (or common name) used to generate X.509 certificate |
| IoTCApiKey           | API Key to access IoT Central | from `Administration` -> `API tokens`                                                |

## Run the app

Run the app with :

```bash
cd cmake
./DeviceFirstWithX509 <Scope ID>
```

After successful provisioning, the new devices should be assigned to the device template

![IoTC-004](media/IoTC-004.png)

Example output :

```bash
 ./DeviceFirstWithX509 0ne0010B795
hsm_client_x509_init()
File size 2057
Certificate :
-----BEGIN CERTIFICATE-----
MIIFwzCCA6ugAwIBAgIBAjANBgkqhkiG9w0BAQsFADAqMSgwJgYDVQQDDB9BenVy
  : <snip>
PLcibK16lQTKuJoF7ge7Movh/LY0KwIz2sgFAcJrcDy0wapMVn15
-----END CERTIFICATE-----

Private Key :
<REDACTED_PRIVATE_KEY>

hsm_client_x509_init()
hsm_client_x509_interface()
custom_hsm_create()
custom_hsm_get_common_name() : PostmanDevice001
custom_hsm_get_certificate()
custom_hsm_get_key()
Info: Provisioning callback indicates success.  iothubUri=iotc-97bbc0fc-d946-41b6-896a-ad9a740cd3b0.azure-devices.net, deviceId=PostmanDevice001
Info: DPS successfully registered.  Continuing on to creation of IoTHub device client handle.
custom_hsm_destroy()
hsm_client_x509_interface()
custom_hsm_create()
custom_hsm_get_certificate()
custom_hsm_get_key()
Info: Successfully created DigitalTwin device with connectionString=<****>, deviceHandle=<0x562fe0e36f90>
Info: DigitalTwin Interface : Changing interface state on interface DeviceInfo from DT_INTERFACE_STATE_INVALID to DT_INTERFACE_STATE_CREATED
Info: DEVICEINFO_INTERFACE: Created DIGITALTWIN_INTERFACE_CLIENT_HANDLE successfully for interfaceId=<urn:azureiot:DeviceManagement:DeviceInformation:1>, interfaceInstanceName=<DeviceInfo>, handle=<0x562fe0e31370>
Info: DigitalTwin Interface : Changing interface state on interface Battery from DT_INTERFACE_STATE_INVALID to DT_INTERFACE_STATE_CREATED
Info: BATTERY_INTERFACE: Created DIGITALTWIN_INTERFACE_CLIENT_HANDLE successfully for interfaceId=<urn:seeedkk:Interface:Battery:1>, interfaceInstanceName=<Battery>, handle=<0x562fe0e31ff0>
Info: DigitalTwin Interface : Changing interface state on interface PushButton from DT_INTERFACE_STATE_INVALID to DT_INTERFACE_STATE_CREATED
Info: PUSHBUTTON_INTERFACE: Created DIGITALTWIN_INTERFACE_CLIENT_HANDLE successfully for interfaceId=<urn:seeedkk:Interface:PushButton2:1>, interfaceInstanceName=<PushButton>, handle=<0x562fe0e0ad50>
Info: DigitalTwin Interface : Changing interface state on interface DeviceInfo from DT_INTERFACE_STATE_CREATED to DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE
Info: DigitalTwin Interface : Changing interface state on interface Battery from DT_INTERFACE_STATE_CREATED to DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE
Info: DigitalTwin Interface : Changing interface state on interface PushButton from DT_INTERFACE_STATE_CREATED to DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE
Info: Successfully queued registration message
custom_hsm_get_certificate()
custom_hsm_get_key()
Info: DigitalTwin Client Core: Processing register DigitalTwin interfaces callback.  confirmationResult=IOTHUB_CLIENT_CONFIRMATION_OK
Info: DigitalTwin Client Core: Interfaces successfully registered.  Register for device method and twin callbacks if needed
Info: Sending reported state for sdkInfo={"$iotin:urn_azureiot_Client_SDKInformation":  { "language":{ "value":"C"},"version":{ "value":"0.9.0"},"vendor":{ "value":"Microsoft"}}}
Info: DigitalTwin Interface : Changing interface state on interface DeviceInfo from DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE to DT_INTERFACE_STATE_REGISTERED
Info: DeviceInfoInterface_InterfaceRegisteredCallback with status=<DIGITALTWIN_CLIENT_RESULT_INVALID>, userContext=<0x562fe0498478>
Info: DEVICEINFO_INTERFACE: Interface successfully registered.
Info: DigitalTwin Interface : Changing interface state on interface Battery from DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE to DT_INTERFACE_STATE_REGISTERED
Info: BatteryInterface_InterfaceRegisteredCallback with status=<DIGITALTWIN_CLIENT_RESULT_INVALID>, userContext=<0x562fe0498480>
Info: BATTERY_INTERFACE: Interface successfully registered.
Info: DigitalTwin Interface : Changing interface state on interface PushButton from DT_INTERFACE_STATE_BOUND_TO_CLIENT_HANDLE to DT_INTERFACE_STATE_REGISTERED
Info: PushButtonInterface_InterfaceRegisteredCallback with status=<DIGITALTWIN_CLIENT_RESULT_INVALID>, userContext=<0x562fe0498490>
Info: PUSHBUTTON_INTERFACE: Interface successfully registered.
Info: Interface registration callback invoked, interfaces have been successfully registered
Info: DigitalTwin interfaces successfully registered
Info: DEVICEINFO_INTERFACE: Queued async report read only property for manufacturer
Info: DEVICEINFO_INTERFACE: Queued async report read only property for model
Info: DEVICEINFO_INTERFACE: Queued async report read only property for swVersion
Info: DEVICEINFO_INTERFACE: Queued async report read only property for osName
Info: DEVICEINFO_INTERFACE: Queued async report read only property for processorArchitecture
Info: DEVICEINFO_INTERFACE: Queued async report read only property for processorManufacturer
Info: DEVICEINFO_INTERFACE: Queued async report read only property for totalStorage
Info: DEVICEINFO_INTERFACE: Queued async report read only property for totalMemory
Info: DEVICE_INFO: Queuing of all properties to be reported has succeeded
Info: PnP enabled, running...
```

gha_language: C


text:
# FeedbackParticleFilters.jl

A package for using feedback particle filters in nonlinear stochastic filtering and data assimilation problems.

```@contents
Pages = [
 "getting_started.md",
]
Depth = 1
```

## What are feedback particle filters?

Feedback particle filters (FPFs) are a class of [sample-based numerical algorithms](https://ieeexplore.ieee.org/document/6530707) to approximate the conditional distribution in a nonlinear filtering problem.
In contrast to conventional particle filters, which use importance weights, FPFs use feedback control to let the observations guide the particles to the appropriate position.

Further background reading:
```@contents
Pages = [
 "filtering.md",
 "fpf.md",
]
Depth = 1
```

## Package features

This package's aim is to provide a versatile and efficient feedback particle filter implementation in Julia, with abstractions to flexibly construct, run, and analyze feedback particle filters for a variety of uni- and multivariate filtering problems with both diffusion and point process observations.

In particular, the following features are planned to be implemented in FeedbackParticleFilters:
* Types for [hidden state](doc:hidden) and [observation models](doc:observation): diffusions, Poisson processes, etc.
* A variety of [gain estimation](doc:gainest) methods
* Automatic filter deployment and simulation of the state and filtering equations
* Storing of intermediate (trajectory) data from simulation
* An interface to the powerful solvers from the [DifferentialEquations](https://github.com/JuliaDiffEq/DifferentialEquations.jl) package

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: Julia

gha_license_id: MIT

license_type: permissive


text:
Summary: This is a test of claat.
Id: test1
Categories: Go, Claat
Status: Draft

# Claat test 0.01

## This is the first step

Duration: 1:25

``` go
This block will be highlighted as Go source code.
```

Yay.

Positive
: This will appear in a positive info box.

Negative
: This will appear in a negative info box.

I hope this works.

repository: amoiseiev/utils

repo_name: amoiseiev/utils


text:
<!---
Provide a short summary in the Title above. Examples of good PR titles:
* "Feature: add so-and-so models"
* "Fix: deduplicate such-and-such"
* "Update: dbt version 0.13.0"
-->

## Description & motivation
<!---
 Is this linked to an open
issue, a Trello card, or another pull request? Link it here.
-->

## Screenshots:
<!---
Include a screenshot of the relevant section of the updated DAG. You can access
your version of the DAG by running `dbt docs generate && dbt docs serve`.
-->

## Validation of models:
<!---
Include any output that confirms that the models do what is expected. This might
be a link to an in-development dashboard in your BI tool, or a query that
compares an existing model with a new one.
-->

## Changes to existing models:
<!---
Include this section if you are changing any existing models. Link any related
pull requests on your BI tool, or instructions for merge (e.g. whether old
models should be dropped after merge, or whether a full-refresh run is required)
-->

## Checklist:
<!---
This checklist is mostly useful as a reminder of small things that can easily be
forgotten – it is meant as a helpful tool rather than hoops to jump through.
Put an `x` in all the items that apply, make notes next to any that haven't been
addressed, and remove any items that are not relevant to this PR.
-->
- [ ] My pull request represents one logical piece of work.
- [ ] My commits are related to the pull request and look clean.
- [ ] My SQL follows the [Fishtown Analytics style guide](https://github.com/fishtown-analytics/corp/blob/master/dbt_coding_conventions.md).
- [ ] I have materialized my models appropriately.
- [ ] I have added appropriate tests and documentation to any new models.
- [ ] I have updated the README file.
{%- if project.warehouse == 'redshift' %}
- [ ] I have added sort and dist keys to models materialized as tables.
- [ ] I have validated the SQL in any late-binding views.
{% endif %}

repository: epdavis/dbt-init

repo_name: epdavis/dbt-init


text:
# set Threshold

Set the threshold value for dark or bright light.

```sig
sensors.color1.setThreshold(Light.Dark, 0)
```

Light intensity is measured from `0` (very dark) to `100` (very bright). You can decide what dark and bright mean for your purposes and set a _threshold_ for them. A threshold is a boundary or a limit. If you want a light intensity of `20` mean that it's dark, then you set the sensor threshold for ``dark`` to `20`. Also, if you think that `75` is bright, then you can set the threshold for ``bright`` to that.

After setting a threshold, any event for that light condition won't happen until the amount of light reaches your threshold value:

```block
sensors.color1.setThreshold(Light.Dark, 20)
sensors.color1.onLightDetected(LightIntensityMode.Reflected, Light.Dark, function () {
    brick.showMood(moods.sleeping)
})
```

## Parameters

* **condition**: the light intensity threshold to set, ``dark`` or ``bright``.
* **value**: the value of light intensity for the threshold: `0` for very dark to `100` for very bright.

## Example

Make a daylight alarm. When the ambient light reaches `70` flash the status light and play a sound.

```blocks
sensors.color3.setThreshold(Light.Bright, 70)
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Bright, function () {
    brick.setStatusLight(StatusLight.GreenFlash)
    for (let i = 0; i < 5; i++) {
        music.playSoundEffectUntilDone(sounds.mechanicalBackingAlert)
    }
})
```

## See also

[threshold](/reference/sensors/color-sensor/threshold)

gha_license_id: NOASSERTION


text:
---
id: 16864
title: Adam Busby
date: 2021-04-07T18:39:32+00:00
author: Laima
layout: post
guid: https://ukdataservers.com/adam-busby/
permalink: /04/07/adam-busby/
---

* some text
{: toc}

## Who is Adam Busby

Star of the TLC reality series OutDaughtered who is featured on the show alongside his family of eight. His wife Danielle gave birth to the only all-female set of quintuplets in the United States in 2015.

## Prior to Popularity

He and Danielle moved from Lake Charles, Louisiana to Houston, Texas shortly after marrying. The newlyweds initially struggled with infertility but underwent a number of procedures to help turn their luck around.

## Random data

He and Danielle share a blog and Instagram account called itsabuzzworld. The Instagram account has more than 1.2 million followers.

## Family & Everyday Life of Adam Busby

He and Danielle had a daughter named Blayke before quintuplets Ava Lane, Olivia Marie, Hazel Grace, Riley Paige, and Parker Kate came into the world almost exactly four years later.

## People Related With Adam Busby

He and Jim Bob Duggar are both patriarchs of large families seen on a TLC reality series.

branch_name: refs/heads/main


text:
# docker-teamcity-ubuntu
Docker packaging for TeamCity professional on top of Ubuntu 14.04 with Oracle  Java 8 from WebUpd8

This is a bit ugly, I run more that I should in one container, but it works...

To run it, clone this repo, then:

```
wget http://download-cf.jetbrains.com/teamcity/TeamCity-9.0.2.tar.gz
docker build --tag tcserver .
docker run -p 8111:8111  --detach --name tcserver tcserver
```

stop it with

```
docker kill tcserver
```

start it again later (config preserved in volume) with:

```
docker start tcserver
```

the server should be reachable at http://localhost:8111

repository: warnerpr/docker-teamcity-ubuntu

repo_name: warnerpr/docker-teamcity-ubuntu


text:
# OSD Cluster Readiness Job

- [OSD Cluster Readiness Job](#osd-cluster-readiness-job)
  - [Deploying the Image](#deploying-the-image)
  - [Deploying the Job](#deploying-the-job)
  - [Tunables](#tunables)
    - [`MAX_CLUSTER_AGE_MINUTES`](#max_cluster_age_minutes)
    - [`CLEAN_CHECK_RUNS`](#clean_check_runs)
    - [`CLEAN_CHECK_INTERVAL_SECONDS`](#clean_check_interval_seconds)
    - [`FAILED_CHECK_INTERVAL_SECONDS`](#failed_check_interval_seconds)
  - [Keeping up with osde2e](#keeping-up-with-osde2e)
- [TO DO](#to-do)

This job silences alerts while Day2 configuration is loaded onto a cluster at initial provisioning, allowing it to not page on-call SREs for normal operations within the cluster.

The silence initially takes effect for 1 hour.

We poll cluster health using [osde2e health checks](https://github.com/openshift/osde2e/blob/041355675304a7aa371b7fbeea313001036feb75/pkg/common/cluster/clusterutil.go#L211)
once a minute (this is [configurable](#failed_check_interval_seconds)),
until they all report healthy 20 times in a row ([configurable](#clean_check_runs))
on 30s intervals ([configurable](#clean_check_interval_seconds)).
By default, we will clear any active silence and exit successfully if the cluster is (or becomes) more than two hours old ([configurable](#max_cluster_age_minutes)).

If the silence expires while health checks are failing, we reinstate it.
(This means it is theoretically possible for alerts to fire for up to one minute if the silence expires right after a health check fails. [FIXME](#to-do).)

## Deploying the Image

```
make build
make docker-build
make docker-push
```

This builds the binary for linux, builds the docker image (which requires the binary to be built externally as of right now) and then pushes the updated image to quay.

If you wish to push to a specific repository, org, or image name, you may override the `IMAGE_REPO`, `IMAGE_ORG`, or `IMAGE_NAME` variables, respectively, when invoking the `docker-build` and `docker-push` targets.
For example, for development purposes, you may wish to `export IMAGE_ORG=my_quay_namespace`.

## Deploying the Job

Deploy each of the manifests in the [deploy/](deploy) folder in alphanumeric order.

If you are overriding any of the `IMAGE_*` variables for development purposes, be sure to (temporarily) edit the [Job](deploy/60-osd-ready.Job.yaml), setting the `image` appropriately.

You can iterate by deleting the Job (which will delete its Pod) and recreating it.

## Tunables
The following environment variables can be set in the container, e.g. by editing the [Job](deploy/60-osd-ready.Job.yaml) to include them in `spec.template.spec.containers[0].env`.

Remember that the values must be strings; so numeric values must be quoted.

### `MAX_CLUSTER_AGE_MINUTES`
The maximum age of the cluster, in minutes, after which we will clear any silences and exit "successfully".

**Default:** `"120"` (two hours)

### `CLEAN_CHECK_RUNS`
The number of consecutive health checks that must succeed before we declare the cluster truly healthy.

**Default:** `"20"`

### `CLEAN_CHECK_INTERVAL_SECONDS`
The number of seconds to sleep between successful health checks.
Once the cluster is truly healthy, you can expect the job to succeed after an interval of roughly:

`CLEAN_CHECK_RUNS` x (`CLEAN_CHECK_INTERVAL_SECONDS` + (time to run one iteration of health checks)) seconds

**Default:** `"30"` (seconds)

### `FAILED_CHECK_INTERVAL_SECONDS`
The number of seconds to sleep after a failed health check, before rechecking.

**Default:** `"60"` (one minute)

## Keeping up with osde2e
This code runs health checks via a module dependency on `github.com/openshift/osde2e`.
That dependency is pinned to a specific commit in [go.mod](go.mod).
That commit must be modified manually to pick up changes in osde2e.
An easy way to bump to the latest commit is to run:

```
go get -u github.com/openshift/osde2e
```

Don't forget to [build](#deploying-the-image) and [test](#deploying-the-job) with the updated dependency before committing!

# TO DO

- [x] Look for existing active silences before creating a new one
- [x] Implement _actual_ healthchecks (steal them from osde2e) to determine cluster stability
- [ ] Find if there's a better and more secure way to talk to the alertmanager API using oauth and serviceaccount tokens.
- [ ] Make the default silence expiry shorter; and extend it when health checks fail ([OSD-6384](https://issues.redhat.com/browse/OSD-6384)).


text:
# Street Address

The street address is often found at the top of the list of hand-entered data in the bottom half of the records. This field can appear as "No. of Street or Avenue", "House Number", "Premises", and "Location". Enter the building address as appears e.g. "39 Mott St", "S. W. corner of 7th Avenue & 25th St. No 226 7th Avenue", "Mulberry, Mott and Prince St."

![record_street_address_image_1](/images/street_address_1.png)
***
![record_street_address_image_2](/images/street_address_2.png)
***
![record_street_address_image_3](/images/street_address_3.png)
***


text:
# Workout-Tracker
Unit 17 Nosql Assignment. UW Coding Boot Camp.

## Description

For this assignment, we were required to create a workout-tracking application that would allow the user to track several chosen metrics. This workout tracker uses mongoDB, mongoose and Express to handle routes.

With the front-end fully developed the back-end our primary objective was to connect html and api routes so our application returned that stats the user is looking for: see user story.

Overall this application was a great exercise in using databases and connecting the front and back ends of an application.

## Table of Contents

* [User Story](#user-story)
* [Acceptance Criteria](#acceptance-criteria)
* [Questions](#questions)
* [Deployment](#deployment)

## User Story

* As health-conscious and physically active person
* I want to be able to keep track of my workout statistics
* So that I can track my progress

I want to be able to log multiple exercises in a workout on a given day.

I should also be able to track the name, type, weight, sets, reps, and duration of exercise.

If the exercise is a cardio exercise, I should be able to track my distance traveled.

## Acceptance Criteria

When the user loads the page, they should be given the option to create a new workout or continue with their last workout.

The user should be able to:

  * Add exercises to a previous workout plan.

  * Add new exercises to a new workout plan.

  * View the combined weight of multiple exercises on the `stats` page.

## Questions

Questions or concerns? Feel free to reach out on [GitHub](https://github.com/bfourGitHub) or via email at<EMAIL_ADDRESS>
## Deployment

[Github Repository](https://github.com/bfourGitHub/Workout-Tracker)

[Deployed Application](https://workout-tracker-moreno.herokuapp.com/)

repository: bfourGitHub/Workout-Tracker

repo_name: bfourGitHub/Workout-Tracker


text:
The purpose of Swagger Tools (swagger-tools) is to provide some useful [Swagger][swagger] tooling written for Node.js
and the browser (where applicable).  Use the links below to get specific documentation about the provided APIs and
tools:

* [API][swagger-tools-api]: The JavaScript API for interacting with Swagger documents
* [CLI][swagger-tools-cli]: The command line interface for swagger-tools
* [Middleware][swagger-tools-middleware]: Connect middleware using Swagger information for various things
(Ex: Request validation, routing, ...)
* [Validation][swagger-tools-swagger-validation]: Documentation on how our Swagger validation works

## Installation

Swagger Tools is available for both Node.js and the browser.  Installation instructions for each environment are below.

### Browser

Installation for browser applications can be done via [Bower][bower] or by downloading a standalone binary.

#### Using Bower

```
bower install swagger-tools --save
```

#### Standalone Binaries

The standalone binaries come in two flavors:

* [swagger-tools-standalone.js](https://raw.github.com/apigee-127/swagger-tools/master/browser/swagger-tools-standalone.js): _2,280kb_, full source _(including all dependencies)_ and source maps
* [swagger-tools-standalone-min.js](https://raw.github.com/apigee-127/swagger-tools/master/browser/swagger-tools-standalone-min.js): _316kb_, minified, compressed
and no sourcemap

### Node.js

Installation for Node.js applications can be done via [NPM][npm].

```
npm install swagger-tools --save
```

If you want to use the `swagger-tools` executable for validating Swagger documents, you can install swagger-tools
globally using the following:

```
npm install -g swagger-tools
```

At this point, you're ready for the [Quick Start][quick-start].

[bower]: http://bower.io/
[npm]: npmjs.org
[quick-start]: https://github.com/apigee-127/swagger-tools/blob/master/docs/QuickStart.md
[swagger]: http://swagger.io/
[swagger-tools-api]: https://github.com/apigee-127/swagger-tools/blob/master/docs/API.md
[swagger-tools-cli]: https://github.com/apigee-127/swagger-tools/blob/master/docs/CLI.md
[swagger-tools-middleware]: https://github.com/apigee-127/swagger-tools/blob/master/docs/Middleware.md
[swagger-tools-swagger-validation]: https://github.com/apigee-127/swagger-tools/blob/master/docs/Swagger_Validation.md

repository: waleedsamy/swagger-tools

gha_language: JavaScript

repo_name: waleedsamy/swagger-tools


text:
---
description: Learn how to configure Cisco Duo for MFA.
topics:
  - mfa
  - duo
contentType:
  - how-to
useCase:
  - customize-mfa
---
# Configure Cisco Duo for MFA

Cisco Duo is a multi-faceted authentication provider and can only be used on your Auth0 tenant if all other factors are disabled.

## Administrative setup

Your Duo account can be configured to support push notifications, SMS, OTP, phone callback, and more. See the [Duo documentation](https://duo.com/docs) for more details on Duo setup.

::: note
Create an integration in Duo Security of type **Web SDK** and use those credentials to fill in the Duo settings in the Auth0 Dashboard as noted below.
:::

When enabling Duo in the Dashboard, you will need to click on the Duo factor and fill in a few settings fields in order to link your Duo account to Auth0.

![MFA Duo Settings](/media/articles/mfa/duo-settings.png)

::: warning
If other factors are enabled alongside Duo, Duo will be unavailable. Duo is only available to end users when it is the **sole** factor enabled.
:::

## MFA sessions

Duo does not provide an option for "Remember Me" behavior, so a 30-day MFA session is hard-coded to remember a logged-in user and not prompt them every time they log in. If you wish to force end-users to log in with Duo every time, you may implement this functionality by creating a rule with `allowRememberBrowser: false` instead.

```js
function (user, context, callback) {
  context.multifactor = {
    provider: 'any',
    allowRememberBrowser: false
  };

  callback(null, user, context);
}
```

## End user experience

The user will see a prompt for the second factor with Duo, listing the options you have enabled in your Duo account.

![Duo Login](/media/articles/mfa/duo-login.png)

Your end users can download Duo from [Google Play](https://play.google.com/store/apps/details?id=com.duosecurity.duomobile) or from the [App Store](https://itunes.apple.com/us/app/duo-mobile/id422663827?mt=8) for use as a second factor.


text:
# cordova-plugin-privacy-screen

On iOS it blurs the app content when it goes into the background to prevent legibility of sensitive information.
On Android it uses default system settings.

### To Install via Ionic
```ionic plugin add https://github.com/mpateck/cordova-plugin-privacy-screen.git --save```

### To Install via Cordova
```cordova plugin add https://github.com/mpateck/cordova-plugin-privacy-screen.git --save```

That is it! it will automatically take effect!

# Roadmap

repository: mpateck/cordova-plugin-privacy-screen

repo_name: mpateck/cordova-plugin-privacy-screen


text:
Form-Submission-Attributes-Polyfill
===================================

Simple polyfill to handle html5 form submission attributes in legacy browsers

Function must be applied to a form, ie $('form').formSubmissionAttributes() otherwise it will output a warning and cancel execution on that element.

The script will pull appropriately typed inputs/buttons either from within the form or that are pointed to the form via the form="" attribute.  If one of these items is clicked and has form submission attributes it will apply those values to the form before submission, otherwise it will make sure the form defaults (from page load time) are applied.

If you need a Modernizr test, I use:
Modernizr.addTest('formaction', 'formAction' in document.createElement('input'));


text:
# ⚡ PW² CLI

A command line interface that easily allows you to re-scale your images to the right power of two dimensions.

## Installation

```bash
npm i -g pw2-cli
```

## Usage
```bash
# will resize all .png images inside the path using the previous-pw2 resizing mode
./pw2-cli -f png -i ./my-images-path -m prev

# will resize the image.jpg file using the next-pw2 resizing mode
./pw2-cli -i ./my-folder/image.jpg -m next

# will resize all .jpg, .jpeg and .png files inside the current directory using the nearest-pw2 resizing mode
./pw2-cli
```

## Supported Commands and Arguments
```bash
Commands:
    help     Display help
    version  Display version

  Options:
    -f, --filter [value]  File extensions to filter (defaults to "png,jpg,jpeg")
    -h, --help            Output usage information
    -i, --input [value]   Input file or directory with files to resize, if the path is a directory it will filter all files using the filter option (defaults to process.cwd())
    -m, --mode [value]    Resizing mode to be used (near, prev, next) (defaults to "near")
    -v, --version         Output the version number
```

## But Why ?

Games and real-time applications, in general, tend to prefer images and textures with power-of-two dimensions, because they make it easier to generate mipmaps, consume less GPU memory, and increase the overall performance for shader operations.

However, finding the right power-of-two values for each dimension of each texture of each model in your application sounds time-consuming, and it is. [⚡PW²](https://www.npmjs.com/package/pw2) born from the necessity to make this a no-brainer, quick and easy process.

This application was developed for the cs50 Final Project assignment and as a use case of [⚡PW²](https://www.npmjs.com/package/pw2) library.

## License

[MIT](https://github.com/jordyhenry/pw2-cli/blob/master/LICENSE)

## TODO
- Update the project to use typescript
- Fix any English misspells (sorry guys, it's not my first language  🤷♂)


text:
---
Slug: dnssec-keys-dialog
Keywords: DNSSEC,key file
Notes: was wd_keyfile prior to v. 8
---
# DNSSEC Keys dialog

This dialog is used to create/maintain a list of [DNSSEC](df_dnssec.md) keys - either a zone's on-line keys or for a DNSSEC key file.

- **DNSSEC keys**\
    A list of DNSSEC keys.
    - Click the *Add* button to create a new key using the [DNSSEC Key dialog](wd_dnsseckey.md).
    - Select a key, and click the *Edit* button to edit a key in the [DNSSEC Key dialog](wd_dnsseckey.md).
    - Select a key, and click the *Remove* button to delete a key.

- **"Import..." button** (on-line keys only)\
Allows you to import DNSSEC keys from a DNSSEC key file.

- **"Export..." button**  (on-line keys only)\
Allows you to export the listed keys to a DNSSEC key file.

repository: jhsoftware/SimpleDNS-Help

repo_name: jhsoftware/SimpleDNS-Help


text:
# avalonia-fsharp-example

Code example for the article ["Say hello to Avalonia"](https://gsomix.github.io/blog/01-say-hello-to-avalonia/).

![window](img/01-window.PNG)

## Build

[.NET Core 3.1 SDK](https://www.microsoft.com/net/download/core#/sdk) is required to build the project.

```
$ dotnet build -c Release
```

# Run

```
$ dotnet run -c Release
```

repository: gsomix/avalonia-fsharp-example

gha_language: F#

repo_name: gsomix/avalonia-fsharp-example


text:
# CHANGELOG

## mmpdb 2.2 - 2019-11-01

  This minor release contains improvements that help reducing the
  database size. MAny transformations and associated statistics inside
  the database are unlikely to ever be used, since there are other
  transformations that will yield the same compounds. To accomplish this,
  three new options have been introduced:

- max-radius: The maximum radius can now be set on the command line
  during indexing. This was hardcoded in previous versions.

- smallest-transformation-only: Some transformation scan be reduced to
  smaller transformations, for example p-Fluoro-phenyl >> p-Chloro-phenyl
  to Fluoro >> Chloro. If this flag is set during indexing, reducible
  transformations will not be written to the database. Note that this only
  setting reduces the number of transformations for a given pair. It does
  not completely remove a pair.

- min-heavies-per-const-frag: For double- and triple-cuts, fragmentations
  are created where the constant parts can be very small down to a single
  atom. For example, if the fragmentation algorithm can generate a single-cut
  where the variable fragment is p-Fluorophenyl, it will also generate a
  double cut with phenyl as variable fragment and F as one of the constant
  pieces. The 'min-heavies-per-const-frag' option can be used during
  fragmentation to eliminate multiple cuts where one of the constant fragments
  is very small. If this is set to 3 or 4, double- and triple cuts only happen
  at positions that would be considered real scaffolds changes in the middle
  of molecules. Note that in principle this option only reduces the number
  of pairs for a given transformation, effectively removing multiple-cuts
  where possible. There may be edge cases where pairs are completely removed,
  because the single cut transfers too many atoms. If you use this option, you
  may want to adjust the --max-variable-heavies option during indexing.

  The last '--smallest-transformation-only' and '--min-heavies-per-const 3'
  options together typically reduce the database size by ~ 70%.

## mmpdb 2.1 - 2018-04-27

- RDKit 2018\_03\_1 changed the SMILES output so wildcard atoms are
  represented with a `*` instead of `[*]`. mmpdb works with SMILES
  strings at the syntax level. Parts of the code expected only the old
  RDKit behavior and crashed or gave the wrong output for the new
  behavior. For example, the fragmentation algorithm raised an
  AssertionError saying:

```
  File "mmpdblib/fragment_algorithm.py", line 368, in make_single_cut
    constant_smiles_with_H = replace_wildcard_with_H(constant_smiles)
  File "mmpdblib/fragment_algorithm.py", line 302, in replace_wildcard_with_H
    assert smiles.count("[*]") == 1, smiles
AssertionError: *O
```

  Version 2.1 now supports both ways of representing the wildcard atom
  and will work with RDKit releases from 2017 and 2018.

- The tests are now included as part of the distribution.

- mmpdb is available from PyPI using "pip install mmpdb"

- A preprint of
  [our paper](https://chemrxiv.org/articles/mmpdb_An_Open_Source_Matched_Molecular_Pair_Platform_for_Large_Multi-Property_Datasets/5999375)
  is available from ChemRxiv. We received word today that
  [JCIM](https://pubs.acs.org/journal/jcisd8) has accepted it (after
  minor changes).

## mmpdb 2.0 - 2017-08-15

First public release of mmpdb, an open-source matched molecular pair
package designed to create and query MMP databases for big-pharma
sized ADMET datasets.


text:
# Change Log

## [Unreleased](#unreleased)

### Build

- **deps:** bump golang from 1.15.0-alpine3.12 to 1.15.2-alpine3.12
- **deps:** bump github.com/hashicorp/nomad from 0.12.3 to 0.12.4
- **deps:** bump golang from 1.14.6-alpine3.12 to 1.15.0-alpine3.12
- **deps:** bump actions/setup-go from v1 to v2.1.2
- **deps:** bump github.com/hashicorp/nomad from 0.12.1 to 0.12.3

### Chore

- automate releases via workflow
- uplift golang and libs
- add dependabot configuration

## [v1.1.0](#v1.1.0) - 2020-08-06

### Build

- **deps:** bump github.com/spf13/viper from 1.7.0 to 1.7.1
- **deps:** bump github.com/spf13/viper from 1.6.3 to 1.7.0

### Chore

- release new version
- update libraries and golang version ([#31](https://github.com/code42/axiomatic/issues/31))

### Docs

- address some markdown linting issues

### Fix

- Added dir2consul environment variable for the host-local consul agent and fixed the default vault path for consul ACL creds.
- s/jimrazmus/code42/

### Reverts

- Added two things:

### Pull Requests

- Merge pull request [#33](https://github.com/code42/axiomatic/issues/33) from code42/dependabot/go_modules/github.com/spf13/viper-1.7.1
- Merge pull request [#28](https://github.com/code42/axiomatic/issues/28) from code42/dependabot/go_modules/github.com/spf13/viper-1.7.0
- Merge pull request [#27](https://github.com/code42/axiomatic/issues/27) from code42/dm-final-dir2consul-job-adjustment
- Merge pull request [#24](https://github.com/code42/axiomatic/issues/24) from code42/adjusting-repo-artifact-stanza
- Merge pull request [#22](https://github.com/code42/axiomatic/issues/22) from code42/code42
- Merge pull request [#23](https://github.com/code42/axiomatic/issues/23) from code42/change-private-repo

## [v1.0.1](#v1.0.1) - 2020-04-27

### Chore

- release new version
- add container labels

### Pull Requests

- Merge pull request [#21](https://github.com/code42/axiomatic/issues/21) from code42/label-container

## [v1.0.0](#v1.0.0) - 2020-04-27

### Build

- add lint and errcheck to workflow
- Adopt simpler workflow and Docker Hub.
- remove debug var in favor of IDE debugging
- no codecov token required for public repos
- Remove redundant triggers. Add all subdirs to code coverage to future proof.
- Change workflow to Go 1.14
- Add labels to the docker image.
- **deps:** bump github.com/spf13/viper from 1.6.2 to 1.6.3

### Chore

- release new version
- update and tidy go modules
- go mod tidy
- update both codecov URLs
- axiomatic is now a code42 os project.
- remove obsolete Makefile

### Docs

- Remove extra header.
- Add verbiage for SSH key usage.
- make configuration section more clear
- sync with currect configuration behavior
- more link updates post move to Code42
- Add dir2consul configuration verbiage. Make other general improvements while here.
- Add Nomad config options now available with the API.
- Add webhook setup instructions.

### Feat

- Pass consul and d2c env vars to dir2consul
- Use ssh for repo cloning. Use an ssh key pair for accessing private repos.
- Pass CONSUL_* env vars to dir2consul.
- Switch handler to use the new functions.
- Use Nomad API for registering a Job.
- Use Nomad API for creating a Job
- update to golang 1.14.0
- Require github secret configuration.
- Begin using dir2consul
- Pass repo name as the Consul key prefix.

### Fix

- Update to dir2consul job and related processing ([#15](https://github.com/code42/axiomatic/issues/15))
- add err checking
- Update test to match linter change
- appease golint
- Use the new environment filter function
- make the ssh public key easy to fetch
- Pass the ssh private key in to the template
- Move config testing to a function.
- use Viper for env var handling
- Remove obsolete configuration variable.
- correct the destination and dirctory values
- use leading spaces, not tabs, in the job definition.
- repo cloning location Put it in local/repo to avoid potential collisions. Make dir2consul chdir to this repo location.
- detect and return err
- improve detecting/reporting on job response.
- log environment vars for debugging
- clean up imports
- remove obsolete variable and add whitespace.
- Compile the template once and reuse it.
- Change template to HCL
- Remove a trailing brace that was missed.

### Test

- update AU file for startupMessage test
- add test for startup message
- Adjust test for new template function.

### Pull Requests

- Merge pull request [#20](https://github.com/code42/axiomatic/issues/20) from code42/update-modules
- Merge pull request [#17](https://github.com/code42/axiomatic/issues/17) from code42/lint-errcheck
- Merge pull request [#16](https://github.com/code42/axiomatic/issues/16) from code42/workflow-overhaul
- Merge pull request [#13](https://github.com/code42/axiomatic/issues/13) from code42/dependabot/go_modules/github.com/spf13/viper-1.6.3
- Merge pull request [#12](https://github.com/code42/axiomatic/issues/12) from code42/d2c-env
- Merge pull request [#11](https://github.com/code42/axiomatic/issues/11) from code42/ssh
- Merge pull request [#10](https://github.com/code42/axiomatic/issues/10) from code42/use-viper
- Merge pull request [#9](https://github.com/code42/axiomatic/issues/9) from code42/inc-cov
- Merge pull request [#8](https://github.com/code42/axiomatic/issues/8) from jimrazmus/consul-env-vars
- Merge pull request [#7](https://github.com/code42/axiomatic/issues/7) from c42-dana-mckiernan/master
- Merge pull request [#6](https://github.com/code42/axiomatic/issues/6) from jimrazmus/use-nomad-api

## [0.10.0](#0.10.0) - 2020-02-18

[Unreleased]: https://github.com/code42/axiomatic/compare/v1.1.0...HEAD
[v1.1.0]: https://github.com/code42/axiomatic/compare/v1.0.1...v1.1.0
[v1.0.1]: https://github.com/code42/axiomatic/compare/v1.0.0...v1.0.1
[v1.0.0]: https://github.com/code42/axiomatic/compare/0.10.0...v1.0.0

repository: jimrazmus/axiomatic

repo_name: jimrazmus/axiomatic


text:
# Defensive Programming

- always expect incorrect input
- create correct exception messages
- user must never see exception messages

### Assertions

- must be used only for very heavy failure situations
- not used often
- cannot be try/catched
- gives a message with stack trace

```c#
public class StudentGradesCalculator
{
    private readonly IList<int> studentGrades;
    public StudentGradesCalculator(IList<int> studentGrades)
    {
        this.studentGrades = studentGrades;
    }

    public double GetAverageStudentGrade()
    {
        Debug.Assert(studentGrades != null && studentGrades.Count > 0,
        "Student grades are not initialised"); // better make validation in constructor

        return studentGrades.Average();
    }
}

public class AssertionDemo
{
    static void Main()
    {   // this will not work in release
        Debug.Assert(PerformAction(), "Could not perform action"); // if statement is true program is working

        StudentGradesCalculator calc = new StudentGradesCalculator(new Int[] {5, 6, 4, 3, 4, 5, 6});
        Console.WriteLine(calc.GetAverageStudentGrade());

        calc = new StudentGradesCalculator(new Int[] {}); // this will interrupt the execution
        Console.WriteLine(calc.GetAverageStudentGrade());
    }

    private static bool PerformAction()
    {
        Console.WriteLine("Action performed.");
        return true;
    }
}
```

### Exceptions

- use only in exceptional situations
- can be very slow (do not use for simple errors as user names)
- crate custom exception Class when needed
- messages need to be very descriptive

#### Defense Clauses
```c#
if (input == null)
{
    throw new ArgumentException("Input cannot be null");
}
```
#### Try - Catch blocks
```c#
try
{
    readInput(input);
}
catch (ArgumentException e)
{
    Console.WriteLine("Invalid Argument");
}
finally
{
    Console.WriteLine("Hello from Finally!"); // used for closing IDisposable for example
}
```

#### [Bytes2you.Validation](https://github.com/veskokolev/Bytes2you.Validation) library
- include from NuGet and use like this

```c#
Guard.WhenArgument(number, "Action number")
    .IsGreaterThan(15)
    .IsLessThan(10)
    .Throw();
```

#### Robustness vs. Correctness
- **Robustness** - always try to return something (video decoding or game)
- **Correctness** - never return wrong result (bank or medical software)

#### Error Barricades
- public methods / functions
- private methods / functions

### Release and Debug modes in Visual Studio

#### Release mode
- **unsafe mode** - allows to use `unsafe {}` block
- **optimise**
    - removes debugger/breakpoints - allows program to start faster
    - removes dead code (after return)
    - changes cycles
    - Debug class is removed - all code in `Debug.Assert()` will not work


text:
# DcaRelations component

This component provides methods to handle "many-to-many" relations between tables.

Important notes:

- Please update the database after defining a new relation.
- The relation table name consists of the original table name and related table name unless specified differently, e.g., tl_table_one_table_two.
- If you delete a record in the related table, then the relation tables are automatically updated.
- Automatically adds a filter in the back end if you set `'filter' => true,` like for any other field (note that `filter` has to be in your `panelLayout`)
- Automatically adds a search box in the back end if you set `'search' => true,` like for any other field  (note that `search` has to be in your `panelLayout`). It lists all the fields that are searchable in the related table.
- Relations are always bidirectional. To have unidirectional ones, you need to have separate relation tables.

## Usage

Define the relation in the DCA table of your choice:

```php
<?php

$GLOBALS['TL_DCA']['tl_source_table']['fields']['my_field']['relation'] = [
    'type' => 'haste-ManyToMany',
    'table' => 'tl_related_table',
];
```

Then, update the database schema. You can now benefit from the relations, e.g., using static methods from our custom model class:

```php
use Codefog\HasteBundle\Model\DcaRelationsModel;

// Get the related values from the related table for source record ID 123
$relatedIds = DcaRelationsModel::getRelatedValues('tl_source_table', 'my_field', 123);

// Get the reference values from the source table for related record IDs 1, 2, 3
$referenceIds = DcaRelationsModel::getReferenceValues('tl_source_table', 'my_field', [1, 2, 3]);
```

Alternatively, you can extend your model class:

```php
use Codefog\HasteBundle\Model\DcaRelationsModel;

class SourceTableModel extends DcaRelationsModel
{
    // …
}
```

Then you can call the methods using the Contao default method:

```php
$related = $sourceTableModel->getRelated('my_field');
```

## Reference

Here is a full list of available configuration options:

```php
$GLOBALS['TL_DCA']['tl_table_one']['fields']['my_field']['relation'] = [
    'type' => 'haste-ManyToMany',
    'table' => 'tl_table_two', // the related table,
    'reference' => 'id', // current table field (optional)
    'referenceSql' => ['type' => \Doctrine\DBAL\Types::INTEGER, 'unsigned' => true, 'default' => 0], // current table field sql definition (optional)
    'referenceColumn' => 'my_reference_field', // a custom column name in relation table (optional)
    'field' => 'id', // related table field (optional)
    'fieldSql' => ['type' => \Doctrine\DBAL\Types::INTEGER, 'unsigned' => true, 'default' => 0], // related table field sql definition (optional)
    'fieldColumn' => 'my_related_field', // a custom column name in relation table (optional)
    'relationTable' => '', // custom relation table name (optional)
    'forceSave' => true, // false by default. If set to true it does not only store the values in the relation tables but also the "my_relation" field
    'skipInstall' => true, // false by default. Do not add relation table. Useful if you use Doctrine relations on the same tables.
];
```

You can also define the relation using Doctrine ORM entities, [read more about it here](DoctrineOrm.md).

repository: codefog/contao-haste

gha_language: PHP

repo_name: codefog/contao-haste


text:
# dcdr-js

VSCO's [DCDR](https://github.com/vsco/dcdr) (Decider) package for Node.js

## Overview

Decider is a [feature flag](https://en.wikipedia.org/wiki/Feature_toggle) system with adaptable backends. Read more on the [DCDR](https://github.com/vsco/dcdr#dcdr-decider) repo.

## Example

```js
var dcdr = require('dcdr');

dcdr.init({ dcdr: { path: '/etc/dcdr/decider.json' } });

if (dcdr.isAvailable('enable_feature')) {
  console.log('feature enabled');
} else {
  console.log('feature disabled');
}
```

## Release

Since we host this package on npm, there are a few steps to follow in order to do a release.

1. Decide the release type. We follow the [semantic versioning](https://docs.npmjs.com/getting-started/semantic-versioning#semver-for-publishers) (semver) standard. Is it a patch, minor, or major release?
2. Run `npm version <release_type>`. This updates the `version` number in `package.json`.
3. Run `script/release`.
4. Fill out the release notes. What changed?
5. Run `npm publish`. See the [docs](https://docs.npmjs.com/getting-started/publishing-npm-packages) for more info.

repository: vsco/dcdr-js

repo_name: vsco/dcdr-js


text:
# Rhodophyllus sericeus var. nolaniformis Kühner & Romagn., 1955 VARIETY

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Revue Mycol. , Paris 19: 9 (1955)

#### Original name
Rhodophyllus sericeus var. nolaniformis Kühner & Romagn., 1955

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Entolomataceae/Entoloma/Entoloma sericeum/ Syn. Rhodophyllus sericeus nolaniformis/README.md

repo_name: mdoering/backbone


text:
# Watr.li Dashboard

## Development

### SCSS compilation

Since the sbt plugins for SASS compilation are really slow (non-incremental?) we've resorted to compiling SASS using the compass gem. So when developing, run

    $ compass watch

in the project's root directory.

repository: watr-li/dashboard

repo_name: watr-li/dashboard


text:
+++
title = "CLEAR HINT"
weight = 6
+++

### Description

The `CLEAR HINT` syntax is used to clear hint settings for current connection.

### Syntax

{{< tabs >}}
{{% tab name="Grammar" %}}
```sql
ClearHint ::=
  'CLEAR' ('SHARDING' | 'READWRITE_SPLITTING')? 'HINT'
```
{{% /tab %}}
{{% tab name="Railroad diagram" %}}
<iframe frameborder="0" name="diagram" id="diagram" width="100%" height="100%"></iframe>
{{% /tab %}}
{{< /tabs >}}

### Supplement

- When `SHARDING`/`READWRITE_SPLITTING` is not specified, the default is clear all hint settings.

### Example

- Clear hint settings of sharding

```sql
CLEAR SHARDING HINT;
```

- Clear hint settings of readwrite splitting

```sql
CLEAR READWRITE_SPLITTING HINT;
```

- Clear all hint settings

```sql
CLEAR HINT;
```

### Reserved word

`CLEAR`, `SHARDING`, `READWRITE_SPLITTING`, `HINT`

### Related links

- [Reserved word](/en/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)

repository: tristaZero/incubator-shardingsphere

repo_name: tristaZero/incubator-shardingsphere


text:
# **About**
It's often harder for a fresh CS graduate to find company names and their career pages where he/she can apply. So we try to accumulate Software company's career pages.

# Software Company's Career Pages in Bangladesh

## [1. Cefalo](https://www.cefalo.com/career)
## [2. Selise](https://selise.ch/career)
## [3. Therap](https://therap.recruiterbox.com)
## [4. NewsCred](https://newscred.com/careers)
## [5. Data Soft](http://datasoft-bd.com/career)
## [6. Brain Station 23](https://career.brainstation-23.com)
## [7. Southtech Limited](https://career.southtechgroup.com)
## [8. Magnito Digital](http://magnitodigital.com/career)
## [9. BJIT Group](https://bjitgroup.com/career)
## [10. InsightIn Technology](http://insightintechnology.com/career)
## [11. Relisource](https://www.relisource.com/careers/)
## [12. eGeneration](https://www.egeneration.co/career/)
## [13. Atom AP Ltd.](http://atomapgroup.com/careers)
## [14. Nascenia](https://www.nascenia.com/career/)

# AI/ML Companies in Bangladesh
Curated a list of companies working on Artificial Intelligence / Machine Learning / Deep Learning in Bangladesh

|Name|Location|Contact|
|:---:|:---:|:---:|
|[Socian Ltd.](https://socian.ai/)|Mirpur, Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[Intelligent Machines Ltd.](https://retail.ai/)| Banani, Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[Growuply](https://growuply.com/)|Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[Cramstack](https://cramstack.com/)|Banani, Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[eGeneration](https://engeneration.co/)|Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[Atom AP Ltd.](http://atomapgroup.com/)|Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[ascii system](https://www.asciisys.com/)|Chittagong| <img<EMAIL_ADDRESS>width=20/>|
|[Orion Informatics Ltd](https://orion-informatics.com/)|Dhanmondi, Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[BJIT](https://bjitgroup.com/)|Baridhara, Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[Augnitive](https://augnitive.com/)|Mirpur DOHS, Dhaka| <img<EMAIL_ADDRESS>width=20/>|
|[Nascenia](https://www.nascenia.com/)|Lalmatia, Dhaka| <img<EMAIL_ADDRESS>width=20/>|

[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FBig0one%2Fsoftware-company-names)](https://github.com/big0one)


text:
<!--
DO NOTE COPY THIS ISSUE TEMPLATE MANUALLY. Use `yarn run release patch:issue <version>` from the
`dev/release` directory in the main repository to create a patch release issue, instead.

Arguments:
- $MAJOR
- $MINOR
- $PATCH
-->

# $MAJOR.$MINOR.$PATCH Patch Release

**Attention developers:** Add pending changes to this checklist, cherry-pick the relevant commits onto branch `$MAJOR.$MINOR`. **Only check off items if the relevant PR/commits have been cherry-picked into the branch**:

- [ ] TODO: Add PR or commit links here

## Release sourcegraph/server

- [ ] Push the branch `$MAJOR.$MINOR` with your cherry-picked commit(s) and make sure CI passes.
- [ ] Push a release candidate tag:
    ```
    VERSION=$MAJOR.$MINOR git checkout "$VERSION"
    VERSION='v$MAJOR.$MINOR.$PATCH-rc.1' bash -c 'git tag -a "$VERSION" -m "$VERSION" && git push origin "$VERSION"'
    ```
- [ ] If CI passes, push the release tag:
    ```
    VERSION=$MAJOR.$MINOR git checkout "$VERSION"
    VERSION='v$MAJOR.$MINOR.$PATCH' bash -c 'git tag -a "$VERSION" -m "$VERSION" && git push origin "$VERSION"'
    ```
- [ ] Wait for the final Docker images to be available at https://hub.docker.com/r/sourcegraph/server/tags.

## Release Kubernetes deployment

In [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph):

- [ ] Wait for Renovate to open a PR to update the image tags and merge that PR ([example](https://github.com/sourcegraph/deploy-sourcegraph/pull/199)).
- [ ] Cherry-pick the image tag update commits from `master` onto `$MAJOR.$MINOR` branch. Then push the release tag:
    ```
    git checkout $MAJOR.$MINOR
    git pull
    git cherry-pick <commit0> <commit1> ... # all relevant commits from the master branch
    git push $MAJOR.$MINOR
    git tag v$MAJOR.$MINOR.$PATCH
    git push v$MAJOR.$MINOR.$PATCH
    ```

## Update the docs

- [ ] Open and merge PRs that publish the release (the PRs created by this command must be merged manually):
  ```
  yarn run release release:publish $MAJOR.$MINOR.$PATCH
  ```
- [ ] Create a new section for the patch version in the changelog. Verify that all changes that have been cherry picked onto the release branch have been moved to this section of the [CHANGELOG](https://github.com/sourcegraph/sourcegraph/blob/master/CHANGELOG.md) on `master`.
- [ ] Post a reply in the #dev-announce thread to say that the release is complete.


text:
---
layout: post
title:      "Surviving my first project (instert cheesy motivational song here)"
date:       2020-06-21 20:05:39 -0400
permalink:  surviving_my_first_project_instert_cheesy_motivational_song_here
---

When Flatiron School said this would be a fast-paced program, they were not kidding! From day 1 I realized that I need to be on my toes and not slack off (slack pun intended). Earning my Master’s Degree seemed like a piece of cake in comparison, and this proved even more true since completing my first project for Module 1.

The start of project week, aka known as my first breakdown, my emotions, esteem, and brain stamina were put to the test. Can I actually do this?! Did I just make a huge mistake?! Perhaps being a health coach and telling people to eat vegetables all day was really *not* that bad???

Okay, I needed to get a grip. I took a breath, reminded myself why I went for a career change.

After venting to and receiving great study tips from my instructor, Yish, I felt better and felt my resolve return. And thanks to my amazing groupmates, Alex and Ben (aka battle buddies) I have been able to push through.

The initial stage was a challenge because I felt like everything I learned in the lessons just flew out the window. For every little thing I needed to do, I had to go back and review and research. I totally gained a new respect for google.

The panic set in at the initial stage of data cleaning. I remembered the tasks that needed to be done, such as grouping, eliminating duplicates, splitting, dropping columns, etc, but it was the how to be done that escaped me at the start. With the help of my instructors and groupmates, the material started to make more sense.

As the week went on, I found myself being able to remember certain codes without having to look them up as much, and my confidence grew a bit more in the reality that perhaps I can do this.  This project really gave me a good handle of Jupyter Notebook and more practice with GitHub (but I am going to find a video tutorial to do a refresher on that).

I also learned a few things about myself:

1. I need to really hunker down and study. And practice. And practice some more. Then do a little bit more practice- This is a truely a "use it or lose it" situation.
2. I am capable of much more than I thought I would be.
3. Don't be afraid to ask for help.

Now as soon as I copy the link to this blog in the final project page, I can breathe and I can say, I survived.

extension: markdown


text:
# FlatSoft-tmTheme
---
####**FlatSoft** is a theme for [Sublime Text](http://www.sublimetext.com)
####Installation:

Open Sublime Text and go to **"Preferences"** >  **"Browse Packages"**
and it will open the folder **"Packages"** for you.

Now create a folder and name it **"Color Schemes"** inside the **"User"** folder, and put the `FlatSoft.tmTheme` file in it.

In Sublime Text menu, go to **"Preferences"** > **"Color Scheme"** > **"User"** > **"Color Schemes"** and select the **FlatSoft** theme and your done.

![Screenshot](https://github.com/francomile/FlatSoft-tmTheme/blob/master/screenshot.png)

license: Unlicense

repository: francomile/FlatSoft-tmTheme

repo_name: francomile/FlatSoft-tmTheme


text:
# Contact

If you have questions, please ask at the
[json-sanitizer-support](https://groups.google.com/forum/#!forum/json-sanitizer-support)
Google Group.

Asking questions on Stack Overflow with the
[*input-sanitization* and *json*](http://stackoverflow.com/questions/tagged/input-sanitization+json)
tags is also a good way to find answers.

repository: lppedd/json-sanitizer

repo_name: lppedd/json-sanitizer


text:
# Prorgessive delivery

Some experiment with progressive delivery. All experiments involve the booking app and the rollout of the `reviews` service (which had three revisons in the original bookinfo demo).

[Experiment #1](./experiment-one/):
- Traffic Management with [Istio Subset-level splitting](https://argo-rollouts.readthedocs.io/en/stable/features/traffic-management/istio/#subset-level-traffic-splitting).
- Analysis with [Prometheus Analysis](https://argo-rollouts.readthedocs.io/en/stable/analysis/prometheus/)
- Metrics from Service Mesh prometheus

[Experiment #2](./experiment-two/):
- Traffic Management with [Istio Host-level splitting](https://argo-rollouts.readthedocs.io/en/stable/features/traffic-management/istio/#host-level-traffic-splitting).
- Analysis with [Prometheus Analysis](https://argo-rollouts.readthedocs.io/en/stable/analysis/prometheus/)
- Metrics from User-workload prometheus

[Experiment #3](./experiment-three/):
- Traffic Management with Routes.
- Analysis with [Prometheus Analysis](https://argo-rollouts.readthedocs.io/en/stable/analysis/prometheus/)
- Metrics from OCP Cluster prometheus

[Experiment #4](./experiment-four/):
- Traffic Management with Gateway API.
- Analysis with [Prometheus Analysis](https://argo-rollouts.readthedocs.io/en/stable/analysis/prometheus/)
- Metrics from OCP Cluster prometheus

gha_language: Shell


text:
<img src="http://img.jcabi.com/logo-square.png" width="64px" height="64px" />

[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
[![Managed by Zerocracy](https://www.0crat.com/badge/C3RUBL5H9.svg)](https://www.0crat.com/p/C3RUBL5H9)
[![DevOps By Rultor.com](http://www.rultor.com/b/jcabi/jcabi-odesk)](http://www.rultor.com/p/jcabi/jcabi-odesk)

[![Build Status](https://travis-ci.org/jcabi/jcabi-odesk.svg?branch=master)](https://travis-ci.org/jcabi/jcabi-odesk)
[![PDD status](http://www.0pdd.com/svg?name=jcabi/jcabi-odesk)](http://www.0pdd.com/p?name=jcabi/jcabi-odesk)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.jcabi/jcabi-odesk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.jcabi/jcabi-odesk)
[![Javadoc](https://javadoc.io/badge/com.jcabi/jcabi-odesk.svg)](http://www.javadoc.io/doc/com.jcabi/jcabi-odesk)

More details are here: [odesk.jcabi.com](http://odesk.jcabi.com/)

Set of classes in `com.jcabi.odesk` package is
an object oriented API of [Odesk](http://www.odesk.com):

```java
import com.jcabi.odesk.RtOdesk;
import com.jcabi.odesk.Odesk;
public class Main {
  public static void main(String[] args) {
    Odesk odesk = new RtOdesk(
      key, // odesk application key
      secret, // odesk application secret code
      token, // OAuth access token
      tsecret // OAuth access token, secret part
    );
    Team team = odesk.teams().team(/* team reference ID */);
    String ref = team.adjustments().add(
      "13369463", // contract number,
      new Cash.S("10.00"), // amount to be paid to the supplier
      new Cash.S("0.0"),
      "bonus payment for you dude", // comments
      "thanks for your good work, keep it up!" // notes
    );
  }
}
```

## Questions?

If you have any questions about the framework, or something doesn't work as expected,
please [submit an issue here](https://github.com/jcabi/jcabi-odesk/issues/new).

## How to contribute?

Fork the repository, make changes, submit a pull request.
We promise to review your changes same day and apply to
the `master` branch, if they look correct.

Please run Maven build before submitting a pull request:

```
$ mvn clean install -Pqulice
```

repository: jcabi/jcabi-odesk

gha_language: Java

repo_name: jcabi/jcabi-odesk


text:
# Hardhat docker node

Creates a standalone hardhat node,intended for development purposes

## Prepare for Unlock dev

### Start an ETH node

```
yarn start
```

### Deploy contracts and sample locks

```
yarn provision --network localhost
```

## Dockerize

```
# build container
docker build --rm -t eth-node .

# launch ETH node
docker run -it --rm -p 8545:8545 eth-node
```

Your node will be accessible locally using `hardhat run <xxx> --network localhost`

repository: unlock-protocol/unlock

gha_language: TypeScript

repo_name: unlock-protocol/unlock


text:
title: Automatic segmentation of subsolid pulmonary nodules using deep learning
groups: ai-for-health
finished: true
type: student
picture: vacancies/subsolid-nodule-segmentation-ai4h-21.png
template: project-single
people: Sanyog Vyawahare, Kiran Vaidhya Venkadesh, Colin Jacobs
description: Development of deep learning algorithms for subsolid nodule analysis in CT.

**Start date: 01-08-2022**

**End date: 30-04-2023**

## Clinical problem

Lung cancer is the leading cause of cancer death among both men and women, accounting for nearly 25% of all cancer
deaths. While early stage lung cancer typically shows up as pulmonary nodules on CT examinations, most nodules are
benign and do not require further clinical workup. However, radiologist workload is expected to increase soon with the
widespread implementation of lung cancer screening programs.
Therefore, accurate detection and characterization of pulmonary nodules is crucial to optimize screening.

Among the different types of nodules, subsolid pulmonary nodules are encountered in screening and carry a
higher malignancy risk. [Clinical reporting guidelines](https://www.acr.org/Clinical-Resources/Reporting-and-Data-Systems/Lung-Rads)
recommend different management strategies based on the radiological appearance and biological behaviour of nodules.
For subsolid nodules, the management decisions are dependent on accurate volumetric measurements and tracking the
evolution of the solid core of these nodules.

![Segmentation example]({{ IMGURL }}/images/projects/subsolid-nodule-segmentation-ai4h-21.png)

## Solution

Two nnUNet models were trained to segment the two sub-categories of subsolid nodules, i.e part-solid nodules (PSN) and non-solid nodules (NSN).
The algorithm takes a nodule patch as an input and predicts a segmentation mask. An ensemble of 5 nnUNet models is used to generate the segmentation mask.

## Approach

To train a network that can predict a segmentation mask, state of the art convolutional neural network approaches were reviewed and adapted to the problem at hand.

## Data

A dataset was curated from the MILD cohort. The segmentation mask for the nodules were generated using the CIRRUS lung screening software.
An expert radiologist finetuned the segmentation mask obtained from the CIRRUS software. A visual check was performed on the nodules to exclude nodules which contained bad segmentations (e.g. scarring was segmented, vessels were segmented as solid core).

For the PSN network 132 nodules and for NSN 613 nodules were used for training the network.
For part-solid nodules the segmentation mask contained three classes namely background, non-solid and solid core. For NSN, only two classes were present: background and non-solid region.

The training data consist of patches of size 64x32x32 (z, x, y) with the nodule located at the center of the patch. The
patches were clipped using the intensity values of 0.5 and 99.5 percentile of the foreground voxels.
Each patch was then normalized over the mean and s.d. of intensity values of entire dataset. On the fly augmentations
were performed to enlarge the dataset for training.

The DLCST cohort was used as an external dataset to validate the network accuracy on unseen data. This contained 119 PSN and
105 NSN nodules. The segmentation reference masks for the nodules were again generated using the CIRRUS software and finetuned by the radiologist.

## Results

The segmentation network for part-solid network achieved a dice score of 77.6% for non-solid and 76% solid core on the
external dataset. For the NSN task the network achieved a dice score of 83.3%.
The table below shows the distribution of dice score across different categories defined using the nodule size
measurement stated in Lung-RADS guidelines.

Dice scores for part solid nodules

| Lung RADS Category | Count | Non-Solid | Solid Core |
|:------------------:|:-----:|:---------:|:----------:|
|  Probably Benign   |  69   |   79.2%   |   76.3%    |
|     Suspicious     |  21   |   80.7%   |    79%     |
|  Very Suspicious   |  29   |   71.9%   |   73.5%    |
|        Mean        |  119  | **77.6%** |  **76%**   |

Dice scores for ground glass opacities

| Lung RADS Category | Count |    GGO    |
|:------------------:|:-----:|:---------:|
|  Mean (“Benign”)   |  105  | **83.3%** |

## Conclusion

The current research achieved good results for subsolid nodules. The network is capable to produce robust segmentations
and avoid segmentation of vessels and chest-wall. Future research should focus on building a unified network capable of classifying and segmenting all different nodule type in a single shot. A self-supervised approach can be utilised to generate pseudo labels and reannotate the nodules which contained inaccurate segmentation. The class imbalance issue needs to be addressed since solid nodules are more frequent when dealing with all nodule types. The nnUNet framework is suboptimal when encountering extreme class imbalance and did not produce good results when the dataset for all nodule types are used.

The final [thesis](https://drive.google.com/file/d/1hME7WopZpHm_Cu5srWs_IyWGGBtoro0B/view?usp=sharing) report has more details about the project and experiments performed.

An interactive demo is accessible via Grand-Challenge:
Try out the algorithm

The code for the project can be found in the [GitHub Repository](https://github.com/DIAGNijmegen/bodyct-subsolid-nodule-segm)

repository: DIAGNijmegen/website-content

gha_language: TeX

repo_name: DIAGNijmegen/website-content


text:
# hostsfile

This library, and the associated command line binary, will help you manipulate
your /etc/hosts file. Both the library and the binary will leave comments
and other metadata in the /etc/hosts file as is, appending or removing only
the lines that you want changed. A description of the API [can be found at
godoc][godoc].

## Installation

On Mac, install via Homebrew:

```
brew install kevinburke/safe/hostsfile
```

If you have a Go development environment, you can install via source code:

    go get github.com/kevinburke/hostsfile@latest

## Command Line Usage

Easily add and remove entries from /etc/hosts.

```
# Assign <IP_ADDRESS> to all of the given hostnames
hostsfile add www.facebook.com www.twitter.com www.adroll.com <IP_ADDRESS>
# Remove all hostnames from /etc/hosts
hostsfile remove www.facebook.com www.twitter.com www.adroll.com
```

You may need to run the above commands as root to write to `/etc/hosts` (which
is modified atomically).

To print the new file to stdout, instead of writing it:

```
hostsfile add --dry-run www.facebook.com www.twitter.com www.adroll.com <IP_ADDRESS>
```

You can also pipe a hostsfile in:

```
cat /etc/hosts | hostsfile add --dry-run www.facebook.com www.twitter.com www.adroll.com <IP_ADDRESS>
```

Or specify a file to read from at the command line:

```
hostsfile add --file=sample-hostsfile www.facebook.com www.twitter.com www.adroll.com <IP_ADDRESS>
```

## Library Usage

You can also call the functions in this library from Go code. Here's an example
where a hosts file is read, modified, and atomically written back to disk.

```go
package main

import (
	"bytes"
	"fmt"
	"log"
	"net"
	"os"

	hostsfile "github.com/kevinburke/hostsfile/lib"
)

func checkError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	f, err := os.Open("/etc/hosts")
	checkError(err)
	h, err := hostsfile.Decode(f)
	checkError(err)

	local, err := net.ResolveIPAddr("ip", "<IP_ADDRESS>")
	checkError(err)
	// Necessary for sites like facebook & gmail that resolve ipv6 addresses,
	// if your network supports ipv6
	ip6, err := net.ResolveIPAddr("ip", "::1")
	checkError(err)
	h.Set(*local, "www.facebook.com")
	h.Set(*ip6, "www.facebook.com")
	h.Set(*local, "news.ycombinator.com")
	h.Set(*ip6, "news.ycombinator.com")

	// Write to a temporary file and then atomically copy it into place.
	tmpf, err := os.CreateTemp("/tmp", "hostsfile-temp")
	checkError(err)

	err = hostsfile.Encode(tmpf, h)
	checkError(err)

	err = os.Chmod(tmp.Name(), 0644)
	checkError(err)

	err = os.Rename(tmp.Name(), "/etc/hosts")
	checkError(err)
	fmt.Println("done")
}
```

[godoc]: https://godoc.org/github.com/kevinburke/hostsfile

repository: kevinburke/hostsfile

gha_language: Go

repo_name: kevinburke/hostsfile


text:
#### Config Format: YAML

#### Config Example
 - [file example](https://github.com/jackersson/gst-plugins-tf/blob/master/data/tf_object_api_cfg.yml)

##### Path to Model's .pb file [Supported Models](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md)
    weights: "frozen_inference_graph.pb"

##### Threshold [0.0, 1.0]
    threshold: 0.5

##### Input Shape
    input_shape: [w, h]

##### Log device placement

    log_device_placement: true or false

##### GPU Options:

   - [explained](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/protobuf/config.proto#L36)

         per_process_gpu_memory_fraction: 0.0

    device: "GPU|CPU", "GPU", "CPU", "GPU:0", ..

#### Labels [Format](https://github.com/jackersson/gst-plugins-tf/blob/master/docs/label_map_format.md)
    labels: mscoco_label_map.yml or {1: "person", ..}

repository: ivost/gst-plugins-tf

repo_name: ivost/gst-plugins-tf


text:
# Tripospora Sacc. GENUS

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
in Saccardo, Syll. fung. (Abellini), Addit. 194 (1886)

#### Original name
Tripospora Sacc.

### Remarks
null


text:
# DPortfolio

Custom Portfolio for a friend

## Installation

```
git clone https://github.com/grossyoan/dporfolio.git
npm i
gatsby develop
```

## To do

- [x] Add style to the "Gallery" page
- [x] Dev and add style to the "Case Study" Page
- [x] Add D.O logo
- [x] Add refs from gallery to case study
- [x] Add background Handler to the Gallery page
- [x] Add video support for the project's page/thumbnail on gallery
- [x] Fix lateral scroll
- [x] Fix loading from local issue
- [x] Fix htaccess issue
- [x] Responsive version (Still has issues)
- [x] Add CMS
- [x] Add responsive and adaptable display for images and videos
- [x] Add support for all categories
- [x] Add favicon
- [x] Fix vertical content bug in project page
- [x] Add project secondary images handler
- [ ] Find a way to auto compress images
- [ ] Add animations
- [ ] Support project sorting
- [ ] Design and dev the "About me" Page
- [ ] Finish hero (Add video) + responsive version
- [ ] Change logo for custom's one
- [ ] SEO
- [ ] English handler

### SSR

- [x] Fix bugs to have a proper build
- [ ] Fix refresh issues
- [x] Add meta informations

repository: grossyoan/dportfolio

repo_name: grossyoan/dportfolio


text:
//[shark](../../../index.md)/[shark](../index.md)/[ApplicationLeak](index.md)/[signature](signature.md)

# signature

[jvm]\
open override val [signature](signature.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)

A unique SHA1 hash that represents this group of leak traces.

For [ApplicationLeak](index.md) this is based on [LeakTrace.signature](../-leak-trace/signature.md) and for [LibraryLeak](../-library-leak/index.md) this is based on [LibraryLeak.pattern](../-library-leak/pattern.md).

repository: pushpalroy/leakcanary

repo_name: pushpalroy/leakcanary


text:
# Themes

Currently GMT.jl offers 3 themes (classic, modern, and dark). Classic theme has been the default
up to version 0.34.0. Starting in 0.35.0 the so called (by GMT) modern theme has become the default.
Differences may not be obvious at first (except for the default axes line width that was decreased
to half-width [0.75p]) but it holds a significant improvement in its capability to scale the size
of fonts and line thicknesses in function of figure size.

A third theme is the `dark` mode. Besides these 3 themes the last two (modern and dark) can still
be tweaked with some other parameters. Basically one can use the `theme` as a function or as an
option in the `plot` (and its avatars) module.

```
theme(name; kwrgs...)
```

- `modern`: - This is the default theme (same as GMT modern theme but with thinner FRAME_PEN [0.75p])
- `classic`: - The GMT classic theme
- `drak`: - A modern theme variation with dark background.

On top of the modern mode variations (so far `dark` only) one can set the following `kwargs` options:

- `noticks` or `no_ticks`: Axes will have annotations but no tick marks
- `inner_ticks` or `innerticks`: - Ticks will be drawn inside the axes instead of outside.
- `gray_grid` or `graygrid`: - When drawing grid line use `gray` instead of `black`
- `save`: - Save the name in the directory printed in shell by gmt --show-userdir and make it permanent.
- `reset`: - Remove the saved theme name and return to the default `modern` theme.

Note: Except `save` and `reset`, the changes operated by the `kwargs` are temporary and operate only until
an image is `show`(n) or saved.

This function can be called alone, e.g. `theme("dark")` or as an keyword option in the `plot()` module. *e.g.*
`plot(..., theme=:dark)` or `plot(..., theme=(modern, noticks=true))`


text:
# 29. Specifying materials

For each of the materials types, we can patch a list of objects to the extension proposal's `materials` key.

There are four, materials specification keys we can patch to. `roof`, `walls`, `windows`, and `doors`.

`PATCH /api/v1/extension-proposals/{id}`

    {
        "materials":{
            "roof": {
                "proposals": [
                    {
                        "material_id": "d470020f-984f-4acf-9e75-387f58db4604",
                        "colour_and_type": "Some lovely green roof tiles."
                    }
                ]
            }
        }
    }

### Returns

    {
      "id": "b2f70564-dbcf-4eb3-be31-f9c3261bbfb2",
      "created_at": "2019-06-26T13:55:30.654207",
      "updated_at": "2019-06-26T13:55:30.654243",
      "application_id": "a4a16477-9f93-4e48-a293-00f89fa5b406",
      "original_house": {
        "id": null,
        "created_at": "2019-06-26T13:55:30.654378",
        "updated_at": "2019-06-26T13:55:30.654406",
        "single_storey_extension": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.654504",
          "updated_at": "2019-06-26T13:55:30.654532",
          "works_location_ids": [
            "165c9046-f6f2-4144-b60c-f1ca24c94054",
            "b6b2cc59-f097-48bc-a9ad-14f263e9e036"
          ],
          "works_locations": null
        },
        "two_storey_extension": null,
        "part_single_part_two_storey_extension": null,
        "basement": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.654722",
          "updated_at": "2019-06-26T13:55:30.654750",
          "works_location_ids": [
            "165c9046-f6f2-4144-b60c-f1ca24c94054",
            "b6b2cc59-f097-48bc-a9ad-14f263e9e036"
          ],
          "works_locations": null,
          "works_type_ids": [
            "06a4181b-41f0-4b3f-9541-3357ff203998"
          ],
          "works_types": null
        },
        "roof": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.654982",
          "updated_at": "2019-06-26T13:55:30.655010",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e",
            "4e9f51cb-1c24-4993-be9e-350e0d395ecb"
          ],
          "works_locations": null,
          "works_type_ids": [
            "19ec661e-4655-4a98-9492-bf8a323607bf"
          ],
          "works_types": null,
          "materials_ids": null,
          "materials": null,
          "materials_not_applicable": false,
          "materials_match_existing": false
        },
        "porch": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.655277",
          "updated_at": "2019-06-26T13:55:30.655315",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_locations": null
        },
        "balcony_terrace": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.655461",
          "updated_at": "2019-06-26T13:55:30.655488",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_locations": null
        },
        "staircase": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.655631",
          "updated_at": "2019-06-26T13:55:30.655658",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_locations": null
        },
        "windows_doors": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.655800",
          "updated_at": "2019-06-26T13:55:30.655827",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_locations": null
        },
        "cladding": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.655968",
          "updated_at": "2019-06-26T13:55:30.655995",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_locations": null
        }
      },
      "incidental_buildings": {
        "id": null,
        "created_at": "2019-06-26T13:55:30.656181",
        "updated_at": "2019-06-26T13:55:30.656209",
        "removal_or_demolition": true,
        "details": "I'm knocking a shed down.",
        "outbuilding": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.656310",
          "updated_at": "2019-06-26T13:55:30.656338",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_locations": null
        }
      },
      "boundaries": {
        "id": null,
        "created_at": "2019-06-26T13:55:30.656505",
        "updated_at": "2019-06-26T13:55:30.656533",
        "gates_fences_walls": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.656622",
          "updated_at": "2019-06-26T13:55:30.656650",
          "works_location_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_locations": null,
          "works_type_ids": [
            "30d4874f-6570-403d-bfcc-d3c58cafe27e"
          ],
          "works_types": null
        },
        "border_works_type_ids": null,
        "border_works_types": null
      },
      "means_of_access": {
        "id": null,
        "created_at": "2019-06-26T13:55:30.656880",
        "updated_at": "2019-06-26T13:55:30.656907",
        "access_works_scope_id": "4c75ce90-4616-4dd0-b70a-de5ca530a37d",
        "access_works_scope": null,
        "access_works_sub_type_ids": [
          "590a7e3d-87ab-4b44-8406-fe0fb369aa81",
          "181deec8-d26f-4796-a036-c66528536de9"
        ],
        "access_works_sub_types": null
      },
      "parking": {
        "id": null,
        "created_at": "2019-06-26T13:55:30.657091",
        "updated_at": "2019-06-26T13:55:30.657119",
        "parking_works_scope_id": "d17dea6b-20d8-46df-87d0-b41fc5ec08c3",
        "parking_works_scope": null,
        "parking_works_sub_type_ids": null,
        "current_car_parking_spaces": 10,
        "planned_car_parking_spaces": 20,
        "current_bike_parking_spaces": 10,
        "planned_bike_parking_spaces": 20,
        "new_ev_charging_points": 10
      },
      "trees": {
        "id": null,
        "created_at": "2019-06-26T13:55:30.657318",
        "updated_at": "2019-06-26T13:55:30.657345",
        "inside_boundry": true,
        "removed_or_pruned": true,
        "outside_boundry": true
      },
      "materials": {
        "id": null,
        "created_at": "2019-06-26T13:55:30.657484",
        "updated_at": "2019-06-26T13:55:30.657511",
        "definitions_in_documents": false,
        "definitions_in_form": true,
        "definitions_to_follow": false,
        "roof": {
          "id": null,
          "created_at": "2019-06-26T13:55:30.657623",
          "updated_at": "2019-06-26T13:55:30.657650",
          "proposals": [
            {
              "id": null,
              "created_at": "2019-06-26T13:55:30.657748",
              "updated_at": "2019-06-26T13:55:30.657776",
              "colour_and_type": "Some lovely green roof tiles.",
              "material_id": "d470020f-984f-4acf-9e75-387f58db4604"
            }
          ],
          "matches_existing": false,
          "not_applicable": false
        },
        "walls": null,
        "windows": null,
        "doors": null
      },
      "additional_floor_area": 23.8,
      "additional_floor_area_units_id": "095bd097-f66e-4c66-bc1e-3521a0358e8d",
      "new_single_bedrooms": 2,
      "new_double_bedrooms": 3
    }

repository: LBHackney-IT/smpa-backend

gha_language: Python

repo_name: LBHackney-IT/smpa-backend


text:
---
layout: post
title:  bootstrap
date:   2020-12-30 16:54:46 -0500
category: notes
author: andrewmcodes
---
Build fast, responsive sites with Bootstrap

Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.

Learn more: [Bootstrap · The most popular HTML, CSS, and JS library in the world](https://getbootstrap.com)


text:
# Generation of requirements.txt

```
pip3 install pipreqs
cd [library_folder]
pipreqs .
```

# Compilation

```
cd [library_folder]
python setup.py bdist_wheel
pip3 install --force-reinstall --upgrade dist/[wheel_file_name].whl
```


text:
# node-sass-package-importer

[![Patreon](https://img.shields.io/badge/patreon-donate-blue.svg)](https://www.patreon.com/maoberlehner)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/maoberlehner)
[![Build Status](https://travis-ci.org/maoberlehner/node-sass-magic-importer.svg?branch=master)](https://travis-ci.org/maoberlehner/node-sass-magic-importer)
[![Coverage Status](https://coveralls.io/repos/github/maoberlehner/node-sass-magic-importer/badge.svg?branch=master)](https://coveralls.io/github/maoberlehner/node-sass-magic-importer?branch=master)
[![GitHub stars](https://img.shields.io/github/stars/maoberlehner/node-sass-magic-importer.svg?style=social&label=Star)](https://github.com/maoberlehner/node-sass-magic-importer)

Custom importer for node-sass to import packages from the `node_modules` directory.

## Usage

In modern day web development, packages are everywhere. There is no way around [npm](https://www.npmjs.com/) if you are a JavaScript developer. More and more CSS and SASS projects move to npm but it can be annoying to find a convenient way of including them into your project. Package importing makes this a little easier.

```js
const sass = require('node-sass');
const packageImporter = require('node-sass-package-importer');

sass.render({
  ...
  importer: packageImporter()
  ...
});
```

```scss
// Import the file that is specified in the `package.json` file of the module.
// In the case of bootstrap, the following file is loaded:
// https://github.com/twbs/bootstrap/blob/v4-dev/scss/bootstrap.scss
@import '~bootstrap';
```

```scss
// Import only specific files:
@import '~bootstrap/scss/variables';
@import '~bootstrap/scss/mixins/border-radius';
@import '~bootstrap/scss/mixins/alert';
@import '~bootstrap/scss/alert';
```

The "~" is mandatory and marks the import path as module.

### Path resolving

If only the module name is given (e.g. `@import '~bootstrap'`) the importer looks in the `package.json` file of the module for the following keys: "sass", "scss", "style", "css", "main.sass", "main.scss", "main.style", "main.css" and "main". The first key that is found is used for resolving the path and importing the file into your sass code.

To load only a certain file from a module you can specify the file in the import url (e.g. `@import '~bootstrap/scss/_alert.scss'`). This module also supports partial file name resolving so you can import files by only specifying their base name without prefix and extension (e.g. `@import '~bootstrap/scss/alert'`). Sadly bootstrap and most other frameworks do not load their dependencies directly in the concerned files. So you have to load all dependencies of a file manually like in the example above. I recommend you to do better and to import dependencies directly in the files that are using them.

### Options

In the example below you can see the default configuration options.

- `cwd`: Defines the path in which your `node_modules` directory is found.
- `packageKeys`: You can define the `package.json` keys to search for and in which order.
- `packagePrefix`: You can set the special character for indicating a module resolution.

```js
const sass = require('node-sass');
const packageImporter = require('node-sass-package-importer');

const options = {
  cwd: process.cwd(),
  packageKeys: [
    'sass',
    'scss',
    'style',
    'css',
    'main.sass',
    'main.scss',
    'main.style',
    'main.css',
    'main'
  ],
  packagePrefix: '~'
};

sass.render({
  ...
  importer: packageImporter(options)
  ...
});
```

### CLI

```bash
node-sass --importer node_modules/node-sass-package-importer/dist/cli.js -o dist src/index.scss
```

## Upgrade from 3.x.x to 5.x.x

- The `prefix` option was renamed to `packagePrefix`.

## Why is there no 4.x version?

This module is maintained in [one repository](https://github.com/maoberlehner/node-sass-magic-importer) together with multiple other node-sass custom importers. The node-sass-magic-importer repository is using a [monorepo approach](https://medium.com/@maoberlehner/monorepos-in-the-wild-33c6eb246cb9) with fixed versions for all packages. The projects maintained in the node-sass-magic-importer monorepo started out as separate repositories with separate versioning, so when they were integrated into the monorepo, the versions of all projects were raised to 5.0.0 and are in sync since then.

## node-sass-magic-importer

This module is powered by [node-sass-magic-importer](https://github.com/maoberlehner/node-sass-magic-importer).

## About

### Author

Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner
Patreon: https://www.patreon.com/maoberlehner

### License

MIT

repository: maoberlehner/node-sass-magic-importer

repo_name: maoberlehner/node-sass-magic-importer


text:
# nhdl

Download galleries directly from the nhentai website

## Requirements

This project uses [Colly](https://github.com/gocolly/colly) for web scraping

## Usage

`nhdl.exe -id <gallery ID>`

To see other options run `nhdl.exe -h`

repository: puckzxz/nhdl

gha_license_id: Unlicense

repo_name: puckzxz/nhdl