text:
[twitter-shield]: https://img.shields.io/twitter/follow/TabNineInc?style=social
[twitter-url]: https://bit.ly/2UmL69Q
[github-shield]: https://img.shields.io/github/stars/codota/Tabnine?style=social
[github-url]: https://bit.ly/36iGtUU
[vscode-shield]: https://img.shields.io/visual-studio-marketplace/r/TabNine.tabnine-vscode?logo=visual-studio-code&style=social
[vscode-url]: https://bit.ly/3pqj7o2
[youtube-shield]: https://img.shields.io/youtube/views/TKLkXh_c-Gw?style=social
[youtube-url]: https://bit.ly/36slY7c

[![Github Repo][github-shield]][github-url]
[![VSCode Plugin][vscode-shield]][vscode-url]
[![Youtube Demo Video][youtube-shield]][youtube-url]
[![Twitter Follow][twitter-shield]][twitter-url]

### **Tabnine Overview:**

Tabnine is a powerful Artificial Intelligence assistant designed to help you code faster, reduce mistakes, and discover best coding practices - without ever leaving the comfort of VSCode.

Tabnine studies publicly shared code and use A.I deep learning algorithms that provide us with the ability to predict your next coding needs and suggest one-click code completion.

Tabnine works with all major programming languages including JavaScript, Python, TypeScript, PHP, C/C++, HTML/CSS, Go, Java, Ruby, C#, Rust, SQL, Bash, Kotlin, Julia, Lua, OCaml, Perl, Haskell, and React.

We believe that coding is like Lego: Imagination is your only limit.
We’re here to help provide you with the perfect code building blocks at the right time

No more memorizing coding syntax, no more worrying about typos, no more neglecting to add that crucial comma, or even search for coding solutions online. Start reducing your development costs, deliver reliable code faster, and explore best coding practices.

