text:
## Practice Quiz: Getting Ready for Python
* **Total points: 5**
* **Score: 100%**

### Question 1

Which of the following is the most modern, up-to-date version of Python?

* **Python 3**
* Python 2
* Python 4
* Anaconda

> Python 3 is the latest version of Python, with Python 3.8.0 being released on October 14, 2019.

### Question 2

Which of the following operating systems is compatible with Python 3?

* Redhat Linux
* Microsoft Windows
* Apple MacOS
* **All of the above**

> Python is a cross-platform language. You can use it on Windows, macOS, Linux, and even on lesser-known Unix variants like FreeBSD.

### Question 3

Which of the following operating systems does not run on a Linux kernel?

* Android
* Chrome OS
* **Mac OS**
* Ubuntu

> Mac OS is a proprietary operating system designed by Apple and uses a proprietary kernel based on BSD.

### Question 4

If we want to check to see  what version of Python is installed, what would we type into the command line? Select all that apply.

* **python -V**
* **python --version**
* python --help
* python -v

> Typing python -V (note the capital V) at the command line will tell you if Python is currently installed and if so, what version.

> Typing python --version (note the double dashes) at the command line will tell you if Python is currently installed and if so, what version.

### Question 5

What is pip an example of?

* A programming language
* An operating system
* A repository of Python modules
* **A Python package manager**

> pip is a command line tool commonly used as the main method of managing packages in Python.


text:
# vscode-babel-repl README

Babel REPL lets you write next generation Javascript and see the transpiled output of Babel.

## Features

![Babel REPL in action](./babel.gif)

With Babel REPL you can write next generation Javascript right in Visual Studio Code and see the transpiled output of Babel right next to it.
Just open the Command Palette and start the REPL throught the Command "Open new Babel REPL":

## Known Issues

This extension is in a pretty rough state right now and will probably have a lot of bugs.
If you have any problems please open a issue on Github.

## Release Notes

### 0.1.2

* Fixed creation of temporary files

### 0.1.0

* Initial release

license: MIT

repository: joeshub/vscode-babel-repl

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: joeshub/vscode-babel-repl


text:
# UWP for Desktop

This NuGet package lets you use UWP WinRT APIs from your desktop apps.

* [UwpDesktop](https://www.nuget.org/packages/UwpDesktop) NuGet package

To use it, right-click on your project, *Manage NuGet Packages*, and install the package.

## Explanation for how it works

MSDN provides this [list of WinRT APIs that can be called from desktop apps](https://msdn.microsoft.com/en-us/library/windows/desktop/dn554295(v=vs.85).aspx).

**To find the UWP WinRT APIs themselves**, look for example at this file:
```
C:\Program Files (x86)\Windows Kits\10\Platforms\UAP\10.0.10240.0\Platform.xml
```
This Platform.xml file conveys which WinRT APIs are available in "version 10240" of the UWP SDK. (This was the version that came out at VS2015 RTM. Newer versions will come out periodically). The Platform.xml file works by being an index into a set of other winmd files. It looks like this:
```
<ApiContract name="Windows.Foundation.FoundationContract" version="<IP_ADDRESS>" />
<ApiContract name="Windows.Foundation.UniversalApiContract" version="<IP_ADDRESS>" />
<ApiContract name="Windows.Networking.Connectivity.WwanContract" version="<IP_ADDRESS>" />
```
Each line denote a .winmd file in the `C:\Program Files (x86)\Windows Kits\10\References directory`. That's how I picked up exact filenames and pathnames to add as references. (I should really have added a reference to the WwanContract.winmd file as well, but couldn't be bothered)

These three winmd files make up the WinRT APIs available across all Win10 devices. You might additionally want to use the additional WinRT APIs that are part of Desktop. Look at this file:
```
C:\Program Files (x86)\Windows Kits\10\Extension SDKs\WindowsDesktop\10.0.10240.0\SDKManifest.xml
```
It has a load more `<ApiContract>` directives, pointing to additional .winmd files you should reference from the `C:\Program Files (x86)\Windows Kits\10\References` directory. I haven't bothered to do that.

**To interop with DLLs or WINMDs built for Win8.1 or WindowsPhone8.1**, the issue is that those old DLLs and WinMDs used to think that all WinRT types were in a file called "windows.winmd". But they're not anymore! Instead they're in files called Windows.Foundation.FoundationContract.winmd and the like. The solution is a *facade winmd*, which is basically a load of type-forwarders from windows.winmd to the new winmd files.
```
c:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.WinMD
```

**To use "await" on WinRT types**, this and other interop between .NET and WinRT are provided by the following DLL. Note that it's an 8.1-era DLL, and therefore only works in conjunction with "facade\windows.winmd" above. (There are several other interop assemblies but they're not so crucial).
```
c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll
```
If you fail to add both these two assemblies, then you'll get error messages like this:

* BC36930: 'Await' requires that the type 'IAsyncAction' have a suitable GetAwaiter method
* CS0012: The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
* CS4036: 'IAsyncAction' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accept a first argument of type 'IAsyncAction' could be found (are you missing a using directive for 'System'?)

## Example code (VB)

Here's an example console app in VB which uses UWP WinRT APIs:

```vb
Imports System.IO

Module Module1
    Sub Main()
        MainAsync().GetAwaiter().GetResult()
    End Sub

    Async Function MainAsync() As Task
        ' basics
        Dim folder = Windows.Storage.KnownFolders.DocumentsLibrary
        Dim opts As New Windows.Storage.Search.QueryOptions(
                              Windows.Storage.Search.CommonFileQuery.OrderByName, {".txt"})
        Dim files = Await folder.CreateFileQueryWithOptions(opts).GetFilesAsync(0, 20)
        For Each file In files
            Console.WriteLine(IO.Path.GetFileName(file.Path))
        Next

        ' streams
        Using reader = New IO.StreamReader(Await files.First.OpenStreamForReadAsync())
            Dim txt = Await reader.ReadToEndAsync()
            Console.WriteLine(txt.Substring(0, 100))
        End Using

        ' pictures
        Dim pics = Await Windows.Storage.KnownFolders.PicturesLibrary.GetFilesAsync(
                         Windows.Storage.Search.CommonFileQuery.OrderBySearchRank, 0, 1)
        Using stream = Await pics.First.OpenReadAsync()
            Dim decoder = Await Windows.Graphics.Imaging.BitmapDecoder.CreateAsync(stream)
            Console.WriteLine(decoder.OrientedPixelWidth & "x" & decoder.OrientedPixelHeight)
        End Using

        ' httpclient
        Dim client As New Net.Http.HttpClient()
        Dim html = Await client.GetStringAsync("http://www.microsoft.com")
        Console.WriteLine(html.Substring(0, 100))

    End Function
End Module
```

## Example code (C#)

Here's an example console app in C# which uses UWP WinRT APIs:

```cs
using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Windows.ApplicationModel.Background;
using Windows.Foundation.Collections;
using Windows.Storage;
using Windows.Storage.Search;
using Windows.UI.Xaml;

class Program
{
    static void Main()
    {
        MainAsync().GetAwaiter().GetResult();
    }

    static async Task MainAsync()
    {
        // events
        var sm = new StringMap();
        sm.MapChanged += (s, e) => Console.WriteLine($"EVENT {e.Key}");
        sm.Add("key", "value");
        var c = new C();
        c.Canceled += (s, e) => Console.WriteLine($"EVENT {e}");
        c.Trigger(BackgroundTaskCancellationReason.IdleTask);

        // await
        var folder = KnownFolders.DocumentsLibrary;
        var opts = new QueryOptions(CommonFileQuery.OrderByName, new[] { ".txt" });
        var files = await folder.CreateFileQueryWithOptions(opts).GetFilesAsync(0, 10);
        foreach (var file in files) Console.WriteLine($"FILE {Path.GetFileName(file.Path)}");

        // streams
        using (var reader = new StreamReader(await files.First().OpenStreamForReadAsync()))
        {
            var txt = await reader.ReadToEndAsync();
            Console.WriteLine($"STREAM {txt.Substring(0, 100)}");
        }

        // xaml
        CornerRadius cr = new CornerRadius(1.5);
        Console.WriteLine($"XAML {cr.BottomLeft} - {cr.BottomRight}");

        // pictures
        var pics = await KnownFolders.PicturesLibrary.GetFilesAsync(CommonFileQuery.OrderBySearchRank, 0, 1);
        using (var stream = await pics.First().OpenReadAsync())
        {
            var decoder = await Windows.Graphics.Imaging.BitmapDecoder.CreateAsync(stream);
            Console.WriteLine($"PICTURE {decoder.OrientedPixelWidth} x {decoder.OrientedPixelHeight}");
        }

        // httpclient
        var client = new HttpClient();
        var html = await client.GetStringAsync("http://www.microsoft.com");
        Console.WriteLine($"HTTP {html.Substring(0, 100)}");
    }
}

public sealed class C : IBackgroundTaskInstance
{
    public BackgroundTaskDeferral GetDeferral() => null;
    public Guid InstanceId { get; set; }
    public uint Progress { get; set; }
    public uint SuspendedCount { get; set; }
    public BackgroundTaskRegistration Task { get; set; }
    public object TriggerDetails { get; set; }

    private EventRegistrationTokenTable<BackgroundTaskCanceledEventHandler> CanceledEvent;

    public event BackgroundTaskCanceledEventHandler Canceled
    {
        add
        {
            return EventRegistrationTokenTable<BackgroundTaskCanceledEventHandler>
                .GetOrCreateEventRegistrationTokenTable(ref CanceledEvent)
                .AddEventHandler(value);
        }
        remove
        {
            CanceledEvent?.RemoveEventHandler(value);
        }
    }

    public void Trigger(BackgroundTaskCancellationReason reason)
    {
        CanceledEvent?.InvocationList.Invoke(this, reason);
    }
}
```

# How to contribute

## Contribute by adding new WinRT APIs

Look on nuget.org at the [uwp-desktop packages already released](https://www.nuget.org/packages/UwpDesktop/):

```
UWP for Desktop 10.0.14393.2
UWP for Desktop 10.0.10586.2
UWP for Desktop 10.0.10586.1
UWP for Desktop 10.0.10240.2
UWP for Desktop 10.0.10240.1
```

The pattern is that if someone wants to write a desktop app that targets 10240, they'd reference the latest 10240 uwp-desktop package. If someone wants to write a desktop app that targets 10586, they'll reference the latest 10586 package.

*Each time a new WinRT release comes out, we make a corresponding new package of UwpDesktop*. The new package has /r: references to the winmds that contain the new APIs.

The minor versions are there because I made bugfixes or feature improvements to UwpDesktop itself, and wanted those fixes to be available to everyone, no matter what their target.

When a new WinRT release comes out, ...

1. Follow the instructions "how it works" above. That's a dull mechanical process that ends up with a list of .winmd files.
2. Look inside the nupkg directory and duplicate a .nuspec + .targets pair of files, renaming them appropriately. Edit the version number inside your new .nuspec file. Edit the .targets file according to the list of .winmd files you came up with. I use Word search+replace to manually generate a new .targets file.
3. Edit UwpDesktopAnalyzer.csproj in a text editor. At the bottom in the AfterBuild target, you'll see that it builds all the .nupkg files as part of its build. Duplicate one of these to build your new .nupkg file. I guarantee you'll make some typos as you do this...!
4. Open the UwDesktopAnalyzer project into VS and build it. The AfterBuild target will run and will generate your new .nupkg. It generates the .nupkg files in the bin\ directory.
5. Test your new .nupkg. Do this by creating a new desktop app (I use a console app myself), manage NuGet references, click the Settings icon to add a new package source, point it to the directory where your .nupkg file was created. (I find this dialog really counterintuitive but you'll get the hang of it eventually). Add the reference. Verify that you can use the new APIs.
6. Currently the NuGet package is owned by Lucian Wischik<EMAIL_ADDRESS>so you'll have email me a copy of your new .nupkg to upload to the NuGet site. (Please do this with a Release build of UwpDesktopAnalyzer, under bin\Release\...). But if someone from Microsoft wants to take ownership, please do!

## Contribute by improving the analyzer

I'll explain how the analyzer works. When someone is working on a desktop project and they add a reference to the UwpDesktop nuget package, then (1) if they're using packages.config then it obeys the install.ps1 script which adds a reference to the analyzer binary, (2) if they're using project.json then it obeys the convention that the analyzer binary is in an appropriate directory of the nuget package. Regardless, the result is that Visual Studio and msbuild know to pass a /r: reference to the analyzer binary when building the user's project.

The analyzer is invoked both live (as you type in Visual Studio) and at build-time (by msbuild). It looks at every single *invocation*. What happens next is subtle...

The way the WinRT "forbidden list" works is that, basically, some WinRT types aren't allowed to be used by desktop apps. (Some are allowed to be used in Centennial apps but not regular desktop apps, but the dividing line wasn't clear enough to me, so I just simplified it down to a single "forbidden list").

**How might the user get hold of one of these types?** The only way is if they use "new" operator to *invoke the constructor* of the type, or if the *invoke a static method* on the type. So if we cut things off at the source (constructors and static methods) then we guarantee the user's code will never get hold of a forbidden type. (and so implicitly will never call any instance methods on it!)

The method UwpDesktopAnalyzer.cs:AnalyzeSyntaxNode() is called on-demand for every syntax node. It only pays attention to invocations and "new" operators. It figures out the fully-qualified name of the target method/constructor. And it looks to see if this name is in the list of forbidden constructors / static methods. (Technical tip: the current implementation is considered inefficient by the Roslyn team because it involves lots of string allocations. They recommend comparing symbols directly. Kevin Pilch-Bission would be a good point-of-contact to see how to improve this.)

How do we get hold of the complete list of forbidden constructors / static methods? I pre-compute that manually. I wrote a separate command-line utility called "Preprocess". It looks at the file "ForbiddenClasses.txt" which merely contains the list of types. It cross-references this with the actual official 10586 SDK to find all constructors and static methods in those types. (TODO: this should be updated. It should be looking in the very latest 14393 SDK). It spits out a list. You have to copy+paste this list into UwpDesktopAnalyzer.cs, in the getter for ForbiddenStaticMethods. Then rebuild.

Why do we only have a single ForbiddenClass.txt list? I made some simplifying assumptions. It is technically possible that the Windows team might have made some WinRT types that were existed in 10240, and were disallowed in desktop apps in 10240, but are allowed in desktop apps in 10586. Or some other convoluted variation. But honestly what's the point? The accuracy of the ForbiddenClass list isn't high enough, and the value-add to developers isn't high enough, to justify any more complexity here.

When you want to improve any part of the analyzer...

1. You should read the instructions about "how it works" above, and also "how to contribute by adding APIs" above.
2. If you're augmenting ForbiddenClasses.txt, then you have to edit this file, run the Preprocess project, copy+paste the output into UwpDesktopAnalyzer.cs, then rebuild the UwpDesktopAnalyzer project.
3. If you're editing the analyzer then just rebuild it.
4. If you're making a change that affects developers on downlevel release of WinRT then you should make a new release of UwpDesktop with a bumped minor version number (e.g. 10.0.10586.3, or .4, or .5, or whatever comes next). And do this for EVERY downlevel version of the package that you touch. You'll do this by editing the nupkg\*.nuspec files of every applicable release.
5. As before, when you build the UwpDesktopAnalyzer project, it will build all the .nupkg files
6. As before, test it by adding a custom "Manage NuGet Packages" source
7. As before, email me the binaries that you want uploaded to nuget.org.

repository: Foda/uwp-desktop

repo_name: Foda/uwp-desktop


text:
<!--  TABLE OF CONTENTS -->
## Table of Contents

* [About the Project](#about-the-project)
  * [Built With](#built-with)
* [Getting Started](#getting-started)
  * [Prerequisites](#prerequisites)
  * [Installation](#installation)
* [Running](#running)
* [Contributing](#contributing)
* [License](#license)
* [Contact](#contact)
* [Acknowledgements](#acknowledgements)

<!-- ABOUT THE PROJECT -->
## About The Project
[![Index][product-screenshot1]](http://byapp.herokuapp.com/)
[![Dashboard][product-screenshot]](http://byapp.herokuapp.com/dashboard)

This is a MERN stack booking system built for learning, understanding and enhancing my skills.

Key Features:
* Real Time Updates
* Unit Testing
* CI/CD integration
* Optimized for production built

### Built With
This project was made possible due to
* React
* MongoDB
* Express
* NodeJS
* Firebase Authentication
* Pusher
* Formik
* Bulma

<!-- GETTING STARTED -->
## Getting Started

### Prerequisites

Tools needed to run this project
* npm
* yarn
* nodejs

### Installation

1. You need to have API Keys for [MongoDB Atlas](https://www.mongodb.com/), [Firebase](https://firebase.google.com) and [Pusher](http://pusher.com/)
2. Clone the repo
```sh
git clone https://github.com/SkSumit/BookMyAppointment.git
```
3. Install packages
#### Backend

```bash
cd .\backend\
npm install
```

#### Frontend

```bash
cd .\frontend\
yarn install
```
4. Create two `.env` files, one in `Backend` and other in `Frontend` folder.
Add your `mongodb atlas` and `pusher` key in the backend .env file , add `firebase` and  ***again*** add `pusher`  keys in the frontend .env file
```JS
const API_KEY = 'ENTER YOUR API';
```

<!-- USAGE EXAMPLES -->
## Running

Backend would be running on PORT 3000

```bash
npm run backend
```
 ***Open new terminal to run front-end***

Frontend would be running on PORT 3001

```bash
npm run frontend
```

<!-- CONTRIBUTING -->
## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3.  Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

<!-- LICENSE -->
## License

Distributed under the MIT License. See `LICENSE` for more information.

<!-- CONTACT -->
## Contact

Sumit Kolpekwar  -<EMAIL_ADDRESS>

<!-- ACKNOWLEDGEMENTS -->
## Acknowledgements
* [Andrew Mead  for  his React Course](https://mead.io/)
* [Beau Carnes for his article](https://medium.com/@beaucarnes/learn-the-mern-stack-by-building-an-exercise-tracker-mern-tutorial-59c13c1237a1)
* [Yup](https://github.com/jquense/yup)
* [Heroku](https://heroku.com/)
* [Paaatterns](https://products.ls.graphics/paaatterns/)
* [Feathericons](https://feathericons.com/)
* [Toastify](https://www.npmjs.com/package/react-toastify)
* [ReadMe Template](https://github.com/othneildrew/Best-README-Template)

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=flat-square
[contributors-url]: https://github.com/SkSumit/BookMyAppointment/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=flat-square
[forks-url]: https://github.com/SkSumit/BookMyAppointment/network/members
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=flat-square
[stars-url]: https://github.com/SkSumit/BookMyAppointment/stargazers
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=flat-square
[issues-url]: https://github.com/SkSumit/BookMyAppointment/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square
[license-url]: https://github.com/SkSumit/BookMyAppointment/blob/master/LICENSE
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/sumitkolpekwar/
[product-screenshot]: frontend/src/Img/byapp.jpg
[product-screenshot1]: frontend/src/Img/byapp1.jpg

repository: Yashdew/BookMyAppointment

gha_license_id: MIT

repo_name: Yashdew/BookMyAppointment


text:
# Analytics

This package houses all Cloud Dataflow/Apache Beam jobs that we might need to create.

### Running a job

You can either run a job locally with `DirectRunner` or on GCP with `DataflowRunner`.

Dataflow only works with Python 2.7.

To run locally, you will need:

```
brew install python2
pip install -r requirements.txt
```

To run on GCP, you'll need to use a service account with the appropriate credentials. Then create and download a key file as JSON, and export it, e.g:

```
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/celo-testnet-ed0960b7047d.json
```

## Segment Data Exporter

The Segment Data Exporter pulls analytics data that Segment pushes on to a pub-sub topic and writes it into StackDriver.

## Client Logs Exporter

The Client Logs Exporter takes a stream of [Google Cloud Storage notifications](https://cloud.google.com/storage/docs/pubsub-notifications) published to a pub-sub topic (in `celo-testnet` project) about newly-uploaded [client logs](https://console.cloud.google.com/storage/browser/celo-org-mobile.appspot.com/logs/?project=celo-org-mobile&organizationId=54829595577) (in `celo-mobile-app` project). It processes those notifications and emits the contents of those files to StackDriver (to the log named by `--output`.)

The job expects client logs to be located at a path `logs/$DATE/$BUNDLEID/$ENV/$TIMESTAMP_$PHONE_$SUFFIX.txt`.

Each instance of the job filters on the `$ENV` path component to match the value passed by `--env`. In this way, one Dataflow job needs to be run per environment. If no value is passed all environments are matched.

The notification was created as follows:

```
gsutil notification create -f json -e OBJECT_FINALIZE -t projects/celo-testnet/topics/clientlogs gs://celo-org-mobile.appspot.com
```

You can view current notifications as follows:

```
gsutil notification list gs://celo-org-mobile.appspot.com/
```

The service account for `celo-testnet` was given permissions to read GCS buckets and objects on the `celo-mobile-app` project to allow the Dataflow job succeed.


text:
# Frequently asked questions

This section contains frequently asked questions related to the Waves applications. In this section, you will find some subtle points for a better understanding of the Waves platform algorithms.

* [_**What is a SEED phrase?**_](/waves-client/frequently-asked-questions-faq/account-management/seed-phrase.md)
* [_**One Seed - One Waves address.**_](/waves-client/frequently-asked-questions-faq/account-management/one-seed.md)
* [_**I have enough Waves but I can't create an order.**_](/waves-client/frequently-asked-questions-faq/account-management/waves-fee.md)
* [_**How to get enough Waves for the fees?**_](/waves-client/frequently-asked-questions-faq/waves-dex/enough-waves.md)
* [_**Order execution time.**_](/waves-client/frequently-asked-questions-faq/waves-dex/order-time.md)
* [_**Asset ID on the Waves DEX.**_](/waves-client/frequently-asked-questions-faq/waves-dex/asset-id.md)
* [_**What is a payment gateway.**_](/waves-client/frequently-asked-questions-faq/transfers-and-gateways/payment-gateway.md)
* [_**Ethereum transfers with smart-contracts.**_](/waves-client/frequently-asked-questions-faq/transfers-and-gateways/ethereum-smartcontract-transfers.md)
* [_**What is an airdrop?**_](/waves-client/frequently-asked-questions-faq/transfers-and-gateways/airdrop.md)
* [_**How to Enable Dark Mode.**_](/waves-client/frequently-asked-questions-faq/account-management/dark-mode.md)

repository: Nazeim/waves-documentation

repo_name: Nazeim/waves-documentation


text:
# Cronartium conigenum Hedgc. & N.R. Hunt, 1922 SPECIES

#### Status
ACCEPTED

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

#### Published in
Phytopathology 12: 120 (1922)

#### Original name
Cronartium conigenum Hedgc. & N.R. Hunt, 1922

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Omise Scala

[![Build Status](https://travis-ci.org/nimid/omise-scala.svg?branch=master)](https://travis-ci.org/nimid/omise-scala)

## Installation

- Install by using JAR file, download [JAR file](https://github.com/nimid/omise-scala/releases/download/v0.1/omise-scala-v0.1.jar) to your machine and set classpath to the downloaded file.

- Install by using dependency management such as sbt is coming soon.

## Usage

```scala
// File Main.scala
import co.omise.{OmiseCharge, OmiseToken}

object Main extends App {
  OmiseToken.publicKey = "YOUR-OMISE-PUBLIC-KEY"
  val token = OmiseToken.create(
    cardName = "Saroj Sangphongamphai",
    cardNumber = "4242424242424242",
    cardExpirationMonth = 6,
    cardExpirationYear = 2019,
    cardCity = "Bangkok",
    cardPostalCode = "10230",
    cardSecurityCode = "123",
  )

  OmiseCharge.secretKey = "YOUR-OMISE-SECRET-KEY"
  val charge = OmiseCharge.create(
    amount = 100000, // ฿ 1,000.00
    currency = "thb",
    card = Some(token.id),
  )

  println(charge.id)
}
```

If using JAR file;

```
$ scalac -classpath omise-scala-v0.1.jar Main.scala
$ scala -classpath omise-scala-v0.1.jar Main
```

repository: nimid/omise-scala

repo_name: nimid/omise-scala


text:
# Note_Taker
![MIT](https://img.shields.io/badge/licence-MIT-Green)

##Table of Contents

  1:Installation

  2:Usage

  3:Licence

  4:Contributing

  5:Tests

  6:Questions

## 1:Installation
Ensure you have successfully cloned the repo to your drive. Then initialize npm with
```npm init``` followed by ```npm i express``` and ```npm i fs```

## 2:Usage
Run the server with ```npm server.js``` from your integrated terminal, then simply go to localhost:3000 on any web browser. Press the button in the centre to get started.
![Note Taker Landing Page](../public/assets/images/Screenshot1.png)
Then type your note title and info out in the provided display, and hit the save button in the right hand corner
![Writing out your important note](../public/assets/images/Screenshot2.png)
Finally if you would like to delete a note having no need of it any longer simply click on the rubbish bin next to the note title and it will be deleted forever.
![Delete The Evidence](../public/assets/images/Screenshot3.png)
## 3:Contributing
I am accepting contributions to my code at this time. If you have futher questions or
would like to contact me see the questions section of the readme

## 4:Tests
To test the project, simply download the required code and run the progamme like in the instuctions under usage. Modifying the maths code in the app.post section will allow you to change the ids made for the json entries.

## 5:Questions
If you have futher questions or would like to contribute, please contact me at one of the following

GitHub:

https://github.com/lordgeer

Email:

<EMAIL_ADDRESS>

## 6:Licence
MIT

branch_name: refs/heads/main


text:
# How to Generate QuickLooks (QL) using Planet APIs
For this tutorial, we will cover a couple of options to generate downsampled/lower resolution imagery from PlanetScope scenes using Planet APIs.

You will need to have the latest version of the `Planet` Command Line Interface (Planet CLI) and `jq`, a library to parse JSON type data on a terminal.

Before using the CLI, make sure you are authenticated to access Planet APIs. You can do that either by setting an env variable named `PL_API_KEY` or by doing
```bash
planet init
```
where you will have to enter you Planet credentials (Email and Password).

## 1. Orders API
Using the Orders API, you can use the `Reproject` raster tool to downsample any specific image you want to order.

- Fastest approach, send order and wait for delivery.
- Processing done and costs covered by Planet.
- Final resolution is defined when creating the order.
- Downloaded images will be fully charged against organization quota.
- Delivered images are downsampled to required resolution.

#### Step-by-step

a. **Define your scene ID list**. Using Planet CLI, let's do a search over an AOI for `PSScene3Band` scenes for the last 4 days. First, let's see how many scenes we get.
```bash
planet data search --geom savoy.geojson --item-type PSScene3Band --date acquired gte 2020-04-12 | jq '.features | length'
```

Now, let's print all the scenes' IDs, concatenate them into a comma-separated string and copy that

```bash
planet data search --geom savoy.geojson --item-type PSScene3Band --date acquired gte 2020-04-12 | jq -r '.features | map(.id) | join(",")'
```

b. **Submit order**. Let's make an order using the `Reproject` raster tool. When using the Planet CLI, the tool or tools chain need to be input as a `JSON` file. Let's create one containing the following JSON object. We can here define the resolution for our QL to be 60 m.

```json
[
    {
        "reproject": {
            "projection": "EPSG:3857",
            "kernel": "cubic",
            "resolution": "60.0"
        }
    }
]
```

Let's use the Planet CLI again to submit an order to the Orders API. For input IDs we use the `PSScene3Band` IDs copied on [step 1.a](#scenelist). We need to define the `bundle` or asset type we want to download, our order `name` and pass the name of our `tools` JSON file.

```bash
planet orders create --item-type PSScene3Band --bundle visual --id 20200415_103259_46_105e,20200415_103257_44_105e,20200414_100952_0f3f,20200414_100954_0f3f,20200414_100953_0f3f,20200412_100858_1034,20200412_100856_1034,20200412_100857_1034 --name esa-demo-ql-reproject-1 --tools reproject.json | jq .
```

c. **Check order status**. From the previous step's output, let's copy the `order-id`. Normally, we should wait a couple of minutes until the order finished processing. We can always check the order status by sending the below request using our own `order-id`
```bash
planet orders get cd79dfb4-7139-4a33-a096-9848c5bc80a8 | jq '"Name: " + .name +  ". Status: " + .state'
```

d. **Download order**. Once an order's `status` has changed to `success`, we can go ahead and download it with the below command:
```bash
planet -v orders download cd79dfb4-7139-4a33-a096-9848c5bc80a8 --dest esa-demo-orders --quiet
```
All of the previous steps can be streamlined and automated using a Python script, whihc allows for more scalability and less human interaction.

Now, we can visualise our QL on QGIS or any other GIS software.

## 2. Planet CLI + QGIS

We can also make use of the Planet integration with QGIS to easily and quickly obtain image footprints and stream pixels without consuming organization quota. The plugin can be found on QGIS's market place from version 3.6 on.

- Easy and quick solution for streaming imagery
- Planet Explorer UX mapped to QGIS
- Images are being streamed and not downloaded, hence, quota is not consumed.
- Images cannot be saved on local unless downloaded (counts against quota.)

### Step-by-step

a.**Define your scene ID list**. Follow the same steps shown in [1.a.](#scenelist) for getting a list of scenes over an AOI using the Planet CLI. Copy the list of IDs.

b.**Stream images on QGIS**. Open the Planet QGIS plugin and authenticate using your email and password.

Load your GeoJSON to QGIS and select the geometry using the _Feature Selection_ tool.

On the Planet Explorer tab, click on `Selection` and then on `Single Feature` to select your layer as your search AOI. Scroll down and paste the list of IDs from the previous step on the `Item IDs (comma separated)` input field. Hit `Search`.

A list of results will appear on the bottom part of the tab. If you hover on the results, you will get footprints displayed in your Map extent. You can also click on `Settings` for more options.

Clicking on `Add preview layer to map` will stream the full resolution images on your current Map.

## 3. Other options

### Tiles API + GDAL
You could also use external libraries for resampling Planet images before downloading them.
For instance, you could make use of Planet's Tiles services and `GDAL.translate` to modify the pixel size of the images on the go.

### Data API (non-georeference image)
On the `Data API` an end-point exists to retrieve an image _Thumbnail_ for each scene in Planet's catalog. These Thumbnails are not georeferenced images but can be very useful for web applications, online catalog skimming, etc.

repository: planetlabs/training-workshop

gha_language: Jupyter Notebook

repo_name: planetlabs/training-workshop


text:
Verso - Node.js LoopbackAPI-based storage middleware

Prerequisites
-------------

Installing PM2
```$ npm install pm2 -g```

We use 'bibliomata' as a name for this particular application, so you may want to install everything in a common directory, e.g. {path}/bibliomata/

Installation
-------------
Navigate to your directory you created (e.g. /bibliomata).

```
$ git clone https://github.com/lcnetdev/verso.git
$ cd verso
$ npm install
$ sudo pm2 start server/server.js --name verso
```

To check:
```
$ sudo pm2 status
```

You should get a status screen (with a short uptime).

Save:

```
$ sudo pm2 save
```

This will save a copy of the PM2 config in /root/.pm2/dump.pm2

To restart the cluster with the dump file:
```
$ sudo pm2 resurrect
```

Note: the data is preserved in a file verso/bfpilot.json.

repository: cledvina/verso

repo_name: cledvina/verso


text:
# SPWaterProgressIndicatorView
This is custom subclass of UIView, which indicates the progress of task in percent.

## What it looks like?
![Presentation](https://raw.githubusercontent.com/antonio081014/SPWaterWaveProgressIndicatorView/master/3.gif)
## Directory
- **SPWaterProgressIndicatorView_README.md**
- **SPWaterProgressIndicatorView.hm**
- **SPWaterProgressIndicatorView.swift**
- **WaterWaveDemo** project demostrates how to use this class in Objective-C Project.
- **WaterWaveDemo_Swift** project demostrates how to use this class in Swift Project.

## How to user it?
- Add SPWaterProgressIndicatorView.hm files to the project.
- There are two ways to use this class:
  - Specify a `UIView`'s class as SPWaterProgressIndicatorView in IB.
  - Using `alloc` | `initWithFrame:` (Objective-C) to create and initialize an instance, then add it to a `UIView`.
  - Using `UIView` | `init(frame: CGRect)` (Swift) to create and initialize an instance, then add it to a `UIView`.

__Objective-C__
```
- (void)viewDidLoad {
    [super viewDidLoad];
    self.waterView = [[SPWaterProgressIndicatorView alloc] initWithFrame:self.view.bounds];
    self.waterView.center = self.view.center;
    [self.view addSubview:self.waterView];

}
```

__Swift__
```
override func viewDidLoad() {
    super.viewDidLoad()

    self.wave = SPWaterProgressIndicatorView(frame: self.view.bounds)
    self.wave.center = self.view.center;
    self.view.addSubview(self.wave)
}
```

## Version
1.0

## Reference & Thanks
- [Stefan Ceriu's SCSiriWaveformView on Github](https://github.com/stefanceriu/SCSiriWaveformView)

repository: heysachin/GMN-Clinic

repo_name: heysachin/GMN-Clinic


text:
#### building

The documentation is written using markdown. A special include syntax is used.

[filename](/path/to/file.md) will be replaced with the contents of
`common/filename.md`

Rake is used to build the project. The default task will process all markdown
files in source/appium and save them to gen/appium.

In the future pandoc/calibre/gollum may be used to export from markdown
to various formats.

````
## Module
### Chapter
#### Lesson

````

`tree -d` is used to generate the directory graphs.

`brew install tree` on OS X.

repository: aslamz/appium

gha_language: Ruby

repo_name: aslamz/appium


text:
## [ITK/VTK Viewer - Web based Image, Mesh, and Point Set Viewer](http://kitware.github.io/itk-vtk-viewer/)

![Build and Test](https://github.com/Kitware/itk-vtk-viewer/workflows/Build%20and%20Test/badge.svg)
[![Build Status](https://dev.azure.com/Kitware/itk-vtk-viewer/_apis/build/status/Kitware.itk-vtk-viewer?branchName=master)](https://dev.azure.com/Kitware/itk-vtk-viewer/_build/latest?definitionId=1&branchName=master)
[![Build Status](https://travis-ci.org/Kitware/itk-vtk-viewer.svg)](https://travis-ci.org/Kitware/itk-vtk-viewer)
[![Dependency Status](https://david-dm.org/kitware/itk-vtk-viewer.svg)](https://david-dm.org/kitware/itk-vtk-viewer)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
![npm-download](https://img.shields.io/npm/dm/itk-vtk-viewer.svg)
![npm-version-requirement](https://img.shields.io/badge/npm->=5.0.0-brightgreen.svg)
![node-version-requirement](https://img.shields.io/badge/node->=8.0.0-brightgreen.svg)
[![DOI](https://zenodo.org/badge/92198432.svg)](https://zenodo.org/badge/latestdoi/92198432)

Introduction
============

ITK/VTK Viewer is an open-source software system for medical and
scientific image, mesh, and point set visualization.

Reporting Issues
=================

If you would like to discuss a bug or possible improvement:

1. If you have a patch, please read the [CONTRIBUTING.md][] document.

2. Open an entry in the [Issue Tracker][].

[CONTRIBUTING.md]: CONTRIBUTING.md
[Issue Tracker]: https://github.com/Kitware/itk-vtk-viewer/issues

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

In general ITK/VTK Viewer tries to be as portable as possible; the specific configurations below are tested and known to work.

ITK/VTK Viewer supports the following development environments:

- Node 8+
- NPM 5+

and the following browsers:

- Firefox 45+
- Chrome 50+
- Safari 9.1+

Documentation
=============

See the [documentation](https://kitware.github.io/itk-vtk-viewer) for a
getting started guide, advanced documentation, and API descriptions.

Contributing
============

See [CONTRIBUTING.md](CONTRIBUTING.md) for instructions to contribute.

License
=======

ITK/VTK Viewer is distributed under the OSI-approved BSD 3-clause License.
See [Copyright.txt][] for details.

[Copyright.txt]: Copyright.txt

repository: harveyyeung/itk-vtk-viewer

gha_license_id: NOASSERTION

repo_name: harveyyeung/itk-vtk-viewer


text:
# SES Domain Identity Construct for AWS CDK

[![Build Status](https://github.com/mooyoul/aws-cdk-ses-domain-identity/workflows/workflow/badge.svg)](https://github.com/mooyoul/aws-cdk-ses-domain-identity/actions)
[![Semantic Release enabled](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
[![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://mooyoul.mit-license.org/)

This package provides Constructs for provisioning & validating SES Domain Identity which can be used in SES.

Inspired from [Automatic DNS-validated certificates using Route 53 of `@aws-cdk/aws-certificatemanager` package.](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-certificatemanager-readme.html)

This package automatically validates SES Domain Identity like `@aws-cdk/aws-certificatemanager` does.

-----

## Example

```typescript
import * as route53 from "@aws-cdk/aws-route53";
import { DnsValidatedDomainIdentity } from "aws-cdk-ses-domain-identity";

// ... (truncated)
    const hostedZone = route53.HostedZone.fromLookup(this, 'HostedZone', {
      domainName: 'example.com',
      privateZone: false,
    });

    const identity = new DnsValidatedDomainIdentity(this, 'DomainIdentity', {
      domainName: 'example.com',
      dkim: true,
      region: 'us-east-1',
      hostedZone,
    });
// ... (truncated)
```

## Structures

#### DnsValidatedDomainIdentityProps

```typescript
interface DnsValidatedDomainIdentityProps {
  /**
   * Fully-qualified domain name to request a domain identity for.
   */
  readonly domainName: string;

  /**
   * Whether to configure DKIM on domain identity.
   * @default true
   */
  readonly dkim?: boolean;

  /**
   * Route 53 Hosted Zone used to perform DNS validation of the request.  The zone
   * must be authoritative for the domain name specified in the Domain Identity Request.
   */
  readonly hostedZone: route53.IHostedZone;
  /**
   * AWS region that will validate the domain identity. This is needed especially
   * for domain identity used for AWS SES services, which require the region
   * to be one of SES supported regions.
   *
   * @default the region the stack is deployed in.
   */
  readonly region?: string;

  /**
   * Role to use for the custom resource that creates the validated domain identity
   *
   * @default - A new role will be created
   */
  readonly customResourceRole?: iam.IRole;
}
```

## License

[MIT](LICENSE)

See full license on [mooyoul.mit-license.org](http://mooyoul.mit-license.org/)


text:
## Hands-On Time

---

# Alerting

## Creating Alerts

---

```bash
docker service update --label-add com.df.alertName=mem \
    --label-add com.df.alertIf='container_memory_usage_bytes{container_label_com_docker_swarm_service_name="go-demo_main"} > 20000000' \
    go-demo_main

exit

open "http://$CLUSTER_DNS/monitor/config"

open "http://$CLUSTER_DNS/monitor/rules"

open "http://$CLUSTER_DNS/monitor/alerts"

open "http://$CLUSTER_DNS/monitor/graph"

# container_memory_usage_bytes{container_label_com_docker_swarm_service_name="go-demo_main"}
```

## Creating Alerts

---

```bash
ssh -i workshop.pem docker@$CLUSTER_IP

docker service update --label-add com.df.alertName=mem \
    --label-add com.df.alertIf='container_memory_usage_bytes{container_label_com_docker_swarm_service_name="go-demo_main"} > 1000000' \
    go-demo_main

exit

open "http://$CLUSTER_DNS/monitor/alerts"
```

<!-- .slide: data-background="img/alerts-fire-diag.png" data-background-size="contain" -->

## Creating Alerts

---

```bash
open "http://$CLUSTER_DNS/monitor/graph"

# container_spec_memory_limit_bytes{container_label_com_docker_swarm_service_name="go-demo_main"}

# container_memory_usage_bytes{container_label_com_docker_swarm_service_name="go-demo_main"}

ssh -i workshop.pem docker@$CLUSTER_IP

docker service update --label-add com.df.alertName=mem_limit \
    --label-add com.df.alertIf='container_memory_usage_bytes{container_label_com_docker_swarm_service_name="go-demo"}/container_spec_memory_limit_bytes{container_label_com_docker_swarm_service_name="go-demo"} > 0.8' \
    go-demo_main

exit

open "http://$CLUSTER_DNS/monitor/alerts"
```

## Creating Multiple Alerts

---

```bash
ssh -i workshop.pem docker@$CLUSTER_IP

docker service update \
    --label-add com.df.alertName.1=mem_load \
    --label-add com.df.alertIf.1='(sum by (instance) (node_memory_MemTotal) - sum by (instance) (node_memory_MemFree + node_memory_Buffers + node_memory_Cached)) / sum by (instance) (node_memory_MemTotal) > 0.8' \
    --label-add com.df.alertName.2=diskload \
    --label-add com.df.alertIf.2='(node_filesystem_size{fstype="aufs"} - node_filesystem_free{fstype="aufs"}) / node_filesystem_size{fstype="aufs"} > 0.8' \
    exporter_node-exporter

exit

open "http://$CLUSTER_DNS/monitor/alerts"

ssh -i workshop.pem docker@$CLUSTER_IP
```

<!-- .slide: data-background="img/alerts-exporters-fire-diag.png" data-background-size="contain" -->

## Postponing Alerts Firing

---

```bash
curl -o go-demo.yml \
    https://raw.githubusercontent.com/vfarcic/docker-flow-monitor/master/stacks/go-demo-alert-long.yml

cat go-demo.yml

docker stack deploy -c go-demo.yml go-demo

exit

open "http://$CLUSTER_DNS/monitor/alerts"

ssh -i workshop.pem docker@$CLUSTER_IP
```

## Postponing Alerts Firing

---

```bash
docker service update \
    --label-add com.df.alertIf='container_memory_usage_bytes{container_label_com_docker_swarm_service_name="go-demo_main"}/container_spec_memory_limit_bytes{container_label_com_docker_swarm_service_name="go-demo_main"} > 0.05' \
    go-demo_main

exit

open "http://$CLUSTER_DNS/monitor/alerts"

ssh -i workshop.pem docker@$CLUSTER_IP
```

## Alert Labels And Annotations

---

```bash
curl -o go-demo.yml \
    https://raw.githubusercontent.com/vfarcic/docker-flow-monitor/master/stacks/go-demo-alert-info.yml

cat go-demo.yml

docker stack deploy -c go-demo.yml go-demo

exit

open "http://$CLUSTER_DNS/monitor/alerts"

ssh -i workshop.pem docker@$CLUSTER_IP
```

## Using Shortcuts

---

```bash
curl -o go-demo.yml \
    https://raw.githubusercontent.com/vfarcic/docker-flow-monitor/master/stacks/go-demo-alert.yml

cat go-demo.yml

docker stack deploy -c go-demo.yml go-demo

curl -o exporters.yml \
    https://raw.githubusercontent.com/vfarcic/docker-flow-monitor/master/stacks/exporters-alert.yml

cat exporters.yml

docker stack deploy -c exporters.yml exporter
```

## Using Shortcuts

---

```bash
exit

open "http://$CLUSTER_DNS/monitor/alerts"

ssh -i workshop.pem docker@$CLUSTER_IP
```

gha_language: HTML


text:
<meta itemprop="name" content="tf_agents.environments.parallel_py_environment.ProcessPyEnvironment" />
<meta itemprop="path" content="Stable" />
<meta itemprop="property" content="__getattr__"/>
<meta itemprop="property" content="__init__"/>
<meta itemprop="property" content="action_spec"/>
<meta itemprop="property" content="call"/>
<meta itemprop="property" content="close"/>
<meta itemprop="property" content="observation_spec"/>
<meta itemprop="property" content="reset"/>
<meta itemprop="property" content="start"/>
<meta itemprop="property" content="step"/>
<meta itemprop="property" content="time_step_spec"/>
<meta itemprop="property" content="wait_start"/>

# tf_agents.environments.parallel_py_environment.ProcessPyEnvironment

## Class `ProcessPyEnvironment`

Step a single env in a separate process for lock free paralellism.

Defined in [`environments/parallel_py_environment.py`](https://github.com/tensorflow/agents/tree/master/tf_agents/environments/parallel_py_environment.py).

__init__

``` python
__init__(
    env_constructor,
    flatten=False
)
```

Step environment in a separate process for lock free paralellism.

The environment is created in an external process by calling the provided
callable. This can be an environment class, or a function creating the
environment and potentially wrapping it. The returned environment should
not access global variables.

#### Args:

* `env_constructor`: Callable that creates and returns a Python environment.
* `flatten`: Boolean, whether to assume flattened actions and time_steps
    during communication to avoid overhead.

#### Attributes:

* `observation_spec`: The cached observation spec of the environment.
* `action_spec`: The cached action spec of the environment.
* `time_step_spec`: The cached time step spec of the environment.

## Methods

__getattr__

``` python
__getattr__(name)
```

Request an attribute from the environment.

Note that this involves communication with the external process, so it can
be slow.

#### Args:

* `name`: Attribute to access.

#### Returns:

Value of the attribute.

action_spec

``` python
action_spec()
```

call

``` python
call(
    name,
    *args,
    **kwargs
)
```

Asynchronously call a method of the external environment.

#### Args:

* `name`: Name of the method to call.
* `*args`: Positional arguments to forward to the method.
* `**kwargs`: Keyword arguments to forward to the method.

#### Returns:

Promise object that blocks and provides the return value when called.

close

``` python
close()
```

Send a close message to the external process and join it.

observation_spec

``` python
observation_spec()
```

reset

``` python
reset(blocking=True)
```

Reset the environment.

#### Args:

* `blocking`: Whether to wait for the result.

#### Returns:

New observation when blocking, otherwise callable that returns the new
observation.

start

``` python
start(wait_to_start=True)
```

Start the process.

#### Args:

* `wait_to_start`: Whether the call should wait for an env initialization.

step

``` python
step(
    action,
    blocking=True
)
```

Step the environment.

#### Args:

* `action`: The action to apply to the environment.
* `blocking`: Whether to wait for the result.

#### Returns:

time step when blocking, otherwise callable that returns the time step.

time_step_spec

``` python
time_step_spec()
```

wait_start

``` python
wait_start()
```

Wait for the started process to finish initialization.

repository: ageron/agents

repo_name: ageron/agents


text:
# NDI Whiteboard

Simple Whiteboard application which outputs to NDI endpoint named `Whiteboard`.
Offers basic colors (black, red, blue, yellow, green) and possible backgrounds
(white, chroma [green], alpha [transparent]).

Needs NDI SDK to function properly

![Example](https://raw.githubusercontent.com/gbraad/NDI-Whiteboard/master/Assets/example.png)

Authors
-------

| [!["Gerard Braad"](http://gravatar.com/avatar/e466994eea3c2a1672564e45aca844d0.png?s=60)](http://gbraad.nl "Gerard Braad<EMAIL_ADDRESS>|
|---|
| [@gbraad](https://twitter.com/gbraad)  |

License
-------
Licensed under the [MIT License](https://opensource.org/licenses/MIT)

repository: gbraad-apps/NDI-Whiteboard

repo_name: gbraad-apps/NDI-Whiteboard


text:
# Project Assigner GitHub Action

This is a GitHub action, implemented in JavaScript, which does the following:
  - Assigns an issue or pull request to a project when a specified label is applied
  - Removes an issue or pull request from a project when a specified label is removed

You can provide multiple label to project mappings as the action input.

## Inputs

### `issue-mappings`
A JSON array of objects containing `label`, `projectName`, and `columnId` attributes.

**`label`** - name of the GitHub label that should trigger this action when it's applied to or removed from an issue or a pull request.

**`projectName`** - name of the project that an issue or pull request should be assinged to when the label is applied, or removed from when the label is removed.

**`columnId`** - *ID* of the GitHub project column that an issue or a pull request should be placed in when they're assigned to the project.  For issues, this would typically be the ID of the "To Do" column. For pull requests, this may be the ID of the "In Review" column. You should use your own discression when choosing which columns to use for your particular project.  A column ID can be found by copying the column URL using its "..." menu and then using the numeric ID at the end of the URL as the value for `columnId`.

Here's a sample format of the `issue-mappings` input:

	issue-mappings: '[{"label": "Test", "projectName": "test", "columnId": 1234},
            {"label": "bug", "projectName": "test2", "columnId": 5678}]'

## Example usage

In order to use this action, create a workflow configuration file (e.g. `issues-workflow.yml`) in your repository's `.github/workflows` directory. *Note that you need to have GitHub Actions enabled for your repository in order for this to work!*

### A workflow configuration for assigning issues to projects

	on:
  	  issues:
    	  types: [labeled, unlabeled]

	jobs:
	  assign_to_project:
	    runs-on: ubuntu-latest
	    name: Assign an issue to project based on label
	    steps:
	      - name: Assign to project
		uses<EMAIL_ADDRESS>		id: project_assigner
		with:
		  issue-mappings: '[{"label": "Test", "projectName": "test", "columnId": 1234},
		    {"label": "bug", "projectName": "test2", "columnId": 5678}]'
		  ghToken: ${{ secrets.GITHUB_TOKEN }}

### A workflow configuration for assigning pull requests to projects

	on:
	  pull_request:
	    types: [labeled, unlabeled]

	jobs:
	  assign_to_project:
	    runs-on: ubuntu-latest
	    name: Assign a PR to project based on label
	    steps:
	      - name: Assign to project
		uses<EMAIL_ADDRESS>		id: project_assigner
		with:
		  issue-mappings: '[{"label": "Test", "projectName": "test", "columnId": 1234},
		    {"label": "enhancement", "projectName": "test2", "columnId": 5678}]'
		  ghToken: ${{ secrets.GITHUB_TOKEN }}


text:
# database\_resetter

Note: I used to use darcs as the source control tool for this project.
I decided to move to git as other people will find it easier to collaborate
on GitHub. As it was small enough, I decided to manually port it on a
one-git-commit-per-darcs-patch basis. So (in case you looked at the commit
history), no – I didn't write the entire thing in 20 minutes. (How I wish
I could code that fast.)

## Introduction

### What does it do?

database\_resetter is a small gem to handle automatically resetting
your test databases when developing a Ruby web app.

### Why do I want it?

  If you're
making a lot of database changes, this can save you a fair bit of time.

I've used this code almost unmodified in all of my clients' projects over
the last year or two.  Pretty much everyone that's seen it has said
it looked pretty handy, so I've bundled it up as a gem.

### How does it work?

database\_resetter writes timestamp files into _log/database\_resetter_
that track when the database was last reset.  It tracks them:

* per environment (eg test, cucumber)
* per hostname

Per-hostname tracking is done in case you use Dropbox/JungleDisk etc to sync
code between machines.  (Note: there are no features/specs to prove this works.)

What _isn't_ tracked is what directory / SCM branch you're in.  So if you switch
to a different working copy folder, or change eg Git branch, database\_resetter
may not run the migrations.  If you'd like this feature please contact me.

_The easiest way to make database\_resetter run is to touch a migration file._

### How is database\_resetter different from database\_cleaner?

Ben Mabey wrote [database\_cleaner](http://github.com/bmabey/database_cleaner) to
help with emptying a database between individual test cases.  database\_resetter is
designed to get the initial schema of a database in place before any test cases run.

Basically, you want both :-)

## Instructions

If you're working on a Rails app, and your tests are good to go after a
`rake db:reset`, then place the following code somewhere that
will get executed once per test run:

    DatabaseResetter.new.reset_if_required

Note: there are no features to prove this default call actually works :)  I've
always specified the options explicitly myself.  But the defaults should work with
Rails.  If not, let me know.

For instructions on specifying the options, see below.

### Changing the Rake task

If (like me), you don't use _schema.rb_ to regenerate databases,
you'll need your own Rake task.  I use one called `rake db:rebuild`,
which is currently:

    desc "Reset and re-migrate the database"
    task :rebuild do
      Rake::Task["db:drop"].invoke
      Rake::Task["db:create"].invoke
      Rake::Task["db:migrate"].invoke
    end

To override the default command, specify the `:command_pattern` option:

    DatabaseResetter.new(
      :command_pattern => "rake db:rebuild RAILS_ENV=%ENV%"
    ).reset_if_required

See below for a description of `%ENV%`.

### Using a different framework

If you use a different web framework, you may have to specify a different
environment variable to switch the framework environment (eg `MERB_ENV`
or `RACK_ENV`).  To override this, specify both `:command_pattern` and
`:environment`, eg:

    DatabaseResetter.new(
      :environment => ENV["MERB_ENV"],
      :command_pattern => "rake db:reset MERB_ENV=%ENV%"
    ).reset_if_required

You may also need to specify a different migration file directory to watch, eg:

    DatabaseResetter.new(
      :migration_directory => "schema/migrations"
    ).reset_if_required

(You can, of course, combine all three.)

### RSpec

Put the call to `DatabaseResetter#reset_if_required` in _spec/spec\_helper.rb_.

### Cucumber

Put the call to `DatabaseResetter#reset_if_required` in
_features/support/env.rb_.

### Spork

If you use Spork, you want to call `DatabaseResetter#reset_if_required` in the
`each_run` block, eg:

    Spork.each_run do
      # ...
      DatabaseResetter.new.reset_if_required
      # ...
    end

### PostgreSQL

If you use PostgreSQL, and your Rake task attempts to drop the database,
Postgres will stop you if there is a connection in place.  You need to work
around this somehow.  If you're using Spork, you need to divert Postgres's
eyes, eg in Rails:

    Spork.each_run do
      # ...

      ActiveRecord::Base.establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public'))
      DatabaseResetter.new.reset_if_required
      ActiveRecord::Base.establish_connection(config)

      # ...
    end

If you're not using Spork, you still need to make sure you call
`DatabaseResetter#reset_if_required` before connecting to the database.
One way of doing this with Bundler is to define a Bundler group just
for database\_resetter in your Gemfile:

    group :database_resetter do
      gem "database_resetter"
    end

And then use this to load and run database\_resetter before anything connects
to the database.  eg with Rails and Cucumber, in _env.rb_:

    # ...

    require 'bundler'
    Bundler.setup(:database_resetter)
    require 'database_resetter'
    DatabaseResetter.new.reset_if_required

    require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')

    # ...

## Bugs / Feedback

There is currently no project page for database\_resetter.  If you want to report
bugs in the code or documentation, or request features, please contact me:

[ashley.moran<EMAIL_ADDRESS>
[PatchSpace Ltd](http://www.patchspace.co.uk/)

## Source code

database\_resetter is maintained in a darcs repository, and is currently hosted
on Patch-Tag:

[Official darcs repository](https://patch-tag.com/r/ashleymoran/database_resetter/)

extension: markdown


text:
---
template: SinglePost
title: " Studies show cement fix on spinal bones not effective"
status: Published
date: 2009-08-06
featuredImage: /images/animals.jpg
excerpt: A treatment that uses medical cement to fix cracks in the spinal bones
  of elderly people worked no better than a sham treatment, the first rigorous
  studies of the popular procedure show.
categories:
  - category: Health
meta:
  title: " Studies show cement fix on spinal bones not effective"
  description: A treatment that uses medical cement to fix cracks in the spinal
    bones of elderly people worked no better than a sham treatment, the first
    rigorous studies of the popular procedure show.
---
<!--StartFragment-->

A treatment that uses medical cement to fix cracks in the spinal bones of elderly people worked no better than a sham treatment, the first rigorous studies of the popular procedure show.

Pain and disability were about the same up to six months later.

The treatment is so widely thought to work that the researchers had a hard time getting patients to take part when it was explained that half of them would not get the real thing.

“All of us who do the procedure have seen apparently miraculous cures,” said Dr. David Kallmes, a radiologist at the Mayo Clinic who led one of the studies. But he said there were also “miraculous cures” among those who got the fake treatments.

The researchers said it is yet another example of a medical procedure coming into wide use before good studies are done to show that it is safe and effective.

About 750,000 Americans suffer painful compression fractures in the spine each year. Bone-thinning osteoporosis is the most common cause. There are about 80,000 bone cement procedures done in the United States each year, Kallmes said.

Medicare pays $1,500 to $2,100 for the procedure.

The findings were published in today’s New England Journal of Medicine.

<!--EndFragment-->

repository: emmadigital/austinlaw

gha_language: JavaScript

repo_name: emmadigital/austinlaw


text:
Andrew Patton
=============
[acusti.ca][] //<EMAIL_ADDRESS>
Current Employment
------------------

**Time Sites — Principal Front-End Engineer** June 2022 – Present

*[Time Sites][] is a collaborative web publishing platform that enables teams to design, build, publish, and maintain their web properties*

Selected Projects
-----------------

**[Time Sites][]** June 2016 – Present

Build and architect experiences across the Time Sites (née “Brandcast”) platform, from the design studio to the web publishing server. Collaborate closely with our lead product designer to design and build new features and UXs in a scalable and maintainable way.

**[React.js][]** Oct. 2016 – August 2018

Modified the `react-dom` library to make it possible to render React components into an `iframe` and worked with the core React team to land those changes in facebook/react.

**[UIKit (and other modules)][npm-acusti]** March 2015 – Present

Maintain [UIKit][], a high-quality UI toolkit, [audile][], a mobile-friendly web audio player, and [react-higher-event][], a declarative API for listening to events outside of a React component.

**[Cinémathèque Québecoise][cq]** Oct. 2014 – June 2015

Lead developer and architect of a multilingual Solr-powered [search application][cqrecherche] built with [FuelPHP][] and a sibling WordPress-powered [publication site][cq] for Québec’s official film archives.

**[Trica Furniture][]** March 2014 - Aug. 2014

Built a WordPress-based multilingual product catalogue with a custom responsive theme, custom interactive sliders and image galleries, and a custom-built authoring experience.

**[Jewish General Hospital Library Search][jgh]** Dec. 2013 – March 2014

Built a fast and maintainable multilingual Solr-powered search front end, based on my initial design, for a hospital library using Handlebars and vanilla JS.

### Open Source Contributions

[React][], [immutable.js][], [jsdom][], [wp-cli][], [AMP][], [flow][], [vimeo/player.js][], [browserslist][], [react-dnd][], [CSSOM][], [jest][], [fbjs][], [react-draggable][], [timeago.js][], [draft.js][], [react-higher-event][], [uikit][], [audile][], [selection.js][], [bezier-easing-editor][], [gogs][], [PrestaShop-webservice-lib][], [affixing-header][], [onscrolling][], [socket.io][], [diffDOM][], [AtomLinter/linter-jscs][], [react-number-editor][], [basecamp/trix][], [react-color][], [redux-form][], [react-numeric-input][], [hood.ie][], [react-async-script-loader][], [underscores.me][], [nvalt-prime][], [jquery-requestAnimationFrame][], [jquery-smooth-scroll][], [wp-plugin-in-github][], [WordPress-Wiki][]

Programming Languages and Technologies
--------------------------------------

- Git and the [GitHub flow][], including interactive rebasing, managing remotes, git hygiene
- The command-line interface (bash)

Front-End

JavaScript

Functional programming

React with Redux or Jotai for state

Remix, the full stack web framework

Static typing via typescript or flow

BDD/TDD (jest and vitest)

End-to-end testing with cypress

CSS and HTML

Flexbox and CSS Grid

Web performance and web vitals

Mobile web development

Back-End

AWS: DynamoDB, AppSync, Lambdas, S3, Cognito, Amplify

Cloudflare Workers and Pages

Node.js

GraphQL and REST

iOS with Swift

Other Interests
---------------

**Music production and composition**
I love music and play piano. I’ve played a couple of shows in Montreal with a previous iteration of the [Sontag Shogun][] project and was coach of the band [Slowest Runner][]. Also, I like making music, and, when feeling inspired, [sharing the results][music].

Education
---------

**McGill University, 2003 – 2007**
BA in Cultural Studies, with a Minor in Music Technology

Languages
---------

I speak and understand Spanish and French fluently.

[mailto]<EMAIL_ADDRESS>[acusti.ca]: https://www.acusti.ca

[time sites]: https://timesites.com

[brandcast platform]: https://app.brandcast.io/signup/
[npm-acusti]: https://www.npmjs.com/~acusti
[uikit]: https://github.com/acusti/uikit
[audile]: https://github.com/acusti/audile
[react-higher-event]: https://github.com/bloodyowl/react-higher-event
[onscrolling]: https://github.com/acusti/onscrolling
[affixing-header]: https://github.com/acusti/affixing-header
[react.js]: https://github.com/facebook/react/pull/12037
[fuelphp]: http://fuelphp.com/
[trica furniture]: http://www.tricafurniture.com/
[cq]: http://collections.cinematheque.qc.ca/ "Collections en ligne | La Cinémathèque québécoise"
[cqrecherche]: http://collections.cinematheque.qc.ca/recherche/ "Recherche collections | La Cinémathèque québécoise"
[jgh]: http://pen.jgh.ca/search/en/ "Montreal Jewish General Hospital"

[react]: https://github.com/facebook/react/pulls?q=is%3Apr+author%3Aacusti
[immutable.js]: https://github.com/immutable-js/immutable-js/pulls?q=is%3Apr+author%3Aacusti
[jsdom]: https://github.com/jsdom/jsdom/pulls?q=is%3Apr+author%3Aacusti
[jest]: https://github.com/facebook/jest/pulls?q=is%3Apr+author%3Aacusti
[wp-cli]: https://github.com/wp-cli/wp-cli/pulls?q=is%3Apr+author%3Aacusti
[amp]: https://github.com/ampproject/amphtml/pulls?q=is%3Apr+author%3Aacusti
[flow]: http://github.com/facebook/flow/pulls?q=is%3Apr+author%3Aacusti
[vimeo/player.js]: https://github.com/vimeo/player.js/pulls?q=is%3Apr+author%3Aacusti
[browserslist]: https://github.com/browserslist/browserslist/pulls?q=is%3Apr+author%3Aacusti
[react-dnd]: https://github.com/react-dnd/react-dnd/pulls?q=is%3Apr+author%3Aacusti
[cssom]: https://github.com/NV/CSSOM/pulls?q=is%3Apr+author%3Aacusti
[selection.js]: https://github.com/Simonwep/selection/pulls?q=is%3Apr+author%3Aacusti
[fbjs]: https://github.com/facebook/fbjs/pulls?q=is%3Apr+author%3Aacusti
[react-draggable]: https://github.com/mzabriskie/react-draggable/pulls?q=is%3Apr+author%3Aacusti
[bezier-easing-editor]: https://github.com/gre/bezier-easing-editor/pulls?q=is%3Apr+author%3Aacusti
[gogs]: https://github.com/gogs/gogs/pulls?q=is%3Apr+author%3Aacusti
[prestashop-webservice-lib]: https://github.com/PrestaShop/PrestaShop-webservice-lib/pulls?q=is%3Apr+author%3Aacusti
[socket.io]: https://github.com/socketio/socket.io/pulls?q=is%3Apr+author%3Aacusti
[timeago.js]: https://github.com/hustcc/timeago.js/issues/139#issuecomment-422639198
[draft.js]: https://github.com/facebook/draft-js/pulls?q=is%3Apr+author%3Aacusti
[atomlinter/linter-jscs]: https://github.com/AtomLinter/linter-jscs/pulls?q=is%3Apr+author%3Aacusti
[react-number-editor]: https://github.com/tleunen/react-number-editor/pulls?q=is%3Apr+author%3Aacusti
[basecamp/trix]: https://github.com/basecamp/trix/pulls?q=is%3Apr+author%3Aacusti
[react-color]: https://github.com/casesandberg/react-color/pulls?q=is%3Apr+author%3Aacusti
[redux-form]: https://github.com/erikras/redux-form/pulls?q=is%3Apr+author%3Aacusti
[react-numeric-input]: https://github.com/vlad-ignatov/react-numeric-input/pulls?q=is%3Apr+author%3Aacusti
[diffdom]: https://github.com/fiduswriter/diffDOM/pulls?q=is%3Apr+author%3Aacusti
[hood.ie]: https://github.com/hoodiehq/hood.ie/pulls?q=is%3Apr+author%3Aacusti
[react-async-script-loader]: https://github.com/leozdgao/react-async-script-loader/pulls?q=is%3Apr+author%3Aacusti
[underscores.me]: https://github.com/Automattic/underscores.me/pulls?q=is%3Apr+author%3Aacusti
[nvalt-prime]: https://github.com/bwiggs/nvalt-prime/pulls?q=is%3Apr+author%3Aacusti
[jquery-requestanimationframe]: https://github.com/gnarf/jquery-requestAnimationFrame/pulls?q=is%3Apr+author%3Aacusti
[jquery-smooth-scroll]: https://github.com/kswedberg/jquery-smooth-scroll/pulls?q=is%3Apr+author%3Aacusti
[wp-plugin-in-github]: https://github.com/sudar/wp-plugin-in-github/pulls?q=is%3Apr+author%3Aacusti
[wordpress-wiki]: https://github.com/mgerring/WordPress-Wiki/pulls?q=is%3Apr+author%3Aacusti
[github flow]: https://guides.github.com/introduction/flow/

[sontag shogun]: http://sontagshogun.bandcamp.com/
[slowest runner]: http://theslowestrunner.bandcamp.com/
[music]: https://soundcloud.com/acusti

gha_language: Sass


text:
# slim-stencil-tools

A lightweight and modern alternative utility library for Bigcommerce Stencil themes
<!-- [![Travis build status](http://img.shields.io/travis/dwest-teo/slim-stencil-tools.svg?style=flat)](https://travis-ci.org/dwest-teo/slim-stencil-tools)
[![Code Climate](https://codeclimate.com/github/dwest-teo/slim-stencil-tools/badges/gpa.svg)](https://codeclimate.com/github/dwest-teo/slim-stencil-tools)
[![Test Coverage](https://codeclimate.com/github/dwest-teo/slim-stencil-tools/badges/coverage.svg)](https://codeclimate.com/github/dwest-teo/slim-stencil-tools) -->
[![devDependency Status](https://david-dm.org/dwest-teo/slim-stencil-tools/dev-status.svg)](https://david-dm.org/dwest-teo/slim-stencil-tools#info=devDependencies)
[![npm](https://img.shields.io/npm/v/slim-stencil-tools.svg)](https://www.npmjs.com/package/slim-stencil-tools)
[![npm](https://img.shields.io/npm/l/slim-stencil-tools.svg)](https://www.npmjs.com/package/slim-stencil-tools)

### About
This library is a lightweight, jQuery-free alternative to Bigcommerce's standard [Stencil Utils](https://stencil.bigcommerce.com/docs/the-stencil-utils-package) package.  slim-stencil-tools is NOT a direct replacement for Stencil Utils, but rather a leaner API client designed for usecases where some of Stencil Utils' functionality isn't needed (ie- a React/Redux implementation that doesn't need the default Events system or jQuery dependency).  Primarily, slim-stencil-tools facilitates the basic HTTP functionality required for a Stencil theme.

slim-stencil-tools also makes it easier to retrieve JSON data from the Stencil API if desired.  Although some features of slim-stencil-utils were designed with React components in mind, it does not require any framework or dependencies to function (although you'll probably want to use some polyfills, read on for details).

### Documentation
slim-stencil-tools is written in ES6 and transpiled via babel to run in the browser.  The standard Stencil theme's Webpack setup will allow you to include this library as a module.

#### Installation
* Run `npm install --save slim-stencil-tools` to install the package and save it as a dependency.
* Import the appropriate parts of the library where needed in your code.  For example, if you need access to the library's Cart API functions in a file:
```javascript
  import { Cart as CartApi } from 'slim-stencil-tools';
```

#### Usage
slim-stencil-tools is split up into several exports that can be used in your modules as needed.  Some of the included functions allow you to specify a "component" that will be receiving the retrieved data.  This allows you to leverage Stencil's custom Handlebars templates to specify the contents and shape of the JSON data returned.  To use this functionality, you'll need to do the following:
* Create a directory for your custom "data" templates.  This directory should be a child of the "templates/components" directory in your Stencil theme.  slim-stencil-tools assumes this directory will be named "data", but you can specify another name using the `componentPath` property of the optional `opts` object on relevant functions.
* Create a new layout file for your "data" templates.  In your Stencil theme's "templates/layout" directory, create a new file "data.html" containing the following:
```javascript
  {{#block "data_objects"}}{{/block}}
```
* Create individual "data" templates for each data retrieval function, specifying the data you require.  These templates will all go in the "templates/components/data" directory, and all need to be named with a common suffix.  The suffix defaults to "-data", but can be specified using the `componentSuffix` property of the optional `opts` object on relevant functions.  For example, here's a file creating a JSON object `cart`, saved as "templates/components/data/cart-data.html":
```javascript
  {{inject "cart" cart}}

  {{#partial "data_objects"}}
    {{jsContext}}
  {{/partial}}

  {{> layout/data}}
```
Using Stencil's Handlebars helpers, you can also create smaller named variables for only the parts of the Stencil object you need in a given component, reducing the amount of data to be downloaded.  For example, if you only need to retrieve a category's description, you could use a data template like this, saved as "templates/components/data/category-data.html":
```javascript
  {{inject "categoryDescription" category.description}}

  {{#partial "data_objects"}}
    {{jsContext}}
  {{/partial}}

  {{> layout/data}}
```
* Now you can use slim-stencil-tools to retrieve JSON data from Bigcommerce.  This makes it trivial to render data on the client-side using something like React, rather than being stuck working with pre-rendered HTML.

##### Base
```javascript
  import { Base as BaseApi } from 'slim-stencil-tools';
```

The Base import is the underlying API function used by slim-stencil-tools.  In most cases, you won't need to import it directly, but you can if you need to add or extend functionality.

##### Cart
```javascript
  import { Cart as CartApi } from 'slim-stencil-tools';
```

The Cart import contains all functions related to retrieving and manipulating data within the cart.

###### getCartContent(component, opts)
Retrieves the current content of the cart according to the specified data component.  `opts` object is optional and can be used to override the default `componentPath` and `componentSuffix` attributes.
```javascript
  const data = CartApi.getCartContent('cart');
```

###### addToCart(formData)
Adds a product to the cart using a FormData object as per the default product page form.
```javascript
  const productForm = document.querySelector('#product-page-form');
  const formData = new FormData(productForm);
  CartApi.addToCart(formData);
```

###### removeFromCart(itemId)
Removes a product from the cart by item id (the cart-specific item id, NOT product id).
```javascript
  CartApi.removeFromCart(itemToRemove);
```

###### updateCartQty(opts)
Change the quantity of a product in the cart.  `opts` object accepts properties `itemId` and `qty`.
```javascript
  const changeQty = {
    itemId: 1234,
    qty: 3,
  };
  CartApi.updateCartQty(changeQty);
```

###### submitCouponCode(code)
Submit a coupon or gift certificate code.
```javascript
  CartApi.submitCouponCode('muchsavings');
```

###### getShippingEstimate(opts)
Retrieve a shipping estimate for items in the cart.  Accepts an object containing the ship-to information.
```javascript
  const shipTo = {
    country_id: 226,
    state_id: 18,
    city: 'Gainesville',
    zip_code: '32653',
  };
  const shippingQuotes = CartApi.getShippingEstimate(shipTo);
```

###### submitShippingEstimate(params)
Submit selected shipping estimate.  Accepts the selected shipping method id.
```javascript
  CartApi.submitShippingEstimate(3);
```

##### Page
```javascript
  import { Page as PageApi } from 'slim-stencil-tools';
```

The Page import contains a function that allows you to fetch a page by URL and render it to a specified Handlebars template file or a "data" component yielding JSON as described above.  Example coming soon.

##### Product
```javascript
  import { Product as ProductApi } from 'slim-stencil-tools';
```

###### getProduct(productId, component, opts)
Retrieve product data by product id and render it to a specified "data" component, yielding JSON.  `opts` object is optional and can be used to override the default `componentPath` and `componentSuffix` attributes.
```javascript
  ProductApi.getProduct(12345, 'quick-view');
```

### Notes
slim-stencil-tools uses modern JavaScript APIs and capabilities that might not be supported in older browsers, specifically ES6 promises and the Fetch API.  You'll likely need to polyfill for best browser support.  The standard stencil theme's dependencies includes babel-polyfill which should take care of the ES6 promises, but here's a [great alternative](https://github.com/stefanpenner/es6-promise) just in case you aren't using babel-polyfill.

As for the Fetch API, here's the recommended [polyfill from GitHub](https://github.com/github/fetch).

#### Important
Please note that in some places slim-stencil-tools' usage of the Fetch API does require the use of HTTPS to avoid CORS issues.  For the best experience, you probably need to be using Bigcommerce's "Site-wide HTTPS" feature.  In your store's admin area, look under Store Setup/Store Settings/HTTPS to see if you have this feature enabled, or to see details on how to enable it.

### License

[MIT](https://opensource.org/licenses/MIT). © 2016 Donny West

[![Built With Swag](http://forthebadge.com/images/badges/built-with-swag.svg)](http://forthebadge.com)

repository: dwest-teo/slim-stencil-tools

repo_name: dwest-teo/slim-stencil-tools


text:
==========
GeoAlchemy
==========

GIS Support for `SQLAlchemy <http://www.sqlalchemy.org/>`_.

Introduction
------------
GeoAlchemy is an extension of SQLAlchemy. It provides support for
Geospatial data types at the ORM layer using SQLAlchemy. It aims to
support spatial operations and relations specified by the Open Geospatial
Consortium (OGC). The project started under Google Summer of Code Program
under the mentorship of `Mark Ramm-Christensen <http://compoundthinking.com/blog/>`_.

Requirements
------------
Requires SQLAlchemy > 0.6. Supported on Python 2.5 and Python 2.6.
Should also work with Python 2.4 but has not been tested. It also
requires a supported spatial database.

Supported Spatial Databases
---------------------------
At present `PostGIS <http://postgis.refractions.net/>`_, `Spatialite
<http://www.gaia-gis.it/spatialite/>`_, `MySQL <http://www.mysql.com/>`_,
`Oracle <http://www.oracle.com/technology/software/products/database/index.html>`_
and `MS SQL Server 2008 <http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx?pf=true>`_
are supported.

Support
-------
GeoAlchemy is at an early stage of development. Its mailing list is available on
`Google Groups <http://groups.google.com/group/geoalchemy>`_. The source code can be
found on `GitHub <http://github.com/geoalchemy/geoalchemy>`_. Also, feel free to email
the author directly to send bugreports, feature requests, patches, etc.

Installation
------------
To install type as usual::

    $ easy_install GeoAlchemy

Or, download the package, change into geoalchemy dir and type::

    $ python setup.py install

Documentation
-------------
Documentation is available online at http://geoalchemy.org.
You can also generate full documentation using sphinx by doing `make html`
in the `doc` dir and pointing the browser to `doc/_build/index.html`.

Package Contents
----------------

  geoalchemy/
      Source code of the project.

  geoalchemy/tests/
      Unittests for GeoAlchemy.

  doc/
      Documentation source.

  examples/
      A few examples demonstrating usage.

License
-------

GeoAlchemy is released under the MIT License.

Contributors
------------

The contributors to this project (in alphabetical order are):

* Eric Lemoine
* Frank Broniewski
* Mark Hall
* Michael Bayer
* Mike Gilligan
* Sanjiv Singh
* Stefano Costa
* Tobias Sauerwein

repository: vuamitom/geoalchemy

extension: rst

repo_name: vuamitom/geoalchemy


text:
# Build notes

## Alternatives

Thanks to Adolfo Villafiorita for all the work on packaging reveal.js (w/ s9).
Keep it up.
See <https://github.com/avillafiorita/slideshow-reveal.js>

## Update Notes

Get zip archive from release page
-> <https://github.com/hakimel/reveal.js/releases>

For now removed /test folder and some "internal build stuff" e.g.

*Build/Test*:
- .travis.yml
- Gruntfile.js

*Packaging*:
- bower.json
- package.json

*GitHub*:
- CONTRIBUTING.md
- README.md
- .gitignore

## Test Presentations

Rename index.html => test.html and
demo.html => test.demo.html


text:
## Streams

- Stream is a flow of data or flow of characters, streams are used for accessing the data from outside the program. From external sources or destination. We can have data from external source to program or vice-versa.

- Program can get data from keyboard, send data to monitor, read and write data to a file or from a network. There are various sources for program to receive and send data. There are Input Output streams called I/O. There are built-in classes present in C++ to access I/O streams that we can make use of.

- Name of class is **ios** i.e. input output stream. From this we have `istream` class for input stream and `ostream` class for output stream. For **accessing files** there are classes available called `ifstream` input file stream and `ofstream` output file stream.

- For input stream from the keyboard, there is already an object present in iostream header file called `cin` and cout object of ostream class used to output to a device your data.

## File Handling

```cpp
#include <fstream>
#include <iostream>
int main()
{
    ofstream outfile("file.txt",ios::app); // Associate outfile object with the file passed to it. What we write to outfile object gets associated with the file.
    // To insert
    outfile << "Hello"<<endl; // Write Hello and switch to new line
    outfile << 25<<endl; // Write 25 and go to new line.
    outfile.close(); // To close the file.
}
```

- If the file is not present in that case fill will be created if we are using output file stream ofstream in our code. If there is some content in the file in that case content will be truncated or removed. If you do not want data to be overwritten with new data you can openfile using **append mode** passed to the object using `ios::app`. Similarly to truncate the mode is `ios::trunc`.

## Type of Files: Text and Binary

- Text files are human readable and binary files are machine readable, what this means is if you write 23 in binary file it will be written in binary 0s and 1s form whereas in txt file 2 of 23 gets converted to ASCII code and 3 to its respective ASCII code i.e. 50 for 2 in ASCII and 51 for 3 in ASCII. For TXT notepad or any other text editor will convert every 8 bit of binary to ASCII code and look it up and convert to corresponding character.

- To read and write data in binary in C++ `ios::binary` mode has to be used. Binary form is faster as for txt files conversion is required. Space wise as well txt takes up more space as compared to binary files.

## Manipulators

- Manipulators are used to enhance the strings or to format strings. When we want to write the data, to write the data we can adopt some formats. We have manipulators available for different data types.

- For **integer** we have following manipulators available : `hex`, `oct`, `dec` for hexadecimal form, octal and decimal form respectively.

```cpp
#include iostream
using namespace std;
int main(){
    cout<< hex << 163; // Will give output as A3
    cout << bin << 43; // Will display binary of 43
}
```

- For float we have manipulators like  `fixed` and `scientific` to display the output in different formats.

path: /18. IO Streams/README.md


text:
---
author: steph_kim
categories: app-development
excerpt: "Call Fourier Detrend algorithm in your Shiny app!"
excerpt-short: "Call machine learning algorithms directly from R Shiny."
exclude_from_search: false
github: https://github.com/algorithmiaio/sample-apps/tree/master/shiny-r/fourier-detrend-example
image:
    teaser: /language_logos/rstudio.svg
layout: article
permalink: /integrations/shiny/
redirect_from:
  - /tutorials/sample-apps/shiny-app
show_related: false
tags: [integrations, app-development]
title: "Shiny App"
---

The full sample code can be found in the GitHub repo:  FORK

Before you get started with this Shiny sample app, check out our Algorithmia R language Client and when you want to work with your own data, read up on [Algorithmia's Data Portal](/data), which offers three different ways to store your data, all available via the [Data API](http://docs.algorithmia.com/#data-api-specification).

Here's a basic example of how to call an algorithm via our REST API inside a Shiny app, which updates the UI based on the API call and check out the example on shinyapps.io:

{% include toc.html %}

{% highlight R %}
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
#    http://shiny.rstudio.com/
#

library(shiny)
library(ggplot2)
library(algorithmia)

# Define UI for application that draws a histogram
ui <- fluidPage(

   # Application title
   titlePanel("NY Births with Fourier Detrend"),

   # Sidebar with a slider input for number of bins
   sidebarLayout(
      sidebarPanel(
         sliderInput("bins",
                     "K strongest frequencies:",
                     min = 1,
                     max = 10,
                     value = 2)
      ),

      # Show a plot of the generated distribution
      mainPanel(
         plotOutput("distPlot")
      )
   )
)

fourier_detrend <- function(x) {
  client <- getAlgorithmiaClient("YOUR_API_KEY")
  algo <- client$algo("TimeSeries/FourierDetrend/0.1.0")
  result <- algo$pipe(x)$result
}

# Define server logic required to draw plot
server <- function(input, output) {
  births <- scan("http://robjhyndman.com/tsdldata/data/nybirths.dat")
  # Update the plot based on UI slider
  update_plot = reactive({
    data_input <- list(as.list(births), input$bins)
    return(unlist(fourier_detrend(data_input)))
  })

   output$distPlot <- renderPlot({
     detrend_data <- update_plot()
     dbl <- ts(detrend_data, frequency=12, start=c(1946,1))
     autoplot(dbl, ts.colour = "#00B8D4")
   })
}

# Run the application
shinyApp(ui = ui, server = server)

{% endhighlight %}

repository: algorithmiaio/dev-center

branch_name: refs/heads/develop

gha_language: CSS

repo_name: algorithmiaio/dev-center


text:
[[Computer Science]]

# Algorithm
- Logical sequence of steps that solve a problem
- Set of _unambiguous_ instructions for solving a problem in a _finite_ amount of time using a _finite_ amount of data
- Measure performance with [[Big O]] notation

## Specific Algorithms
### Search Algorithms
- Sequential Search
- [[Binary Search]]

### Sorting Algorithms
- [[Selection Sort]]
- [[Bubble Sort]]
- [[Insertion Sort]]
- [[Quicksort]]

## Resources

### Books
- [[Grokking Algorithms]]
- [Algorithmica](https://en.algorithmica.org/)

gha_language: TypeScript


text:
---
title: FindContact
uid: pref_findcontact
description: Preference section FindContact
author: {github-id}
keywords: database
so.topic: reference
---

# Preference section FindContact

[!include[SQL](./includes/to-view-pref.md)]

```SQL
SELECT * FROM UserPreference WHERE prefsection='FindContact'
```

Finds companies dialog.

| Preference | Description | Control type | Access |
|---|---|---|---|
| Code | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| Email | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| Expanded | [!include[pref](./includes/pref-filter.md)] | Bool | Wizard |
| FirstName | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| LastName | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| Name | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| Number | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| OrgNr | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| Phone | [!include[pref](./includes/pref-filter.md)] | Text | Wizard |
| SearchType | [!include[pref](./includes/pref-filter.md)] | Number | Wizard |

repository: ArildEik/superoffice-docs

repo_name: ArildEik/superoffice-docs


text:
---
layout: posts
title:  "SST Partitioning toggle"
date:   2023-05-15
categories:
  - chaos_experiment
  - configuration
tags:
  - availability
  - data
authors: zell
---

# Chaos Day Summary

On this chaos day I wanted to experiment with a new experimental feature we have released recently. The [enablement of the partitioning of the SST files in RocksDB](https://github.com/camunda/zeebe/pull/12483). This is an experimental feature from RocksDb, which we made available now for our users as well, since we have seen great benefits in performance, especially with larger runtime data.

I wanted to experiment a bit with the SST partitioning and find out whether it would be possible to enable and disable the flag/configuration without issues.

**TL;DR;** The first experiment was successful, it looks like we can enable and disable the partitioning without impacting the execution of one existing PI. We need to experiment a bit more with larger data sets to force RocksDB compaction, to be fully sure.

<!--truncate-->

## Chaos Experiment

For our chaos experiment we set up again our [normal benchmark cluster](https://github.com/camunda/zeebe/tree/main/benchmarks/setup), this time without any clients (no workers/starters).

Setting all client replicas to zero:
```diff
$ diff default/values.yaml zell-chaos/values.yaml
40c40
<   replicas: 3
---
>   replicas: 0
47c47
<   replicas: 1
---
>   replicas: 0
```

The experiment we want to do on this chaos day will look like the following:

**First part:**

 * Verify steady state:
   * verify the readiness of the cluster
   * deploy a process model (which contains a [simple model](https://github.com/zeebe-io/zeebe-chaos/blob/main/go-chaos/internal/bpmn/one_task.bpmn))
 * Chaos Action:
   * start a process instance (PI), with a service task
   * enable the SST partitioning
   * restart the cluster
   * verify the readiness
   * verify that job is activatable
   * complete the job (in consequence the PI)

**Second part:**

* Chaos Action:
    * start a process instance (PI), with a service task
    * disable the SST partitioning
    * restart the cluster
    * verify the readiness
    * verify that job is activatable
    * complete the job (in consequence the PI)

### Expected

When operating a cluster, I can enable the SST partitioning without an impact on executing existing process instances. Existing PIs should still be executable and completable.

### Actual

As linked above I used again our [benchmark/setup](https://github.com/camunda/zeebe/tree/main/benchmarks/setup) scripts to set up a cluster.

#### First Part: Verify Steady state
To verify the readiness and run all actions I used the [zbchaos](https://github.com/zeebe-io/zeebe-chaos/tree/zbchaos-v1.0.0) tool.

Verifying readiness is fairly easy with zbchaos.

```shell
$ zbchaos verify readiness -v
Connecting to zell-chaos
Running experiment in self-managed environment.
Pod zell-chaos-zeebe-0 is in phase Pending, and not ready. Wait for some seconds.
[...]
Pod zell-chaos-zeebe-0 is in phase Running, and not ready. Wait for some seconds.
Pod zell-chaos-zeebe-0 is in phase Running, and not ready. Wait for some seconds.
All Zeebe nodes are running.
```

We then deploy the mentioned simple process model:
```shell
$ zbchaos deploy process -v
Connecting to zell-chaos
Running experiment in self-managed environment.
Port forward to zell-chaos-zeebe-gateway-7bbdf9fd58-dl97j
Successfully created port forwarding tunnel
Deploy file bpmn/one_task.bpmn (size: 2526 bytes).
Deployed process model bpmn/one_task.bpmn successful with key<PHONE_NUMBER>685249.
Deployed given process model , under key<PHONE_NUMBER>685249!
```

#### First Part: Chaos Action

As the first step in the chaos action we create a process instance.

```shell
$ zbchaos verify instance-creation -v
Connecting to zell-chaos
Running experiment in self-managed environment.
Port forward to zell-chaos-zeebe-gateway-7bbdf9fd58-dl97j
Successfully created port forwarding tunnel
Send create process instance command, with BPMN process ID 'benchmark' and version '-1' (-1 means latest) [variables: '', awaitResult: false]
Created process instance with key<PHONE_NUMBER>685251 on partition 1, required partition 1.
The steady-state was successfully verified!
```

Next, we enable the SST partitioning in our broker configuration, we can do this in the `values.yaml` file and run a `helm update`.

```shell
$ diff ../default/values.yaml values.yaml
85a86
>     zeebe.broker.experimental.rocksdb.enableSstPartitioning: "true"
```

```shell
$ make update
helm upgrade --namespace zell-chaos zell-chaos zeebe-benchmark/zeebe-benchmark -f values.yaml
Release "zell-chaos" has been upgraded. Happy Helming!
NAME: zell-chaos
LAST DEPLOYED: Mon May 15 15:54:24 2023
NAMESPACE: zell-chaos
STATUS: deployed
REVISION: 2
NOTES:
# Zeebe Benchmark

Installed Zeebe cluster with:

 * 3 Brokers
 * 2 Gateways

The benchmark is running with:

 * Starter replicas=0
 * Worker replicas=0
 * Publisher replicas=0
 * Timer replicas=0
```

> **Note**
> Changing the configmap doesn't restart pods! We need to delete all Zeebe pods, to apply the configuration.

```shell
$ k delete pod -l app=camunda-platform
pod "zell-chaos-zeebe-0" deleted
pod "zell-chaos-zeebe-1" deleted
pod "zell-chaos-zeebe-2" deleted
pod "zell-chaos-zeebe-gateway-7bbdf9fd58-8j7d6" deleted
pod "zell-chaos-zeebe-gateway-7bbdf9fd58-dl97j" deleted
```

Next we can use `zbchaos verify readiness` again to await the readiness of the cluster.
```
All Zeebe nodes are running.
```

Taking a look at the logs of the broker we can also see that the broker configuration was correctly set:

```
   \"disableWal\" : true,\n      \"enableSstPartitioning\" : true\n    }
```

> **Note**
> Right now zbchaos can't complete an job (missing feature). We use zbctl for that, we need to port-forward to the gateway in order to send the commands.

```shell
$ k port-forward svc/zell-chaos-zeebe-gateway 26500
Forwarding from <IP_ADDRESS>:26500 -> 26500
Forwarding from [::1]:26500 -> 26500

```

Activating the right job.
```shell
$ zbctl --insecure activate jobs benchmark-task
{
  "jobs":  [
    {
      "key":  "2251799813685256",
      "type":  "benchmark-task",
      "processInstanceKey":  "2251799813685251",
      "bpmnProcessId":  "benchmark",
      "processDefinitionVersion":  1,
      "processDefinitionKey":  "2251799813685249",
      "elementId":  "task",
      "elementInstanceKey":  "2251799813685255",
      "customHeaders":  "{}",
      "worker":  "zbctl",
      "retries":  3,
      "deadline":  "1684173544716",
      "variables":  "{}"
    }
  ]
}
```
Completing the job and the PI.
```shell
$ zbctl complete job<PHONE_NUMBER>685256 --insecure
Completed job with key '2251799813685256' and variables '{}'
```

#### Second Part:

Create again a process instance `$ zbchaos verify instance-creation`

```
Created process instance with key<PHONE_NUMBER>685263 on partition 1, required partition 1.
The steady-state was successfully verified!
```

Disabling the configuration again, and running the update.
```shell
$ diff default/values.yaml zell-chaos/values.yaml
85a86
>     zeebe.broker.experimental.rocksdb.enableSstPartitioning: "false"

$ make update
helm upgrade --namespace zell-chaos zell-chaos zeebe-benchmark/zeebe-benchmark -f values.yaml
Release "zell-chaos" has been upgraded. Happy Helming!
NAME: zell-chaos
LAST DEPLOYED: Mon May 15 20:00:53 2023
...

$ k delete pod -l app=camunda-platform
$ zbchaos verify readiness
All Zeebe nodes are running.
```

Again the job completion worked without problems (skipping here the port-forward and activate output)

```
$ zbctl complete job<PHONE_NUMBER>685268 --insecure
Completed job with key '2251799813685268' and variables '{}'
```

:white_check_mark: The experiment was successful.

#### Further investigation

![](general-after2.png)

When running the experiment I also observed the metrics of the cluster and was not able to see any differences in the snapshot file counts, which we would expect on the SST partitioning (there should be more files).

Before the experiment:
![](snapshot-before.png)

After the experiment, we still see that for each partition we have around ~6 files.
![](snapshot-after2.png)

In order to make sure whether the options have been applied correctly I investigated the RocksDB log files and option files.

In the current LOG file, we can see the current options printed, which is indeed the disabled partitioner. Since this is the default as well it is not a proof yet.

```
2023/05/15-18:01:46.223234<PHONE_NUMBER>92096 [/column_family.cc:621] --------------- Options for column family [default]:
2023/05/15-18:01:46.223237<PHONE_NUMBER>92096               Options.comparator: leveldb.BytewiseComparator
2023/05/15-18:01:46.223239<PHONE_NUMBER>92096           Options.merge_operator: None
2023/05/15-18:01:46.223241<PHONE_NUMBER>92096        Options.compaction_filter: None
2023/05/15-18:01:46.223242<PHONE_NUMBER>92096        Options.compaction_filter_factory: None
2023/05/15-18:01:46.223244<PHONE_NUMBER>92096  Options.sst_partitioner_factory: None
```

What we can see in the runtime folder of the partition is that there exist two Options files, an older one `OPTIONS-000014`, and a newer one `OPTIONS-000023`.

The older one contains the expected configuration for the SST partitioning:

```shell
$ cat OPTIONS-000014
[CFOptions "default"]
...
  sst_partitioner_factory={id=SstPartitionerFixedPrefixFactory;length=8;}
```

The most recent options file has the configuration set to null.
```shell

$ cat OPTIONS-000023
[CFOptions "default"]
...
sst_partitioner_factory=nullptr

```

We can see that the current snapshot only copied the most recent options file:

```shell
$ ll ../snapshots/188-4-230-244
total 56
drwxr-xr-x 2 root root 4096 May 15 18:13 ./
drwxr-xr-x 3 root root 4096 May 15 18:13 ../
...
-rw-r--r-- 2 root root 7015 May 15 18:01 OPTIONS-000023
-rw-r--r-- 1 root root   92 May 15 18:13 zeebe.metadata
```

### Conclusion

We were able to toggle the SST partitioning flag without problems back and forth. We were able to make still progress on an existing process instance, which we wanted to prove.

Nevertheless, we need to prove this once more for multiple process instances (100-1000 PIs), which cause or forces compaction of the SST files. Right now I'm not 100% convinced whether this experiment was enough, but it was a good first step.

repository: zeebe-io/zeebe-chaos

gha_language: Go

repo_name: zeebe-io/zeebe-chaos