text:
---
versionFrom: 8.0.0
meta.Title: "Umbraco Healthcheck"
meta.Description: "The Settings section of the Umbraco backoffice holds a dashboard named 'Health Check'. It is a handy list of checks to see if your Umbraco installation is configured according to best practices."
---

# Health Check

The Settings section of the Umbraco backoffice holds a dashboard named "Health Check". It is a handy list of checks to see if your Umbraco installation is configured according to best practices. It's possible to add your custom built health checks.
This feature has been available since Umbraco version 7.5.

For inspiration when building your own checks you can look at the checks we've [built into Umbraco](https://github.com/umbraco/Umbraco-CMS/tree/v8/dev/src/Umbraco.Web/HealthCheck/Checks). Some examples will follow in this document.

## Built-in checks

Umbraco comes with the following checks by default:

* Category **Configuration**
  * **Macro errors (id: `D0F7599E-9B2A-4D9E-9883-81C7EDC5616F`)** - checks that the errors are set to `inline` so that pages that error will still load (and shows a small error message)
  * **Notification Email Settings (id: `3E2F7B14-4B41-452B-9A30-E67FBC8E1206`)** - checks that the "from" email address used for email notifications has been changed from its default value
  * **Try Skip IIS Custom Errors (id: `046A066C-4FB2-4937-B931-069964E16C66`)** - in IIS 7.5 and higher this should be set to `true`
* Category **Data Integrity**
  * **Database data integrity check (id: `73DD0C1C-E0CA-4C31-9564-1DCA509788AF`)** - checks for various data integrity issues in the Umbraco database
* Category **Live environment**
  * **Custom errors (id: `4090C0A1-2C52-4124-92DD-F028FD066A64`)** - should be set to `RemoteOnly` or `On` on your live site
  * **Trace mode (id: `9BED6EF4-A7F3-457A-8935-B64E9AA8BAB3`)** - should be set to `enabled="false"` on your live site
  * **Debug compilation mode (id: `61214FF3-FC57-4B31-B5CF-1D095C977D6D`)** - should be set to `debug="false"` on your live site
* Category **Permissions**
  * **Folder & file permissions (id: `53DBA282-4A79-4B67-B958-B29EC40FCC23`)** - checks that folders and files that are either required or recommended to set with write permissions can be accessed
* Category **Security**
  * **Click-Jacking Protection (id: `ED0D7E40-971E-4BE8-AB6D-8CC5D0A6A5B0`)** - checks to see if a header or meta-tag is in place to indicate whether the site can be hosted in an IFRAME.  Normally this is best set to deny permission for this to be done, to prevent what is known as [click-jacking](https://www.owasp.org/index.php/Clickjacking) attacks
  * **Content/MIME Sniffing Protection (id: `1CF27DB3-EFC0-41D7-A1BB-EA912064E071`)** - checks that your site contains a header used to protect against MIME sniffing vulnerabilities
  * **Cookie hijacking and protocol downgrade attacks Protection (HSTS) (id: `E2048C48-21C5-4BE1-A80B-8062162DF124`)** - checks if your HTTPS site contains the Strict-Transport-Security Header (HSTS). If not - adds with a default of 18 weeks
  * **Cross-site scripting Protection (id: `F4D2B02E-28C5-4999-8463-05759FA15C3A`)** - checks for the presence of the X-XSS-Protection-header
  * **Excessive Headers (id: `92ABBAA2-0586-4089-8AE2-9A843439D577`)** - checks to ensure that various headers that can provide details about the technology used to build and host the website have been removed
  * **HTTPS check (id: `EB66BB3B-1BCD-4314-9531-9DA2C1D6D9A7`)** - to determine if the current site is running on a secure connection
  * **UseHttps check** - when the site is running on HTTPS, `Umbraco.Core.UseHttps` needs to be enabled to secure the backoffice. The setting can be found under `appSettings` in the `web.config` file
* Category **Services**
  * **SMTP settings (id: `1B5D221B-CE99-4193-97CB-5F3261EC73DF`)** - checks that an SMTP server is configured and is accepting requests for sending emails

Each check returns a message indicating whether or not the issue in question has been found on the website installation. This could be an error that should be fixed, or a warning you should be aware of.

Some of them can also be rectified via the dashboard, by clicking the **Fix** button and in some cases providing some required information.  These changes usually involve writing to configuration files that will often trigger a restart of the website.

## Configuring and scheduling checks

As well as viewing the results of health checks via the Settings section dashboard, you can set up the checks to be run on a schedule and be notified of the results by email.  It's also possible to disable certain checks if they aren't applicable in your environment.

For more on this see the [Reference > Config > Health checks page](../../Reference/Config/HealthChecks/index.md).

## Custom checks

You can build your own health checks. There are two types of health checks you can build: **configuration checks** and **general checks**.

Each health check is a class that needs to have a `HealthCheck` attribute. This attribute has a few things you need to fill in:

* GUID - a unique ID that you've generated for this specific check
* Name - give it a short name so people know what the check is for
* Description - describes what the check does in detail
* Group - this is the category for the check if you use an existing group name (like "Configuration") the check will be added in that category, otherwise a new category will appear in the dashboard

### Configuration checks

These are small checks that take an XPath query and confirm that the value that's expected is there. If the value is not correct, clicking the "Rectify" button will set the recommended value.

* A configuration check needs to inherit from `Umbraco.Web.HealthCheck.Checks.Config.AbstractConfigCheck`
* A configuration check needs the `HealthCheck` attribute as noted at the start of this document
* `FilePath` is the relative path to which config file you want to check
* `XPath` is the query you want to execute to find the configuration value you want to verify
* `ValueComparisonType` can either be `ValueComparisonType.ShouldEqual` or `ValueComparisonType.ShouldNotEqual`
* `Values` is a list of values that are available for this configuration item - in this example it can be `RemoteOnly` or `On`, they're both acceptable for a live site.
  * For checks using the `ShouldEqual` comparison method, make sure to set one of these values to `IsRecommended = true` - when the "Fix" button is pressed, the recommended value will be stored
  * Where `ShouldNotEqual` is used the fix will require the user to provide the correct setting
* `CheckSuccessMessage`, `CheckErrorMessage` and `RectifySuccessMessage` are the messages returned to the user
  * It is highly recommended to use the `LocalizedTextService` so these can be localized. You can add the text in `~/Config/Lang/en-US.user.xml` (or whatever language you like)
  * Don't add the translations to `~/Umbraco/Config/Lang` files, the correct location is `~/Config/Lang/*-*.user.xml`

An example check:

```csharp
using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Services;

namespace Umbraco.Web.HealthCheck.Checks.Config
{
    [HealthCheck("D0F7599E-9B2A-4D9E-9883-81C7EDC5616F", "Macro errors",
        Description = "Checks to make sure macro errors are not set to throw a YSOD (yellow screen of death), which would prevent certain or all pages from loading completely.",
        Group = "Configuration")]
    public class MacroErrorsCheck : AbstractConfigCheck
    {
        public MacroErrorsCheck(ILocalizedTextService textService) : base(textService) { }

        public override string FilePath
        {
            get { return "~/Config/umbracoSettings.config"; }
        }

        public override string XPath
        {
            get { return "/settings/content/MacroErrors"; }
        }

        public override ValueComparisonType ValueComparisonType
        {
            get { return ValueComparisonType.ShouldEqual; }
        }

        public override IEnumerable<AcceptableConfiguration> Values
        {
            get
            {
                var values = new List<AcceptableConfiguration>
                {
                    new AcceptableConfiguration
                    {
                        IsRecommended = true,
                        Value = "inline"
                    },
                    new AcceptableConfiguration
                    {
                        IsRecommended = false,
                        Value = "silent"
                    }
                };

                return values;
            }
        }

        public override string CheckSuccessMessage
        {
            get
            {
                return TextService.Localize("healthcheck/macroErrorModeCheckSuccessMessage",
                    new[] { CurrentValue, Values.First(v => v.IsRecommended).Value });
            }
        }

        public override string CheckErrorMessage
        {
            get
            {
                return TextService.Localize("healthcheck/macroErrorModeCheckErrorMessage",
                    new[] { CurrentValue, Values.First(v => v.IsRecommended).Value });
            }
        }

        public override string RectifySuccessMessage
        {
            get
            {
                return TextService.Localize("healthcheck/macroErrorModeCheckRectifySuccessMessage",
                    new[] { Values.First(v => v.IsRecommended).Value });
            }
        }
    }
}
```

### General checks
This can be anything you can think of, the results and the rectify action are completely under your control.

* A general check needs to inherit from `Umbraco.Web.HealthCheck`
* A general check needs the `HealthCheck` attribute as noted at the start of this document
* All checks run when the dashboard is loaded, this means that the `GetStatus()` method gets executed
  * You can return multiple status checks from `GetStatus()`
* A status check returns a `HealthCheckStatus`
  * If a `HealthCheckStatus` has a `HealthCheckAction` defined then the "Fix" button will perform that action once clicked
  * Sometimes, the button to fix something should not be called "Fix", change the `Name` property of a `HealthCheckAction` to provide a better name
  * `HealthCheckAction` has a `Description` property so that you can provide information on what clicking the "Rectify" button will do (or provide links to documentation, for example)
  * `HealthCheckStatus` has a few result levels:
    * `StatusResultType.Success`
    * `StatusResultType.Error`
    * `StatusResultType.Warning`
    * `StatusResultType.Info`
  * A `HealthCheckAction` needs to provide an alias for an action that can be picked up in the `ExecuteAction` method
* It is highly recommended to use the `LocalizedTextService` so text can be localized. You can add the text in `~/Config/Lang/en-US.user.xml` (or whatever language you like)
* Don't add the translations to `~/Umbraco/Config/Lang` files, the correct location is `~/Config/Lang/*-*.user.xml`

An example check:

```csharp
using System;
using System.Collections.Generic;
using System.IO;
using System.Web;
using System.Web.Hosting;
using Umbraco.Core.Composing;
using Umbraco.Core.Services;
using Umbraco.Web.HealthCheck;

namespace Umbraco.Web.HealthCheck.Checks.SEO
{
    [HealthCheck("3A482719-3D90-4BC1-B9F8-910CD9CF5B32", "Robots.txt",
    Description = "Create a robots.txt file to block access to system folders.",
    Group = "SEO")]
    public class RobotsTxt : HealthCheck
    {
        private readonly ILocalizedTextService _textService;

        public RobotsTxt(ILocalizedTextService textService)
        {
            _textService = textService;
        }

        public override IEnumerable<HealthCheckStatus> GetStatus()
        {
            return new[] { CheckForRobotsTxtFile() };
        }

        public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
        {
            switch (action.Alias)
            {
                case "addDefaultRobotsTxtFile":
                    return AddDefaultRobotsTxtFile();
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }

        private HealthCheckStatus CheckForRobotsTxtFile()
        {
            var success = File.Exists(HttpContext.Current.Server.MapPath("~/robots.txt"));
            var message = success
                ? _textService.Localize("healthcheck/seoRobotsCheckSuccess")
                : _textService.Localize("healthcheck/seoRobotsCheckFailed");

            var actions = new List<HealthCheckAction>();

            if (success == false)
                actions.Add(new HealthCheckAction("addDefaultRobotsTxtFile", Id)
                // Override the "Rectify" button name and describe what this action will do
                {
                    Name = _textService.Localize("healthcheck/seoRobotsRectifyButtonName"),
                    Description = _textService.Localize("healthcheck/seoRobotsRectifyDescription")
                });

            return
                new HealthCheckStatus(message)
                {
                    ResultType = success ? StatusResultType.Success : StatusResultType.Error,
                    Actions = actions
                };
        }

        private HealthCheckStatus AddDefaultRobotsTxtFile()
        {
            var success = false;
            var message = string.Empty;

            const string content =
                @"# robots.txt for Umbraco
                User-agent: *
                Disallow: /umbraco/";

            try
            {
                File.WriteAllText(HostingEnvironment.MapPath("~/robots.txt"), content);
                success = true;
            }
            catch (Exception exception)
            {
                Current.Logger.Error(typeof(RobotsTxt), exception, "Could not write robots.txt to the root of the site");
            }

            return
                new HealthCheckStatus(message)
                {
                    ResultType = success ? StatusResultType.Success : StatusResultType.Error,
                    Actions = new List<HealthCheckAction>()
                };
        }
    }
}
```
## Custom health check notifications

Health check notifications can be scheduled to run periodically and notify you of the results. Included with Umbraco is a notification method to deliver the results via email. In a similar manner to how it's possible to create your own health checks, you can also create custom notification methods to send the message summarising the status of the health checks via other means.  Again, for further details on implementing this, please refer the [existing notification methods within the core code base](https://github.com/umbraco/Umbraco-CMS/tree/v8/dev/src/Umbraco.Web/HealthCheck/NotificationMethods).

Each notification method needs to implement the core interface `IHealthCheckNotificationMethod` and, for ease of creation, can inherit from the base class `NotificationMethodBase`, which itself implements the `IHealthCheckNotificationMethod` interface. There's one method to implement - `SendAsync(HealthCheckResults results)` - which is responsible for taking the results of the health checks and sending them via the mechanism of your choice.

The following example shows how the core method for sending notification via email is implemented:

```csharp
using System;
using System.Net.Mail;
using System.Threading;
using System.Threading.Tasks;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
using Umbraco.Core.Services;

namespace Umbraco.Web.HealthCheck.NotificationMethods
{
    [HealthCheckNotificationMethod("email")]
    public class EmailNotificationMethod : NotificationMethodBase
    {
        private readonly ILocalizedTextService _textService;
        private readonly IRuntimeState _runtimeState;
        private readonly ILogger _logger;

        public EmailNotificationMethod(ILocalizedTextService textService, IRuntimeState runtimeState, ILogger logger)
        {
            var recipientEmail = Settings?["recipientEmail"]?.Value;
            if (string.IsNullOrWhiteSpace(recipientEmail))
            {
                Enabled = false;
                return;
            }

            RecipientEmail = recipientEmail;

            _textService = textService ?? throw new ArgumentNullException(nameof(textService));
            _runtimeState = runtimeState;
            _logger = logger;
        }

        public string RecipientEmail { get; }

        public override async Task SendAsync(HealthCheckResults results, CancellationToken token)
        {
            if (ShouldSend(results) == false)
            {
                return;
            }

            if (string.IsNullOrEmpty(RecipientEmail))
            {
                return;
            }

            var message = _textService.Localize("healthcheck/scheduledHealthCheckEmailBody", new[]
            {
                DateTime.Now.ToShortDateString(),
                DateTime.Now.ToShortTimeString(),
                results.ResultsAsHtml(Verbosity)
            });

            // Include the umbraco Application URL host in the message subject so that
            // you can identify the site that these results are for.
            var host = _runtimeState.ApplicationUrl;

            var subject = _textService.Localize("healthcheck/scheduledHealthCheckEmailSubject", new[] { host.ToString() });

            var mailSender = new EmailSender();
            using (var mailMessage = CreateMailMessage(subject, message))
            {
                await mailSender.SendAsync(mailMessage);
            }
        }

        private MailMessage CreateMailMessage(string subject, string message)
        {
            var to = Current.Configs.Settings().Content.NotificationEmailAddress;

            if (string.IsNullOrWhiteSpace(subject))
                subject = "Umbraco Health Check Status";

            return new MailMessage(to, RecipientEmail, subject, message)
            {
                IsBodyHtml = message.IsNullOrWhiteSpace() == false && message.Contains("<") && message.Contains("</")
            };
        }
    }
}
```

If custom configuration is required for a custom notification method, this can be placed in `HealthChecks.config`, with the `alias` XML attribute for the `notificationMethod` element matching that used on the class level attribute. Again, the following extract shows how the email notification method is configured:

```xml
<HealthChecks>
    <notificationSettings enabled="true" firstRunTime="" periodInHours="24">
    <notificationMethods>
        <notificationMethod alias="email" enabled="true" verbosity="Summary">
        <settings>
            <add key="recipientEmail"<EMAIL_ADDRESS>/>
        </settings>
        </notificationMethod>
    </notificationMethods>
    </notificationSettings>
</HealthChecks>
```

repository: jakob-bagterp/UmbracoDocs

repo_name: jakob-bagterp/UmbracoDocs


text:
# _My First Webpage_

#### _A simple website stating what I will learn at Epicodus, 10/14/2019_

#### By _**Malcolm Womble, Baul Kim, Kyle Wymer**_

## Description

_This web page describes my experience building web pages, the languages I intend to learn, and where I intend to learn about coding. There is a link to a web page where others can learn more about me as well as my coding school Epicodus._

## Setup/Installation Requirements

* _Clone the repository from Github.com onto your local machine_
* _Open my-first-webpage.html with your browser_

## Known Bugs

_No known bugs_

## Support and contact details

_If you run into any issues or have any questions, contact the developer(s) in Github (username(s): AramisDad, Wymerkd), Contributions to this code are welcome!_

## Technologies Used

_HTML_

### License

*MIT License

Copyright (c) [2019] [Malcolm Womble, Baul Kim, Kyle Wymer]

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

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

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

license: MIT

repository: AramisDad/my-first-webpage

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: AramisDad/my-first-webpage


text:
---
layout: page
title: About Us
subtitle: Who are we, anyway
---
### Meetings

With the exception of holidays, we meet on the first Tuesday of every month in the [Fort Worth Masonic Temple.](https://goo.gl/maps/KBkeZiZwJiD2)

- Dinner is held at 6 PM on Floor *3M*.
- Texas Chapter \#362 meets on Floor 3 in the "Red Room" at 7 PM.
- Texas Council \#321 meets immediately after the Chapter closes.

### Texas Chapter \#362, Royal Arch Masons
Texas Chapter \#362, Royal Arch Masons, was set to work and given a charter by The Grand Royal Arch Chapter of Texas on December 8, 1915. We are a member of Capitular District \#26 and our membership currently stands at 126 Companions. Our most important charity is the Texas Masonic Retirement Center in Arlington, Texas.

### Texas Council \#321, Royal & Select Masters
Texas Council No. 321 was set to work and given a charter by The Grand Council of Royal and Select Master of Texas on December 3, 1918. We are a member of Cryptic District \#26 and our membership currently stands at 123 Companions. Our most important charity, as with Texas Chapter, is the Texas Masonic Retirement Center in Arlington, Texas.


text:
AuTuMN
======

![](https://github.com/monash-emu/AuTuMN/workflows/Continuous%20Integration/badge.svg)

This project is a Python disease modelling framework used by the [AuTuMN tuberculosis modelling project](http://www.tb-modelling.com/index.php).
It is currently being applied to COVID-19 as well. This project is used by the Monash Univeristy Epidemiological Modelling Unit.

See [this guide](./docs/setup.md) for information on how to set up this project. See [here](./docs/adding-new-covid-model.md) for steps on how to add a new COVID model.

## Using the command line

All of Autumn's features can be accessed from the command line. You can run commands as follows:

```bash
python -m apps <YOUR COMMANDS>
```

To see a list of options, try:

```bash
python -m apps --help
```

## Project structure

```
├── .github                 GitHub config
├── apps                    Specific applications of the framework
├── autumn                  AuTuMN framework module
├── data                    Data to be used by the models
|   ├─ inputs                   Input data for the models
|   └─ outputs                  Module run outputs (not in source control)
|
├── docs                    Documentation
├── scripts                 Utility scripts
|   ├─ aws                      Scripts to run tasks on AWS
|   ├─ buildkite                Configuration of Buildkite pipelines
|   └─ massive                  Scripts to run tasks on MASSIVE (not used)
|
├── summer                  SUMMER framework module
├── tasks                   Cloud computing tasks
├── tests                   Automated tests
├── .gitignore              Files for Git to ignore
├── plots.py                Streamlit entrypoint
└── requirements.txt        Python library dependencies
```

## Running an application

You can run all the scenarios for specific application using the `run` command. For example, to run the "malaysia" region of the "covid" model, you can run:

```bash
python -m apps run covid malaysia
```

Model run outputs are written to `data/outputs/run` and can be viewed in Streamlit (see below).

## Running a calibration

You can run a model MCMC calibration as follows

```bash
python -m apps calibrate MODEL_NAME MAX_SECONDS RUN_ID
```

For example, to calibrate the malaysia COVID model for 30 seconds you can run:

```bash
python -m apps calibrate malaysia 30 0
```

The RUN_ID argument can always be "0" for local use, it doesn't really matter.

Model calibration outputs are written to `data/outputs/calibrate` and can be viewed in Streamlit (see below).

## Running Streamlit

We use [Streamlit](https://www.streamlit.io/) to visualise the output of local model runs. You can run streamlit from the command line to view your model's outputs as follows:

```bash
streamlit run plots.py
```

If you want to view the outputs of a calibration, run:

```bash
streamlit run plots.py mcmc
```

## Running the automated tests

We have a suite of automated tests that verify that the code works. Some of these are rigorous "unit" tests which validate functionality, while others are only "smoke" tests, which verify that the code runs without crashing. These tests are written with [pytest](https://docs.pytest.org/en/stable/).

 Automated tests may be run via [PyCharm](https://www.jetbrains.com/help/pycharm/pytest.html) or via the command line using pytest:

```
pytest -v
```

Tests are also run automatically via [GitHub Actions](https://github.com/monash-emu/AuTuMN/actions) on any pull request or commit to the `master` branch.

## Formatting

The codebase can be auto-formatted using [Black](https://github.com/psf/black):

```
./scripts/format.ps1
```

## Input data

Input data is stored in text format in the `data/inputs/` folder. All input data required to run the app should be stored in this folder, along with a README explaining its meaning and provenance. Input data is preprocessed into an SQLite database at runtime, inside the `autumn.inputs` module. A unique identified for the latest input data is stored in `data/inputs/input-hash.txt`. If you want to add new input data or modify existing data, then:

- add or update the source CSV/XLS files
- adjust the preprocess functions in `autumn.inputs` as required
- rebuild the database, forcing a new file hash to be written

To fetch the latest data, run:

```bash
python -m apps db fetch
```

You will need to ensure that the latest date in all user-specified mixing data params is greater than or equal to the most recent Google Mobility date.

To rebuild the database with new data, run:

```bash
python -m apps db build --force
```

Once you are satisfied that all your models work again (run the tests), commit your changes and push up:

- The updated CSV files
- The updated `input-hash.txt` file
- Any required changes to model parameters (eg. dynamic mixing dates)

## AWS calibration

We often need to run long, computationally expensive jobs. We are currently using Amazon Web Services (AWS) to do this. The scripts and documentation that allow you to do this can be found in the `scripts/aws/` folder. The following jobs are run in AWS:

- Calibration: Finding maximum likelihood parameters for some historical data using MCMC
- Full model runs: Running all scenarios for all accepted MCMC parameter sets
- PowerBI processing: Post-processing of full model runs for display in PowerBI

All outputs, logs and plots for all model runs are stored in AWS S3, and they are publicly available at [this website](http://autumn-data.s3-website-ap-southeast-2.amazonaws.com). Application _should_ be uploaded if the app crashes midway.

Each job is run on its own server, which is transient: it will be created for the job and will be destroyed at the end.

The AWS tasks are run using [Luigi](https://luigi.readthedocs.io/en/stable/index.html), which is a tool for building data processing pipeline. The Luigi tasks can be found in the `tasks` folder.

## Buildkite job runner

We have a self-serve job-runner website available [here](https://buildkite.com/autumn), build on the [Buildkite](https://buildkite.com/home) platform. This website can be used to run jobs in AWS. Buildkite runs on a small persistent server in AWS. Buildkite configuration is stored in `scripts/buildkite/`.

repository: malanchak/AuTuMN

gha_license_id: NOASSERTION

repo_name: malanchak/AuTuMN


text:
---
title: Start-Up
tags: tag3, tag4, tag5
category: Drama, Romance
excerpt: The series revolves around a woman who has dreams of becoming an entrepreneur like Steve Jobs, and her love triangle between a man who is secretly her first love and another man who is pretending to be her first love.
created: 2020-10-17
image: ./images/startup.jpg
image_caption: Photo by STARTUP/TVN
author: author3
---

## Plot Synopsis

> Set in South Korea's fictional Silicon Valley called Sandbox, Start-Up tells the story of people in the world of startup companies.

> Seo Dal-mi (Bae Suzy) is a bright and ambitious young woman who dreams of becoming Korea’s Steve Jobs. Dal-mi doesn’t have a fancy background but she’s passionate about her work. She has bright energy and is a person of great vitality, having experience in a wide range of part-time jobs.

> Nam Do-san (Nam Joo-hyuk), is the founder of Samsan Tech. A ‘math genius’ as a young boy, Do-san was once the pride of his family but became their shame now, as his business has been going down for the past two years. He finds out that Dal-mi mistakenly remembers him as her first love, so he decides to work his way up in hopes of turning that misunderstanding into reality.

## Cast and characters

- **Bae Suzy** as Seo Dal-mi

    She dreams of becoming Korea's Steve Jobs. She was born to a humble family and does not own much. However, she's also an adventurer who has a grand plan for herself. Her drive also came from being abandoned by her mother and sister at a young age. She also has experience in a wide range of part-time jobs and is a person of great vitality.

- **Nam Joo-hyuk** as Nam Do-san

    Do-san is the founder of Samsan Tech. He was once the pride of his family as a math genius, but he is now shy and cannot even look people in the eye. After having gone nowhere in the past two years with investments in his company, he is almost ready to give up. It turns out that Seo Dal-mi remembers him as her ‘cool first love’ although he never knew her, and he decides to begin a startup in the hope of turning Seo Dal-mi's misunderstanding into a reality.

- **Kim Seon-ho** as Han Ji-pyeong

    A team leader at SH Venture Capital, his astonishing investment skills and sharp tongue earn him the nickname, “the Gordon Ramsay of investments.” Though he's prickly to most others, he's softer than anyone to one special person who granted him a great favor in the past.

- **Kang Han-na** as Won In-jae/Seo In-jae

    Won In-jae is Seo Dal-mi's older sister. She has everything society respects: a strong educational background, beautiful appearance, and money. She eventually realizes her background as a second-generation chaebol is a weakness and does everything she can to create success on her own and be acknowledged for her skills.

> ### Samsan Tech

- **Yoo Su-bin** as Lee Chul-san

    A friend of Do-san since they were in university, he joined the company after resigning due to a ransomware that had taken control while he was in-charge and was told to pay 100 million won.

- **Kim Do-wan** as Kim Yong-san

    A friend of Do-san since they were in university, he had his own agenda for getting into Sandbox, relating to the death of his brother who was a CEO at Sandbox's 2nd batch.

- **Stephanie Lee** as Jeong Sa-ha

> ### Seo Dal-mi & Won In-jae's Family**

- **Kim Hae-sook** as Choi Won-deok, Seo Chung-myung's mother and Seo Dal-mi and Won In-jae's grandmother

    Having divorced her husband for quitting his job, she ends up marrying Won Doo-jung , though she is shown to regret leaving Seo Dal-mi's dad for him as he cheats on her, yet enjoys the money that comes with him.

- **Kim Joo-hun** as Seo Chung-myung, Seo Dal-mi's and Won In-jae's father

    Having had enough of being degraded at work, he decides to start his own business, which leads to his divorce and after a year, he manages to get a deal and it is implied that he inspired the name "Sandbox" during a chat with the owner. On the very same day, he dies in the bus while going home due to brain injuries.

- **Eom Hyo-seop** as Won Doo-jung, Won In-jae's stepfather

- **Moon Dong-hyeok** as Won Sang-soo, Won Don-Jung's son and Won In-jae's stepbrother

> ### Nam Do-san's family

- **Kim Hee-jung** as Park Geum-jung, Do-san's mother

- **Kim Won-hae** as Nam Sung-hwan, Nam Do-san's father

- **Jang Se-hyun** as Nam Chun-ho, Nam Do-san's cousin

> ### SH Venture Capital

- **Seo Yi-sook** as Yoon Seon-hak, the CEO of Sandbox and SH Venture Capital.

- **Kim Min-seok** as Park Dong-cheon, the assistant or secretary of Ji-pyeong and mentoring manager of Sandbox's 12th batch.


text:
---
path: /kitchen/recipe/mexican-rice
layout: recipe
title: Mexican rice
category: Sides
timing:
  - timingAmount: 5 mins
    timingType: Prep time
  - timingAmount: 30 mins
    timingType: Cook time
time:
  timeAmount: '0.5'
  timeUnits: hrs
photo: /images/uploads/IMG_20180814_211614.jpg
ingredients:
  - ingredientAmount: 3 tbsp
    ingredientName: Vegetable oil
  - ingredientAmount: 2 cups
    ingredientName: Long-grain white rice
  - ingredientAmount: 1/4 cup
    ingredientName: Chopped onion
  - ingredientAmount: 1 cup
    ingredientName: Tomato sauce
  - ingredientAmount: 3-4 cups
    ingredientModification: ', depending on whether rice requires 1.5:1 or 2:1'
    ingredientName: Chicken or vegetable stock
  - ingredientAmount: 1 tsp
    ingredientName: Minced garlic
  - ingredientAmount: 1/2 tsp
    ingredientName: Cumin
  - ingredientAmount: 1/4 tsp
    ingredientName: Salt
  - ingredientAmount: 1/4 tsp
    ingredientName: Black pepper
tools:
  - toolName: Large skillet
instructions:
  - step: Heat oil on a large skillet over medium heat.
  - step: Add rice and stir constantly for 8-10 minutes until rice looks puffed and golden.
  - step: Stir in onion and cook until tender.
  - step: Stir in tomato sauce, stock, garlic, cumin, salt, and pepper, and bring the mixture to a boil.
  - step: Cover and simmer for 15-25 mins or until the liquid is absorbed.
  - step: Fluff with a fork.
---

repository: tatwater/personal-site

gha_language: JavaScript

gha_license_id: MIT

repo_name: tatwater/personal-site


text:
# NextJS and Docker

Enjoy!

### Dev

`npm i && npm run dev`

### Prod

Build your containers for deploys:

MacOS/Linux

`./scripts/prod.sh`

Windows

`./scripts/prod.bat`

Now that your container is built, you can test it locally:

`docker run -p 3000:3000 nextjs-docker`

Now deploy :rocket:

repository: devbyray/nextjs-base

repo_name: devbyray/nextjs-base


text:
# Hello REST API using express and embedded tingodb and tungus driver
This code is based on the tutorial [build restful api using express and mongodb](https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4)

 This uses tingodb instead of mongodb

##usage
* npm install
* node server.js
* Use [Postman](https://www.getpostman.com/) for testing as mentioned in the turorial.


text:
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->

# BasicDAGRun

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**run_id** | **str** | Run ID.  | [optional]
**dag_id** | **str** |  | [optional] [readonly]
**logical_date** | **datetime** | The logical date (previously called execution date). This is the time or interval covered by this DAG run, according to the DAG definition.  The value of this field can be set only when creating the object. If you try to modify the field of an existing object, the request fails with an BAD_REQUEST error.  This together with DAG_ID are a unique key.  *New in version 2.2.0*  | [optional]
**start_date** | **datetime, none_type** | The start time. The time when DAG run was actually created.  *Changed in version 2.1.3*&#58; Field becomes nullable.  | [optional] [readonly]
**end_date** | **datetime, none_type** |  | [optional] [readonly]
**data_interval_start** | **datetime, none_type** |  | [optional] [readonly]
**data_interval_end** | **datetime, none_type** |  | [optional] [readonly]
**state** | [**DagState**](DagState.md) |  | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

repository: apache/airflow-client-python

branch_name: refs/heads/main

gha_language: Python

repo_name: apache/airflow-client-python


text:
# Install Docker and Docker-Compose On Raspberry Pi

## Step 1: Update and Upgrade
```bash
sudo apt-get update && sudo apt-get upgrade
```

## Step 2: Check to see if you have any old Docker versions installed
```bash
sudo apt remove docker docker-engine docker.io containerd runc
sudo apt autoremove
```

## Step 3: Install Docker
```bash
curl -sSL https://get.docker.com | sh
```

## Step 4 (optional): Add a Current User to the Docker Group
### Manage Docker as a non-rootuser
Obviously, you don’t want to type “sudo” every time that you want to manage Docker. To get rid of this follow the below steps.
```bash
sudo groupadd docker
sudo usermod -aG docker ${USER}
newgrp docker
```
::: info Check User Group
```bash
groups ${USER}
```
:::

## Step 5: Enable the Docker system service to start your containers on boot
```bash
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
```

Reboot the Raspberry Pi to let the changes take effect.

## Step 6: Install Docker-Compose requires pip3, so it needs to have python3 and pip3 installed
```bash
sudo apt-get install libffi-dev libssl-dev
sudo apt install python3-dev
sudo apt-get install -y python3 python3-pip
```

## Step 7: Install Docker-Compose
```bash
sudo pip3 install docker-compose
```

## Step 8: Enable the Docker system service to start your containers on boot
```bash
sudo systemctl enable docker
```

---

## Upgrade Docker on Raspberry Pi
```bash
sudo apt-get upgrade
```

## Uninstall Docker on Raspberry Pi
```bash
sudo apt-get purge docker-ce
```
* Note: Depending on the version of software, you may need to use an additional command to completely remove Docker:
  ```bash
  sudo apt-get purge docker-ce-cli
  ```

* To delete leftover images, containers, volumes and other related data, run the following command:
  ```bash
  sudo rm -rf /var/lib/docker
  ```

repository: waynecheah/docs

repo_name: waynecheah/docs


text:
# SSDP fork for React Native from node

This is a fork of `node-ssdp` that uses `react-native-udp` instead of `dgram` to enable react multicast messaging and plain socket control. The API is the same as in the forked version.

> This package powers [Yeti Smart Home](https://getyeti.co) and is used in production. It is maintained with our developers's free time, PRs and issues are more than welcome.

## Installation

Unless React Native Version is > 0.29 use rnpm else use react-native link.

```javascript
npm install react-native-ssdp
rnpm link
```

Make sure you set `Buffer` as global in `react-native-udp`'s UdpSockets.js (noted filename end with letter s)

```javascript
global.Buffer = global.Buffer || require('buffer').Buffer
```

## Things to take note
- Be aware that the Android emulator does not support incoming UDP traffic, so the client will not get any responses to search requests.  For best results, test on a real device when using Android.  The iOS simulator, on the other hand, works just fine.

- Make sure you close all the sockets you open and never try to reopen one already open, mobile OSs and React Native are very aggresive both with security and performance, so a misuse could kill your process.

## Usage (Android)

### android/settings.gradle

```gradle
...
include ':react-native-udp'
project(':react-native-udp').projectDir = new File(settingsDir, '../node_modules/react-native-udp/android')
include ':react-native-network-info'
project(':react-native-network-info').projectDir = new File(settingsDir, '../node_modules/react-native-network-info/android')
```

### android/app/build.gradle

```gradle
...
dependencies {
	...
	compile project(':react-native-udp')
	compile project(':react-native-network-info')
}
```

### register module in MainActivity.java

#### For RN 0.19.0 and higher
```java
import com.tradle.react.UdpSocketsModule;  // <--- import
import com.pusherman.networkinfo.RNNetworkInfoPackage; // <--- import

public class MainActivity extends ReactActivity {
   // ...
    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(), // <---- add comma
		new UdpSocketsModule(), // <---- add package
        new RNNetworkInfoPackage() // <---------- add package
      );
    }
```

#### For react-native 0.29.0 and higher ( in MainApplication.java )
```java
import com.tradle.react.UdpSocketsModule;  // <--- import
import com.pusherman.networkinfo.RNNetworkInfoPackage; // <--- import

public class MainApplication extends Application implements ReactApplication {
   // ...
    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(), // <---- add comma
        new UdpSocketsModule(), // <---- add package
		new RNNetworkInfoPackage() <---- add package
      );
    }
```

## Usage (iOS)

### Adding with CocoaPads

Add the RNFS pod to your list of applications pods in your podfile, using the path from the Podfile to the installed module.

```
pod 'RNUDP', :path => './node_modules/react-native-udp'
pod 'RNNetworkInfo', :path => './node_modules/react-native-network-info'
```

Install pods as usual:
```
pod install
```

### Adding manually in Xcode

In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] Go to node_modules ➜ react-native-fs and add the .xcodeproj file

In XCode, in the project navigator, select your project. Add the `lib*.a` from the RNFS project to your project's Build Phases ➜ Link Binary With Libraries. Click the .xcodeproj file you added before in the project navigator and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for Header Search Paths and make sure it contains both `$(SRCROOT)/../react-native/React` and `$(SRCROOT)/../../React` - mark both as recursive.

Run your project (Cmd+R)

**Note:** Library uses these installed native_modules internally for sockets communication.

## Usage - Client

```javascript
    var Client = require('react-native-ssdp').Client
      , client = new Client();

    client.on('response', function (headers, statusCode, rinfo) {
      console.log('Got a response to an m-search.');
    });

    // search for a service type
    client.search('urn:schemas-upnp-org:service:ContentDirectory:1');

    // Or get a list of all services on the network

    client.search('ssdp:all');
```

## Usage - Server

```javascript
    var Server = require('react-native-ssdp').Server
      , server = new Server()
    ;

    server.addUSN('upnp:rootdevice');
    server.addUSN('urn:schemas-upnp-org:device:MediaServer:1');
    server.addUSN('urn:schemas-upnp-org:service:ContentDirectory:1');
    server.addUSN('urn:schemas-upnp-org:service:ConnectionManager:1');

    server.on('advertise-alive', function (headers) {
      // Expire old devices from your cache.
      // Register advertising device somewhere (as designated in http headers heads)
    });

    server.on('advertise-bye', function (headers) {
      // Remove specified device from cache.
    });

    // start the server
    server.start();

    process.on('exit', function(){
      server.stop() // advertise shutting down and stop listening
    })
```

# Legacy docs from the forked repo

Take a look at `example` directory as well to see examples or client and server.

##Configuration
`new SSDP([options, [socket]])`

SSDP constructor accepts an optional configuration object and an optional initialized socket. At the moment, the following is supported:

- `ssdpSig` _String_ SSDP signature. Default: `node.js/NODE_VERSION UPnP/1.1 node-ssdp/PACKAGE_VERSION`
- `ssdpIp` _String_ SSDP multicast group. Default: `<IP_ADDRESS>`.
- `ssdpPort` _Number_ SSDP port. Default: `1900`
- `ssdpTtl` _Number_ Multicast TTL. Default: `1`
- `adInterval` _Number_ `advertise` event frequency (ms). Default: 10 sec.
- `unicastHost` _String_ IP address or hostname of server where SSDP service is running. This is used in `HOST` header. Default: `<IP_ADDRESS>`.
- `location` _String_ URL pointing to description of your service, or a function which returns that URL
- `udn` _String_ Unique Device Name. Default: `uuid:f40c2981-7329-40b7-8b04-27f187aecfb5`.
- `description` _String_ Path to description file. Default: `upnp/desc.php`.
- `ttl` _Number_ Packet TTL. Default: `1800`.
- `allowWildcards` _Boolean_ Accept wildcards (`*`) in `serviceTypes` of `M-SEARCH` packets, e.g. `usn:Belkin:device:**`. Default: `false`

###Logging

You can enable logging via an environment variable `DEBUG`. Set `DEBUG=node-ssdp*` to enable all logs. To enable only client or server logs, use
`DEBUG=node-ssdp:client` or `DEBUG=node-ssdp:server` respectively.

# License

(The MIT License)

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

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

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: zwhitchcox/react-native-ssdp

repo_name: zwhitchcox/react-native-ssdp


text:
# redsys

PHP library for payment processing with the `Redsys` platform

## Installation

not ready, still in alpha...

## Basic Usage

`Redsys` platform has two connection methods:

* **Redirect:** users are redirected from your website to the official `Redsys` platform to complete the payment.
* **Webservice:** payment is completed without leaving your website.

### Redirect method

1. Prepare the request

```php

```

repository: rmhdev/redsys

repo_name: rmhdev/redsys


text:
# Perspective Webpack Plugin

For use with [Webpack](https://webpack.js.org/), this plugin allows smaller
& faster loading assets.  The plugin takes care of:

* Copying the Web Worker engine assets to your output directory.
* That's it!

Without this plugin or a manual equivalent of these steps, the WebAssembly
binary we be inlined as a `base64` string in the resulting `.js` asset, which
impacts total asset size and load time.  It will not in any way affect actual
runtime performance - the `inline` and `plugin` compilations modes are
otherwise identical.

## Example

```javascript
const PerspectivePlugin = require("@finos/perspective-webpack-plugin");

module.exports = {
    entry: "./in.js",
    output: {
        filename: "out.js",
        path: "build"
    },
    plugins: [new PerspectivePlugin()]
};
```
## Configuration _without_ `@finos/perspective-webpack-plugin`

As of version `0.6.1`, the equivalent webpack config is quite simple:

```javascript
module.exports = {
    // ...

    rules: [
        // ...

        {
            test: /perspective\.worker\.js$/,
            type: "javascript/auto",
            include: path.dirname(require.resolve("@finos/perspective")),
            loader: "worker-loader"
        },
        {
            test: /perspective\.cpp\.wasm$/,
            type: "javascript/auto",
            include: path.dirname(require.resolve("@finos/perspective-cpp")),
            loader: "file-loader"
        }
    ]
};
```

## `0.4.4` and below

These versions pre-date In order to use Perspective via webpack, so this
plugin is a requirement.

repository: zepaz/perspective

repo_name: zepaz/perspective


text:
# LuckyBastard

![LuckyBastard Preview](luckybastard.gif)

**Are You Lucky Bastard ???**

Generate random hex seeds to find out!

# How to install

Clone Git Repository and install required gems if not installed:

```ruby
 git clone https://github.com/decentralizuj/luckybastard.git
 cd luckybastard

 # install gems if not installed
 gem install money-tree colorize
```

# How to run

Run script with `--start` to start random seed generation.
Default check is by received, you can run with `--sent` to
check for received coins by address.

```ruby
 ruby luckybastard.rb --start

 ruby luckybastard.rb --start --sent
```

repository: decentralizuj/luckybastard

gha_language: Ruby

repo_name: decentralizuj/luckybastard


text:
# Brian Kuzma Portfolio

## Local Development

Install Gatsby globally:
`npm install --global gatsby-cli`

To install dependencies, go to the project root and run:

`yarn install`

To start the Gatsby development server:

`yarn develop`

To deploy:

`yarn deploy`

To serve the static build:

`yarn serve`

**Note: _develop_ is the main branch of development. Anything committed to _master_ will be overwritten in the deployment process, since Github pages require that _master_ be used for an organization page.**

branch_name: refs/heads/develop


text:
# roomjs

### Usage
```js
import Room from '@dolchi21/roomjs'
```

### Host a room
```js
const room = await Room.host('looking-for-someone')
```

### Join a room
```js
// on browser0
const room = await Room.joinAs('looking-for-someone', 'Phil')
// on browser1
const room = await Room.joinAs('looking-for-someone', 'Peter')

// on any browser
await room.list() // ['Phil', 'Peter']
```

gha_language: TypeScript


text:
### Note: This package has been renamed from `PimpMyREPL` to `OhMyREPL`. The simplest way of updating is to remove the old package and reclone this one.

# OhMyREPL

*This is my REPL. There are many like it, but this one is mine.*

A package that hooks into the Julia REPL and gives it syntax highlighting, bracket highlighting, [prompt paste mode](https://github.com/JuliaLang/julia/pull/17599), [colorized, structured error messages](https://github.com/JuliaLang/julia/pull/18228) and other goodies.

![repl](https://i.imgur.com/wtR0ASD.png)

**Note:** A video showing installation and features of the package is available [here](https://www.youtube.com/watch?v=lTLPAOLLbTU).

If you like this package please give it a star. I like stars.

### Installation

```jl
Pkg.clone("https://github.com/KristofferC/Tokenize.jl")
Pkg.clone("https://github.com/KristofferC/OhMyREPL.jl")
```

and then just load with `using OhMyREPL`.

### Features

* Syntax highlighting - Highlighting of keyword, operators, symbols, strings etc. in different colors. There available colorschemes are currently:
    * "JuliaDefault" - the default Julia scheme.
    * "Monokai16" - 16 colors
    * "Monokai256" - 256 colors
    * "BoxyMonokai256" - 256 colors

    To see an example output of a colorscheme use `test_colorscheme(name::String)`.
To activate a colorscheme use `colorscheme!(name::String)`. By default, "Monokai16" will be used on Windows and "Monokai256" otherwise. To test the supported colors in your terminal you can use `OhMyREPL.ANSICodes.test_ANSI()` and `OhMyREPL.ANSICodes.test_ANSI_256()` to test 16 and 256 colors respectively.
* Bracket highlighting - Will make matching brackets highlighted when the cursor is between an opening and closing bracket.
* Automatic bracket insertion - Will insert a matching closing bracket to an opening bracket automatically unless the next character is the same opening bracket. Will also ignore an input closing bracket if the character under the cursor is that closing bracket. This can be enabled or disabled at will with `enable_autocomplete_brackets(::Bool)`.
* Prompt pasting - If a pasted statement starts with `julia> ` any statement beginning with `julia> ` will have that part removed before getting parsed and any other statement will be removed. This makes easy to paste what others have copied from their REPL without the need to remove any prompts or output.
* Colorized error messages [0.5 only]. Will write the error messages in a bit nicer way. To disable, put `ENV["LEGACY_ERRORS"] = true` in your `.juliarc` file. Each stack frame has a number that is shown to the left. If you enter that number in the REPL and then press `Ctrl + Q` the editor will open at the line in the file of that stackframe. To set the editor to use, use for example `ENV["EDITOR"] = "subl"` for Sublime Text on linux. A demonstration of this functionality can be seen [here](https://media.giphy.com/media/3o7TKKlZrKQnWcdGTK/giphy.gif).

### Automatically start with Julia.

One way of automatically starting the package with Julia is by simply putting `using OhMyREPL` in your `.juliarc.jl` file.

You can also compile `OhMyREPL` into the Julia system image. This will mean that there is no need to edit your `.juliarc` file and the Julia REPL will start a bit quicker since it does not have to parse and compile the package when it is loaded. The way to do this is described in the [Julia manual](http://docs.julialang.org/en/release-0.4/devdocs/sysimg/#building-the-julia-system-image) but is also summarized here:

* Create a `userimg.jl` file that contains `Base.require(:OhMyREPL)`.
* Run `include(joinpath(JULIA_HOME, Base.DATAROOTDIR, "julia", "build_sysimg.jl"))`
* Run `build_sysimg(default_sysimg_path(), "native", userimg_path=USERIMGPATH; force=true)` where `USERIMGPATH` is the path to the `userimg.jl` file.

If you are building Julia from source, the `userimg.jl` file can just be moved to the `Base` folder and then run `make` like normal.

Note that you will have to redo this process if `OhMyREPL` is updated.

### Documentation

TODO: `ANSIToken`, `ANSIValue` docs.

#### Pipeline

The pipeline of how things are transformed from normal text to fancy text is as follows:

* When a key is pressed, tokenize the full input string using `Tokenize.jl`.
* To each token there is an associated `ANSIToken` which represents how the Token should be
printed in the Terminal.
* The list of `Tokens`, the list of `ANSITokens`s and the current position of the cursor are then sent to each registered and enabled pass.
* The purpose of a pass is to look at the list of `Tokens` and update each `ANSIToken` to its liking. The `BracketHighlighter` pass for example looks through the tokens and find matching brackets with help of the cursor position and then updates the corresponding `ANSIToken`s for the found matching bracket `Token`s.
* After all passes are done, the `Token`s are then printed out to the terminal according to their now updated `ANSIToken`.

#### Creating your own pass.

It is simple to create your own pass. We will here show how to create a pass that will transform all the `*` operators to be underlined and bold. To do so, we simply create a function that looks through the list of tokens for this operator and updates the `ANSIToken` for that `Token`. We then add this function to the global pass handler. This will immediately take effect.

```jl
using Tokenize # Load the tokenization library
# import the global pass handler that keep track of all passes
import OhMyREPL: PASS_HANDLER, ANSICodes.ANSIValue

# Write the pass function, the cursor position is not used but it needs to be given an argument
function underline_star(ansitokens, tokens, cursorposition::Int)
    # Loop over all tokens and ansitokens
    for (ansitok, tok) in zip(ansitokens, tokens)
        # If the token is a STAR token
        if Tokenize.Tokens.exactkind(tok) == Tokenize.Tokens.STAR
            # Update the ansi token
            ansitok.underline = ANSIValue(:underline, :true)
            ansitok.bold = ANSIValue(:bold, :true)
        end
    end
end

# Add the pass to the pass_handler
OhMyREPL.add_pass!(PASS_HANDLER, "Underline star", underline_star);
```

![](https://i.imgur.com/MxVeA6j.png)

For documentation of the `Token` type please see the [`Tokenize.jl` repo](https://github.com/KristofferC/Tokenize.jl).


text:
![ueli logo](img/doc/readme-header.png)

# ueli

This is a keystroke launcher for Windows and macOS.

![ueli screenshot](img/doc/features/app-search.png)

## Table of contents

* [Installation](#installation)
* [Quick tutorial](#quick-tutorial)
* [Features](#features)
* [Settings](#settings)
* [Updating](#updating)
* [Privacy](#privacy)
* [Known bugs](#known-bugs)
* [Development](#development)
* [Alternatives](#alternatives)
* [License](#license)
* [Release Notes](https://github.com/oliverschwendener/ueli/releases)

## Installation

### Installer / Zip

* Download the latest version [here](https://github.com/oliverschwendener/ueli/releases)
* Run the installer or unzip
* Run the application

> Note: because the executables are not signed Windows will probably prevent you from executing the installer or the program itself. You can click "Run anyway" to install/run the program.

### Installing via chocolatey repository

* Open a powershell with administration rights (Right click on your start button and click `Windows PowerShell (Admin)`
* Type `choco install ueli`
* Accept the upcoming prompt by entering `y` or run above command with `-y` switch
* Run the application

## Features

### Program search

* You can search for installed programs
* Press Enter to launch the selected program
* Press Shift Enter to launch the selected program as admin (Windows only)

![Feature Program search](img/doc/features/app-search.png)

### Files and folder search

* You can search files and folders
* Press Enter to open the selected file/folder
* You can [customize](#settings) the folders which are scanned for files and folders

![Feature file search](img/doc/features/file-search.png)

### Open URLs with your default web browser

* Type in a URL
* Press Enter to open the URL with your default web browser

![Feature URL](img/doc/features/url.png)

### Open default mail program

* Type in an email address
* Press Enter to open your default mail program with an empty email to the specified email address

![Feature email](img/doc/features/email.png)

### Web search engines

* You can use web search engines with a prefix and `?`

![Feature web search engines](img/doc/features/websearch.png)

Default web search engines:

|Prefix|Web Search Engine|
|---|---|
|`d`|[DuckDuckGo](https://duckduckgo.com)|
|`g`|[Google](https://google.com)|
|`gi`|[Google Images](https://images.google.com)|
|`l`|[Linguee](https://www.linguee.de)|
|`w`|[Wikipedia](https://wikipedia.org)|
|`yt`|[YouTube](https://youtube.com)|

You can [customize](#settings) your own web search engines

#### Fallback web search engines

You can [customize](#settings) multiple fallback web search engines which are used if ueli does not find any other search results.

![Feature fallback web search](img/doc/features/fallback-websearch.png)

### Operating system settings

* Search for operating system settings

![Feature operating system settings](img/doc/features/operating-system-settings.png)

### Operating system commands

* Execute operating system commands like "Shutdown", "Restart", "Lock computer", etc.

![Feature operating system commands](img/doc/features/operating-system-commands.png)

### Execute commandline tools

* Start a commandline tool with the `>` prefix
* Stop an executing commandline tool with Ctrl c

> Note: you can **not** interact with the commandline tool. You only see the output.

![Feature commandline](img/doc/features/commandline.png)

### Browse file system

* You can browse your file system by typing in a file path
* Press Enter to open the file or folder
* Press Tab for autocompletion

![Feature file browser](img/doc/features/filebrowser.png)

### Calculator

* Calculate simple math, matrix, symbolic function, convert units and a lot more
* Press Enter to copy the result to the clipboard

![Feature calculator](img/doc/features/calculator.png)

### Shortcuts

* You can [customize](#settings) shortcuts to
    * start command line tools
    * open websites
    * open files/folders
    * launch programs

![Feature shortcuts](img/doc/features/shortcuts.png)

### Custom commands

* You can [customize](#settings) custom commands with parameters

![Feature custom commands](img/doc/features/custom-commands.png)

### Environment Variables

* Search for environment variables
* Press Enter to open the current file/folder
* Press Tab to autocomplete if it shows a valid file path

![Feature environment variables](img/doc/features/environment-variables.png)

### Keyboard shortcuts

|Keyboard shortcut|Description|
|---|---|
|Enter|Execute selected search result|
|Shift Enter|Execute selected program as admin (Windows only)|
|Tab|Autocomplete file path|
|Ctrl o|Open the selected program or file at it's location|
|↑|Scroll up|
|↓|Scroll down|
|Ctrl i|Open settings|
|Shift ↑|Browse user input history up|
|Shift ↓|Browse user input history down|
|F6, Ctrl l|Set focus on user input|

## Settings

To open the settings press Ctrl i or search for `ueli settings`.

![Settings view](img/doc/settings.png)

### Options

> All settings are stored in `~/.ueli/ueli.config.json`.

* `allowMouseInteraction` Boolean - If mouse interaction should be allowed.
* `alwaysShowOnPrimaryDisplay` Boolean - If ueli should always show up your the primary display. If set to false ueli will show up on the display your cursor is currently on.
* `applicationFileExtensions` Array of string - Represents the file extensions which are used to find applications in the specified folders.
* `applicationFolders` Array of string - Represents the folders which are scanned for applications.
* `autoStartApp` Boolean - If the app should be started automatically when you log in.
* `calculatorPrecision` Number - Defines the calculator's precision of decimal numbers. Minimum is `0` and maximum is `64`.
* `colorTheme` String - Defines the [color theme](#color-themes).
* `customCommands` Array of customCommand objects - A list of [custom commands](#custom-commands)
    * `name` String - Represents the displayed name of the custom command.
    * `executionArgument` String - Represents the execution argument for the custom command.
    * `prefix` String - Represents the prefix for the custom command.
    * `icon` String - Represents the svg icon for the custom command.
* `features` FeatureOptions
    * `calculator` Boolean - If the calculator feature is enabled.
    * `commandLine` Boolean - If the command line feature is enabled.
    * `customCommands` Boolean - If the custom command feature is enabled.
    * `email` Boolean - If the email feature is enabled.
    * `environmentVariables` Boolean - If the environment variables feature is enabled.
    * `fileBrowser` Boolean - If the file browser feature is enabled.
    * `fileSearch` Boolean - If the file search feature is enabled.
    * `programs` Boolean - If the programs feature is enabled.
    * `operatingSystemCommands` Boolean - If the operating system commands feature is enabled.
    * `operatingSystemSettings` Boolean - If the operating system settings feature is enabled.
    * `shortcuts` Boolean - If the shortcuts feature is enabled.
    * `ueliCommands` Boolean - If the ueli commands feature is enabled.
    * `webSearch` Boolean - If the web search feature is enabled.
    * `webUrl` Boolean - If the web url feature is enabled.
* `fileSearchBlackList`: Array of string - Represents a black list when files are searched. This has a small improvement on the performance when scanning a folder with a lot of files.
* `fileSearchOptions` Array of FileSearchOption objects (**only effective if `searchFiles` is set to `true`**).
    * `folderPath` String - Represents a folder which should be searched for files and folders.
    * `recursive` Boolean - If the specified folder should be searched recursively. **Be cautious with this option because it can slow down the application drastically.**
* `hotKey` String - Represents the hotkey to show/hide the window ([Available hot keys](https://github.com/electron/electron/blob/master/docs/api/accelerator.md)).
* `logExecution` Boolean - If ueli should log the execution of applications, files and folders for better search results. Set to `false` if you want to disable logging.
* `iconSet` IconSet - Represents the default icon set.
    * `appIcon` String - Represents the svg icon for applications.
    * `calculatorIcon` String - Represents the svg icon for the calculator.
    * `commandLineIcon` String - Represents the svg icon when typing in a command line command.
    * `emailIcon` String - Represents the svg icon when typing in an email address.
    * `environmentVariableIcon` String - Represents the svg icon for environment variables.
    * `fileIcon` String - Represents the svg icon for files.
    * `folderIcon` String - Represents the svg icon for folders.
    * `operatingSystemSettingsIcon` String - Represents the svg icon for operating system settings.
    * `searchIcon` String - Represents the svg icon for the search icon on the top right.
    * `shortcutIcon` String - Represents the default svg icon for shortcuts and custom commands.
    * `urlIcon` String - Represents the svg icon when typing in an email address.
* `maxSearchResultCount` Number - Maximum number of search results to be displayed on one page.
* `rescanInterval` Number - Interval in seconds to rescan the application folders.
* `searchEngineLimit` Number - Represents the maximum of items that the search engine shows in the search results. The lower the better is the rendering performance.
* `searchEngineThreshold` Number - Represents the threshold for fuzzy matching (min = 0, max = 1, lower means you have to be more precise with the user input).
* `searchResultDescriptionFontSize` Number - Represents the font size of the search result description in pixels.
* `searchResultHeight` Number - Represents the height of a search result box in pixels.
* `searchResultNameFontSize` Number - Represents the font size of the search result name in pixels.
* `shortcuts` Arraay of shortcut objects - A list of [shortcuts](#shortcuts).
    * `executionArgument` String - Represents the execution argument for the shortcut.
    * `name` String - Represents the displayed name for the shortcut.
    * `icon` String - (Optional) Represents the svg icon for the shortcut. If no icon is set default icon is used.
* `showConfirmationDialog` Boolean - If a confirmation dialog should pop up when trying to execute "dangerous stuff" like operating system shutdown etc.
* `showSearchResultNumber` Boolean - If the search result number should be shown on the GUI.
* `showTrayIcon` Boolean - If the icon should appear in the system tray.
* `smoothScrolling` Boolean - If page scrolling for search results should be smooth or instant.
* `transparentWindow` Boolean - If the window should be transparent. **Changing this option needs a restart of ueli.**.
* `useNativeIcons` Boolean - If native operating system icons should be applied to apps and files.
* `userInputFontSize` Number - Represents the font size of the user input in pixels.
* `userInputHeight` Number - Represents the height of the user input box in pixels.
* `userStylesheet` String - Represents a path to a local stylesheet to modify the appearance of the window.
* `webSearches` Array of webSearch Objects - A list of [web search engines](#web-search-engines):
    * `webSearch` Object - Defines a web search engine.
        * `icon` String - Represents the svg icon for the specific web search engine.
        * `isFallback` Boolean - If the web search should act as [fallback](#fallback-web-search-engines)
        * `name` String - Represents the name of the web search engine.
        * `prefix` String - Represents the prefix for your web search engine. For example if the prefix is `g` you can type in `g?{your search term}` to search.
        * `priority` Number - Represents the priority of the web search engine when used as fallback (the higher the number the higher the web search engine appears in the search results).
        * `url` String - Represents the url for the search engine to which the search term is appended to. For example `https://google.com/search?q=` or `https://google.com/search?q={{query}}`.
        * `whitespaceCharacter` String - Represents a character or string which is used to encode whitespace.
* `windowMaxHeight` Number - Represents the maximum window height. Only used for command line output and settings view.
* `windowWidth`: Number - Represents the width of the main window in pixels.

### Color themes

![Color themes](/img/doc/color-themes.png)

#### Available color themes

* `atom-one-dark`
* `dark`
* `dark-mono`
* `light`
* `light-mono`

#### Custom color themes

You can customize your own color theme with a CSS file on your computer.

1. Create a CSS file on your computer
2. Add CSS variables in the `:root` section. For example:

    ``` CSS
    :root {
        --background-color: #21252b;
        --text-color: #ccc;
        --accent-color: #333842;
        --accent-text-color: #fff;
        --mono-font-color: #ccc;
        --scrollbar-foreground-color: #3d444f;
        --scrollbar-background-color: #1f2328;
    }
    ```

3. In the [settings](#settings) set `userStylesheet` to the CSS file you just created

4. Reload ueli

> You can completly overwrite uelis behaviour with your CSS file! See the [base stylesheet](https://github.com/oliverschwendener/ueli/tree/master/styles/app.css) of ueli.

### Icons

On [https://icons8.com](https://icons8.com/) you can find svg icons for almost everything!

## Updating

To check if you are running the latest version open the [settings](#settings). If there is an update available you can press the button to download and install the newer version.

## Privacy

For better search results ueli is keeping track of the applications, files and folders you are executing. All information is stored in `~/.ueli/ueli.count.json`. If you don't want ueli to track your executions simply delete that file's content and disable logging via the [settings](#settings).

## Known bugs

* ([#37](https://github.com/oliverschwendener/ueli/issues/37)) Window starts to move while typing when custom scaling in Windows is set.
* ([#92](https://github.com/oliverschwendener/ueli/issues/92)) If you see an error that says `spawn powershell.exe ENOENT` check if powershell is installed (should be installed in all recent Versions of Windows by default) and check if powershell is in the PATH variable.

## Development

### Build status

|Platform|Build status|
|---|---|
|Windows|[![Build status](https://ci.appveyor.com/api/projects/status/c208tgdb97rrx9i3?svg=true)](https://ci.appveyor.com/project/oliverschwendener/ueli)|
|macOS|![Build status](https://travis-ci.org/oliverschwendener/ueli.svg?branch=migration-to-typescript)|

### Code coverage

[![Coverage Status](https://coveralls.io/repos/github/oliverschwendener/ueli/badge.svg?branch=master)](https://coveralls.io/github/oliverschwendener/ueli?branch=master)

### Requirements

* Git
* Node.js
* Yarn

### Setup

```
$ git clone https://github.com/oliverschwendener/ueli
$ cd ueli
$ yarn
```

### Run

```
$ yarn bundle
$ yarn start
```

> Note: there is also a watch task `$ yarn bundle:watch` which watches the typescript files and bundles them automatically if there are any changes.

### Debug

> For debugging you need Visual Studio Code

1. Go to `.vscode` folder
2. Make a copy of `launch.example.json` and rename it to `launch.json`
3. Select one of the preconfigured debug modes and start debugging

### Run tests

```
$ yarn test
```

### Code coverage

```
$ yarn test --coverage
```

### Package

```
$ yarn package:dir
```

## Alternatives

* [khanhas/ueli](https://github.com/khanhas/ueli)
* [Launchy](https://www.launchy.net/)
* [Wox](https://github.com/Wox-launcher/Wox)
* [Keypirinha](http://keypirinha.com/)
* [Alfred](https://www.alfredapp.com/)
* [Hain](https://github.com/hainproject/hain)
* [Zazu App](http://zazuapp.org/)
* [Cerebro](https://cerebroapp.com/)

## License

Copyright (c) Oliver Schwendener. All rights reserved.

Licensed under the [MIT](LICENSE) License.

repository: dyslexictech/ueli

repo_name: dyslexictech/ueli


text:
django-fixture
=============

Utilities for generating django fixtures from a csv data file and json file

What it does
------------

[Djredcap] (https://github.com/dmegahan/django-redcap) and [djfixture] (https://github.com/cbmi/djFixture) are 2 scripts that automate the process of transferring patient or survey data from Redcap to Harvest. The programs work alongside one another to create a models.py file, a fixtures.json file and a filename.json file.

Djfixture uses a csv containing the data used for the fixtures and the intermediary json file created from djredcap. Djfixture looks at each field in each form from the json file, repeats them if needed, and uses their form name and other clues to determine the name of the field in the data file using clues from its form name, its number of choices, and extracts that data.

Install and Setup
-----------------

To install:

```bash
python setup.py sdist
cd dist
tar xvfz django-fixture-0.1.1b2
cd django-fixture-0.1.1b2
python setup.py install --user
```

Once installed, simply add `djfixture` to your `INSTALLED_APPS` project settings:

```python
INSTALLED_APPS = (
    'djfixture',
    ...
)
```

Commands
--------

Djredcap and djfixture function alongside one another. For both of them to work correctly, they must be run in the correct order. djredcap should be run first. Djredcap creates an intermediary json file that describes each form, including each field and its information, from the redcap data dictionary submitted in djredcap. This json file is used in djfixture to describe the models.py file.

Commands are executed using the `fixture` command with a sub-command, e.g.:

```bash
./manage.py fixture [options] subcommand [args]
```

**inspect**

```bash
./manage.py fixture inspect path/to/exported/data.csv path/to/djredcap/file.json
```

repository: chop-dbhi/djFixture

repo_name: chop-dbhi/djFixture


text:
---
title: The Tried Intelligent Methods Met Impossible Trolls Waiver (TIMMIT)
category: Software Development
tags:
- development
- software
- project management
- licence
- quality
---

This goes out to all the developers who have to deal with Code Crap.

Find the latest version of the waiver @ GitHub.

The Tried Intelligent Methods Met Impossible Trolls Waiver (TIMMIT) v1.0

As declared on {DATE} at {NAME-OF-CORPORATION} by the project developers

Responsibility is hereby waived, to the maximum amount allowed by law and binding legal contracts, from any developer associated with this project, including (any of), but not limited to: software developers, system administrators, designers, usability experts, test engineers, technical writers, but excluding all decision-making stakeholder roles, including, but not limited to: project managers, chief technical officers, chief executive officers and the product owner. Permission is hereby granted to all obligated developers to continue work on this project. The project is subject to the following conditions:

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, INFORMATION SECURITY AND PRIVACY, PERCENTAGE OF BUGS, USABILITY OF THE USER INTERFACE, UPTIME OF THE SERVICE, CUSTOMER SATISFACTION, GENERAL CODE QUALITY AS IMPLIED BY INDUSTRY STANDARDS AND CERTIFICATIONS, THE AMOUNT OF DOCUMENTATION AND NONINFRINGEMENT. IN NO EVENT SHALL THE DEVELOPERS OF THE SOFTWARE OR ITS COMPONENTS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

extension: markdown

gha_language: HTML


text:
# BBMOD_EAnimationInstance
`enum`
## Description
An enumeration of members of an AnimationInstance structure.

### Members
| Name | Description |
| ---- | ----------- |
| `Animation` | The animation to be played. |
| `Loop` | True if the animation should be looped. |
| `AnimationStart` | Time when the animation started playing (in seconds). |
| `AnimationTime` | The current animation time. |
| `AnimationTimeLast` | Animation time in last frame. Used to reset members in  	 looping animations or when switching between animations. |
| `PositionKeyLast` | An index of a position key which was used last frame.  	 Used to optimize search of position keys in following frames. |
| `RotationKeyLast` | An index of a rotation key which was used last frame.  	 Used to optimize search of rotation keys in following frames. |
| `BoneTransform` | An array of individual bone transformation matrices,  	 without offsets. Useful for attachments. |
| `TransformArray` | An array containing transformation matrices of all bones.  	 Used to pass current model pose as a uniform to a vertex shader. |
| `SIZE` | The size of an AnimationInstance structure. |

repository: short-bread/BBMOD

repo_name: short-bread/BBMOD


text:
---
layout: post
title: My experience with Terraform
description: ""
modified: 2014-12-11
category: posts
tags:
- automation
blog: true
---

One of the projects recently tasked to me was cloud infrastructure automation. We are building out a presence in AWS and potentially GCE and need a way to manage the infrastructure services we are providing to our app teams. Since cloudformation is lock-in to AWS, we needed something else... Enter [Terraform](https://www.terraform.io/).

Using terraform we were able to build out a versioned configuration for the interdependencies in AWS and soon to be GCE.

Also have been using it to build out my personal educational projects, example would be generating/destroying CoreOS clusters in DigitalOcean.

repository: aaronmfraser/indigo

branch_name: refs/heads/gh-pages

repo_name: aaronmfraser/indigo


text:
---
type: conference
speakers: -olivier
track: '2'
date: '2021-09-10'
start: '09:55'
end: '10:35'
short: Why we choose API Platform ecosystem to build a fast and scalable application.
---

# Project “reboot” : Why PHP and Symfony are still into the game for any new project

[![Olivier Doucet - Why PHP and Symfony are still into the game](https://img.youtube.com/vi/aB6lKL_SvYQ/0.jpg)](https://www.youtube.com/watch?v=aB6lKL_SvYQ&list=PL3hoUDjLa7eSo7-CAyiirYfhJe4h_Wxs4&index=14)

In 2020 we faced an important challenge: **reboot a project from scratch** and think again the architecture and technologies chosen two years ago.

This talk explains **why we chose Symfony + API-Platform + Mercure** in order to build **a fast and scalable application**, easy to improve and maintain.
The objective was to recode 4 years of work in 6 months.

*Context: for the last couple of years, two in-house developers were in charge of developing an API entirely in NodeJS + GraphQL. NodeJS seemed a good choice at that…*

repository: api-platform/website

repo_name: api-platform/website


text:
---
layout: featured
title: Become a borrower
header-bg: custom-bg-corporate
featured-hero-description: "Sign up for free access to more than 60,000 eBooks, eAudio titles, magazines, newspapers and streaming."
featured-hero-image: "borrower/train.jpg"
featured-hero-alt: "Illustration of a man on a train with headphones on."
cta-text: "Sign up for free →"
cta-link: "/borrower/sign-up/"
breadcrumb: home
---

{%
  include z-bar.html
  src="borrower/seabird.jpg"
  alt="Close up of an eReader from over the shoulder of a reader"
  bg-color="bg-near-white"
  title="eBooks and eAudio"
  text="The latest titles, classics and non-fiction available to download to your device as eBooks or eAudio."
%}

{%
  include z-bar.html
  layout-reverse="true"
  src="borrower/paterson.jpg"
  alt="Woman curled up with a man with the title Paterson, by Jim Jarmusch"
  bg-color="custom-bg-corporate"
  color="white"
  title="Streaming"
  text="Stream arthouse and indie films, challenging documentaries and hundreds of academic lectures."
%}

{%
  include z-bar.html
  src="borrower/good-food-900.jpg"
  alt="Good Food magazine cover"
  bg-color="bg-near-white"
  title="Newspapers & magazines"
  text="All the dailies, Sundays and a wide range of popular magazines."
%}

It’s all free

Access to all these online services – and everything else we do – is free when you sign up for a library card.

Sign up for a free library card →

repository: suffolklibraries/sljekyll

repo_name: suffolklibraries/sljekyll


text:
# Hanami::Webconsole

[Hanami](http://hanamirb.org) development web console.

## Version

**This branch contains the code for `hanami-webconsole` 2.x.**

## Status

[![Gem Version](https://badge.fury.io/rb/hanami-webconsole.svg)](https://badge.fury.io/rb/hanami-webconsole)
[![CI](https://github.com/hanami/webconsole/workflows/ci/badge.svg?branch=main)](https://github.com/hanami/webconsole/actions?query=workflow%3Aci+branch%3Amain)
[![Test Coverage](https://codecov.io/gh/hanami/webconsole/branch/main/graph/badge.svg)](https://codecov.io/gh/hanami/webconsole)
[![Depfu](https://badges.depfu.com/badges/a8545fb67cf32a2c75b6227bc0821027/overview.svg)](https://depfu.com/github/hanami/webconsole?project=Bundler)
[![Inline Docs](http://inch-ci.org/github/hanami/webconsole.svg)](http://inch-ci.org/github/hanami/webconsole)

## Installation

Add this line to your Hanami project's `Gemfile`:

```ruby
group :development do
  gem "hanami-webconsole"
end
```

And then execute:

```shell
$ bundle install
```

**NOTE:** You need a version of `hanami` `1.2.0+`.

## Usage

When an exception is raised during your local development in-browser, you'll see the web console.

### Code reloading

This gem in incompatible with `hanami` code reloading.

In order to use this gem, you have two alternatives:

  1. Start the server without code reloading: `bundle exec hanami server --no-code-reloading`
  1. Use [`hanami-reloader`](https://rubygems.org/gems/hanami-reloader) gem and start the server as usual: `bundle exec hanami server`

## Development

After checking out the repo, run `bin/setup` to install dependencies.
You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

To run all the test, use `script/ci`.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hanami/webconsole.

## Acknowledgements

This gem is based on the great work of [`better_errors`](https://rubygems.org/gems/better_errors) and [`binding_of_caller`](https://rubygems.org/gems/binding_of_caller) gems. Thank you!

## Copyright

Copyright © 2014 Hanami Team – Released under MIT License

repository: hanami/webconsole

repo_name: hanami/webconsole


text:
# Automatic picture transmission(APT) decoder

Automatic picture transmission protocol is used by NOAA satellites. They constantly send a frequency modulated signal at 137 to 138 MHz.
Demodulating this FM wave will give an output of audio signal with a frequency of 2400 Hz. This is also known as amplitude modulated subcarrier wave. NOAA satellite sends 120 lines per minute or 1 line per 500 milliseconds. From this AM subcarrier wave, we can extract the amplitudes for 500 milliseconds and normalize them to be in between 0 and 255.

These values can be stored in NumPy array and can be plotted as an image.

Here's an example image:
![example image](https://github.com/jch15/APT-Decoder/blob/main/noaa1.png)

![example image 2](https://github.com/jch15/APT-Decoder/blob/main/noaa2.png)

# How to run?
Make sure that you install `numpy`, `scipy`, `matplotlib` using the following commands

`pip install numpy`

`pip install scipy`

`pip install matplotlib`

Once they are installed, run the program using `python run.py`, it will ask for the WAV file and normalization values. Enter them and it will show you the image as a plot.

I've included `noaa1.wav` file, you can use it see the image sent by the satellite.

# References
https://noaasis.noaa.gov/NOAASIS/pubs/Users_Guide-Building_Receive_Stations_March_2009.pdf

https://en.wikipedia.org/wiki/Automatic_picture_transmission


text:
# Question Answering

## Overview

Recall the overall workflow for retrieval augmented generation (RAG):

![overview.jpeg](overview.jpeg)

We discussed `Document Loading` and `Splitting` as well as `Storage` and `Retrieval`.

Let's load our vectorDB.

```python
import os
import openai
import sys
sys.path.append('../..')

from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file

openai.api_key  = os.environ['OPENAI_API_KEY']
```

The code below was added to assign the openai LLM version filmed until it is deprecated, currently in Sept 2023.
LLM responses can often vary, but the responses may be significantly different when using a different model version.

```python
import datetime
current_date = datetime.datetime.now().date()
if current_date < datetime.date(2023, 9, 2):
    llm_name = "gpt-3.5-turbo-0301"
else:
    llm_name = "gpt-3.5-turbo"
print(llm_name)
```

```python
from langchain.vectorstores import Chroma
from langchain.embeddings.openai import OpenAIEmbeddings
persist_directory = 'docs/chroma/'
embedding = OpenAIEmbeddings()
vectordb = Chroma(persist_directory=persist_directory, embedding_function=embedding)
```

```python
print(vectordb._collection.count())
```

```python
question = "What are major topics for this class?"
docs = vectordb.similarity_search(question,k=3)
len(docs)
```

```python
from langchain.chat_models import ChatOpenAI
llm = ChatOpenAI(model_name=llm_name, temperature=0)
```

### RetrievalQA chain

```python
from langchain.chains import RetrievalQA
```

```python
qa_chain = RetrievalQA.from_chain_type(
    llm,
    retriever=vectordb.as_retriever()
)
```

```python
result = qa_chain({"query": question})
```

```python
result["result"]
```

### Prompt

```python
from langchain.prompts import PromptTemplate

# Build prompt
template = """Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Use three sentences maximum. Keep the answer as concise as possible. Always say "thanks for asking!" at the end of the answer.
{context}
Question: {question}
Helpful Answer:"""
QA_CHAIN_PROMPT = PromptTemplate.from_template(template)

```

```python
# Run chain
qa_chain = RetrievalQA.from_chain_type(
    llm,
    retriever=vectordb.as_retriever(),
    return_source_documents=True,
    chain_type_kwargs={"prompt": QA_CHAIN_PROMPT}
)
```

```python
question = "Is probability a class topic?"
```

```python
result = qa_chain({"query": question})
```

```python
result["result"]
```

```python
result["source_documents"][0]
```

### RetrievalQA chain types

```python
qa_chain_mr = RetrievalQA.from_chain_type(
    llm,
    retriever=vectordb.as_retriever(),
    chain_type="map_reduce"
)
```

```python
result = qa_chain_mr({"query": question})
```

```python
result["result"]
```

If you wish to experiment on the `LangChain plus platform`:

 * Go to [langchain plus platform](https://www.langchain.plus/) and sign up
 * Create an API key from your account's settings
 * Use this API key in the code below
 * uncomment the code
 Note, the endpoint in the video differs from the one below. Use the one below.

```python
#import os
#os.environ["LANGCHAIN_TRACING_V2"] = "true"
#os.environ["LANGCHAIN_ENDPOINT"] = "https://api.langchain.plus"
#os.environ["LANGCHAIN_API_KEY"] = "..." # replace dots with your api key
```

```python
qa_chain_mr = RetrievalQA.from_chain_type(
    llm,
    retriever=vectordb.as_retriever(),
    chain_type="map_reduce"
)
result = qa_chain_mr({"query": question})
result["result"]
```

```python
qa_chain_mr = RetrievalQA.from_chain_type(
    llm,
    retriever=vectordb.as_retriever(),
    chain_type="refine"
)
result = qa_chain_mr({"query": question})
result["result"]
```

### RetrievalQA limitations

QA fails to preserve conversational history.

```python
qa_chain = RetrievalQA.from_chain_type(
    llm,
    retriever=vectordb.as_retriever()
)
```

```python
question = "Is probability a class topic?"
result = qa_chain({"query": question})
result["result"]
```

```python
question = "why are those prerequesites needed?"
result = qa_chain({"query": question})
result["result"]
```

Note, The LLM response varies. Some responses **do** include a reference to probability which might be gleaned from referenced documents. The point is simply that the model does not have access to past questions or answers, this will be covered in the next section.

```python

```


text:
# Explore the Tech!

In today's blog, I am going to discuss some topics related to web development using **HTML AND CSS**. So, _let's get started!_

### 1. Images in _HTML_:
To add an image into the page you need to use an `<img>` element. It must carry the following two attributes: `src`, which tells the browser where it can find the image file. `alt`, whcih provides a text description of the image which describes the image if you cannot see it, and `title` to provide additional information about the image. There are addintional attributes that can be added to the `<img>` tag, described as follows:
* `height` and `width`.
* `align`, which can be `left` and `right` for horizantal alginment, and `top`, `middle` and `bottom` for vertical alignment.

Images can be displayed in different places on the webpage, such as:
1. before a paragraph.
2. inside the start of a paragraph.
3. in the middle of a paragraph

The images you use on your website should be saved at the same width and height that you want them to appear on the page. Generally, there are three rules for creating images:
1. Save images in the right format.
2. Save images at the right size.
3. Use the correct resolution.

There are several image formats, such as **JPG**, **PNG**, and **GIF**, which are pixel images. Also, you can use vectorized images that are based on mathemetical representation, and if you want to crop an image, it is important not to lose valuable information. It is best to source
images that are the correct shape if possible.

### 2. Color in _CSS_:
The `color` property allows you to specify the color of text inside an element (foreground color). You can specify any color in CSS in one of three ways: **rgb values**, **hex codes**, and **colors names**. In the same way, `background-color` property is used to define the color of the webpage background.
Every color on a computer screen is created by mixing amounts of red, green, and blue. To find the color you want, you can use a color picker. the `opacity`
property which allows you to specify the opacity of an element and any of its child elements. Also, `rgba` property allows you to specify a color, just like you would with an RGB value, but adds a fourth value to indicate opacity.
Also, _CSS_ uses another coloring scheme, which is _hue, saturation and brightness_. It is defined by the `hsl` and `hsla` porperty that indicates the values of the 3 features.

### 3. Text in _CSS_:
Typeface terminologies (fonts) used in css include the following:
* Serif: have extra details on the ends of the main strokes of the letters.
* Sans-Serif: have straight ends to letters.
* Monospace: every letter in a monospace (or fixed-width) font is the same width.
* Cursive: either have joining strokes or other cursive characteristics.
* Fantasy: usually decorative fonts and are often used for titles.
* Weight: Light, Medium, **Bold**, ***Black***
* Style: Normal, _Italic_, Oblique.
* Stretch: Condensed, Regular, Extended.

The following properties are used with fonts in _CSS_:
* `font-family` property is used to specify a font of the text.
* `font-size` that can be in `px`, `em` and `%`.
* `font-weight` that contains `normal` and `bold`.
* `font-style` contains `normal`, `italic` and `oblique`.
* `text-transform` used to change the case of text giving it one of the following values: `capitalize`, `lowercase`, and `uppercase`.
* `text-decoration`: `none`, `underline`, `overline`, `line-through`, and `blink`.
* `line-height` sets the height of an entire line of text.
* `letter-spacing` and `word-spacing`.
* `text-align`: `left`, `right`, `center`, and `justify`.
* `vertical-align`: `baseline`, `sub`, `super`, `top`, `text-top`, `middle`, `bottom`, and `text-bottom`.
* `text-indent`.


text:
# Setup Jenkins on OpenShift 4.3

Pre-requirements:
- OpenShift 4.3 cluster

1. From the IBM Cloud cluster dashboard, click the `OpenShift web console` button,

    ![open OpenShift web console](../.gitbook/jenkins/openshift-web-console-button.png)

2. First we need to create a new project named `jenkins` to deploy the Jenkins service to,

3.  From the terminal,

    ```
    oc new-project jenkins
    ```

    outputs,

    ```
    $ oc new-project jenkins
    Now using project "jenkins" on server "https://c107-e.us-south.containers.cloud.ibm.com:31608".
    ```

4. Or in the Openshift web console, go to `Home` > `Projects`,
5. Click `Create Project`

    ![Projects](../.gitbook/jenkins/projects.png)

6. For `Name` enter `jenkins`, for `Display Name` enter `jenkins`, and for `Description` enter `jenkins`,

    ![Create jenkins project](../.gitbook/jenkins/jenkins-project.png)

7. Click `Create`,
8. Go to `Operators` > `OperatorHub`,
9.  For `Filter by keyword` enter `Jenkins`,

    ![](../.gitbook/jenkins/operatorhub-jenkins.png)

10. Select the `Jenkins Operator` by `Community`, `provided by Red Hat`,
11. Click `Continue` to `Show Community Operator`,

    ![](../.gitbook/jenkins/show-community-operator.png)

12. Review the operator information, and click `Install`,

    ![](../.gitbook/jenkins/install-jenkins-operator.png)

13. In the `Create Operator Subscription` window, choose `A specific namespace in the cluster` and select the project `jenkins`, select `alpha` under `Update Channel`, select `Automatic` under `Approval Strategy`,

    ![](../.gitbook/jenkins/jenkins-operator-config.png)

14. Click `Subscribe`,
15. The `Installed Operators` page will load, wait until the `Jenkins Operator` has a `Status` of `Succeeded`,

    ![](../.gitbook/jenkins/installed-operator-succeeded.png)

16. Click the installed operator linked `Name` of `Jenkins Operator`,

    ![](../.gitbook/jenkins/jenkins-operator-details.png)

17. In the `Provided APIs` section, click the `Create Instance` link in the `Jenkins` panel,
18. In the `Create Jenkins` YAML definition for the new Jenkins instance, change the `metadata.name` to `my-jenkins`, accept all other specifications,

    ![](../.gitbook/jenkins/jenkins-yaml.png)

19. Click `Create`,

    ![](../.gitbook/jenkins/jenkins-instance-created.png)

20. Go to `Networking` > `Routes`, and look for a new Route `jenkins-my-jenkins`,

    ![](../.gitbook/jenkins/jenkins-route.png)

21. Click the link for `jenkins-my-jenkins` route in the `Location` column,

    ![](../.gitbook/jenkins/jenkins-route.png)

22. A route to your Jenkins instance opens in a new browser window or tab,
23. Click `Log in with OpenShift`,

    ![](../.gitbook/jenkins/login-with-openshift

24. Click `Allow selected permissions`,

    ![OpenShift Jenkins Allow selected permissions](../.gitbook/jenkins/jenkins-login-set-permissions.png)

25. Welcome to Jenkins !

    ![](../.gitbook/jenkins/welcome-to-jenkins.png)

26. Configure Jenkins
    1. Go to Jenkins > Manage Jenkins > Global Tool Configuration,
    2. Go to the `Maven` section,
    3. Click `Maven Installations`,
    4. If no Maven installer is configured, click `Add Maven`,
    5. Configure the `Name` to be `maven`, check the option `Install automatically` and select version `3.6.3`,
    6. Click Save,

    ![OpenShift Add Maven](../.gitbook/jenkins/jenkins-add-maven.png)

repository: IBMAppModernization/workshop-setup

repo_name: IBMAppModernization/workshop-setup