Tabnine is trusted by more than a million developers worldwide. [Join us Now](https://www.tabnine.com/install) and enjoy the coding future, today. It’s Free!

![With and without Tabnine](https://github.com/codota/TabNine/raw/master/with-and-without-tabnine.gif)

### **Privacy**

Concerned about privacy and security? So do we!

Your code’s privacy is our highest priority. Tabnine keeps your code completely private

Tabnine offers code completion suggestions based on a model trained on millions of open-source code lines, which are then derived from the code you are currently working on. Tabnine only sends minimal contextual information from your currently edited file that allows us to make predictions based on your current local scope

We do not use your code to train our models and the information sent to our servers is only used to compute your prediction and is not being saved on our end

Find out more about how we keep your code private [here](https://www.codota.com/tabnine-code-privacy)

### **_Recommended by developers everywhere:_**

![Tom Dohnal Tweet](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/twitter-ps-1.png)

![Paul Mtali Tweet](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/twitter-ps-2.png)

![albertgao Tweet](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/twitter-ps-3.png)

![David Hariri Tweet](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/twitter-ps-4.png)

![Chris Bongers Tweet](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/twitter-ps-5.png)

![Andrea Tweet](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/twitter-ps-6.png)

### **Installation Instructions**

- Navigate to the Extensions tab and search for the Tabnine extension

- Click the Install button on the right-hand side

- Reload or Restart your VSCode

  ![VSCode look](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/vscode-ext-ps.png)

  ![Tabnine Languages](https://raw.githubusercontent.com/codota/tabnine-vscode/master/assets/tabnine-langs.png)

- The default behavior of Tabnine is using the Enter key to accept completions.
  If you want to use the Enter key to start a new line instead of accepting a completion, just go to ‘Settings → Editor: Accept Suggestion On Enter’ and turn it off.

##### **Manual Installation inside VSCode**

- Press `Cmd+P` in your Visual Studio Code, type in ext install `Tabnine.tabnine-vscode` and press `Enter`

- Click the Reload button in the extensions tab

- The default behavior of Tabnine is using the Enter key to accept completions. If you want to use the Enter key to start a new line instead of accepting a completion, just go to ‘Settings → Editor: Accept Suggestion On Enter’ and turn it off

Trouble installing? Check out our [FAQ](https://www.tabnine.com/faq) page, or contact<EMAIL_ADDRESS>

### **Tabnine Pro**

Looking for an even greater productivity boost?

Tabnine Pro plan enables a larger index size, premium support, and optional use of GPU-accelerated cloud servers for Deep completions, providing even better predictions

Click [Here](https://www.tabnine.com/trial) to get Free Tabnine Pro trial for 14 days

### **Technical information**

Tabnine Indexes your entire project by reading your `.gitignore` or others and determines which files to index.

- Add long variable names using minimal keystrokes
- Zero configuration. Tabnine works out of the box
- Highly responsive: Produces a list of suggestions in less than 10 milliseconds on average

##### **Usage**

After Tabnine’s installation, navigate to the Tabnine Settings page (‘Tabnine: Open Settings’ from the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)) and verify that Tabnine local model is successfully loaded (as shown in the following screenshots)

Tabnine is a textual autocomplete extension. When you type a specific string in your editor, you will view Tabnine completion dialog, with Tabnine suggestions according to the text you type

##### **Deep Completion**

Deep Tabnine is trained on millions of files from GitHub. During training, Tabnine’s goal is to predict the next token given the tokens that came before. To achieve this goal, Tabnine learns complex behavior, such as type inference in dynamically typed languages

Deep Tabnine can use subtle clues that are difficult for traditional tools to access. For example,
the return type of `app.get_user()` is assumed to be an object with setter methods, while the return type of `app.get_users()` is assumed to be a list

Deep Tabnine is based on GPT-2, which uses the Transformers Network Architecture. This architecture was first developed to solve problems in natural language processing. Although modeling code and modeling natural language might appear to be unrelated tasks, modeling code requires understanding English in some unexpected ways


text:
# Changelog
All notable changes to this project will be documented in this file.

## [3.10.2306] - 2023-06-30

### Added
- It is now possible to configure the upgrade job for helm using an API token instead of a user/password

### Fixed
- After the registration to Flow Manager, if no custom certificate is specified, the REST API server uses the certificate generated during registration.
- Docker compose templates are compatible with "docker compose" functionality.

## [3.10.2303] - 2023-03-31

### Changed
- Podman templates support secrets.
- Configuration templates have changed. Protocols Pesit, SFTP and Pesit using SSL are always activated; when not using FM/CG, partners and all needed certificates are created.

### Fixed
- Add registration_id condition before generate new certificate.
- Incomplete cft_support: "file" utility added to the image.

## [3.10.2206] - 2022-07-12

### Added
- Podman templates.

### Changed
- Verification of required parameters before deployment in helm.
- Improved protection of undefined parameters in helm.

## [3.10] - 2022-04-15

### Added
- Audit logs added to upgrade.

### Changed
- Copilot certificate generated uses CFT_INSTANCE_ID as CN.

### Fixed
- The usage of existingSecretFile or existingConfigMap was not correct.

## [3.9] - 2021-10-21

### Added
- Added support for OpenShift. Any user can run the Transfer CFT container.

### Changed
- You must accept the general conditions prior to creating a container (ACCEPT_GENERAL_CONDITIONS=YES in docker-compose, cft.accept_general_conditions=true for Helm).
- To upgrade your Transfer CFT deployment to v3.9, you require Transfer CFT v3.6 SP4 or higher.
- When Flow Manager or Central Governance is enabled and if no custom certificate is specified, the REST API server uses the certificate generated during registration.
- Helm: Added the cft.cg.agentName parameter to values.yaml which allows you to register your Transfer CFT instance to Flow Manager SaaS.

## [3.6 SP2] - 2021-05-31

### Changed
- Helm README updated on resources calculation.
- Helm README updated disks prerequisites.

## [3.7] - 2020-09-30

### Added
- Sentinel parameters support.

### Changed
- Host information calculation for add_host command.

### Fixed
- A single node Transfer CFT instance running inside a podman container did not stop properly.
- Missing imagePullSecrets in pre-upgrade would cause upgrade to fail when a imagePullSecret was needed.

## [3.6 SP1] - 2020-06-30

### Added
- Helm templates for Kubernetes.
- Multinode support to enable Transfer CFT deployment with multiple replicas.
- Health check using /healthz.
- A REST API to export Transfer CFT data prior to upgrading your deployment (PUT /cft/api/v1/cft/container/export).

### Changed
- File and folder organization in the repository.
- CFT_KEY, CFT_CG_SHARED_SECRET, USER_COPILOT_CERT_PASSWORD, USER_XFBADM_PASSWORD can be a command, a file, or a string value.
- Parameter USER_XFBADM_PASSWORD is mandatory to create the user defined by USER_XFBADM_LOGIN.
- Stop Transfer CFT using 'cft stop' command instead of 'cft force-stop'.
- Remove COMS from exposed ports.

### Fixed
- Locking issue if error occurred while creating the runtime.

repository: Axway/docker-cft

branch_name: refs/heads/master

extension: md

gha_language: Shell

license_type: permissive

repo_name: Axway/docker-cft


text:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Meet Robo: your friend

# import necessary libraries
import io
import os
import random
import string  # to process standard python strings
import warnings

import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import warnings

warnings.filterwarnings('ignore')

import nltk
from nltk.stem import WordNetLemmatizer
from pathlib import Path

nltk.download('popular', quiet=True)  # for downloading packages

# uncomment the following only the first time
# nltk.download('punkt') # first-time use only
# nltk.download('wordnet') # first-time use only

# data_dir = "D:/CodeGrind/Data/Formatted_Data/"
filename ="demofile2.txt"
# Reading in the corpus
total_str = ''
# for file in os.listdir(data_dir):
    # filename = data_dir + "sample.txt"
    # print(filename)
data = open(filename, 'rt', encoding="utf-8", errors="ignore")
text = data.read()
data.close()
total_str = total_str + "\n" + text

raw = text.lower()

# print(raw)

# TOkenisation
sent_tokens = nltk.sent_tokenize(raw)  # converts to list of sentences
word_tokens = nltk.word_tokenize(raw)  # converts to list of words

# Preprocessing
lemmer = WordNetLemmatizer()

def LemTokens(tokens):
    return [lemmer.lemmatize(token) for token in tokens]

remove_punct_dict = dict((ord(punct), None) for punct in string.punctuation)

def LemNormalize(text):
    return LemTokens(nltk.word_tokenize(text.lower().translate(remove_punct_dict)))

# Keyword Matching
GREETING_INPUTS = ("hello", "hi", "greetings", "sup", "what's up", "hey",)
GREETING_RESPONSES = ["hi", "hey", "*nods*", "hi there", "hello", "I am glad! You are talking to me"]

def greeting(sentence):
    """If user's input is a greeting, return a greeting response"""
    for word in sentence.split():
        if word.lower() in GREETING_INPUTS:
            return random.choice(GREETING_RESPONSES)

# Generating response
def response(user_response):
    robo_response = ''

    sent_filt_tokens.append(user_response)
    TfidfVec = TfidfVectorizer(tokenizer=LemNormalize, stop_words='english')
    tfidf = TfidfVec.fit_transform(sent_filt_tokens)
    # feature_names = tfidf.get_feature_names()
    # print(tfidf)
    vals = cosine_similarity(tfidf[-1], tfidf)
    # print(vals)
    # for a in vals[0]:
    # print(sent_tokens[int(a)])
    idx = vals.argsort()[0][-2]
    # print(idx)

    flat = vals.flatten()
    flat.sort()
    req_tfidf = flat[-2]

    if (req_tfidf == 0):
        robo_response = robo_response + "I am sorry! I don't understand you"
        return robo_response
    else:
        robo_response = robo_response + sent_filt_tokens[idx]
        return robo_response

flag = True
print(" My name is BOT. I will answer your queries about Chatbots. If you want to exit, type Bye!")
while (flag == True):
    user_response = input()
    user_response = user_response.lower()
    tokens_user = LemNormalize(user_response)
    # print(tokens_user)

    # print(token_data)
    if (user_response != 'bye'):
        if (user_response == 'thanks' or user_response == 'thank you'):
            flag = False
            print("BOT: You are welcome..")
        else:
            if (greeting(user_response) != None):
                print("BOT: " + greeting(user_response))
            else:

                sent_filt_tokens = []
                new_list = []
                sent_list = []
                Counter = 0
                # print(raw)
                for line in raw.splitlines():
                    # print(line)
                    # print(line.split(":"))
                    key_words = line.split(":")[0]
                    sent = line.split(":")[1]
                    words = key_words.split(" ")
                    x = set(words) & set(tokens_user)
                    new_list.append(x)
                    sent_list.append(sent)

                m = max(new_list)
                # print(new_list)
                # print(m)
                match_index = [i for i, j in enumerate(new_list) if j == m]

                for x in match_index:
                    sent_filt_tokens.append(sent_list[x])

                    # print(sent_filt_tokens)

                print("BOT: ", end="")
                print(response(user_response))
                sent_filt_tokens.remove(user_response)

    else:
        flag = False
        print("BOT: Bye! take care..")

license: Unlicense

extension: ipynb


text:
# plaid
PLAtformer In D

Requirements
============

-   `SDL2`
-   `SDL2_Image`
-   `SDL2_Mixer`

On Ubuntu 14.04:

    sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev

license: MIT

repository: CheeseLord/plaid

gha_language: D

repo_name: CheeseLord/plaid


text:
ARC: Ariadne Component Library
=========================

A flexible component library for PHP 5.4+
-----------------------------------------

The Ariadne Component Library is a spinoff from the Ariadne Web
Application Framework and Content Management System
[ http://www.ariadne-cms.org/ ]

The PHP 5.4 version is very much a work in progress. It is by no
means complete yet.

It is designed to make it simpler to do many common web application
tasks in a way that is easy to extend and is standards compliant and
accessible by default. The components are loosely coupled, they can
generally be used seperately but can be combined to enable more
features.

All components use dependency injection combined with default factory
methods, so the components are very flexible but easy to use.

It doesn't provide a MVC (Model View Controller) framework or URL
router, that is left to other frameworks. Instead it provides the
following components:

Common abstractions
------------------
- path: parse paths, including relative paths, get parents, etc.
- tree: methods to parse filesystem-like trees and search and alter them
- hash: methods to ease common tasks with nested hashes
- url: create and parse urls and query arguments
- http: simple http requests and generic access to user input
- xml: xml writer and parser
- html: html writer and parser

(Web) application building blocks
---------------------------------
- events: W3C style event system, with a filesystem tree as the DOM
- cache: easy caching system, can be used as a proxy for other objects
- context: a stackable dependency injection container
- config: a configuration/acquisition component
- template: a very simple substitution template language
- lambda: adhoc objects using closures and with prototype support

Connectivity components
-----------------------
- atom
- rss

Coming soon
-----------
These are already in Ariadne, they just need to be refactored.
- html: generate, parse and traverse html, native or through dom methods
- html\form: easy form generation, validation and manipulation
- html\menu: simple menu builder component
- html\table: simple table builder component
- csv: easy csv generation and parsing
- connect\ftp: ftp client
- connect\oauth: openauth client
- connect\twitter: twitetr client
- connect\xmlrpc: easy xmlrpc client

TODO
----
- tests and more tests
- documentation - see [the Wiki pages](https://github.com/Ariadne-CMS/arc/wiki)
  which are far from complete, but you can edit them yourself!
- make it easier

What makes ARC useful/interesting/unique?
=========================================

Many people have written about PHP lately and specifically about how
bad it is. I agree and disagree. PHP is powerfull and flexible, but
it isn't consistent.

Many parts of PHP have not been updated to use newer features to
maximum effect. Some parts are downright incomprehensible. This
library of components is set up to remedy that for the most common
things we encountered while building Ariadne over the last 14-odd
years.

The main design idea in ARC is that components should not depend on
other components, unless absolutely necessary. They should be flexible
enough to do what you need or be able to be extended easily. In
addition they should be easy to use, predictable in API and behaviour
and cohere closely to expected PHP behaviour.

We did this using the following architectural guidelines:
- (constructor based) dependency injection.
  No need for complex injection containers or service locators, since
  ARC is not a framework. It does provice factory methods to ease and
  standardize the use of components.
- Limit static / global state.
  Static methods are limited to either pure stateless functions or
  factory methods, which get all state information from a stackable
  dependency injection container.
- Define interfaces as documentation only.
  Wherever there are multiple implementations possible, components
  define an interface that defines the minimum API they need.
  There are no checks on these Interfaces and they may not be
  implemented by classes that still provide the required API, because:
- Duck typing all the way
  PHP is a dynamic language, strict type checking is out the window.
  So why not go completely in the opposite direction? Don't specify
  interfaces - or worse: classes - but accept all types of input. As
  long as they implement the needed methods and give access to the
  requested properties, accept it as correct.
  The interface definitions are there to be used if you can, or to use
  as a reference specifying which methods and properties should be
  available.
- Be liberal in what you accept
  An extension of the duck typing principal, methods should accept a
  range of input parameters, if they make sense in usage. So wherever
  you would accept a single value, but could as well operate on an
  array of values, do so.
  If you accept string values, also accept objects with a __toString
  method. If you accept an array, also accept array-like objects.
- Be simple, concise and readable
  The code must be simple to read and understand, without the need for
  large docblocks. Because of the ducktyping rule the default defense
  of docblocks - that they assist the IDE in telling you what to type
  where - is no longer valid. So the only comments in the code are
  there to explain some non-obvious but unavoidable piece of code. All
  the rest should be easily understandable by reading the how-to-use
  documentation and the code.
- Be consistent in naming and usage.
  Each method and class is named to be consistent with similar methods
  or classes. Argument order is kept similar where possible.

repository: liepertt/arc

repo_name: liepertt/arc


text:
+++
title = "O projeto Estatística é com R!"
subtitle = "Conheça o projeto e seus produtos :know:"

date = 2018-10-20T00:00:00
lastmod = 2018-10-21T00:00:00
draft = false

# Authors. Comma separated list, e.g. `["Luciane Alcoforado"]`.
authors = []

tags = ["rstats"]
summary = "O projeto pode oferecer uma sólida base de conhecimento na linguagem R, temos muito a oferecer: vídeos, posts, tutoriais, minicursos online, seminários, meetups, livros e muito mais."

# Featured image
# To use, add an image named `featured.jpg/png` to your project's folder.
[image]
  # Caption (optional)
  caption = "Image credit: [**zcool**](https://www.zcool.com.cn)"

  # Focal point (optional)
  # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
  focal_point = ""

[[gallery_item]]
album = "1"
image = "https://pbs.twimg.com/profile_images/1041702815582892034/QOQRdQNC_400x400.jpg"
caption = "Luciane"

[[gallery_item]]
album = "1"
image = "https://pbs.twimg.com/profile_images/199501655/ariel2004_400x400.JPG"
caption = "Ariel"

[[gallery_item]]
album = "1"
image = "https://i1.rgstatic.net/ii/profile.image/363500405837825-1463676658853_Q512/Steven_Dutt-Ross.jpg"
caption = "Steven"

+++

**Academic** makes it easy to create a beautiful website for free using Markdown. Customize anything on your site with widgets, themes, and language packs.

[Check out the update site](https://www.estatisticacomr.uff.br) for full instructions.

## License

Copyright 2016-present [George Cushen](https://georgecushen.com).

Released under the [MIT](https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md) license.


text:
## How to create full featured screen capturing app in C# with ByteScout Screen Capturing SDK

### The tutorial shows how to create full featured screen capturing app in C#

This sample source code below will demonstrate you how to create full featured screen capturing app in C#. ByteScout Screen Capturing SDK is the screen video recording SDK helps in quick implementation of screen video recording. WMV, AVI, WebM output options are available with adjustable quality, video size, framerate and video and audio codec. Includes special features like live multiple blacking out of selected areas, recording from web cam as main source and as overlay, optional watermarks for output video. It can be used to create full featured screen capturing app using C#.

The SDK samples like this one below explain how to quickly make your application do create full featured screen capturing app in C# with the help of ByteScout Screen Capturing SDK. In your C# project or application you may simply copy & paste the code and then run your app! This basic programming language sample code for C# will do the whole work for you to create full featured screen capturing app.

Free trial version of ByteScout Screen Capturing SDK is available on our website. Documentation and source code samples are included.

## Get In Touch

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20Screen%20Capturing%20SDK%20Question)

or send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20Screen%20Capturing%20SDK%20Question)

## Free Trial Download

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)

## Web API (On-demand version)

[Get your free API key](https://pdf.co/documentation/api?utm_source=github-readme)

## API Documentation and References

[Explore ByteScout Screen Capturing SDK Documentation](https://bytescout.com/documentation/index.html?utm_source=github-readme)

[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)

[Check Free Training Sessions for ByteScout%20Screen%20Capturing%20SDK](https://academy.bytescout.com/)

## Video Review

[https://www.youtube.com/watch?v=fujkvtWUVCw](https://www.youtube.com/watch?v=fujkvtWUVCw)

url: https://raw.githubusercontent.com/repohoarder/ByteScout-SDK-SourceCode/32dd9367cebb66e3aa16bd803798c026d7dfeed5/Screen Capturing SDK/C#/Create Full Featured Screen Capturing App/README.md

repository: repohoarder/ByteScout-SDK-SourceCode

repo_name: repohoarder/ByteScout-SDK-SourceCode


text:
# Code Quiz
This is a basic Javascript quiz.

## Internet Address

https://benjdg.github.io/04_Code_Quiz/

## Screenshot

![code quiz](./Assets/screenshot.PNG)

## Usage

Click on the start button and answer the questions.  You have 30 seconds to finish the quiz.  Every wrong answer will reduce the time by 5 seconds.  Enter your name to record your highscore at the end.

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

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

branch_name: refs/heads/main


text:
# dokieli

```{raw} html
<script src="https://dokie.li/scripts/dokieli.js"></script>
<link media="all" rel="stylesheet" type="text/css" href="https://dokie.li/media/css/dokieli.css" />
```

## Activate `dokie.li`

You can activate [`dokie.li`](https://dokie.li/)
by adding the following to your `conf.py` file:

```python
comments_config = {
   "dokieli": True
}
```

Next, [follow the `dokie.li` configuration instructions](https://dokie.li/).

When you build your documentation, pages will now have an active dokieli overlay.

repository: firasm/sphinx-comments

repo_name: firasm/sphinx-comments


text:
<img src="https://raw.githubusercontent.com/nielse63/stonksjs/main/docs/assets/logo.svg" align="right" width="100" />

# stonksjs

> Reliable algotrading utilities written in node

![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nielse63/stonksjs?style=flat-square)
![CI Tests](https://github.com/nielse63/stonksjs/workflows/CI%20Tests/badge.svg)
![Coveralls github](https://img.shields.io/coveralls/github/nielse63/stonksjs?style=flat-square)
![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/nielse63/stonksjs?style=flat-square)
![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/nielse63/stonksjs?style=flat-square)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

- [Features](#features)
  - [Goals](#goals)
- [Usage](#usage)
- [Development](#development)
  - [Setup](#setup)
  - [Testing](#testing)
  - [Release](#release)
- [Contributing](#contributing)
- [Roadmap](#roadmap)

## Features

- Custom screeners from finviz, msn, and finscreener
- Detailed ticker fundamentals
- Module and CommonJS compatible
- Light-weight - few to no dependencies

### Goals

**What stonksjs is:**

The primary objective of this project are:

- To provide a collection of reliable algotrading utilities written in
  typescript/node
- Take some of the guess-work out of the stock research process by using
  industry-tested, predefined screeners
- Provide more data-points for a given instrument than most packages currently
  available
- Enable algotrading programmers with diversified assets - not just the hottest
  options rumors on [r/wallstreetbets](https://reddit.com/r/wallstreetbets)

**What stonksjs is not:**

- stonksjs **is not** a roboadvisor or professional trading app - this is just a
  fun little side project
- stonksjs **is not** an unofficial API for Robinhood or any other brokerage. If
  that's what you're looking for, I'd recommend
  [algotrader](https://github.com/torreyleonard/algotrader)
- stonksjs **is not** a backtesting tool, although that might get added to the
  roadmap soon

## Usage

Installation, usage, and API docs can be found in each scoped package directory.

| Name                                                                                | Description                                                  | Version                                                                                |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| [@stonksjs/core](https://github.com/nielse63/stonksjs/tree/main/packages/core)                     | Single point of entry for all stonksjs packages              | ![npm (scoped)](https://img.shields.io/npm/v/@stonksjs/core?color=brightgreen&style=flat-square)           |
| [@stonksjs/quote](https://github.com/nielse63/stonksjs/tree/main/packages/quote)                   | Detailed, real-time stock quote data                         | ![npm (scoped)](https://img.shields.io/npm/v/@stonksjs/quote?color=brightgreen&style=flat-square)          |
| [@stonksjs/finviz](https://github.com/nielse63/stonksjs/tree/main/packages/finviz)                 | Unofficial finviz API                                        | ![npm (scoped)](https://img.shields.io/npm/v/@stonksjs/finviz?color=brightgreen&style=flat-square)         |
| [@stonksjs/stock-screener](https://github.com/nielse63/stonksjs/tree/main/packages/stock-screener) | Pre-defined industry standard stock screeners from MSN Money | ![npm (scoped)](https://img.shields.io/npm/v/@stonksjs/stock-screener?color=brightgreen&style=flat-square) |

## Development

### Setup

#### Prerequisites

This project requires node `v16.20.1`.

#### Installation

Clone the repo and install the dependencies:

```bash
git clone http://github.com/nielse63/stonksjs.git
cd stonksjs
nvm use
npm ci
```

### Testing

Tests are run using `jest`, and can be run by executing:

```bash
npm test

# run with coverage
npm test -- --coverage
```

### Release

To release a new version, run:

```bash
npm run release
```

This executes `lerna publish` behind the scenes, and you'll be prompted with a
few questions before the package is deployed.

## Contributing

Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.

Please make sure to update tests as appropriate.

## Roadmap

All new features and changes are being tracked in GitHub under the
[projects](https://github.com/nielse63/stonksjs/projects) and
[issues](https://github.com/nielse63/stonksjs/issues) tabs of this repo.

license: ISC

gha_language: TypeScript

gha_license_id: ISC


text:
# Flutter Wrapper

Similar to the gradle wrapper, an executable shell script in the root of you project, `flutterw` which downloads and runs flutter in the correct version for every user.

The flutter wrapper will add flutter as a submodule to your project which pins the version allowing you to upgrade flutter for all developers in you project at the same time.

#### Get started with Flutter without adding flutter to your PATH

The [Flutter install process](https://flutter.io/setup-macos/#get-sdk) is not perfectly automated. You have to manually download Flutter and add it to your path before you can use the awesome Flutter CLI to create a new project. With the flutter wrapper this becomes easier.

```bash
mkdir flutter_wrapper_project && cd "$_"
git init
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh | bash -
./flutterw create .
./flutterw run
```

## Maintenance

#### Update flutter wrapper

Run the install command again.

```bash
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh | bash -
```

If you want a specific version, use the `-t <tag/branch>` (i.e. `v0.8.0`)

```bash
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh | bash /dev/stdin -t v0.8.0
```

#### Uninstall flutter wrapper

Removing submodules is hard, that's why I did the hard work for you.
Simply run this command from the root of your flutter project and the uninstall script will cleanup everything.

Bye :wave:

```bash
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/uninstall.sh | bash -
```

#### Update flutter version

No special command required. Run `./flutterw channel <master|dev|beta>`, afterwards add and commit changed `.flutter` submodule reference.

## License

```
Copyright 2018 Pascal Welsch

Licensed 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.
```


text:
# MQ Client for Akeneo
A Message Queue bundle for the Akeneo PIM

## Principle

This simple bundle allows to push a message to a Google Cloud Pub/Sub topic each time a product is modified.

## Use case

Combined with other services orchestrated from an ESB, this allows to asynchronously process changes (BLOB for examples) and push them back to the PIM or to any other application (catalog, etc)

We use this in a BIM environment to parse ArchiCAD 3D .gsm model files and inject the PIM data to generate up to date versions of 3D furniture libraries.

## Installation

From your PIM project root folder, clone the repository:

`git clone https://github.com/bimbus/mq-client-akeneo src/Bimbus`

Then add the needed dependencies:

`composer require google/cloud-pubsub`

Edit the `app/AppKernel.php` file to reflect this:

```php
    protected function registerProjectBundles()
    {
        return [
          new Bimbus\Bundle\MQBundle\BimbusMQBundle(),
        ];
    }
 ```

Empty your cache:

`bin/console cache:clear --env=prod`

## Google Cloud Pub/Sub

Select or create the project. If this is a creation, activate the Pub/sub API.

### Create a service account

- Select the `IAM & admin > Service accounts` menu item then click on **CREATE SERVICE ACCOUNT**.
- Type in a name for the new service account (eg. akeneo-mq) and check the *Furnish a new private key* checkbox.
- Click on "CREATE", the JSON credentials file should be downloaded automatically.
- Rename the downloaded file to `gcp-credentials.json` and put it in the `src/Bimbus/config` folder.

### Create a topic

- Go to the `Pub/Sub > Topics` menu and then click on **CREATE TOPIC**.
- On the next screen, select the newly created topic.
- Then, type in the name of the new service account your just created and give it the "Pub/Sub Publisher" Role.

### Create a subscription

- Return to the `Pub/Sub > Topics` menu.
- Click the button at the end of the created topic line and select *New subscription*.
- Enter a name and click on create.

## Bundle configuration

- Move into the `src/Bimbus/Bundle/MQBundle/Resources/config/` folder.
- Copy the `parameters.yml.dist` to `parameters.yml`.
- Edit the `parameters.yml` file to fill in the `gcp.pubsub.project` and `gcp.pubsub.topic` keys:

```yaml
parameters:
    gcp.pubsub.project: '<<gcp-project-id>>'
    gcp.pubsub.topic: '<<last-part-of-topic>>'
    gcp.pubsub.credentials: '%kernel.project_dir%/src/Bimbus/config/gcp-credentials.json'
```

## Test everything

- Open the Akeneo UI and edit a product to check that saving works fine.
- Use the `gcloud` CLI to check that the message as been pushed to the topic:

```bash
gcloud config set project <<gcp-project-id>>
gcloud pubsub subscriptions pull <<subscription-name>>
```

repository: bimbus/mq-client-akeneo

gha_language: PHP

repo_name: bimbus/mq-client-akeneo


text:
The Virtual Watershed

is a "catchment" for
software tools developed through close collaboration between watershed scientists
and software developers.

        Our tools solve problems that our watershed scientists face today.

        We are working to collect these tools to form the foundation for the
        next generation of hydrological data management and modeling.

        Read more about us below

Watersheds and Projects

Valles Caldera and Jemez River Canyon

New Mexico: UNM and NM Tech

Lehman Creek

Nevada: UNR and UNLV

Dry Creek and Reynolds Creek

Idaho: ISU, BSU, and UI

Who we Are

        13 Watershed scientists working with

        10 Software developers across

        4 watersheds in

        3 states:

Watershed Scientists

{% for card in contributor_cards %}

{{card['name']}}

    Institute

{% endfor %}

gha_language: HTML

gha_license_id: MIT


text:
---
layout: recipe
title: Raisin Pie
image: raisinpie.jpg
origin: Page 247  Better Homes And Gardens
tags: dessert, raisins, pie, traditional

ingredients:
    - "4 eggs, beaten (approx 200 grams)"
    - "1 1⁄3 cup sugar"
    - "Scant ¾ teaspoon cinnamon"
    - "Scant ¾ teaspoon nutmeg"
    - "Scant ½ teaspoon salt"
    - "3 ¼ Tablespoons lemon juice"
    - "2 2⅓ Tablespoons butter, melted"
    - "1 ½ cup raisins"
    - "½ cup broken walnuts"
    - "1 9-inch _unbaked_ pastry shell"

directions:
    - Combine eggs, sugar, spices, salt, lemon juice, and butter.
    - Stir in raisins and nuts
    - Pour into pastry shell.
    - Bake at 375 35-45 minutes, or until filling is just set in center.
    - serve with whipped cream

---
At first read, this seems like a truly bizarre recipe.  But the lemon juice cuts the sweetness of the raisins, the spices make it super-wintery, and the whipped cream mellows it all out.  It's really quite delicious and unusual these days.

Note that it's also totally reasonable to blind-bake the pie shell first; given the short baking time and low temperature this improves the pie a lot.

repository: edinel/recipes

path: /_recipes/Raisin Pie.md

filename: Raisin Pie.md

gha_license_id: Unlicense

repo_name: edinel/recipes


text:
---
title: Toolbelt
description: Helps developers build applications/websites faster and automate tedious processes. These tools are a great addition to anyones arsenal
color: "#21A3F1"
---

Helps developers build applications/websites faster and automate tedious processes. Just makes life a bit easier (which we all like)

## Text Editor

[Visual Studio Code](https://code.visualstudio.com/) - Firm Favourite - My go to editor of choice. No need for anymore suggestions, it's just that good. I'll also add some of my current config below.

## Dependency Management

What if every everyone released the new version of their modules at the same time, and everyone updated the moment after. Simply put it, never gonna happen.

[Node Version Manager (NVM)](https://github.com/creationix/nvm) - A must have - Seemlessly manage your node and npm versions. This has been a life saver on more than one occasion and it makes it all super simple. I have some snippets available which will help you in setting up and not having to scour the docs for relevant commands.

## Cheatsheets

[Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) - Markdown Loveliness - The holy grail of markdown cheat sheets. It's the only one you'll every need (unless you're venturing down the MDX path)

### Task Runners

[Gulp](https://gulpjs.com/) - Automate Tasks - A simple, easy to learn task runner, producing efficient builds, automate task. It's super flexible and the only one I tend to use (especially for Wordpress development).

## Collaboration

[MakeSpace](https://makespace.fun) - Collaboration/Create - A whole new way to collaborate, apart. A place to co-create, co-work, or just hang out. It's still relatively early in it's development but I think it has a whole load of potential.

[Notion](https://www.notion.so) - Collaboration/Notes - Write, plan, collaborate, and get organized. A really great tool for note taking and prepping/recording meeting notes. Now it's free for personal accounts!

## Thinking

[Untools](https://untools.co/) - Thinking/Learning - A collection of thinking tools and frameworks to help you solve problems, make decisions and understand systems. I've not read a lot of it yet but it seems pretty cool.

repository: velasco/portfolio-site

repo_name: velasco/portfolio-site


text:
---
title: Setting VPS Disk Space with OpenVZ the "easy way"
layout: post
tags: openvz
---
Disk space can be easily controlled via OpenVZ but I have yet to find anyone to actually explain what the heck to "really" do when you need to add more! Everything I have found about OpenVZ just explains the parameters and never shows you how to do it easily. When I need to adjust disk space on an VPS it is usually when I have someone beating up my ear on the phone or my IM so I needed a fast way to expand the disk without worrying about the details.
There are three parameters in OpenVZ which are directly related to disk usage. They are disk_quota, diskspace and diskinodes. NOTE: there are a lot of other parameters that control and effect the disk but this tutorial will only cover the basics!
The parameter disk_quota is a YES or NO value which disables the file system quotas; if you are not worried about the quotas set it to NO and stop reading. Otherwise; leave it set at YES and continue.
The parameter diskspace is the count of 1K blocks available to the VPS in a soft and hard limit. The hard limit is a stop point similar to filling up a physical disk - when you are out, you are out. The soft limit is when the bean counters get angry and the quotatime timer starts. On a basic installation and VPS setup you will have a 1048576 1K blocks as a soft limit and 1153024 1K blocks as a hard limit. The numbers are not crazy as they are derived from [base2](http://en.wikipedia.org/wiki/Binary_numeral_system). Thus, 1048576 1K blocks is 1GB of disk space. Add an additional 10.2MB to the disk space and you arrive at the 1048576 1K blocks. These are the basic numbers for the basic template that ships with OpenVZ.
The parameter diskinodes is the total number of files, directories and links you can have in the container. Think of them as Post-it notes and each file, directory and link gets a single note. The default basic number is 200,000 for a soft limit for 1GB of disk space and 220,000 for the hard limit. Normally `*nix` systems will set aside enough inodes for one inode per 4K disk space block. In the default template for OpenVZ they are setting aside enough inodes for 5.2K blocks. Which I'll write off as either (a) a magic number or (b) a unique calculation I am not familiar with. Thus, because the 4K block inode count for 1GB of disk space should be 262,144 inodes we\'ll use the default template values for our calculations and simply multiply times the number of GB requested.

So.. now...

The question is how do you adjust them quickly and easily. In this example we are going to work with units of GBs. If you need more granularity you will need to divide it back out to MBs but Gigabytes works great for our needs:

First, we need to define the soft and hard limits, next we apply the updated diskspace numbers and finally set the inode numbers correctly based on the ratio we know from the default template:

Here are the commands (and note below for a quick and easy Perl script):
{% highlight bash %}
cid=1324
gb=5
vzctl set ${cid} --diskspace $((1048576 * ${gb})):$((1153434 * ${gb})) --save
vzctl set ${cid} --diskinodes $((200000 * ${gb})):$((220000 * ${gb})) --save
{% endhighlight %}

{% highlight perl %}
#!/usr/bin/perl

# display the commands to update an OpenVZ VPS with new disk space requirements
# 2009/11/15 - Chris Schuld<EMAIL_ADDRESS>
use strict;

print "Enter VPS CID: "; my $_CID = ; chomp($_CID);
print "Enter SOFT Diskspace Limit (ex 10GB):"; my $_SOFT = ; chomp($_SOFT); $_SOFT =~ s/[^0-9]//g;
print "Enter HARD Diskspace Limit (ex 11GB):"; my $_HARD = ; chomp($_HARD); $_HARD =~ s/[^0-9]//g;
my $_INODE_SOFT = ( 200000 * $_SOFT );
my $_INODE_HARD = ( 220000 * $_HARD );
print "Run these commands:\n";
print "vzctl set $_CID --diskspace ".$_SOFT."G:".$_HARD."G --save\n";
print "vzctl set $_CID --diskinodes $_INODE_SOFT:$_INODE_HARD --save\n";
{% endhighlight %}

gha_language: CSS

gha_license_id: NOASSERTION


text:
# Explanation of Arduino Controller Code

**author: Joshua Cook**

**date: 2019-02-10**

## Overview

For those new to Arduino, there are two essential functions: `setup()` and `loop()`. Both are `void` (ie. there return no value). `setup()` runs once at the beginning upon start up of the machine, and `loop()` is the main function that continously loops forever - this is where the main commands of the code run.

The main purpose of the code is to check the time and set the lights appropriately. The temperature, time, date, and status of the "over-ride switch" are printed to a small (cheap) OLED screen. The complexity of the code is introduced by my over-ride button. Pressing this switches the lights to their opposite state (if they are on, it turns them off, and vice versa) and over-rides the timer. Pressing the button again, restores control to the timer.

## The Code

### Header section (runs before `setup()`)

First, I load the libraries I am using. The `OneWire.h` and `DallasTemperature.h` libraries are for the SSD1306 temperature sensor. `Wire.h` is the I2C library. `RTC.h` is for the real-time clock module. `Adafruit_SSD1306.h` are for the OLED screen.
The `GrowLight.h` is my own library that makes the lights a new class. I implemented this in the second version of the code to reduce complexity of the code and make it more robust. You can read about the details here: [Explanation of the GrowLight Class](./growlight_class_walkthrough.md "Explanation of the GrowLight Class").

```c
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include <RTClib.h>
#include <Adafruit_SSD1306.h>
#include "GrowLight.h"
```

I then initialize all of the modules. You can see which ones correspond to which piece in the comments.

```c
// initiate RTC module object
RTC_DS3231 rtc;

// IO pins
int relayPin = 7;
int buttonPin = 6;

// OLED declarations
#define OLED_RESET -1
Adafruit_SSD1306 display(OLED_RESET);

// one-wire SSD1306 declarations
#define ONE_WIRE_BUS 10
#define SSD1306_128_64
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);  // Pass our oneWire reference to Dallas Temperature.

// self-defined grow-lights object
GrowLight gl(relayPin, 10, 22);
```

The only one I will comment on is the last line `GrowLight gl(relayPin, 10, 22)`. This is the new class I defined and it accepts 3 values upon initialization: the pin to turn the lights ON or OFF, the hour of when to turn the lights ON, and the hour on when to turn the lights OFF. I made a walk-through tutorial for this library, too ([Explanation of the GrowLight Class](./growlight_class_walkthrough.md "Explanation of the GrowLight Class")).

### The setup function

Finally, the `setup()` function. Here is it in full, and I broke it down below.

```c
void setup() {
    pinMode(LED_BUILTIN, OUTPUT);

    // begin RTC
    rtc.begin();

    // setup the OLED display
    display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
    display.clearDisplay();
    display.display();

    // begin one-wire temp sensor
    sensors.begin();

//    if (rtc.lostPower()) {
//        Serial.println("RTC lost power, lets set the time!");
//        // following line sets the RTC to the date & time this sketch was compiled
//        rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
//    }

    // declare IO
    pinMode(buttonPin, INPUT);

    // pause before starting to control the lights
    delay(3000);
}
```

I begin by designating the built-in LED as an output.

```c
pinMode(LED_BUILTIN, OUTPUT);
```

Then, the `rtc` object is started.

```c
// begin RTC
rtc.begin();
```

The OLED screen is initiated with a blank screen. If you use this code, and the screen does not display anything, try using the address `0x3D` - it's usually one of these two. Note, when using this library, don't forget to call the `.display()` method to actually produce an image (in this case blank) on the screen.

```c
// setup the OLED display
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.display();
```

Next, the temperature sensor in started.

```c
// begin one-wire temp sensor
sensors.begin();
```

The commented out section is code that will reset the RTC time to the current time if it is disconnected from its power source. I leave this commented out because it only works when connected to a computer, not a wall-wart as I currently have it.

```c
if (rtc.lostPower()) {
	Serial.println("RTC lost power, lets set the time!");
	// following line sets the RTC to the date & time this sketch was compiled
	rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
}

```

I declare the input/output pin for the button as `OUTPUT`.

```c
// declare IO
    pinMode(buttonPin, INPUT);
```

Finally, I add a slight delay before taking control of the lights because I noramlly plug in the Arduino and then the lights.

```c
delay(3000);
```

### The loop function

Here is the entire `loop()` function that I then decompose below. On each loop, current date and time is collected, the screen is updated, the built-in LED is turned according to the over-ride button status, the lights are updated, and the function waits for a button press.

```c
void loop() {
    // print useful info. to Serial
    DateTime now = rtc.now();

    // print the current temperature
    printScreen(now, gl.getOverrideStatus());

    // builtin-led ON/OFF according to over-ride status
    digitalWrite(LED_BUILTIN, gl.getOverrideStatus());

    // check the current time against the time limits
    gl.updateLights(now.hour());

    // check time every 15 sec, otherwise look for button presses
    int checkTimeDelay = 2000;
    unsigned long start_timer = millis();
    unsigned long end_timer = start_timer;
    while(end_timer >= start_timer && checkTimeDelay > (end_timer - start_timer)) {
        int buttonState = digitalRead(buttonPin);
        if (buttonState == HIGH) {
            gl.overrideLights(now.hour());
            Serial.println("button pressed");
            digitalWrite(LED_BUILTIN, gl.getOverrideStatus());
            delay(500);
            break;
        }
        delay(50);
        end_timer = millis();
    }
}
```

#### Step 1. collect current date and time

Request current information from the RTC module.

```c
// print useful info. to Serial
DateTime now = rtc.now();
```

#### Step 2. update user interface

The screen is updated with current temperature, time, date, and the status of the over-ride button. The `printScreen` function is elaborated on below. The built-in LED is switched ON or OFF according to the over-ride button.

```c
// print the current temperature
printScreen(now, gl.getOverrideStatus());

// builtin-led ON/OFF according to over-ride status
digitalWrite(LED_BUILTIN, gl.getOverrideStatus());
```

#### Step 3. update the lights

I have included a method in the `GrowLight` class called `.updateLights` that takes the current time and checks it against the ON and OFF hours for the lights. It also takes into account the over-ride status. This functionality was the main reason I wanted to create the `GrowLight` library. It packaged all of the information for the lights into a single object instead of relying on the careful tracking of global variables.

```c
// check the current time against the time limits
gl.updateLights(now.hour());
```

#### Step 4. wait for button press

`int checkTimeDelay` holds a value for how long to wait for a button press (in milliseconds). I start a timer with `unsigned long start_timer = millis();`, and assign the same value to `unsigned long end_timer`. By subtracting these two values on each loop of the `while`, I have created a timer. If this timer reaches `checkTimeDelay`, then the `while` stops and `loop()` continues.

Inside of the `while` statement, the state of the button is constantly checked, waiting to be pressed. If it isn't pressed, there is a bit of a delay (50 ms) and the `end_timer` variable is updated.

If the button is pressed, the `gl` object's over-ride status is switched using the `.overrideLights` method and the lights are switched to the approriate state. The built-in LED is turned to reflect the status of the over-ride button, and there is a half-second delay to prevent double presses from accidentally registering.

Within the `.overrideLights` method, if the over-ride status is swtiched from OFF to ON, then the lights are simply switched to their opposite state. However, if the over-ride status is switched from ON to OFF, then the method uses the `.updateLights` method to return control back to the lights. This simple implementation of specialized logic is the second reason why I needed to create the `GrowLight` library.

```c
// check time every 15 sec, otherwise look for button presses
int checkTimeDelay = 2000;
unsigned long start_timer = millis();
unsigned long end_timer = start_timer;
while(end_timer >= start_timer && checkTimeDelay > (end_timer - start_timer)) {
    int buttonState = digitalRead(buttonPin);
    if (buttonState == HIGH) {
        gl.overrideLights(now.hour());
        Serial.println("button pressed");
        digitalWrite(LED_BUILTIN, gl.getOverrideStatus());
        delay(500);
        break;
    }
    delay(50);
    end_timer = millis();
}
```

### Subroutines

The function `printScreen()` was primarily used to remove a block of ugly verbose code out of my `loop()` function. It reads the temperature (in Farenheit) using the two statements `sensors.requestTemperatures();` and `float ftemp = sensors.getTempFByIndex(0);`.

Next, a string is made depending on the over-ride status for the lights, passed to `printScreen` using the `bool or_status` argument.

Then, there is a whole process for writing the temperature, time, date, and over-ride status to the OLED screen: the display is cleared, text size set, color set, cursor positioned, the statement printed, and the display is shown (`.display()` method). I add a delay to prevent any quick accidental repeat calls to set the display.

```c
// print the temperature to the OLED display
void printScreen(DateTime dt, bool or_status) {
    // call sensors.requestTemperatures() to issue a global temperature
    // request to all devices on the bus
    sensors.requestTemperatures(); // Send the command to get temperature readings
    float ftemp = sensors.getTempFByIndex(0);  // 0 refers to the first IC on the wire

    String or_string;
    if (or_status) {
        or_string = "OR: ON";
    } else {
        or_string = "OR: OFF";
    }

    // setup display
    display.clearDisplay();
    display.setTextSize(2);
    display.setTextColor(WHITE);
    display.setCursor(0,0);

    // line 1: print temperature
    display.print(ftemp);
    display.println(" F");

    // line 2: time
    display.print(dt.hour(), DEC);
    display.print(":");
    display.println(dt.minute(), DEC);

    // line 3: date
    display.print(dt.month(), DEC);
    display.print("/");
    display.print(dt.day(), DEC);
    display.print("/");
    display.println(dt.year(), DEC);

    // line 4: override status:
    display.print(or_string);

    // print to screen
    display.display();
    delay(100);
}
```

Here is an example of what the screen looks like:

<img src="./images/oled_screen_example.jpg" width="200" height="200"/>

---
### TODO

Some minor issues are logged in my Project tab of the GitHub repo, but nothing major is in the works.


text:
### Dynamic Materials

[previous](../grouping-meshes/README.md#user-content-grouping-meshes) • [home](../README.md#user-content-ue4-blueprints) • [next](../private-variables/README.md#user-content-private-variables)

What if we want to change a property in the material dynamincally through the blueprint? What if we want to change the property of a component like the spotlight color? We will be looking at both of these in the upcoming exercise.

This is not as straight forward as changing a value to an existing material.  We have to change the **type** to a dynamic material which is different from the one supplied in the editor (a *static* material).  Please note that a dynamic material is more expensive so only create one if you do need to make changes dynamically during gameplay.

---

##### `Step 1.`\|`ITB`|:small_blue_diamond:

Go to the **Blueprints** folder and duplicate **BP_Spotlight**. Call it `BP_SpotlightDynamic`. Create a new folder called `Room 4`. Drag **BP_Spotlight_Dynamic** into this folder. Put three of these blueprints in **Room 4** and rotate them to your liking:

![add three BP_SpotlightDynamic actors to room](images/BpSpotDynamicRm4.jpg)

##### `Step 2.`\|`FHIU`|:small_blue_diamond: :small_blue_diamond:

Open up **BP_SpotlightDynamic**. Now we want to affect the color of the glow in the lamp **Material**. *Click* on the **Lamp** component and look for the material. *Double click* the icon to load it up. Make sure you are opening **M_Spotlight_Master**.

![open m_spotlight_master](images/FindOutLampMaterial.jpg)

##### `Step 3.`\|`ITB`|:small_blue_diamond: :small_blue_diamond: :small_blue_diamond:

Look for the parameter that adjusts the light color. Just before the **Emissive** color we have a **Vector Parameter** called **Light Color**. This is the color we want to change in code in the blueprint.

![look for light color](images/LightColorParameterRm4.jpg)

##### `Step 4.`\|`ITB`|:small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond:

Go to the **blueprint** and into the **Construction Script** tab. *Drag* a reference to the **Lamp** component which contains that material we just looked at.

![drag lamp reference](images/DragLampReference.jpg)

##### `Step 5.`\|`ITB`| :small_orange_diamond:

Now we need to reference just the material attached to the lamp component. To do this pull off of the **Lamp** pin then type **Create Dynamic Material Instance**. Make sure the subtitle says **Target is Primitive Component** and you have all the pins shown in the screenshot.

We need to make the material dynamic in the constructor. This will allow us to access parameters within the material. Leave **Element Index** at `0`. If there were more than one material attached to the static mesh then you would select the one you want to access (it always starts counting from material 0). For **Source Material**, select **M_Spotlight_Master** which is the material we want to alter (we just looked at it).

![create dynamic instance material](images/CreateDynamicInstance.jpg)

##### `Step 6.`\|`ITB`| :small_orange_diamond: :small_blue_diamond:

Connect the execution pins.

![connect execution pins](images/ConnectFirstExecutionPinsRm4.jpg)

##### `Step 7.`\|`ITB`| :small_orange_diamond: :small_blue_diamond: :small_blue_diamond:

Drag off the **Create Dynamic Material Instance | Return Value** pin to help the node suggestions. Let go of the left mouse button and start to type **Set Vector Parameter Value**. You can see that this is in the **Material** section which gives us a good hint that this is what we want.

![set vector parameter values](images/SetVectorParameterValueRm4.jpg)

##### `Step 8.`\|`ITB`| :small_orange_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond:

Go to the material and find out how the Parameter name is spelled with spaces and caps. You have to enter this exactly in the **Parameter Name** box `Light Color`. Make sure it is the same as it is in the material with a space between the two words.

![parameter name light color](images/ParameterNameRm4.jpg)

##### `Step 9.`\|`ITB`| :small_orange_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond:

Hover over the **Value** pin in the **Set Vector Parameter Value** input node. Notice that it wants a **Linear Color Structure**. This gives us a *hint*.

![tooltip](images/HoveOverValueRm4.jpg)

##### `Step 10.`\|`ITB`| :large_blue_diamond:

Drag off the left pin, let go and enter **Linear Color**. Select the **Make Linear Color** node.

![add make linear color](images/MakeLinearColor.jpg)

##### `Step 11.`\|`ITB`| :large_blue_diamond: :small_blue_diamond:

Make this node pure blue with a solid alpha. Press the Compile button.

![make a blue node](images/PureBlueSolidAlphaRm4.jpg)

##### `Step 12.`\|`ITB`| :large_blue_diamond: :small_blue_diamond: :small_blue_diamond:

Go into the game and checkout the color of the light. The actual light is still green but the light bulb glow is now blue.

![blue lightbulb glow in game](images/ColorOfLight.jpg)

##### `Step 13.`\|`ITB`| :large_blue_diamond: :small_blue_diamond: :small_blue_diamond:  :small_blue_diamond:

Now go back to the **blueprint** and *drag* a reference from the light called **Spotlight** to the main graph area.

![drag spotlight reference](images/DragSpotLightReference.jpg)

##### `Step 14.`\|`ITB`| :large_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond:  :small_blue_diamond:

Now drag off the Spotlight pin and type **lightcolor**. Out of the options **Set Light Color** is what we want.

![set light color](images/SetLightColorRm4.jpg)

##### `Step 15.`\|`ITB`| :large_blue_diamond: :small_orange_diamond:

We will make the color of the light the same as the color of the bulb glow. Grab the output pin from the **Make Linear Color** node and connect it to the **New Light Color** input pin on the **Set Light Color** node.

![connet linear color to set color](images/OutputSecondLinearColorRm4.jpg)

##### `Step 16.`\|`ITB`| :large_blue_diamond: :small_orange_diamond:   :small_blue_diamond:

Nothing will happen with this light until the *execution pins* are *connected*. Then press the Compile button so that the changes can run in engine.

![connect execution and compile](images/SetExecutionPinThenCompileRm4.jpg)

##### `Step 17.`\|`ITB`| :large_blue_diamond: :small_orange_diamond: :small_blue_diamond: :small_blue_diamond:

Make sure the compile is succesful by checking to see that there is a green checkmark by the compile button.

![compile button has checkmark](images/GreenCheckmarkCompile.jpg)

##### `Step 18.`\|`ITB`| :large_blue_diamond: :small_orange_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond:

Now go back to the game and hit run. You will see that both the bulb and the color of the light are set dynamically in the blueprint! But the lightbulb is still glowing white. Lets fix that.

![bulb in game glowing white](images/BlueLightAndGround.jpg)

##### `Step 19.`\|`ITB`| :large_blue_diamond: :small_orange_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond:

Repeat creating a **Dynamic Material Instance** with **SM_Lightbulb**. Go look at the static mesh and notice that the **M_Glass** in **Element Index** `1`. Add another **Vector Parameter Value** to it. The parameter we want to change is called `ColorGlow`. Run in game and you can see that the light, casing glow and lightbulb glow are all the same color.

https://user-images.githubusercontent.com/5504953/132038111-ba9730c2-cba5-4700-b76c-c8151d931e3d.mp4

##### `Step 20.`\|`ITB`| :large_blue_diamond: :large_blue_diamond:

Press **File | Save All** then go into **Source Control | Submit to Source Control**, add a message that you have completed room 1 and press the Submit button. Open up **GitHub Desktop** and **Push** changes to server. The first time you do this it will say **Publish Branch**.  Select this to finish off this section.

![save, commit and push to github](images/Room4Github.jpg)

___

| [previous](../grouping-meshes/README.md#user-content-grouping-meshes)| [home](../README.md#user-content-ue4-blueprints) | [next](../private-variables/README.md#user-content-private-variables)|
|---|---|---|


text:
# Behavioural-Cloning

A project to emmulate the driving recorded using the simulator provided by Udacity as part of its Nanodegree Program

### Table of Content

1. model.py
- Used to train the deep learning model using the images an steering angle recorded during the simulation of driving over the provided track

2. drive.py
- Used to drive the car over the provided track using the model and the parameters saved in model.h5 file

3. model.h5
- The file generated after training the model

### Requirements
- Python
- Keras
- Numpy
- Sklearn
- Other supporting imports mentioned in the respective .py files

### Usage
- Generate dataset using the simulator provided by Udacity
- Use model.py to train over the dataset. [Edit the path to fetch the dataset in model.py according to the location of dataset on your local machine]
- model.h5 file will be generated.
- Use drive.py to drive the car on the track using model.h5 as a command line argument to drive.py file

### License
- Included in the repo

repository: anborde/Behavioural-Cloning

repo_name: anborde/Behavioural-Cloning


text:
# Module inputs

Input variables serve as parameters for a Terraform module, allowing aspects of the module to be customized without altering the module's own source code, and allowing modules to be shared between different configurations.

## Declaring an Input Variable

Each input variable accepted by a module must be declared using a variable block:

```
variable "bucket_name" {
    description = "Name of the bucket"
    type        = string
}
```

The label after the variable keyword is a name for the variable, which must be unique among all variables in the same module. This name is used to assign a value to the variable from outside and to reference the variable's value from within the module.

## Access input variables

Within the module that declared a variable, its value can be accessed from within expressions as var.<NAME>, where <NAME> matches the label given in the declaration block:

```
resource "ibm_cos_bucket" "testBucket" {
  bucket_name          = var.bucket_name
}
```

## When to use `input.tfvars` file

The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. The type constructors allow you to specify complex types such as collections:

* list(<TYPE>)
* set(<TYPE>)
* map(<TYPE>)

If we want user to pass the complex variable values such as above, then use `input.tfvars`

## Example

Say to provision a multi-zone cluster, we define a variable of type map as follows:

```
variable "worker_zones" {
    type = map
    description = "List of worker zones to attach"
}
```

and define the values in `input.tfvars` as follows:

```
worker_zones = {
    dal12 = {
      public_vlan = "2944984"
      private_vlan = "2944986"
    }
    dal10{
        public_vlan = "2944963"
        private_vlan = "2944964"
    }
}

```

## How to pass `input.tfvars` to module

To review the plan for the configuration defined (no resources actually provisioned)

```
terraform plan -var-file=./input.tfvars
```

To execute and start building the configuration defined in the plan (provisions resources)

```
terraform apply -var-file=./input.tfvars
```

To destroy the VPC and all related resources

```
terraform destroy -var-file=./input.tfvars
```

repository: smgeetha/getting-started

repo_name: smgeetha/getting-started


text:
# Azure Git Repos Extension

This is a VS Code extension to easily download your Git Repos and Projects from the Command Palette. One of the most frustrating parts of downloading your Git code is remembering those pesky remote URLS. This extension makes it so you never have to memorize a URL again! Only supports Git projects hosted in Azure Repos.

## Features

To setup the extension start by adding your Organization name and Personal Access Token generated from Azure DevOps. The token only needs access to read Code. After that you can browse your project names and repos from inside VS Code.

![Azure Repos Tutorial](images/animated_tutorial.gif)

> Tip: You can also access all of the commands from the Command Palette starting with the name 'Azure Git Repos'

* Initialize - Set Org and Personal Access Token
* Download Repo - Displays projects picker to download from repo
* Logout - Clears the Org and PAT

![Azure Repos Command Bar](images/command_bar.png)

Generate your Personal Access Token from your Azure DevOps site

![Azure Repos PAT](images/access_token.jpg)

## Extension Settings

You can customize the extension from the User Settings in VSCode

![Azure Repos Settings](images/animated_settings.gif)

Allows you to customize what terminal commands run when downloading from a repo

* `azuregit.settings.command1`
* `azuregit.settings.command2`
* `azuregit.settings.command3`

Set whether you want the Download Repo button to appear at the bottom of VS Code

* `azuregit.settings.showStatusBar`

![Azure Repos Button](images/bar.jpg)

## Requirements

> Requires running VS Code version 1.28.0 or later

repository: nbarkhina/AzureGitRepos

repo_name: nbarkhina/AzureGitRepos


text:
---
uid: crmscript_ref_NSContact_SetAddress
title: SetAddress(NSAddress address)
intellisense: NSContact.SetAddress
keywords: NSContact, GetAddress
so.topic: reference
---

# SetAddress(NSAddress address)

Contact address as  a list of LocalizedFieldList objects. Used to store localized information such as formatted address data. Suitable for passing to an address control for display.

**Parameter:**
 - **address** NSAddress

```crmscript
NSContact thing;
NSAddress address;
thing.SetAddress(address);
```

repository: stianol/crmscript

repo_name: stianol/crmscript


text:
---
layout: post
title: December 2019 Release Notes
category: releases
tags: release-notes
---

## Improvements

* **Rails:** We upgraded our application to a new version of Rails
* **Security:** We upgraded some components of our system to ensure more secure infrastructure.
* **Elasticsearch:** We continued work on upgrading our analytics engine's version of Elasticsearch.

## Fixes

* **Input Improvements:** We added input validation to a couple fields that originally allowed off-format submissions.


text:
# Binary Tree Inorder Traversal

https://leetcode.com/problems/binary-tree-inorder-traversal/[](https://leetcode.com/problems/binary-tree-inorder-traversal/)

## Description

Medium

Given a binary tree, return the _inorder_ traversal of its nodes' values.

**Example:**

```
Input: [1,null,2,3]
   1
    \
     2
    /
   3

Output: [1,3,2]
```

**Follow up:** Recursive solution is trivial, could you do it iteratively?

Accepted

446,174

Submissions

793,933

## Solution

### High-level Idea

- Recursive method
  - Trivial, so it is not the focus
  - Base case: reaching a null ==> return an empty list
  - Recursive rule:
    - At each level, ask the two children for their subtree's in-order traversal
    - Add the results in the order of: _left subtree + root.key + right subtree_
    - Return the result to my parent
- Iterative method
  - Use a stack to keep track of the nodes that have been checked but have a left child available
  - Use a current node pointer to keep track of the previously traversed node
    - Such that we could have a reference to the previous node when we come back from the stack
  - Keep traversing to the left and push the current node to the stack
  - When reaching a null, the current node of interest is the stack's top
  - Traverse until the stack or the current node becomes empty

### Code

```java
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *   int val;
 *   TreeNode left;
 *   TreeNode right;
 *   TreeNode(int x) { val = x; }
 * }
 */
class Solution {

  public List<Integer> inorderTraversal(TreeNode root) {
    List<Integer> result = new ArrayList<>();
    if (root == null) {
      return result;
    }
    // Use a stack to keep track of the nodes that have been traversed
    // and have a left child available
    Deque<TreeNode> stack = new LinkedList<>();
    // Use a current node pointer to keep track of the previously traversed node
    TreeNode current = root;
    // Traverse until current or stack becomes empty
    while (current != null || !stack.isEmpty()) {
      // Keep traversing to the left and keep track of the node that have been traversed
      while (current != null) {
        stack.offerFirst(current);
        current = current.left;
      }
      current = stack.pollFirst();
      result.add(current.val);
      current = current.right;
    }
    return result;
  }
}
```

### Complexity

- Time
  - Every single node is traversed
  - O(n)
- Space
  - A stack is used
  - In the worst case, when the tree is a linked list (each node has only a left child), it costs O(n)

repository: risetarnished/leetcode-docs

repo_name: risetarnished/leetcode-docs


text:
# Campaign Finance - Status Of Voluntary Expenditure Ceiling VECs in November 8, 2016 Election

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/campaign-finance-status-of-voluntary-expenditure-ceiling-vecs-in-november-8-2016-election) |
| Metadata | [Link](https://data.sfgov.org/api/views/4va5-ssaq) |
| Data: JSON | [100 Rows](https://data.sfgov.org/api/views/4va5-ssaq/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.sfgov.org/api/views/4va5-ssaq/rows.csv?max_rows=100) |
| Host | data.sfgov.org |
| Id | 4va5-ssaq |
| Name | Campaign Finance - Status Of Voluntary Expenditure Ceiling VECs in November 8, 2016 Election |
| Attribution | San Francisco |
| Category | City Management and Ethics |
| Tags | campaign finance, election, vec |
| Created | 2016-03-03T21:59:40Z |
| Publication Date | 2016-03-03T22:03:54Z |

## Description

Under S.F. Campaign and Governmental Conduct Code 1.128, a candidate who wishes to accept the voluntary expenditure ceiling must file Form SFEC-128 no later than the August 12, 2016 deadline for filing nomination papers.In a race where at least one candidate has accepted the VEC, all candidates running for office in the same race must file Form SFEC 134(b) within 24 hours of receiving contributions, making expenditures, or having funds that exceed 100 percent of the applicable VEC.

## Columns

```ls
| Included | Schema Type    | Field Name           | Name                 | Data Type | Render Type |
| ======== | ============== | ==================== | ==================== | ========= | =========== |
| Yes      | series tag     | city_elective_office | City Elective Office | text      | text        |
| Yes      | numeric metric | amount_of_vec        | Amount of VEC        | money     | money       |
| Yes      | series tag     | status_of_vec        | Status of VEC        | text      | text        |
```

## Time Field

```ls
Value = 2016
Format & Zone = yyyy
```

## Data Commands

```ls
series e:4va5-ssaq d:2016-01-01T00:00:00.000Z t:status_of_vec="The ceiling is not in place." t:city_elective_office="Board of Education" m:amount_of_vec=104000

series e:4va5-ssaq d:2016-01-01T00:00:00.000Z t:status_of_vec="The ceiling is not in place." t:city_elective_office="Community College Board" m:amount_of_vec=104000
```

## Meta Commands

```ls
metric m:amount_of_vec p:integer l:"Amount of VEC" t:dataTypeName=money

entity e:4va5-ssaq l:"Campaign Finance - Status Of Voluntary Expenditure Ceiling VECs in November 8, 2016 Election" t:attribution="San Francisco" t:url=https://data.sfgov.org/api/views/4va5-ssaq

property e:4va5-ssaq t:meta.view v:id=4va5-ssaq v:category="City Management and Ethics" v:attributionLink=http://www.sfethics.org v:averageRating=0 v:name="Campaign Finance - Status Of Voluntary Expenditure Ceiling VECs in November 8, 2016 Election" v:attribution="San Francisco"

property e:4va5-ssaq t:meta.view.license v:name="Open Data Commons Public Domain Dedication and License" v:termsLink=http://opendatacommons.org/licenses/pddl/1.0/

property e:4va5-ssaq t:meta.view.owner v:id=vm9c-ykir v:profileImageUrlMedium=/api/users/vm9c-ykir/profile_images/THUMB v:profileImageUrlLarge=/api/users/vm9c-ykir/profile_images/LARGE v:screenName="Steven Massey" v:profileImageUrlSmall=/api/users/vm9c-ykir/profile_images/TINY v:displayName="Steven Massey"

property e:4va5-ssaq t:meta.view.tableauthor v:id=vm9c-ykir v:profileImageUrlMedium=/api/users/vm9c-ykir/profile_images/THUMB v:profileImageUrlLarge=/api/users/vm9c-ykir/profile_images/LARGE v:screenName="Steven Massey" v:profileImageUrlSmall=/api/users/vm9c-ykir/profile_images/TINY v:roleName=publisher v:displayName="Steven Massey"
```

## Top Records

```ls
| city_elective_office    | amount_of_vec | status_of_vec                |
| ======================= | ============= | ============================ |
| Board of Education      | 104000        | The ceiling is not in place. |
| Community College Board | 104000        | The ceiling is not in place. |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
# i13 verify partial ag network policy

Sprint #20

## Description

Improve and correct network policy content per QE review

- Merge Request: https://gitlab.cee.redhat.com/RedHatManagedIntegration-documentation/rhmi-docs/-/merge_requests/133
- Jira ref link: https://issues.redhat.com/browse/RHMIDOC-80
- Peer contact: Joan Edwards

* Staging doc link: N/A
  > **NOTE:** The _Staging doc link_ is not to the Customer Portal. The formatting will not match what is on the Customer Portal; however, the steps should be the same.

## Acceptance Criteria

. Test docs/modules/admin-guide/proc_disabling-communication-between-managed-services-project.adoc
. Test docs/modules/admin-guide/proc_enabling-communication-between-managed-services-customer-applications.adoc
. Test docs/modules/admin-guide/proc_enabling-communication-between-managed-services-projects.adoc
. Test docs/modules/admin-guide/proc_enabling-communications-between-customer-applications.adoc
. Correct prerequisites and permissions are identified.
. Steps in procedure are clear.
. The flow of instructions makes sense.
. All links are accessible.

repository: jeremyary/integreatly-operator

gha_language: Go

repo_name: jeremyary/integreatly-operator


text:
# New PSD Wizard Guide

One of the newer features in PSD is the wizard. The new wizard closely resembles what MDT used to look like with a few other themes available.

## Themes
- Native --> Original theme for PSD (Set _PSDWizard=**Native**_ or leave blank)
![nativeui](.images/nativeui.png)

- Classic --> Default theme. Looks and feels like MDT original menu (Set _PSDWizard=**PSDWizardNew**_ and _PSDWizardTheme=**Classic**_)
![psdwizardnew_classic](.images/psdwizardnew_classic.png)

- Modern --> Looks and feels like Windows 10 OOBE (Set _PSDWizard=**PSDWizardNew**_ and _PSDWizardTheme=**Modern**_)
![psdwizardnew_modern](.images/psdwizardnew_modern.png)

- Refresh --> Looks and feels like MDT original menu but with cleaner input and buttons (Set _PSDWizard=**PSDWizardNew**_ and _PSDWizardTheme=**Refresh**_)
![psdwizardnew_refresh](.images/psdwizardnew_refresh.png)

- Tabular --> wider and short height menu. provides a horizontal menu (Set _PSDWizard=**PSDWizardNew**_ and _PSDWizardTheme=**Tabular**_)
![psdwizardnew_tabular](.images/psdwizardnew_tabular.png)

## About the wizard

The structure of the wizard was written to be modular as well as include controllable features like the original MDT wizard had. However the wizard is using XAML format instead of HTA (HTML) format. You can read more about it here: [XAML Overview](https://learn.microsoft.com/en-us/windows/uwp/xaml-platform/xaml-overview).

The wizard also uses the same xml definitions as the original; however there are additional xml files that control the themes, languages, and pages. For further details review the structure section

## The underlying structure

```
DeploymentShare
    |-Tools
        |-Modules
            |-PSDWizardNew
                |--PSDWizardNew.psm1
    |-Scripts
        |--PSDListOfLanguages.xml
        |--PSDListOfTimeZoneIndex.xml
        |-PSDWizardNew
            |--PSDWizard.Initialize.ps1
            |--PSDWizard.Definition_<Language>.xml
            |-Resources
                |--<icons,colors,buttons,etc > in XAML format
            |-Themes
                |--Classic_Theme_Definitions_<Language>.xml
                |--Modern_Theme_Definitions_<Language>.xml
                |--Refresh_Theme_Definitions_<Language>.xml
                |--Tabular_Theme_Definitions_<Language>.xml
                |-Classic
                    |--Classic-<paneid>-<Language>.xaml
                |-Modern
                    |--Modern-<paneid>-<Language>.xaml
                |-Refresh
                    |--Refresh-<paneid>-<Language>.xaml
                |-Tabular
                    |--Tabular-<paneid>-<Language>.xaml

```
> Keep in mind only **en-US** is supported right now, but has potential to use additional.

## File explanations

 - **PSDWizardNew.psm1** --> the module that is loaded to present the UI. Each page is split into there own respective xaml file. The module will reference the customsettings.ini for any skips, language, and theme variables, compare that with the definition files (eg. PSDWizard.Definition_**en-US**.xml and **Classic**\_Theme_Definitions_**en-US**.xml). Then it will construct all pages into a single UI.
 - **PSDWizard.Initialize.ps1** --> The additional supporting functions to use during the Wizard. This is the script that makes the UI respond to input such as invalid computername or password doesn't match.
 - **PSDListOfLanguages.xml** --> Used in UI to display locale dropdown
 - **PSDListOfTimeZoneIndex.xml** --> Used in UI to display timezone dropdown
 - **\<Resource\>.xaml files** --> These are the variant theme buttons, icons and visual in UI
 - **\<Theme\>_Theme_Definitions_\<Language\>.xml** --> Contains list of pages (_aka Panes_) each theme can use and there id's
 - **\<theme\>-\<paneid\>-\<Language\>.xaml** --> Each page for each theme. Example in the classic theme there is a _PSDWizard_Applications_en-US.xaml_ that is the layout of the applications page in english.

## Supported variables in _Bootstrap.ini_

- **SkipBDDWelcome** --> YES or NO.  Toggles the Welcome splash screen.

## Supported variables in _CustomSetting.ini_

- **OSDComputerName** --> even though this is a normal MDT variable the PSD wizard can support some dynamic values.
    - **_%SERIALNUMBER%"_** --> replaced with serial number of device
    - **_%SERIAL%_** --> replaced with serial number of device
    - **_%SERIAL:\<NUM\>%_** --> replaced with last **num**bers of serial number  (eg %SERIAL:7%)
    - **_%\<NUM\>:SERIAL%_** --> replaced with first **num**bers of serial number  (eg %7:SERIAL%)
    - **_%RAND:\<NUM\>%_** -> replaced with alphanumeric character of **num**bers (eg. %RAND:7&)

- **SkipBDDWelcome**--> YES or NO. Toggles the Welcome splash screen.
- **SkipWelcome** --> YES or NO. Toggles the Welcome splash screen (same as _SkipBDDWelcome_)
- **SkipTaskSequence** --> YES or NO. Toggles the Task sequence page
- **SkipDomainMembership** --> YES or NO. Toggles the Computer name section in device details page
- **SkipComputerName** --> YES or NO. Toggles the Computer name section in device details page
- **DeploymentType** --> ONLY SUPPORTS NEWDEPLOYMENT
- **SkipAdminPassword** --> YES or NO. Toggles the admin password section in admin page
- **SkipLocaleSelection** --> YES or NO. Toggles Language section in the locale page.
- **SkipTimeZone** --> YES or NO. Toggles the Timezone section in the locale page.
- **SkipApplications** --> YES or NO. Toggles the Application page (see known issue)
- **SkipSummary** --> YES or NO. Toggles the summary page (Shows what was selected in UI)

> The main PSD variable definitions do not include the listed items below; they will need to be added to the Property section in the customsettings.ini

- **SkipPSDWelcome** --> YES or NO. Toggles the Welcome splash screen.
- **PSDWizard** --> Native or PSDWizardNew. Native is the original wizard (not new)
- **PSDWizardTheme** --> Classic, Modern, Refresh, Tabular (see theme section for details and screenshots)
- **SkipDeployReadiness** --> YES or NO. Toggles the deployment readiness page (first page after welcome wizard). This page isn't very useful yet.
- **PSDWizardLogo** --> Adds logo to top left corner of wizard and on Welcome page. (eg. PSDWizardLogo=%SCRIPTROOT%\powershell.png)
- **PSDDebug** --> YES or NO. Will activate the Debug Mode and constructed UI will be exported with logs

![screenshot9](.images/image9.png)

# Keyboard shortcuts

- **Escape** will make the menu not on top (allows other screens to go in front)
- **Space bar** will close the PSD Welcome Wizard (if enabled)
- **Tab** will navigate menu forward
- **Shift Tab** will navigate menu reverse
- **F5** will refresh Task sequence list
- **F9** minimizes the wizard

## Additional Language support (TEST ONLY - NOT SUPPORTED)
 Currently PSD only supports English (en-US). However if you are multilingual and want to test additional languages here are the steps to do it:

> NOTE: this only works for the PSDWizardNew UI

1. Edit the PSDStart.ps1 line: 669 from:

```powershell
$result = Show-PSDWizard "$scripts\PSDWizard.xaml"
```
To
```powershell
$result = Show-PSDWizard "$scripts\PSDWizard.xaml" -Language $tsenv:Language
```

2. Edit CustomSettings.ini to match language locale (eg en-ES)
```ini
Language=en-ES
```
...and make sure your setting the CustomSetting.ini values to match the theme (see themes section)

3. Make a copy of each page and definition files and rename to reflect new language (using **en-ES** as an example)
```
DeploymentShare
    |-Scripts
        |-PSDWizardNew
            |--PSDWizard.Definition_en-ES.xml
            |-Themes
                |--Classic_Theme_Definitions_en-ES.xml
                |-Classic
                    |--PSDWizard_AdminCreds_en-ES.xml
                    |--PSDWizard_Applications_en-ES.xml
                    |--PSDWizard_DeployReadiness_en-ES.xml
                    |--PSDWizard_DeviceDetails_en-ES.xml
                    |--PSDWizard_Locale_en-ES.xml
                    |--PSDWizard_Ready_en-ES.xml
                    |--PSDWizard_Start_en-ES.xml
                    |--PSDWizard_TaskSequence_en-ES.xml
                    |--PSDWizard_Template_Classic_en-ES.xml

```

4. Edit each file.
    - Edit the Wizard definition's xml file. Change the quoted values for _MainTitle_ element, _Subtitle_ element, and _title_ attribute value (DO NOT CHANGE **ID** or ANYTHING ELSE)
        - Be sure keep it in this format
        ```xml
            <![CDATA[" you language text "]]>
        ```
    - Edit the theme definition's references values to point to new language pages (DO NOT CHANGE **ID**)
    - Edit each page within theme folder editing values for Content (DO NOT CHANGE **XNAME** or ANYTHING ELSE)

5. Provide Feedback to [@powershellcrack](https://github.com/PowerShellCrack) or team

# Custom Pages

It is possible to add (or remove pages) to the PSD Wizard. Sine there is not UDI wizard (...yet); this is a manual process.

### Here are the steps

1. Open the definition file for a theme (eg. <PSD>\Script\PSDWizardNew\Themes\Classic_Theme_Definitions_en-US.xml) in a Text editor
2. Add a new pane line with page details (eg. <Pane id="GroupPage" reference="Classic\PSDWizard_GroupPage_en-US.xaml" margin="0,0,0,0" />). Order DOES matter.

![screenshot1](.images/image1.png)

3. Add a new xaml file in the <themes> folder and name it the same as the reference. In this example I would add a new file here:  <PSD>\Script\PSDWizardNew\Themes\Classic\PSDWizard_GroupPage_en-US.xaml.

![screenshot2](.images/image2.png)

4. Edit the page. It must consist of these elements (expect what's in bold). Be sure give the name of the tab something unique (eg. x:Name="_grpTabLayout")

```xml
<Grid x:Name="_grpTabLayout" Margin="0" Grid.ColumnSpan="2">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="490"></ColumnDefinition>
        <ColumnDefinition Width="150"></ColumnDefinition>
    </Grid.ColumnDefinitions>
    <Label x:Name="_grpTabMainTitle" Grid.Column="0" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" FontSize="22" Content="@MainTitle"/>
    <Label x:Name="_grpTabSubTitle" FontSize="14" HorizontalAlignment="Left" Margin="10,73,0,0" VerticalAlignment="Top" Content="@SubTitle"/>

    <TextBox x:Name="TS_IntuneGroup" HorizontalAlignment="Left" Height="31" Margin="10,103,0,0" VerticalAlignment="Top" Width="331" Foreground='Gray' FontSize="18"/>

    <Label Content="More Info" Grid.Column="1" FontSize="14" HorizontalAlignment="Left" Margin="10,31,0,0" VerticalAlignment="Top" Foreground="LightSlateGray" />
    <TextBlock x:Name="_grpTabMoreInfo" Grid.Column="1" HorizontalAlignment="Left" Margin="10,89,0,0" Width="136" TextWrapping="Wrap" VerticalAlignment="Top" Height="422">
        <Run Text="@Help"/>
    </TextBlock>
</Grid>
```
![screenshot3](.images/image3.png)

5. Within the grid you can add code to make inputs, dropdowns, buttons, etc. The problem is this code HAS to be formatted correctly or the whole wizard won't load! I like to take code from other pages as an example. If you do this any x:Name MUST be unique and by setting one of the x:Name with a TS_<value>; will be exported as a variable when wizard is closed.

> HINT: Knowing the margins can be tricky; either use Visual Studio Community to edit the xaml or copy code from another page of the same property. I copied the search input box from the application page and removed some properties. In this screenshot there is a section to build a two column page (help menu is in Column 1)

![screenshot4](.images/image4.png)

Here is what it looks like in VS2022

![screenshot5](.images/image5.png)

> The last thing to do is control how the page will display and what language. You'll notice in the VS2020 Screenshot, some text with @ in the. These are placeholders for words in a language. Even though English is the only supported language right now, this definition contains all types of pages and their conditions.

6. Open the main language definition file (eg. <PSD>\Script\PSDWizardNew\PSDWizard_Definitions_en-US.xml) in a Text editor
Add a new Pane to where you want the pane to show up (order does matter here). The id must match the name designator of the page (eg. GroupPage is the designator for PSDWizard_GroupPage_en-US.xaml)

```xml
<Pane id="GroupPage" title="Intune Group">
	<Condition><![CDATA[ UCase(Property("SkipGroupPage")) <> "YES"]]></Condition>
	<MainTitle><![CDATA[ "Intune Group" ]]></MainTitle>
	<SubTitle><![CDATA[ "Group Name" ]]></SubTitle>
	<Help><![CDATA[ "Add an Azure AD group.

These setting will be used during the deployment process.

Add this device to an Intune group" ]]></Help>
</Pane>
```

![screenshot6](.images/image6.png)

> Optional: You can fill in the conditions, Main title, subtitle and help with what you want.
If done correctly you should get this:

![screenshot7](.images/image7.png)

and at the ready pages, it will show up:

![screenshot8](.images/image8.png)

## CHANGELOG

The changelog can be found here: [CHANGELOG.MD](..\Scripts\PSDWizardNew\CHANGELOG.md)

## Future releases / in-development

- Use runspace for multithreading, refresh capability, and faster response
- Support application profiles
- Support profile selections
- Support Autopilot Tasksequence
- Provide deployment readiness checks
- Support additional languages
- Cleanup Windows 10 OOBE theme
- Additional themes
    - Star Wars theme
    - Windows 11 OOBE theme
    - Tabular with circular buttons theme (for touch screens)
    - Teams like theme

# Known issues

- Applications that have not ben toggled as disabled then reenabled, will not show in UI. Workaround is to use * in search.
- _SkipApplications=NO_ must exist in CustomSettings.ini if you want the application page to show

url: https://raw.githubusercontent.com/PowerShellCrack/PSD/3e3e917722ec220c01bbfa1b273e69bab0a47c16/Documentation/PowerShell Deployment - PSD Wizard Guide.md

repository: PowerShellCrack/PSD

repo_name: PowerShellCrack/PSD


text:
# AWS serverless web hosting + contact form
This project is all about an AWS cloudformation template that sets up all the necessary infrastructure for serverless web hosting on AWS, including a contact form. There is also a github action to setup continuous delivery. The stack deploys the following:

- S3 bucket
- Cloudfront distribution
- SSL/TLS certificate
- Route53 record
- AGI gateway, lambda, sns topic for contact form
- Edge lamda for better SEO
- IAM user with permissions to deploy from github actions

The website this stack will deploy is based on [Start Bootstrap - Freelancer](https://github.com/startbootstrap/startbootstrap-freelancer)
The cloudformation template uses the [deploy-to-s3 app](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:375983427419:applications~deploy-to-s3) from the [serverless application repository](https://aws.amazon.com/serverless/serverlessrepo/).

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/riznob/aws-serverless-web-hosting-plus-contact/blob/master/LICENSE)

## Prerequisites
- [AWS account](https://aws.amazon.com/)
- A [hosted zone in Route53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingHostedZone.html)
[- GitHub account](https://github.com)
- Setup reCaptcha v2 here: [https://www.google.com/recaptcha/admin](https://www.google.com/recaptcha/admin). Note both the client and server side site keys. See the [recaptcha documentation](https://developers.google.com/recaptcha/docs/invisible) for more details.
- [AWS sam cli](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)
- [Setup a named profile for sam cli](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html). Let's assume your named profile is called `sidney`.
- [Node.js](https://nodejs.org/en/)
- Python 3.6

## Deploying to AWS
There are 2 resources that need to be deployed in us-east-1 region; 1) [SSL/TLS Certificate](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cnames-and-https-requirements.html#https-requirements-aws-region), and 2) [edge lambda](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html#lambda-requirements-cloudfront-triggers) for SEO. Everything else can be deployed in your region of choice. Therefore, if you want to deploy to any AWS region other than us-east-1, you need to deploy 2 stacks; one stack for the resources that need to be in us-east-1 and another stack in your chosen region. If your region of choice is us-east-1 you need only deploy one stack, and that's a wee bit simpler.

### us-east-1 region only (single stack)
1. run `./prepare.sh` to pull in the vendor code for the website
1. run `export AWS_PROFILE=sidney`
1. run `sam build`
1. run `sam deploy --guided --capabilities CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND`

Leave the `EdgeLambdaArn` and `SSLCertificateArn` blank.

 Note the output values of `SSLCertificateArn` and `EdgeLambdaArn`
3. run `sam build --use-container`
4. run `sam deploy --guided --capabilities CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND`, using the output values of the us-east-1 stack as parameters for this stack.

## GitHub actions continuous delivery
Before you setup github actions, go grab the index.html from your S3 bucket and check it into git. During the deploy of the cloudformation template, the API gateway URL and google reCaptcha client key values were put into that file.

Look at the output of the cloudformation stack to find the `IAMUser`. Then setup [AWS programatic credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) for that user. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, should be [set as encrypted secrets on your github repo](https://docs.github.com/en/actions/reference/encrypted-secrets).

Look at the output of the cloudformation stack to find the `CloudFrontDistributionId` and `S3Bucket`. Edit `.github/workflows/main.yml` with those values. Region too.

## Running the site locally
1. run `cd web`
1. run `npm install`
2. run `gulp`
3. run `gulp dev`

#### Gulp Tasks
- `gulp` the default task that builds everything
- `gulp dev` browserSync opens the project in your default browser and live reloads when changes are made
- `gulp css` compiles SCSS files into CSS and minifies the compiled CSS
- `gulp js` minifies the themes JS file
- `gulp vendor` copies dependencies from node_modules to the vendor directory

NOTE: Delete the web/node_modules directory or the deploy will fail due to too much crap.

## Deleting the stack
When you delete the stack it will probably fail to delete. Don't worry. You need to do two things after the stack fails to delete:
1. Empty the S3 bucket
1. Wait for the edge lambda to undeploy now that your cloudfront distribution had been deleted. Maybe a couple of hours.

After that, try to delete the stack again. It should delete just fine.


text:
```## setConfig
[
  ["config", "Object"]
]
```

This method allows to set the `config` property of the _Replaceable_ instance created inside of the `stream` method. Some transform may use `config` for certain functionality, e.g., replacing of the source string in the [`@a-la/import`](https://github.com/a-la/import) transform.

%~%

```## setFile
[
  ["file", "string"]
]
```

Sets the `file` property on the replaceable stream. This is required by the import transform to find the _package.json_ file of the imported module to check whether it has the `alamode` property so that the `esCheck` can be skipped.

%~%

```## setProps
[
  ["props", "!Object"]
]
```

Assigns properties to the transform stream. The rules will be able to access them via their `this` context.

%~%

repository: a-la/context

repo_name: a-la/context


text:
ROS 2 Tutorials
===============

:warning:

These tutorials are still under construction, please refer to our [demos](https://github.com/ros2/demos) or [examples](https://github.com/ros2/examples) in the meantime.

See: https://index.ros.org/doc/ros2/Tutorials/ for Tutorials etc.

:warning: