text:
# nystudio107/devmode Change Log

## 2.7.0 - 2022.12.14
### Changed
* Move to Vite 4.x

## 2.6.5 - 2022.05.04
### Added
* Determine the container name separator character by checking the Docker Compose API version at runtime

### Changed
* Updated to release version of Craft CMS 4

## 2.6.4 - 2022.05.02
### Fixed
* Clean up initial check for `composer.lock` or `vendor/autoload.php` to ensure the first-time install is done

## 2.6.3 - 2022.04.28
### Changed
* Updated to Craft CMS `4.0.0-RC1` & latest Composer deps

## 2.6.2 - 2022.04.15
### Changed
* Remove `enableLogging` and `enableProfiling` from `config/db.php` as they've now gone away
* Changed `bootstrap.php` to allow `.env`-set environment variables override existing injected environment variables ([#82](https://github.com/craftcms/craft/issues/82))

## 2.6.1 - 2022.04.13
### Added
* Added Craft CMS 4 db dump
* Added `config/custom.php` for custom config settings

### Changed
* Added compressed `.gz` db dump support
* Set `enableLogging` and `enableProfiling` in `config/db.php`
* Use `"eslint": "^7.0.0"` to avoid package version conflicts with `vite-plugin-eslint`

## 2.6.0 - 2022.04.08
### Changed
* Switched over to Craft CMS 4.0.0-beta.4

## 2.5.8 - 2022.04.08
### Changed
* Run migrations first via `composer.json` scripts, because Craft won't apply Project Config if there are pending migrations
* Added `tty: true` back in now that the issue has been fixed in the Docker Compose API `2.4.1` ([#9348](https://github.com/docker/compose/pull/9348))
* Wait for both `vendor/autoload.php` as we as `composer.lock` before starting up the queue listener

## 2.5.7 - 2022.04.06
### Changed
* Updated to latest `composer.json` and `package.json` deps
* Switched over to using a script for db seeding

## 2.5.6 - 2022.03.30
### Changed
* Fix `WORKDIR` in `php-prod-craft` container so `make craft` etc. commands work as expected
* Fix `WORKDIR` in `node-dev-vite` container so `make npm` etc. commands work as expected
* Fix linting issue with `import.meta.hot`

## 2.5.5 - 2022.03.28
### Changed
* Add `disableProcessTimeout` to the `post-craft-update` Composer scripts, and run Project Config before migrations

## 2.5.4 - 2022.03.26
### Added
* Ensure permissions on directories Craft needs to write to

## 2.5.3 - 2022.03.26
### Added
* Added more logging to indicate when a container is waiting for another service to start up, and when seeding a database is complete
* Run `composer craft-update` after a `composer install` is done via `composer_install.sh`

### Changed
* Moved permissions setting to Docker image creation

## 2.5.2 - 2022.03.26
### Added
* Dramatically sped up the startup time for the PHP containers by moving the permissions setting script to run asynchronously in the queue container via the `run_queue.sh` script

## 2.5.1 - 2022.03.17
### Added

* Run migrations / project config changes via the `run_queue.sh` script, only after the db container responds

## 2.5.0 - 2022.03.17

### Added
* Significantly increased startup times via a `composer_install.sh` script that only runs `composer install` at container startup time if `composer.lock` or `vendor/` is missing
* Significantly increased startup times via a `npm_install.sh` script that only runs `npm install` at container startup time if `package-lock.json` or `node_modules/` is missing

### Changed
* Added a `sleep 60` in the `run_queue.sh` containers, so they don't run the "keepalive" script until the other containers have started
* refactor: Remove `tty: true` which causes console output to not appear in Docker Composer API 2.3.0. ref: https://github.com/docker/compose/issues/9288

## 2.4.0 - 2021.07.01
### Changed
* Updated to Craft CMS 3.7.0-beta.5

## 2.1.11 - 2020.12.03
### Changed
* Moved to webpack 5 for the build process
* Numerous other changes globbed together

## 1.1.3 - 2020.02.17
### Changed
* Containerized the local dev environment via Docker

## 1.1.2 - 2019.08.10
### Changed
* Moved the `license.key` over to `LICENSE_KEY` environmental variables
* Moved the plugin license over to environmental variables
* Re-enabled the Service Worker

## 1.1.1 - 2019.08.10
### Changed
* Converted over to using Project Config's `project.yaml` and disabled `allowAdminChanges` in production

## 1.1.0 - 2019.08.10
### Added
* Open sourced it all
* Added auto-completion via [Auto-Complete Craft CMS 3 APIs in Twig with PhpStorm](https://nystudio107.com/blog/auto-complete-craft-cms-3-apis-in-twig-with-phpstorm)
* Added webpack for the build system as per [An Annotated webpack 4 Config for Frontend Web Development](https://nystudio107.com/blog/an-annotated-webpack-4-config-for-frontend-web-development)
* Added auto-complete searching through paginated past episodes
* Added an experimental light/dark theme
* Refactored the JSON-LD structured data as per [Annotated JSON-LD Structured Data Examples](https://nystudio107.com/blog/annotated-json-ld-structured-data-examples)
* Added [webmentions](https://webmention.io/) support for podcast episodes via Twig/custom module
* Added a display of upcoming episodes pulled from Trello
* Added Google AMP pages

### Changed
* Upgraded to Tailwind CSS `^1.0.0`
* Refactored base layout templates to be more flexible, AMP vs. regular, AJAX, etc.

## 1.0.1 - 2017.12.01
### Added
* Added accessible tabhandler.js
* Added Tailwind CSS
* Added support for Redis via `app.php`
* Fixed `package.json` paths for `web/`
* Cleaned up the default templates
* Added `src/conf/` for Nginx or other configuration files

## 1.0.0 - 2017.11.26
### Added
* Initial release

Brought to you by [nystudio107](https://nystudio107.com/)

branch_name: refs/heads/develop

gha_language: Twig


text:
# SDL_text
A wrapper for SDL_ttf so you can render text faster with fewer lines.

# How to Build
  **To build the library**
  run the command "make buildLib"

  **To build the example**
  run the command "make buildExample"

# How to use SDL_Text (*nessacerry* attributes)
  First you'll need to create your text with **SDL_Text text {};**

  the SDL_Text struct has 8 attributes you need to include

  std::string text - the text you want to display

  int width and int length  - your text's width and length

  int x and int y - your text's  x and y

  SDL_Color - your text's color (More info about SDL_Color @ https://wiki.libsdl.org/SDL_Color)

  and, std::string font - your text's font

  a simple example of this is

    SDL_Text text3 = {"Text3",50,50,50,300,300,{255,0,0,0},"Roboto-Regular.ttf"};

# How to use SDL_Text (*optional* attributes)

  **Rect**

  bool background - toggles background (auto false) (rect only)

  SDL_Color bgcolor - your text's background color (rect only) (More info about SDL_Color @ https://wiki.libsdl.org/SDL_Color)

  bool fill - toggles if you want to fill your background rect or not

  bgrect - optional rect for your background if you want to make it difer from your text's rect (auto your text's rect) (both Rect and Image)

  **Image**

  bool bgImage - toggles background (auto false) (image only)

  const char* file - the file of your background's image

  bgrect - optional rect for your background if you want to make it difer from your text's rect (auto your text's rect) (both Rect and Image)

# SDL_Tect functions
  bool init() - function to initialise yor SDL_Text object (Your code will not work if you don't include this) returns true if it worked and false if there was in error

  bool draw(SDL_Renderer* renderer) - draws your text/background on the SDL renderer

  void GetError() - outputs any SDL/SDL_TTF/SDL_text errors in the terminal

  **Simple Error Handling**
    if (!text.init()){text.TextGetError}
    or
    if (!text.draw(renderer)){text.TextGetError}

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
<--
.. title: Something Bugging Me
.. date: 2010-07-20 23:24:00
.. tags: collision, bug, summer
.. category: old
.. slug: something-bugging-me
.. author: Jesse
.. has_math: true
-->

[![image](http://4.bp.blogspot.com/_SYZpxZOlcb0/TEZsSZmSnUI/AAAAAAAAAB8/6ArQgAym3Fk/s200/3063594778_019489ef21.jpg)](http://4.bp.blogspot.com/_SYZpxZOlcb0/TEZsSZmSnUI/AAAAAAAAAB8/6ArQgAym3Fk/s1600/3063594778_019489ef21.jpg)
Apparently July is a quiet month here at the Virtuosi. We're busy with
research, travel, vacation, etc. I, myself, have been busy with only a
few of those things, though I've also been studying for my qualifying
exam, which is coming up in less than a month. However, that's not the
question before us today. Today I'd like to think about the density of
bugs in the air. I was walking outside this past weekend, there was a
fierce wind blowing, and twice in five minutes a bug hit my ear. That
seemed like a lot. But for 1 hour of previous walking no bugs hit my
ear. How many bugs would there have to be per cubic meter of air to
achieve that rate? We'll restrict ourselves to small bugs, like nats,
nothing really mobile like house flies. We have an observed bug impact
rate of 2 bug/hour. I'd estimate that my ear is \~1"x2", an area of 2
in^2. Let's convert to metric, that's about 13 cm^2. Next I need to
know how fast the wind was blowing. I'd guess about 15 miles per hour,
it was a good stiff wind off the lake. From here, we just need to write
down an equation for the bug collision rate. The simplest theory I can
imagine would go something like this: (Bug density)(ear cross
section)(wind speed)=(collision rate) In the above I've assumed that the
bugs are moving with the wind (hence my initial assumption that the bugs
are small, and thus will more or less move with the wind). If you check
the above, it has the right units, bugs per time on both sides of the
equation. Now we just need to solve for the bug density, we'll call that
*B*, in terms of the rest of our knowns: ear cross section area *A*,
wind speed *v*, and collision rate *R*. This gives
$$B=\frac{R}{Av}=\frac{2 bug/hour}{(13cm^2)(15mph)}$$ We've got a big
of a units problem with our wind speed in miles per hour and our ear
area in cm^2, so I'll convert from mph to cm/hour, and come out with a
bug density of $$B=\frac{2 bug/hour}{(13cm^2)(2.4
Mcm/hour)}=6.4*10^{-8}bugs/cm^3$$ That seems like an absurdly small
number. Let's convert from cm^3 to m^3. That gives us .064 bugs/m^3.
This still seems rather low to me. Put another way, we'd need \~16 m^3
to find 1 bug (this is only \~160 bugs/olympic swimming pool!). What
might be amiss with the estimate? Well, I'm fairly happy with the ear
area. I could be misremembering the length of my walk. More importantly,
I'd wager that not all of my walk was perpendicular to the direction the
wind was blowing. If I were at an angle to the wind I'd have a
commensurately smaller ear surface area presented to the wind. Of
course, this will at best probably gain us around a factor of two. I'm
not very familiar with wind speeds, so maybe we could pick up another
factor of two there. Still, I imagine that the main problem with my
calculation is that I assumed that all of the bugs were stationary and
would be blown against my ear. Even little bugs are very mobile (as you
well know if you've ever tried to swat them), and were probably actively
trying to avoid my ear for the most part.  How common are they? You tell me.
Make an estimate for the bug density of air, compare it to my senseless
bug density, and find the percent of bugs that fit my description! Or
not, if you only come here to watch the rest of us toil over our
calculations.

repository: alexalemi/virtuosi

branch_name: refs/heads/master

gha_language: CSS

repo_name: alexalemi/virtuosi


text:
# ``XCTHealthKit``

<!--

This source file is part of the XCTHealthKit open source project

SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)

SPDX-License-Identifier: MIT

-->

XCTHealthKit is an XCTest-based framework to test the creation of HealthKit samples using the Apple Health App on the iPhone simulator.

You can use XCTHealthKit in your UI tests.
The framework has the following functionalities:

### Add Mock Data Using the Apple Health App

Use the `XCTestCase`'s `exitAppAndOpenHealth(_: HealthAppDataType) throws` function passing in an `HealthAppDataType` instance to add mock data using the Apple Health app:
```swift
import XCTest
import XCTHealthKit

class HealthKitUITests: XCTestCase {
    func testAddMockDataUsingTheAppleHealthApp() throws {
        try exitAppAndOpenHealth(.electrocardiograms)
        try exitAppAndOpenHealth(.steps)
        try exitAppAndOpenHealth(.pushes)
        try exitAppAndOpenHealth(.restingHeartRate)
        try exitAppAndOpenHealth(.activeEnergy)
    }
}
```

### Handle the HealthKit Authorization Sheet

You can use the `XCUIApplication`'s `handleHealthKitAuthorization() throws` function to handle the HealthKit authorization sheet:
```swift
import XCTest
import XCTHealthKit

class HealthKitUITests: XCTestCase {
    func testHandleTheHealthKitAuthorizationSheet() throws {
        let app = XCUIApplication()
        app.launch()

        app.buttons["Request HealthKit Authorization"].tap()
        try app.handleHealthKitAuthorization()
    }
}
```

repository: StanfordBDHG/XCTHealthKit

gha_language: Swift

gha_license_id: MIT

repo_name: StanfordBDHG/XCTHealthKit


text:
---
layout: default
---

# 1996-07-03 - Re: Net and Terrorism.

## Header Data

From<EMAIL_ADDRESS>(Timothy C. May)

To<EMAIL_ADDRESS>Message Hash: 8e250b71742123cbed3af4dcb7f1886f51efbfeb1425f53b18b9f01baadfeb02

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-07-03 05:58:35 UTC

Raw Date: Wed, 3 Jul 1996 13:58:35 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Timothy C. May)
Date: Wed, 3 Jul 1996 13:58:35 +0800
To<EMAIL_ADDRESS>Subject: Re: Net and Terrorism.
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 9:13 PM 7/2/96, snow wrote:
>On Tue, 2 Jul 1996, snow wrote:

>> Gain control of the power grid (I don't know how possible this is)
>> and selectively brown out certain sections of the city during peak demand
>> periods. Make it obvious, then do the preceeding idea.

>        Ummm... Just in case anyone is thinking it right now, NO, I
>didn't. If this outage was deliberate, I had nothing to do with it. I was
>just postulating possibilities.

Hmmhhh....I post about the "Net and Terrorism" on Sunday, and the Viper
Militia and their plans to blow up several courthouses in Phoenix are
revealed a few hours later....Snow posts about using computers to knock out
the power grid, and a few hours later power goes out over 15 western
states....

Coincidence? I think not.

But we can test this hypothesis:

"Alien spaceship images will appear in thousands of darkened rooms and will
trigger mass hysteria."

We'll find out tomorrow if Cypherpunks really do have the Power.

--Tim

Boycott "Big Brother Inside" software!
We got computers, we're tapping phone lines, we know that that ain't allowed.
---------:---------:---------:---------:---------:---------:---------:----
Timothy C. May              | Crypto Anarchy: encryption, digital money,
<EMAIL_ADDRESS>408-728-0152 | anonymous networks, digital pseudonyms, zero
W.A.S.T.E.: Corralitos, CA  | knowledge, reputations, information markets,
Licensed Ontologist         | black markets, collapse of governments.
"National borders aren't even speed bumps on the information superhighway."

{% endraw %}
```

## Thread

+ Return to [July 1996](/archive/1996/07)

+ Return to "[snow <snow@smoke.suba.com>](/authors/snow_snow_at_smoke_suba_com_)"
+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_got_net_timothy_c_may_)"

+ 1996-07-03 (Wed, 3 Jul 1996 13:58:35 +0800) - Re: Net and Terrorism. -<EMAIL_ADDRESS>(Timothy C. May)_
  + 1996-07-04 (Thu, 4 Jul 1996 12:55:30 +0800) - [Re: Net and Terrorism.](/archive/1996/07/515376fd0a03a3b8239c6cf328dfb8149719a169c5e0f97efe82297fca70d006) - _snow<EMAIL_ADDRESS>


text:
# jsonnet

The gocolor jsonnet source is in a sub-directory within this directory so that the jsonnetfile.json and jsonnetfile.lock.json
files can not be contained within the same directory as main.jsonnet. This is necessary when loading this jsonnet into argocd
because the argocd jsonnet parser tries to parse the jsonnetfile.json and jsonnetfile.lock.json files as jsonnet source. This
should be fixed at some point in the near future with [this](https://github.com/argoproj/argo-cd/issues/4432) issue.

## Useful Documentation

* https://jsonnet-libs.github.io/k8s-alpha/1.18/
* https://jsonnet.org/

## Compiling Locally

To compile the jsonnet source locally execute the following from the [k8s/jsonnet](.) directory:

```bash
jsonnet -J vendor ./main/main.jsonnet
```

To specify top level arguments basic arguments use `tla-str`:

```bash
jsonnet -J vendor ./main/main.jsonnet --tla-str port=80
```

To specify top level object arguments use `tla-code`:

```bash
jsonnet -J vendor ./main/main.jsonnet --tla-code 'envMap={"one":"two"}'
```

repository: spansari-cxone/gocolor

repo_name: spansari-cxone/gocolor


text:
# react-native-awesome-starter

This repository is initial development environment settings customed by Holy Kiwi Team (2018.09.19)

UPDATE 2018.10.27

## Contents

1. `react-native init`

2. use `typescript`

3. use `mobx` and `mobx-react`

4. connect with `code-push`

5. connect with `firebase`

(TODO)
- add assets/font
- use `react-native-splash-screen`
- use `react-native-fast-image`
- use `react-navigation` or `react-native-navigation`

## Version

- `react`: 16.5.0
- `react-native`: 0.57.4

## How to set up

### 1. init your project with `react-native-cli`

```bash
$ npm install -g react-native-cli
$ react-native init MyProject
$ cd MyProject
```

### 2. use `typescript`

```bash
$ yarn add --dev typescript
$ yarn add --dev react-native-typescript-transformer
$ yarn tsc --init --pretty --jsx react
$ touch rn-cli.config.js
$ yarn add --dev @types/react @types/react-native
```

#### write this code in `rn-cli.config.js`

```javascript
module.exports = {
  getTransformModulePath() {
    return require.resolve("react-native-typescript-transformer");
  },
  getSourceExts() {
    return ["ts", "tsx"];
  }
};
```

#### in order to migrate to typescript, rename `App.js` to `App.tsx`

#### add typescript test infra
```bash
yarn add --dev ts-jest
```

#### write this in `package.json`
```json
"jest": {
  "preset": "react-native",
  "moduleFileExtensions": [
    "ts",
    "tsx",
    "js"
  ],
  "transform": {
    "^.+\\.(js)$": "<rootDir>/node_modules/babel-jest",
    "\\.(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
  },
  "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
  "testPathIgnorePatterns": [
    "\\.snap$",
    "<rootDir>/node_modules/"
  ],
  "cacheDirectory": ".jest/cache"
}
```

### 3. use `mobx` and `mobx-react`

```bash
npm install --save mobx mobx-react
```

#### add babel-preset plugin `transform-decorators-legacy` in `.babelrc` to use decorator syntax
```json
{
  "presets": [
    "module:metro-react-native-babel-preset"
  ],
  "plugins": [
    "transform-decorators-legacy"
  ]
}
```

#### Trouble Shooting
if you have error like this
```
error: bundling failed: Error: The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.
```

```
npm install --save-dev @babel/plugin-proposal-decorators
```

```
{
  ...
  "plugins": [
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
  ]
}
```

#### let `experimentalDecorators` be true in `tsconfig.json`
```
{
  "compilerOptions": {
    ...
    "experimentalDecorators": true
    ...
  }
}
```

### 4. connect with `code-push`

#### install `code-push-cli`
```bash
npm install -g code-push-cli
code-push register
```

#### register your app in `code-push`
```bash
code-push app add <AppName-Android>
code-push app add <AppName-iOS>
```

#### you can check apps that you registered by this command.
```bash
code-push app list
```

```bash
npm install --save react-native-code-push@latest
react-native link react-native-code-push
```

### iOS

#### write Staging Deployment Key in `info.plist`
```
<key>CodePushDeploymentKey</key>
<string><Staging Deployment Key></string>
```

### Android

#### write Staging Deployment Key in `MainApplication.java`
```java
@Override
protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new CodePush("<Staging Deployment Key>", getApplicationContext(), BuildConfig.DEBUG)
    );
}
```

### 5. connect with `firebase`

```bash
npm install --save react-native-firebase
react-native link react-native-firebase
```
create your project in Firebase

### Analytics

#### iOS

##### Setup `GoogleService-Info.plist`

install `GoogleService-Info.plist` and move to `ios/[YOUR APP NAME]` directory

##### Initialize Firebase

in AppDelegate.m

```
#import <Firebase.h>

[FIRApp configure];
```

##### Install Firebase Library

in PodFile
```
# Required by RNFirebase
pod 'Firebase/Core', '~> 5.9.0'
```

```
pod install
```

#### Android

##### Setup `google-services.json`

install `google-services.json` and move to `android/app` directory

write this code in `app.gradle` (*project* level)
```gradle
buildscript {
  // ...
  dependencies {
    // ...
    classpath 'com.google.gms:google-services:4.0.1'
  }
}
```

write this code very bottom in `app.gradle` (*app* level)
```gradle
apply plugin: 'com.google.gms.google-services'
```

##### Initialize Firebase

```gradle
dependencies {
  // This should be here already
  implementation project(':react-native-firebase')

  // Firebase dependencies
  implementation "com.google.android.gms:play-services-base:15.0.1"
  implementation "com.google.firebase:firebase-core:16.0.3"

  ...
```

#### Analytics `logEvent`

##### You can track event with `logEvent` function

```javascript
firebase.analytics().logEvent(eventName, params);
// eventName: string, params: object
```

### Admob

#### iOS

##### Android

## Trouble Shooting

### Problem
When you build react-native application in Xcode
```
Xcode 10: Build input file double-conversion cannot be found
```
### Solution
```bash
$ cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../
$ cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh && cd ../../../../
```
reference: https://github.com/facebook/react-native/issues/21168

### Problem
error (when `pod install`)
```
In Podfile:
    React/CxxBridge (from `../node_modules/react-native`) was resolved to 0.57.2, which depends on
      Folly (= 2<IP_ADDRESS>)
```

### Solution
write this code in `Podfile`
```
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
```
reference: https://facebook.github.io/react-native/docs/integration-with-existing-apps.html

## Deprecated

### `styled-components`

### 3. use `styled-components` (ts)

```bash
yarn add --dev styled-components
```

#### make `index.ts` file in theme directory
```typescript
import * as styledComponents from "styled-components";

const {
  default: styled,
  css,
  injectGlobal,
  ThemeProvider
} = styledComponents as styledComponents.ThemedStyledComponentsModule<
  IThemeInterface
>;

export interface IThemeInterface {
  primaryColor: string;
}

export const theme = {
  primaryColor: "#e9e9eb"
};

export default styled;
export { css, injectGlobal, ThemeProvider };
```

> In `react-native`, you cannot use keyframes. You should use [`Animated`](https://facebook.github.io/react-native/docs/animated) API supported by `react-native`.

#### migrate `css` to `styled-components`
```tsx
// in App.tsx
const ContainerView = styled(View)`
    flex: 1;
    justify-content: center;
    align-items: center;
    background-color: #F5FCFF;
`;

class App extends Component {
  render() {
    return (
      <ContainerView>
        // ...
      </ContainerView>
    );
  }
}
```

## Reference

- [Facebook react-native official website](https://facebook.github.io/react-native/docs/getting-started.html)
- [TypeScript-React-Native-Starter](https://github.com/Microsoft/TypeScript-React-Native-Starter)
- [Styled-Components-Typescript-Example](https://github.com/patrick91/Styled-Components-Typescript-Example/blob/master/src/theme/index.ts)
- [CodePush 적용하기](https://github.com/kjk7034/ReactNativeStudy/blob/master/docs/CodePush.md)
- [react-native-firebase](https://github.com/invertase/react-native-firebase)
- [integration with existing apps](https://facebook.github.io/react-native/docs/integration-with-existing-apps#docsNav)
- [Snow 개발자 이성민님의 react-native 발표내용 정리](https://github.com/JonJee/deview-2018-review/blob/master/React%20Native:%20%EC%9B%B9%20%EA%B0%9C%EB%B0%9C%EC%9E%90%EA%B0%80%20%ED%95%9C%20%EB%8B%AC%20%EB%A7%8C%EC%97%90%20%EC%95%B1%20%EC%B6%9C%EC%8B%9C%ED%95%98%EA%B8%B0.md)


text:
As a user of an OpenShift cluster, most of the time you will only be a consumer of existing Operators which have been installed into the cluster. The primary use case involve helping you provision applications such as databases or middleware products, including message queuing systems, rules management systems etc. A typical developer looking to use these services should never have a need to create their own Operator.

If you do have a need to implement an Operator to manage use of an application, perhaps as a way of making it easier for users to consume your own product, to make that task easier you can use the [Operator SDK](https://github.com/operator-framework/operator-sdk). The Operator SDK can be installed on your own development system and supports the creation of operators using the Go programming language, Ansible, or by bundling up Helm charts into an Operator.

In this part of the workshop you will use the Operator SDK to create an Operator implemented in the Go programming language.

The benefit of using the Operator SDK's Go support is that it uses the controller-runtime library from the Kubernetes project, to make writing operators easier. The SDK provides:

* High level APIs and abstractions to write the operational logic more intuitively.
* Tools for scaffolding and code generation to bootstrap a new project quickly.
* Extensions to cover more common Operator use cases.

The general steps for creating an Operator using the SDK which you will be guided through are:

1. Creating a new Operator project using the SDK CLI.
2. Creating a new Custom Resource Definition using the SDK CLI.
3. Defining the Spec and Status sections of the custom resource type.
4. Adding your Custom Resource Definition (CRD) to the Kubernetes cluster.
5. Creating a new Kubernetes controller to handle your custom resources.
6. Writing the reconciliation logic for your controller.
7. Running the Operator to test your code against the Kubernetes cluster.
8. Using the SDK CLI to build and generate the operator deployment manifests.

The example Operator you will be creating implements a common pattern of Operators. That is, the creation and management of a set of pods, and scaling the number of pods.

repository: openshift-labs/lab-build-an-operator

gha_language: Python

repo_name: openshift-labs/lab-build-an-operator


text:
---
layout: post
title:  "What is DevOps?"
date:   2019-07-05 18:15:00 +0300
categories: sysadmin
summary: In this article I describe DevOps in my own opinion and based on my experience.
---

# Introduction

Hi friends, thanks for visiting my website and deciding to read this article, here I will put
my opinion and use my personal experience to describe DevOps one of the wrongly used concepts
these days in the field of Software Engineering and Delivery, let me start with this joke
that I heard in a video talking about DevOps:

"If you bring 10 Computer Science Scientists, put them in a room and ask to define DevOps
you will get 11 different definitions of DevOps" :)

So why 11 and we only have 10 scientists? Well if you ask me to define DevOps today and do
the same tomorrow I might give you two different ones but the main concepts are the same
and this is what we will study here and help understand them and use DevOps in your organization.

# What is not DevOps?
To make it easier to learn about DevOps we will start with what DevOps is not?
* DevOps is not a product that you can buy from any one or any company, if you decide
  to bring DevOps to your organization you cannot go and buy it from any store.
* DevOps is not a set of practices or steps that you must follow to bring it to your organization.
* DevOps is not solely a physical or mental concept that you can use in your organization but a
  combination of both you will learn more about this in the following sections.

The term DevOps was first coined by [Patrick Debois](https://newrelic.com/devops/what-is-devops) in 2009 to describe the importance of collaboration
between **Devs** and **Ops** in any organization to deliver **value to end users** more **rapidly**.

I highlighted the most important words in the last sentence about DevOps so let us talk about them now.

# Devs and Ops
Let us start by decoupling the word DevOps, this term consists of the combination of first three letters
from two words Developers and Operations.

Developers are the **people** who work on writing code and developing our applications and tools used to build
our products and Operations are the **people** who work to deploy these products to servers and networks
to become accessible by our clients all over the world, without Developers our servers are networks would just
be a big junk of hardware that does nothing and without Operations the products created by our Developers will
not leave their own work stations and will not be used by our clients at all.

This is where DevOps started, we need to value the roles of all of our people in the process of making our
products and making them available to the whole world, DevOps embraces the collaboration between Developers
and Operations to bring us faster and closer to our clients, it also makes everyone responsible for the Delivery
of value to end users.

Of course we also have many other departments including Marketing teams, Quality Assurance teams, managers and directors
and many more but here we focused on Developers and Operations because they are mentioned in the term DevOps, all of these
people any many more need to work together as a team for the benefit of the organization they work in.

# Value not products
In the last section I used the term product when talking about what Developers make and the term value when
talking about what is delivered to end users, I meant to use these two terms like this intentionally.

Developers create products like we said but what end users need is not the product only the value delivered
with the product that what really matters, these days there are many products around the world of similar types
many search engines, many programming languages and frameworks, many jobs sites, etc....

How will users choose between all of them? They will look for the product that gives them the best value, when they
need to compare two products its features, price, weak and strong points, uses will be taken into account to make
a final decision about what will be used.

So DevOps focuses on this concept and encourages Developers to create high value products and also take
end user feedback seriously when modifying their products and adding new features to deliver the best value
to our end users.

# Rapid Development
Here we are talking about Time to Market, we want our products to make it quickly to the market but not
so quick, full of bugs and lack some features, so how do we achieve this?

DevOps adopts concepts to help get our products to market easily and quickly such as Automation, testing,
Continuous Integration, Delivery and Deployment, monitoring etc...., we will talk about all these in
next sections.

Adopting DevOps helps us get to the market faster in the first launch and also make updates faster and cleaner
with no or minimal downtime, our products will not just stay as they were launched first, we need to update them
from time to time and when we use DevOps concepts right especially automation, testing and Continuous Deployment
we will be able to update them a lot easily and with no to minimal downtime during the updates.

Teams adopting DevOps are expected to update their products multiple times a day in contrast with teams not adopting
DevOps they might update once a month or 3 to 6 months, which makes fixing bugs and adding new features a very slow
process and users have to wait a long time to get bugs fixed and new features added.

# Mental side of DevOps
In the last sections we talked about DevOps mental side, how we should think when implementing DevOps, Devs and
Ops need to collaborate and are a single team, we need to deliver value to end users, we must adopt rapid development
concepts to get to the market quickly and be able to update our apps without downtime with multiple times a day.

The most important of all of these are the people who work in the organization and the end users, DevOps makes sure
that all Developers and Operations are working closely on the same page with other departments and with each other
and also be close to end users through feedback loops that help shape the future of our products to deliver more
value to clients.

We need to focus on these concepts before moving along to the tools that help us achieve all of this.

Hint: A common mistake by organizations who try to adopt DevOps is that they start with using the DevOps tool chain
before completing the change of mentality among their people (Devs, Ops, Marketing, Directors, testers etc...),
this is a very wrong approach and it will lead to tools used wrongly by people or maybe not used at all, this will
give negative effects to the organization, so first make sure you have people mentally ready for DevOps and then
start using DevOps tools.

Now we need to talk about some practices for implementing DevOps and achieving what we already mentioned.

# Automation
Automation is key to DevOps success we talked about Rapid Development and the ability to deploy updates quickly
and without downtime we can do all of this with automation.

To automate something first you need to be able to do it manually, so practice first using test servers, deploy
apps to them, create database clusters, run monitoring software etc... and then move to automating all of this.

Automation does not include only configuring existing servers and deploying apps but also provisioning new servers
and resources for our apps to function properly.

For automation I use [ansible](https://ansible.com) to describe the state of our servers and resources using
YAML files and then apply this state to them whenever we create a change.

For provisioning new servers [terraform](https://www.terraform.io/) can be used, however I did not use yet but planning to do so.

There is a big advantage to using automation in regards to helping Developers adopt DevOps, the state
of servers is now described using code and this code can be committed to source control and changed by anyone
then these changes will be deployed to our servers and Developers love to work with code, that is their job
actually and by being able to configure servers using code and not log in to SSH sessions this gives them
a great advantage also they can easily replicate production environment using code and test their apps against
these production-like environments before going to production.

# Testing
With automation it becomes easier to deploy updates to our products but we need to make sure
these updates do not include any security holes, bugs or causes existing features not to work
properly, to achieve this we need to always test our code before moving it to production.

The code we want to test does not only include our applications' code but also the code that
configures our servers, as we have seen in the last section we now use code such as playbooks
in ansible to configure our servers, so when we make changes these changes must be tested
before being deployed to production.

To do testing of our apps we can use a testing library according to the programming language and framework we are
using for example [unittest](https://docs.python.org/3/library/unittest.html) is good for Python apps, we can use
[selenium](https://www.seleniumhq.org) for testing our apps in a real browser, [jest](https://jestjs.io) for testing client side JavaScript
and [molecule](https://molecule.readthedocs.io/en/stable/) for testing ansible roles, [testinfra](https://testinfra.readthedocs.io/en/latest/) for
testing our changes to servers using ansible.
# Continuous Integration and Deployment
Okay we talked about Automation and Testing but how do we run them? Manually with every change? Or using a special tool for that?

Of course we cannot do this manually because this includes a lot of work, we could forget to run tests before
deploying to production and also we could have many parallel environments one for review, staging, QA etc...
and we cannot manually deploy to all of these manually so here comes the tools for Continuous Integration and Deployment.

Continuous Integration encourages Developers to push their code early to source control so it will be deployed
to a review environment and other Developers or team leaders can see the code and make comments about it, when
these new changes are ready they are deployed to a staging environment to be further tested after being merged with
the master branch which includes latest development after these changes are tested they can be deployed to production
environment where our end users will see them.

Continuous Deployment encourages to deploy multiple times a day and defines the right steps for deploying
updates to our apss, we can use [ansible](https://ansible.com) to do the Deployment but we can also use
other special tools such as [capistrano](https://github.com/capistrano/capistrano) to do the job.

The tools used to do Continuous Integration are [gitlab CI](https://about.gitlab.com/product/continuous-integration/),
[travic CI](https://travis-ci.org) and [jenkins](https://jenkins.io), I prefer to use gitlab CI.
# Conclusion
In this article I gave my own personal opinion about DevOps based on my four years experience as Linux
Systems Administrator, every thing mentioned here was based on my work and the problems I encountered
I did not implement all of the concepts I talked about them in here but looking forward to work on them
and write similar articles and tutorials after this one.

Just to remind you make sure you change the mentality of your organization to accept and adopt DevOps
practices before working on any tools used in DevOps, this is key to success in the adoption process.

I hope you find the content useful for any comments or questions you can contact me
on my email address [mohsen47@hotmail.co.uk](mailto:mohsen47@hotmail.co.uk?subject=what-is-devops)

Stay tuned for more articles. :) :)

gha_language: HTML


text:
# js-chart-examples
Line Chart Examples of Various JavaScript Charting Libraries.

## Comparison Articles
- [Summary (ja)](https://marmooo.blogspot.com/2019/04/javascript.html)
- [Benchmarks (ja)](https://marmooo.blogspot.com/2019/04/javascript-test.html)

## List of Examples
- [Echarts](https://github.com/apache/incubator-echarts): [example1](https://marmooo.github.io/js-chart-examples/echarts.html), [example2](https://marmooo.github.io/js-chart-examples/echarts-2.html)
- [Chartist](https://github.com/gionkunz/chartist-js): [example](https://marmooo.github.io/js-chart-examples/chartist.html)
- [Chart.js](https://github.com/chartjs/Chart.js): [example](https://marmooo.github.io/js-chart-examples/chartjs.html)
- [Google Charts](https://developers.google.com/chart/): [example](https://marmooo.github.io/js-chart-examples/googlecharts.html)
- [C3.js](https://github.com/c3js/c3): [example](https://marmooo.github.io/js-chart-examples/c3.html)
- [Plotly.js](https://github.com/plotly/plotly.js/): [example1](https://marmooo.github.io/js-chart-examples/plotlyjs.html), [example2](https://marmooo.github.io/js-chart-examples/plotlyjs-2.html)
- [Vis.js](https://github.com/almende/vis): [example](https://marmooo.github.io/js-chart-examples/visjs.html)
- [Rickshaw](https://github.com/shutterstock/rickshaw): [example](https://marmooo.github.io/js-chart-examples/rickshaw.html)

repository: marmooo/js-chart-examples

repo_name: marmooo/js-chart-examples


text:
# Crypto Piggy (frontend of the application)

![screenshot](https://github.com/ith-harvey/cryptopiggy-frontend/blob/master/style/images/Marquee%20(2).jpg)

[Node.js backend of the application](https://github.com/ith-harvey/cryptopiggy-backend)

Crypto Piggy is an open source crypto portfolio extension that allows users to track the performance of their Ethereum addresses.

Having to hop around to different portfolio tracking sites and keep a running list of all of your public addresses is a hassle. With Crypto Piggy, all of your information is in one place. After a user registers and inputs their Ethereum public addresses they simply have to click open the chrome extension and all of their portfolio performance information is in one place.

Our dashboard tracks the following views of your portfolio:
 - Last 24 hours
 - Last week
 - Last month
 - Last year
 - Since account creation

We plan on adding additional cryptocurrencies and ERC20 tokens in the coming months.

## Screen Shots

## Built With

* [React](https://reactjs.org/) - The web framework used
* [Redux](https://redux.js.org/) - State management
* [D3](https://d3js.org/) - Data visualization
* [React Redux Starter](https://github.com/davezuko/react-redux-starter-kit) - The web framework used
* [React-Bootstrap](https://react-bootstrap.github.io/) - CSS framework

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

repository: ith-harvey/cryptopiggy-frontend

repo_name: ith-harvey/cryptopiggy-frontend


text:
# Kubernetes Virtual Kubelet with Azure Batch

[Azure Batch](https://docs.microsoft.com/en-us/azure/batch/) provides a HPC Computing environment in Azure for distributed tasks. Azure Batch handles scheduling of discrete jobs and tasks accross pools of VM's. It is commonly used for batch processing tasks such as rendering.

The Virtual kubelet integration allows you to take advantage of this from within Kubernetes. The primary usecase for the provider is to make it easy to use GPU based workload from normal Kubernetes clusters. For example, creating Kubernetes Jobs which train or execute ML models using Nvidia GPU's or using FFMPEG.

Azure Batch allows for [low priority nodes](https://docs.microsoft.com/en-us/azure/batch/batch-low-pri-vms) which can also help to reduce cost for non-time sensitive workloads.

__The [ACI provider](../azure/README.md) is the best option unless you're looking to utilise some specific features of Azure Batch__.

## Status: Experimental

This provider is currently in the exterimental stages. Contributions welcome!

## Quick Start

The following Terraform template deploys an AKS cluster with the Virtual Kubelet, Azure Batch Account and GPU enabled Azure Batch pool. The Batch pool contains 1 Dedicated NC6 Node and 2 Low Priority NC6 Nodes.

1. Setup Terraform for Azure following [this guide here](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/terraform-install-configure)
2. From the commandline move to the deployment folder `cd ./providers/azurebatch/deployment` then edit `vars.example.tfvars` adding in your Service Principal details
3. Download the latest version of the Community Kubernetes Provider for Terraform. Get the correct link [from here](https://github.com/sl1pm4t/terraform-provider-kubernetes/releases) and use it as follows: (Current official Terraform K8s provider doesn't support `Deployments`)

```shell
curl -L -o - PUT_RELASE_BINARY_LINK_YOU_FOUND_HERE | gunzip > terraform-provider-kubernetes
chmod +x ./terraform-provider-kubernetes
```

4. Use `terraform init` to initialize the template
5. Use `terraform plan -var-file=./vars.example.tfvars` and `terraform apply -var-file=./vars.example.tfvars` to deploy the template
6. Run `kubectl describe deployment/vkdeployment` to check the virtual kubelet is running correctly.
7. Run `kubectl create -f examplegpupod.yaml`
8. Run `pods=$(kubectl get pods --selector=app=examplegpupod --show-all --output=jsonpath={.items..metadata.name})` then `kubectl logs $pods` to view the logs. Should see:

```text
	[Vector addition of 50000 elements]
	Copy input data from the host memory to the CUDA device
	CUDA kernel launch with 196 blocks of 256 threads
	Copy output data from the CUDA device to the host memory
	Test PASSED
	Done
```

### Tweaking the Quickstart

You can update [main.tf](./main.tf) to increase the number of nodes allocated to the Azure Batch pool or update [./aks/main.tf](./aks/main.tf) to increase the number of agent nodes allocated to your AKS cluster.

## Advanced Setup

## Prerequistes

1. An Azure Batch Account configurated
2. An Azure Batch Pool created with necessary VM spec. VM's in the pool must have:
    - `docker` installed and correctly configured
    - `nvidia-docker` and `cuda` drivers installed
3. K8s cluster
4. Azure Service Principal with access to the Azure Batch Account

## Setup

The provider expects the following environment variables to be configured:

```
    ClientID:        AZURE_CLIENT_ID
	ClientSecret:    AZURE_CLIENT_SECRET
	ResourceGroup:   AZURE_RESOURCE_GROUP
	SubscriptionID:  AZURE_SUBSCRIPTION_ID
	TenantID:        AZURE_TENANT_ID
	PoolID:          AZURE_BATCH_POOLID
	JobID (optional):AZURE_BATCH_JOBID
	AccountLocation: AZURE_BATCH_ACCOUNT_LOCATION
	AccountName:     AZURE_BATCH_ACCOUNT_NAME
```

## Running

The provider will assign pods to machines in the Azure Batch Pool. Each machine can, by default, process only one pod at a time
running more than 1 pod per machine isn't currently supported and will result in errors.

Azure Batch queues tasks when no machines are available so pods will sit in `podPending` state while waiting for a VM to become available.

repository: lizrice/virtual-kubelet

gha_language: Go

repo_name: lizrice/virtual-kubelet


text:
# AzureUnit
[![Build Status](https://travis-ci.com/nathankitchen/azunit.svg?branch=master)](https://travis-ci.com/nathankitchen/azunit)

A unit testing framework for Microsoft Azure resources, written in NodeJS and TypeScript. Designed to test any Azure cloud environment with ARM-based resources.

AzUnit authenticates with Azure and accesses a subscription, downloading the JSON ARM template defining each resource. It then finds the latest API version for the relevant provider and resource type, and uses it to download the full JSON definition for the resource.

Tests comprise a series of JsonPath-based assertions to validate the properties of the resources. Code coverage tracks which resources have assertions run against them, and provides coverage level as a percentage.

For feature roadmaps, please refer to the GitHub projects associated with this repository.

## Quickstart
First, install AzUnit using NPM:

``` cli
npm install -g azunit
```

Then, navigate to an empty directory and run:

``` cli
azunit init
```

This will populate a sample project structure; refer to the command reference for further information.

Then create some JS files to run the tests. Call the global function `start` passing a test title, and provide a function to test your resources. When creating tests, a productive workflow is often to sign in to Microsoft [Resource Explorer](https://resources.azure.com) and navigate to the resources you want to test. Find the properties you are interested in, and write tests to validate them.

``` javascript
title("website.com");

start("Search Service", (test) => {

    var search = test.selectResourcesByName("someservice");

    search.shouldHaveInstanceCount.equals(1);

    // Test ARM properties using JsonPath in a fluent API. Each assertion
    // is run against the selected resource(s).
    search.shouldHaveProperty("$.location").as("Location").equals("West Europe");
    search.shouldHaveProperty("$.sku.name").as("Service Tier").equals("basic");

    test.log.trace("An example trace message");
    test.log.write("An example log message");
    test.log.warning("An example warning message");
    test.log.error("An example error message");

    var storage = test.selectResourcesByName("nk1b1234a2d3401x46fee9aa");
    storage.shouldHaveProperty("$.properties.encryption.services.file.enabled").as("File encryption").disabled();
});
```

To run your test you will need to create a Service Principal and assign it *Reader* permissions on the Azure Subscription(s) that you want to test. Full instructions can be found [here](https://github.com/Azure/azure-sdk-for-node/blob/master/Documentation/Authentication.md#service-principal-authentication).

Finally, run AzUnit from shell passing details of the Service Principal, Tenant, and Subscrpition as parameters. You can call AzUnit multiple times for each environment you want to test. There are two options for calling AzUnit: `test` or `run`.

### Test mode
Intended for use in terminal and allowing quick runs against different environments.

``` cli
azunit test ./samples/quickstart/test.js \
        --tenant acme.onmicrosoft.com \
        --subscription ffffffff-ffff-ffff-ffff-ffffffffffff \
        --app-id ffffffff-ffff-ffff-ffff-ffffffffffff \
        --app-key [key] \
        --output-xml .azunit/test.xml \
        --run-name "My glorious test run"
```

### Run mode
Leverage YAML file configuration to pass the same configuration in a more reusable way, suitable for sharing with a wider team.

``` YML
run:
  name          : Web farm tests
  select        : ./samples/quickstart/*.js
  parameters    : ./samples/quickstart/test.params.json
  language      : enGb
  silent        : false
auth:
  tenant        : $TENANT
  appId         : $APP_ID
  appKey        : $APP_KEY
  subscription  : $SUBSCRIPTION
coverage:
  resources:
    threshold   : 90
    fail        : true
  APR:
    threshold   : 1
    fail        : true
  AAPR:
    threshold   : 1.2
    fail        : true
output:
  json          : .azunit/output.json
  xml           : .azunit/output.xml
```

Settings in the YAML file are as follows:

| Setting           | Description                                        |
|-------------------|----------------------------------------------------|
| run/name          | A descriptive title for the run.                   |
| run/select        | Glob for defining test JS files to process.        |
| run/parameters    | JSON data passed to JS files to enable test reuse. |
| run/language      | Language. Only enGb is currently supported.        |
| run/silent        | Suppress console output (secure build scenarios?)  |
| auth/tenant       | The tenant ID for the target subscription.         |
| auth/appId        | The app ID with access to the subscription.        |
| auth/appKey       | The app key to utilise this application.           |
| auth/subscription | The subscription ID.                               |
| output/json       | Path to store run results (in JSON format).        |
| output/xml        | Path to store run results (in XML format).         |

*Note: All values starting with `$` will be treated as environment variables and loaded appropriately. To avoid putting sensitive information in config files (which should be source controlled), set this information in local environment variables (on your dev machine or build pipeline) and reference the variable with the $ prefix (e.g. `appKey: $KEY`)*

Finally, run AzUnit from your shell passing the configuration file as a parameter:

``` cli
azunit run --config azunit.dev.yml
```

This will result in output similar to that shown below:

![Console output of an AzUnit run](docs/output.png?raw=true)

## Commands
AzUnit can be passed multiple commands, each of which has its own parameters.

### init
Initialises a project in the current directory.

``` cli
azunit init
```

The capability of init is reasonably limited at the moment: it simply creates files if they don't already exist, so it won't try to merge new additions to your .gitignore. Rather than running `azunit init` in an existing directory, I recommend doing it in a clean one and then merging the relevant settings.

After running `azunit init`, set up your environment with [Service Principal Authentication](https://github.com/Azure/azure-sdk-for-node/blob/master/Documentation/Authentication.md#service-principal-authentication), adding your settings to the `.env` file or using actual environment variables on your machine.

### run
Runs AzUnit with options configured in the specified YAML file.

``` cli
azunit run --config azunit.yml
```

| Parameter      | Alias | Description                                                              | Default         |
|----------------|-------|--------------------------------------------------------------------------|-----------------|
| --config       | -c    | String. Path to the YAML config file describing the environment.         | None            |

### test
A command to enable AzUnit to run without YAML file configuration, executing the specified tests against the named environment. Multiple test files can be included and there are a reasonable number of options, but you don't get the extensive control of things like test coverage that you would get with a YAML config input.

``` cli
azunit test ./test1.js ./test2.js [parameters]
```

| Parameter      | Alias | Description                                                              | Default         |
|----------------|-------|--------------------------------------------------------------------------|-----------------|
| --tenant       | -t    | String. The domain name of the tenant, often ends in ".onmicrosoft.com". | None            |
| --app-id       | -a    | GUID. The service principal with access to the target subscription.      | None            |
| --app-key      | -k    | String. The secret for the service principal.                            | None            |
| --subscription | -s    | GUID. The ID of the subscription containing resources to tests.          | None            |
| --run-culture  | -c    | Language code. Culture/language code for messages in the run. *          | en-GB           |
| --run-name     | -n    | String. A name for the test run.                                         | *Current date*  |
| --parameters   | -p    | String. Path to a file containing JSON data to be passed to test files.  | None            |
| --silent       | -x    | No value required: prevents logging test result output to the console.   | N/A             |
| --output-xml   | -X    | String. A filename to output the results of the run in XML format.       | *Based on date* |
| --output-json  | -J    | String. A filename to output the results of the run in JSON format.      | *Based on date* |

* *Run culture is currently ignored as the output only runs in a single culture: enGb*

To use parameters, create a file containing a JSON data structure that you want to make available to your tests. For example, create `env-test.params.json` containing:

``` javascript
{
    "prefix": "tst"
}
```

You can use this parameter within your tests as follows (parameters will be in the global context):

``` javascript
start("Search Service", (test) => {
    test.log.write(parameters.prefix);
});
```

This allows tests to be configured and reused across multiple environments.

### dump
This is a development tool that dumps an array of all the resources under test in a subscription. It can be used for debugging if particular JsonPath queries don't seem to be evaluating correctly, by dropping what AzUnit "sees" into a handy file for reference.

``` cli
azunit dump --config azunit.yml --output dump.json
```

| Parameter      | Alias | Description                                                              | Default         |
|----------------|-------|--------------------------------------------------------------------------|-----------------|
| --config       | -c    | String. Path to the YAML config file describing the environment.         | None            |
| --output       | -o    | String. Name of a file to dump resource output to.                       | None            |

## Output formats
Initially the project included output formats for CSV, HTML, and Markdown. These have been removed for several reasons:

   1. They required an amount of unnecessary package bloat
   2. Many decisions around formatting were arbitrary and probably wouldn't properly serve use cases
   3. Formatting outputs can be customised in test post-processing, for example:
        - Running XSLT over the output from PowerShell
        - Dropping into gulp
        - Utilising a templating framework like Handlebars or Liquid

Samples of transforms that can serve as a basis for different projects can be found in `samples/transforms`. Feel free to contribute new ones via a pull request, so long as they're generic, self-contained, and reasonably unique I'll be happy to include them.

## Contributing

   1. Fork it!
   2. Create your feature branch: `git checkout -b my-new-feature`
   3.  Push to the branch: `git push origin my-new-feature`
   5. Submit a pull request :D

## Credits

Developer - Nathan Kitchen (@nathankitchen)

## License
This project is Open Source and licensed under [MIT](license.md).

repository: nathankitchen/azunit

gha_language: TypeScript

repo_name: nathankitchen/azunit


text:
---
layout: post
title: Moving from Tensorflow 2.0 to Pytorch
published: true
---

I was having many issues with GPU memory management in a Transfer Learning problem when using Tensorflow 2.0 with Keras module. Even though I was using Inception V3 model with all the weights of the architecture freezed, the code ran out of memory. The weights of the model occupied only 98 MB therefore that wasn't the problem. Input shape was (299, 299, 3) so not huge images were being used, but I couldn't use a batch size higher than 16.

After three days trying to work around this issue, I decided to port the code to Pytorch. And this is where the magic happends. I had zero problems when executing the code and with memory management. Everything worked smoothly.

There's no way back.

repository: pacocp/blog

gha_language: Jupyter Notebook

repo_name: pacocp/blog


text:
# <img src="assets/logo.png" alt="expensor_personal" width="48px"/> Expenses Visualization App (expensor_personal)
[![Build Status](https://travis-ci.com/villoro/expensor_personal.svg?branch=master)](https://travis-ci.com/villoro/expensor_personal)
[![codecov](https://codecov.io/gh/villoro/expensor_personal/branch/master/graph/badge.svg)](https://codecov.io/gh/villoro/expensor_personal)

This is a [dash](https://plot.ly/products/dash/) app that allows me to visualitze my financial data. This includes expenses, incomes, EBIT, liquid and investments.

![Mockup](images/mockup.png)

**It is intended only for personal use.** There is another repository ([expensor](https://github.com/villoro/expensor)) with a similar dash app for public use. However, if you want, you can use the code of this app or fragments of it.

It takes personal information from dropbox and uses dash login to verify the identity.

## Installation and usage
1. Download the code

    ```git clone https://github.com/villoro/expensor_personal.git```

2. Install requirements

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

3. Register a dropbox app ([Documentation](https://www.dropbox.com/developers/reference/oauth-guide))

4. Set environment variables
    - **EXPENSOR_DROPBOX_TOKEN:** dropbox token (from the previously registered app)
    - **EXPENSOR_USER:** user for login
    - **EXPENSOR_PASSWORD:** password for login

5. Make sure you have the data needed inside the dropbox app (see section `Data needed`)

6. Run the app

    ```python src/index.py```

7. Log in using `EXPENSOR_USER` and `EXPENSOR_PASSWORD`.

## Data needed
In order to set up the app you will need three excel files inside the dropbox app folder:
* your_app/Money Lover/YYYY-MM-DD.xlsx
* your_app/data.xlsx
* your_app/config.yml (optional)

### Money Lover/YYYY-MM-DD.xlsx file
The first excel file will be a raw export from [Money Lover](https://moneylover.me/) android app. The dash app will scan the `Money Lover` folder and take the newest excel file based on it's name.

This excel file needs the following columns:

| Date       | Amount | Category |
|------------|--------|----------|
| 2017/01/01 | -500   | Rent     |
| 2017/02/01 | -500   | Rent     |
| 2017/03/01 | -500   | Rent     |
| 2017/01/01 | 1150   | Salary   |
| 2017/02/01 | 1250   | Salary   |

Note that expenses will have negative amounts and incomes positive ones.

### data.xlsx file
This file should have the following sheets:
* liquid_m
* invest_m
* worth_m
* trans_categ

#### liquid_m sheet
This will have the money in each account for each month. It should have `date` and `Total` as columns followed by one column per each account. For example:

| Date    | Total | ING Account | ING Deposit | Revolut |
|---------|-------|-------------|-------------|---------|
| 2018/10 | 680   | 100         | 500         | 80      |
| 2018/11 | 700   | 150         | 500         | 50      |
| 2018/12 | 680   | 120         | 500         | 60      |

#### invest_m and worth_m sheets
This will be a list of the money invested (invest_m) and the value of the investments (worth_m) at each month per each investment account. Those can be different from the ones listed in `liquid_list`.

For example:

| Date    | Total | betterment | vanguard |
|---------|-------|------------|----------|
| 2018/10 | 600   | 100        | 500      |
| 2018/11 | 650   | 150        | 500      |
| 2018/12 | 620   | 120        | 500      |

#### trans_categ sheet
This is a list of all possible categories for the transactions listed in `Money Lover/YYYY-MM-DD.xlsx` file. It will show if they are **Expenses** or **Incomes** and the color that should be used when plotting. For example:

| Name   | Type     | Color Name | Color index |
|--------|----------|------------|-------------|
|  Food  | Expenses | blue       | 500         |
| Salary | Incomes  | red        | 500         |
|  Rent  | Expenses | green      | 500         |

### config.yml (optional)
This allows to set custom colors and group accounts in plots. It can group:
* liquid
* investment

As a key for the first level it should have the name of the group it wants to classify (`liquid` / `investment`). Then it can have as many groups as wanted where each should have the following keys:
* **color_name:** name of the color
* **color_index:** color intensity
* **accounts:** accounts this group includes

For example:

```yml
liquid:
  0 - Liquid:
    color_name: blue
    color_index: 100
    accounts:
      - ING Account
      - Revolut

  1 - Savings:
    color_name: blue
    color_index: 300
    accounts:
      - ING Deposit
```

All available colors can be found at [Meterial Design Guidline](https://material.io/design/color/the-color-system.html#color-usage-palettes).

## Authors
* [Arnau Villoro](https://villoro.com)

## Images
Some screenshots (with personal data hidden):

![Screenshoot1](images/screenshot_1.jpg)
![Screenshoot2](images/screenshot_2.jpg)
![Screenshoot3](images/screenshot_3.jpg)

## License
The content of this repository is licensed under a [MIT](https://opensource.org/licenses/MIT).

## Nomenclature
Branches and commits use some prefixes to keep everything better organized.

### Branches
* **f/:** features
* **r/:** releases
* **h/:** hotfixs

### Commits
* **[NEW]** new features
* **[FIX]** fixes
* **[REF]** refactors
* **[PYL]** [pylint](https://www.pylint.org/) improvements
* **[TST]** tests


text:
## How to set text rotation in VBScript and VB6 with ByteScout PDF SDK

### How to code in VBScript and VB6 to set text rotation with this step-by-step tutorial

This sample source code below will demonstrate you how to set text rotation in VBScript and VB6. ByteScout PDF SDK can set text rotation. It can be used from VBScript and VB6. ByteScout PDF SDK is the component to help programmers in generating new pdf files, modifying and updating existing pdf documents or pdf forms. Provides support for auto-filling pdf forms, adding text with adjustable font, style, size, font family, new form fields, vector and raster drawings.

VBScript and VB6 code samples for VBScript and VB6 developers help to speed up coding of your application when using ByteScout PDF SDK. In your VBScript and VB6 project or application you may simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample VBScript and VB6 codes.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

## Get In Touch

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

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

## Free Trial Download

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

## Web API (On-demand version)

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

## API Documentation and References

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

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

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

## Video Review

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

url: https://raw.githubusercontent.com/repohoarder/ByteScout-SDK-SourceCode/32dd9367cebb66e3aa16bd803798c026d7dfeed5/PDF SDK/VBScript and VB6/Set Text Rotation/README.md

repository: repohoarder/ByteScout-SDK-SourceCode

repo_name: repohoarder/ByteScout-SDK-SourceCode


text:
# General: Server

[![Build Status](https://travis-ci.org/pmeisen/gen-server.svg?branch=master)](https://travis-ci.org/pmeisen/gen-server)

Library to generally defined servers with an XML based configuration. The server can be any type of serving instance via
a port, see, e.g., the [HTTP listener](https://github.com/pmeisen/gen-server-http-listener) implementation.

repository: pmeisen/gen-server

repo_name: pmeisen/gen-server


text:
---
title: Last IT lesson of the year and homework
layout: post
author: tom.whittington
permalink: /last-it-lesson-of-the-year-and-homework-/
source-id: 1-r_X4qEkEGx1pHWg3_YNzHvRYod17VQpVa0yo0CoYI4
published: true
---
In this lesson, we were once again talking about Internet safety, but the majority of the lesson was spent on propaganda.

**WWW**:I felt as if I understood what the teacher was telling us. I learnt what propaganda was and I learnt what indicates propaganda.

**EBI**:I could have contributed to class discussions a bit more, even though I contributed a fair amount.

**Homework**: Our homework was to watch the BBC News and then watch the Al Jazeera News and to see the difference between how the two channels talk about the news try have.

I thought that Al Jazeera channel used much less propaganda, and didn't use as much biased language whereas as the BBC did.


text:
#Inputosaurus Text

Inputosaurus Text is a jQuery UI widget that represents (and is instantiated on) a text <input>. This new input allows for multiple values that appear to be contained within a single input element. All values are separated via a delimiter of your choosing and placed back as the original input's value.

[Demo](http://sproutsocial.github.com/inputosaurus-text/)

[Tests](http://sproutsocial.github.com/inputosaurus-text/tests/)

repository: marviljoy/inputosaurus-text

repo_name: marviljoy/inputosaurus-text


text:
# angular2-socketio-chat-example

## Entrypoints

On this directory you will see *entrypoints* for the code. WebPack uses the these to transpile and create ES5 bundles (e.g. `target/assets/js/main.js`, `target/assets/js/vendor.js`, `target/assets/js/polyfills.js` and `target/assets/js/server.js`).

- `main.ts` is the main application (frontend)
- `index.html` is the SPA (single page app) HTML
- `vendor.ts` contains the dependencies for libraries to be bundled
- `polyfills.ts` contains the dependencies for polyfills
- `server.ts` is the NodeJS backend

# Subdirectories

- `app/` contains frontend-only code parts
- `models/` contains models shared with frontend and backend
- `server/` contains the backend code
- `styles/` contains shared SCSS files

repository: Jlabarca/goodtalk

repo_name: Jlabarca/goodtalk


text:
Access-control framework on the IOTA Distributed Ledger.

# Access Server Reference Implementation (ASRI)
The Access Server Reference Implementation is meant to act as a reference for developers who want to write their own IOTA Access dApps.

It showcases how to put together the different pieces from the Access SDK into a functional application.

Please note that the release `v0.1.0-alpha` is a [Minimal Viable Product (MVP)](https://www.agilealliance.org/glossary/mvp). It is by no means ready for production.

Please also note that the current state of the `master` branch does not necessarily reflect the state of that release tag. In case you want to inspect the source code of the release, make sure you set the correct release tag.

## Documentation

For documentation, please refer to [Access SDK repository](https://github.com/iotaledger/access-sdk.git).

Please note that the documentation refers to `v0.1.0-alpha`, which does not necessarily reflect the current state of the `master` branch.

# Getting Started
## Clone, Build

ASRI is currently focused on [Raspberry Pi OS](https://www.raspberrypi.org/downloads/).

1 - SSH into the Raspberry Pi.

2 - Install dependencies:
```
$ sudo apt-get update
$ sudo apt-get install git cmake python3-distutils libfastjson-dev libcurl4-gnutls-dev libtool
```

3 - Clone:
```
$ cd ~
$ git clone --recurse-submodules -j4 --branch v0.1.0-alpha https://github.com/iotaledger/access-server.git
$ cd access-server
```

**Warning ⚠**
You are checking out a detached head for the release tag `v0.1.0-alpha`, which will allow you to try out the [Access Mobile Client](https://github.com/iotaledger/access-mobile-client) and the [Access Policy Store](https://github.com/iotaledger/access-policy-store).

If you choose to build from `master` or `develop`, beware that you are about to build a **Work-In-Progress**. You are invited to investigate and help us fix the build and runtime errors you will likely encounter.

4 - Build:
```
$ mkdir build; cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/ext_install
$ make -j4
```

## Configure
Edit `config.ini` to set up runtime parameters.

In case you are testing Access Policy Store, it is important that you set up `policy_store_service_ip` under `[pap]`.

**Warning ⚠**

You want to edit `access-server/build/config.ini`, **not** `access-server/config.ini`.

## Run
Simply invoke the `asri` [ELF](https://man7.org/linux/man-pages/man5/elf.5.html).

**Warning ⚠** If you are using `pep_plugin_relay`, you will need `sudo`. That's because [`pigpio`](http://abyz.me.uk/rpi/pigpio/) uses DMA. `pigpio`'s author warns the following:
> At the moment pigpio on the Pi4B is experimental. I am not sure if the DMA channels being used are safe.

For production scenarios, it is advised that `pigpio` is replaced (by a safe alternative) on any GPIO-based `pep_plugin_*` implementation.

```
$ ./asri
```


text:
# Overview

TelemetryMetricsPrometheus.Core is a [Telemetry.Metrics Reporter](https://hexdocs.pm/telemetry_metrics/overview.html#reporters) for aggregating and exposing [Prometheus](https://prometheus.io) metrics based on `Telemetry.Metrics` definitions.

The reporter runs as a standalone application but does not include a web server to expose
your metrics. [TelemetryMetricsPrometheus](https://github.com/bryannaegele/telemetry_metrics_prometheus) provides an out of the box
solution with an included web server.

## Getting Started

Once you have the package added to your dependencies, you can start
TelemetryMetricsPrometheus.Core by initiating the application during
your application startup.

```elixir
def start(_type, _args) do
  TelemetryMetricsPrometheus.Core.init([])

  # List all child processes to be supervised
  children = [
    ...
  ]

  opts = [strategy: :one_for_one, name: ExampleApp.Supervisor]
  Supervisor.start_link(children, opts)
end
```

There are a few metrics built into `TelemetryMetricsPrometheus.Core` to
monitor resource usage by the reporter and measure scrape processing time.

Open another terminal and curl the endpoint a few times to see the output.

```
 $ curl http://localhost:9568/metrics
# HELP prometheus_metrics_table_size_total A gauge of the key count of a prometheus metrics aggregation table
# TYPE prometheus_metrics_table_size_total gauge
prometheus_metrics_table_size_total{name="prometheus_metrics_dist"} 1
prometheus_metrics_table_size_total{name="prometheus_metrics"} 4

# HELP prometheus_metrics_table_memory_bytes A gauge of the memory size of a prometheus metrics aggregation table
# TYPE prometheus_metrics_table_memory_bytes gauge
prometheus_metrics_table_memory_bytes{name="prometheus_metrics_dist"} 1356
prometheus_metrics_table_memory_bytes{name="prometheus_metrics"} 1426

# HELP prometheus_metrics_scrape_duration_seconds A histogram of the request duration for prometheus metrics scrape.
 The port number
can be configured if necessary. You are not required to use the included server,
though it is recommended. `https` is not supported yet, in which case exposing
a `/metrics` endpoint and calling the `scrape/1` function is your best option
until TLS is supported.

Note that aggregations for distributions (histogram) only occur at scrape time.
These aggregations only have to process events that have occurred since the last
scrape, so it's recommended at this time to keep an eye on scrape durations if
you're reporting a large number of disributions or you have a high tag cardinality.

## Telemetry.Metrics to Prometheus equivalents

Metric types:
* Counter - Counter
* Distribution - Histogram
* LastValue - Gauge
* Sum - Counter
* Summary - Summary (Not supported)

### Units

Prometheus recommends the usage of base units for compatibility - [Base Units](https://prometheus.io/docs/practices/naming/#base-units).
This is simple to do with `:telemetry` and `Telemetry.Metrics` as all memory
related measurements in the BEAM are reported in bytes and Metrics provides
automatic time unit conversions.

Note that measurement unit should used as part of the reported name in the case of
histograms and gauges to Prometheus. As such, it is important to explicitly define
the unit of measure for these types when the unit is time or memory related.

It is suggested to not mix units, e.g. seconds with milliseconds.

It is required to define your buckets according to the end unit translation
since this measurements are converted at the time of handling the event, prior
to bucketing.

#### Memory

Report memory as `:byte`.

#### Time

Report durations as `:second`. The BEAM and `:telemetry` events use `:native` time
units. Converting to seconds is as simple as adding the conversion tuple for
the unit - `{:native, :second}`

### Naming

`Telemetry.Metrics` definition names do not translate easily to Prometheus naming
conventions. By default, the name provided when creating your definition uses parts
of the provided name to determine what event to listen to and which event measurement
to use.

For example, `"http.request.duration"` results in listening for  `[:http, :request]`
events and use `:duration` from the event measurements. Prometheus would recommend
a name of `"http_request_duration_seconds"` as a good name.

It is therefore recommended to use the name in your definition to reflect the name
you wish to see reported, e.g. `"http.request.duration.seconds"` or `[:http, :request, :duration, :seconds]` and use the `:event_name` override and `:measurement` options in your definition.

Example:
```
Metrics.distribution(
  "http.request.duration.seconds",
  buckets: [0.01, 0.025, 0.05, 0.1, 0.2, 0.5, 1],
  event_name: [:http, :request, :complete],
  measurement: :duration,
  unit: {:native, :second}
)
```

The exporter sanitizes names to Prometheus' requirements [Naming](https://prometheus.io/docs/instrumenting/writing_exporters/#naming) and joins the event name parts with an underscore.

### Labels

Labels in Prometheus are referred to as `:tags` in `Telemetry.Metrics` - see the docs
for more information on tag usage.

*Important: Each tag + value results in a separate time series. For distributions, this
is further complicated as a time series is created for each bucket plus one for measurements
exceeding the limit of the last bucket - `+Inf`.*

It is recommended, but not required, to abide by Prometheus' best practices regarding labels -
[Label Best Practices](https://prometheus.io/docs/practices/naming/#labels)

### Included Metrics

Several metrics are exported by default to monitor scrape metrics.

The metric names are:

  * `"prometheus_metrics_scrape_duration_seconds"`
  * `"prometheus_metrics_aggregation_duration_seconds"`

Optionally, you can monitor internal `:ets` table usage by setting `monitor_reporter: true`
in your `init` options.

The metric names for this setting are:

  * `"prometheus_metrics_table_memory_bytes"`
  * `"prometheus_metrics_table_size_total"`

Please report any abnormally large table usage. Histogram measurements are currently only
aggregated at the time of the scrape. We can take a different approach if this proves to be
an issue.

gha_language: Elixir


text:
# List installations for a user

## Table of contents

1. [Docs](#docs)
1. [Quick start](#quick-start)
1. [Inputs](#inputs)
1. [Outputs](#outputs)

## Docs

Original documentation: https://developer.github.com/v3/apps/installations/#list-installations-for-a-user

Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.

You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.

The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

You can find the permissions for the installation under the `permissions` key.

## Quick start

```yaml
- uses: maxkomarychev/octions/octions/apps/list-installations-for-authenticated-user@master
  id: my_step_id
  with:
    token: <token value>
    per_page: <per_page value>
    page: <page value>
- name: Print outputs
  run: |
    echo ${{ steps.my_step_id.outputs.id }}
    echo ${{ steps.my_step_id.outputs.number }}
    echo ${{ steps.my_step_id.outputs.status }}
```

## Inputs

| Name | Is required | Description |
|---|---|---|
|token|true|Token to authenticate the request
|per_page|true|Results per page (max 100)
|page|true|Page number of the results to fetch.
|file_output|false|Path to store full output of the action
|custom_outputs|false|Custom outputs to create for step. This has to be YAML multiline string literal `custom_outputs: \|<newline> output_name:path.in.result`

## Outputs

| Name | Description |
|---|---|
|id|`id` field of the response (if exists)|
|number|`number` field of the response (if exists)|
|status|HTTP status of underlying API call|

repository: maxkomarychev/octions

gha_language: JavaScript

repo_name: maxkomarychev/octions


text:
# Snow Day Challenge: Check If A Binary Tree is Balanced
 - Determine if a Binary Tree is balanced.
## Challenge
- Implement a method with the following signature bool IsBinaryTreeBalanced(Node root) that determines if a binary tree is balanced.

- Reminder: We define a balanced binary tree as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
### Structure and Testing
- Utilize the Single-responsibility principle: any methods you write should be clean, reusable, abstract component parts to the whole challenge. You will be given feedback and marked down if you attempt to define a large, complex algorithm in one function definition.

- Write at least three test assertions for each method that you define.

- Ensure your tests are passing before you submit your solution.

## Approach & Efficiency
### Approach
- Since I didn't need to modify my Binary Tree I brought in my preexiting Binary Tree and Node class as a dependency.
- I then created the method int IsBinaryTreeBalanced(BinaryTree tree)
  - I then split off the Root of the tree into a new Node called root.
  - I then check to see if the input tree has any Nodes and return true if the tree is empty.
  - I then created an bool variable called isBalanced.
  - I then created 2 helper methods within IsBinaryTreeBalanced.
    - int HelperCalculateBinaryTreeHeight(Node helperRoot)
      - Runs a depth first traversal with two base cases. If a node is null it will return -1. If the node is a leaf it will return 0.
      - I then call HelperCalculateBinaryTreeHeight recursively and set an integer called leftChildHeight to the root.Left recursive call.
      - I then call HelperCalculateBinaryTreeHeight recursively and set an integer called rightChildHeight to the root.Right recursive call.
      - After leftChildHeight and rightChildHeight have been populated I then compare the two height and return the largest of the two with a modifier of +1 to take into account the node that the method is being called from.
    - int HelperIsBinaryTreeBalanced(Node helperRootTwo)
      - I then created two int variables called leftHeight and rightHeight.
      - I then ran HelperCalculateBinaryTreeHeight(helperRootTwo.Left) to set leftHeight's value.
      - I then ran HelperCalculateBinaryTreeHeight(helperRootTwo.Right) to set rightHeight's value.
      - I then compare the absolute difference between leftHeight - rightHeight and make sure that is is less than or equal to 1 as well as making sure that that nodes children are also returning true when fed into HelperIsBinaryTreeBalanced.
        - If the above conditions are met then return true.
        - Else return false.

  - I then set isBalanced to HelperIsBinaryTreeBalanced(root)
  - I then return isBalanced.

### Efficiency
#### Space
O(h)
#### Time
O(n)

## API
### FindMaxValue Required Classes
- BinaryTree class
- Node class

## Whiteboard
![whiteboard image](./assets/Whiteboard.jpg)

gha_language: C#


text:
# Ultrakazoid

Ultrakazoid (UKZ for short) is a library, including a melody-building language, for writing music in the form of MIDI files.

# How I use it:

* With qpython3 on Android
* With CodeBoard keyboard on Android (I've designed the ukz-language to make it convenient specifically for this keyboard)
* Song scripts should go in the same folder where "ukz" folder is. (exception for sit_scripts, test_scripts.py handles directories properly)
* Running the song script should work.
* Result will be a Midi file in a folder called AMidi, in the same folder as qpython3 in the phone
* I made an album with Ultrakazoid! I converted and uploaded the music I wrote here: https://youtu.be/7ioDpl8poLc

# Quick Architecture

## ukz/interface

The song-building stuff (on top of the melody-building stuff) required to actually build a whole song with several tracks.
See sit_scripts folder for examples.

In the Song constructor, the string you pass must be in the skz language (ukz/ukzlang/skzgrammar.py), which makes a SongConfig object.

Then repeatedly call song.play(s) where each string s is in ukz language (ukz/ukzlang/ukzgrammar.py) representing a multi-track melody.
These melodies will be concatenated in the end (played sequentially).

## ukz/melody, ukz/ukzlang/hmel.py

These stand for "hierarchical melody" and "flat melody".

A flat melody has the following properties:
* Start and end time (or duration)
* A list of notes
    * Each note has a pitch (which piano key the player presses), a "loudness" (linked to MIDI velocity, which means how fast the player's finger is going when he hits the piano key), a start time (when the player presses the piano key) and a duration (how long he keeps it pressed for).
* A list of gradients. Often used kinds are: Volume gradients (e.g. for fade-in and fade-out) and Pitch bends (very relevant for guitar soloists bending the strings)

Hmel is a tree-representation of a melody, used only in the ukz melody-building language.
Each leaf is either a note (with a pitch, loudness, and duration, but no start or end times because these will be derived from the leaf's position within the tree) or a rest (same as a note but without the pitch and loudness, it's just silence)
Then there are nodes:
* HmelSeq (sequence) has a list of child melodies. These children will be played one after the other. In ukz, use square brackets with melodies inside to play sequentially: [ c e g ]
* HmelPar (parallel) has a list as well, but they will all start playing at the same time. In ukz, use round brackets with melodies inside to play in parallel: ( c e g )

There's also the concept of pipes, which sets the start/end time(s) of a melody and adds the capability to add stuff before the start and after the end of that melody. This is useful if you want a "lead-up" to a melody but you need the start of it to be after the first few notes. Hmel stores these children in separate lists.
* HmelSeq will play the pre-children sequentially, then children, then post-children sequentially.
* HmelPar will play the pre-children all ending at time 0 (relatively speaking) then the children all starting at this same time 0. If you want several parallel lead-ups, use this pipe in a HmelPar.

## ukz/songconfig

A SongConfig object tells you how ukzlang code translates into actual midi stuff. Like what instrument each channel plays, what volumes and velocities will be played, etc.

## ukz/midi

This is all code directly related to MIDI writing. As of April 2021 I'm dealing with all the byte logic myself without an external library.

## ukz/uklr,ukz/ukzlang

uklr is general parser code (not necessarily ukz-specific) that I wrote. The ukz and skz parsers makes good use of the stuff in here.

## test_ukz

These are unit tests... sort of. Their scope is pretty wide, no mocking or anything, they're more like integration tests maybe.

test_ukz/test_scripts: These run the scripts in sit_scripts folder, and check that the output midi file matches those in good_midi_files folder. If these pass then the engine is probably doing ok.

## utils

Yeah, obviously this is random utilities. Useful code used elsewhere.

## ukz_ut_run.py

Run main from here: it runs all the tests from test_ukz (UT and script tests).

repository: clauderichard/Ultrakazoid

repo_name: clauderichard/Ultrakazoid


text:
# polySolve
*By Trond Hauklien*

The main use of this script is to easily calculate the roots of third degree equations or functions. I made this because I wanted to revert an polynomial model applied to a dataset. I knew the coefficients, and had an calculated value for every input, but I needed the raw data. I had no chance of calculating the data manually, because the list was a csv file consisting of over 40,000 datapoints.

## How to use
There is two ways to use this script. The first class, `polySolve()`, uses `np.roots()` to solve a single third degree equation. The other class, `polySolveList()`, takes input from a csv file and processes it with the `np.roots()` function.

### polySolve
The required input format is `polySolve(a, b, c, d)` where the arguments are equal to the coefficients of your equation. Just like this: `ax^3+bx^2+cx+d=0`. The solution will be printed as an array.

### polySolveList
This script need an input csv file to process. It takes each row as an equation, and uses the same format as in `polySolve()`. The script will process up to four coefficients per equation (i.e. will be able to handle 3rd degree equations) and provide you with the solutions to your list of equations. The solutions are printed as arrays.

If there is any problems regarding your inputs, the code will prompt you with an error message telling you what line the error lies within.

**NEW!** You are now able to output the solutions of your equations (from the input file) to an separate output file. The syntax of the function is `polySolveList(file, w=True, path="solutions.csv")`, where `file` is the path to your input file, `w` is wether or not you'd like to output the solutions to a separate csv file (default `False`) and `path` is the path to your output file (default `solutions.csv`). The output list will consist of one array of solutions per row, with the following format: `[x1 x2 x3]`, where the objects are float elements.

## To do
A list of what has been done, and where to go next.
- [x] Make the script solve up to third degree equations
- [x] Make it possible to output the results to a csv
- [ ] Expand to solve equations of a higher degree

repository: trondhauklien/polySolve

repo_name: trondhauklien/polySolve


text:
---
layout: post
title:  "16 Unexpected Uses for Resume 9gag"
postname: "resume-9gag"
date:   2017-09-23 09:43:00 +0700
categories: [resume]
---
 The Argument About Resume 9gag
================================

You're able to when you get to the point. The quality of Blogger is it supports Google support and thus you can make money. Google has exceptional characteristics to allow you to find precisely what you. It's rated as stated by the Alexa records.

 New Step by Step Roadmap for Resume 9gag
------------------------------------------

In an endeavor to give info that was useful to our followers, we've attempted to get the relevance image about Template. Can delight in writing. Hoax disproved with a dependable source.

 Using Resume 9gag
-------------------

Whether possess an organization or you would like to start one, it's possible to discover some amazing resources throughout the SBA. Each city or country could have websites. Most of all, your resume needs to be brief steady, and clear and easy to peruse. You might need to sort through a number of those videos to get a great one, but there are a lot of instructors and experts out there to find out from.

 The Little-Known Secrets to Resume 9gag
-----------------------------------------

Trying to find ideas is one of the absolute most fun activities. If we might not discover the ideas that are desired however, it may also be annoyed. Approaches to make certain to do your homework. Checkout Simplemost for concepts and additional excellent strategies to create the maximum out of existence.

The articles your buddies share produce the world seem to be a location or full of injustice that is shocking. We'd like to create the world a happier place. It's true that the planet has been changed by the web but it hasn't been all smooth sailing. Discover amazing stuff, accumulate the scenarios you adore, buy everything in 1 place. No estate investment that is actual.

It looks Marissa Mayer won't be watching out for a new task immediately. Merchandiser I utilize smart.

There are a whole lot of design and ideas from the article resume cheat sheet it is possible to find, you can discover ideas from the gallery. This page consists of directions about how to remove. The remedy is below the button of the mouse. This picture was printed by admin.

 A History of Resume 9gag Refuted
----------------------------------

There's an number of websites specializing in providing you with the complete picture on social issues warts and all. What's your best strength. Students may learn the role along with the way to write shots employing various lighting procedures. They'll learn the fundamental elements of sculpture, such as form proportions and space, and they will be introduced to casting and mold-making procedures.

So we attempted to locate some Best Resume Ever 9gag picture. English Literacy could be provided dependent on the requirements of the neighborhood community. have also had a great influence on the lifestyle. Veterinarians need problem-solving skills that are strong since they need to figure out what creatures.

They utilize clinical trials and other investigative approaches to attain their findings. The procedure that is user-friendly that is simple attracts an increasing number of visitors. It's the quickest and search engine. Make certain you get for. It's well-known for info that is ideal and dependable.

The simplest ruses are the best. It is possible that you read in accordance. Relaxation and the ease that we're enjoying today can be attributed.

 How to Choose Resume 9gag
---------------------------

It's now available in 36 languages. With the web, you can reach billions of individuals within some of a moment.

 What You Should Do About Resume 9gag Starting in the Next Seven Minutes
-------------------------------------------------------------------------

Medical scientists conduct research targeted at improving human wellbeing. Even in the event that you would rather learn about things like history, astronomy or mathematics for its pleasure you're find some intriguing options. As an example, business owners might discover how to do performance reviews or review of integrating the benefits. This infographic has all you need to understand about creating an impressive resume.

extension: markdown


text:
# PyMC4

Pre-release development of high-level probabilistic programming interface for TensorFlow.  Please contribute or participate [on github](https://github.com/pymc-devs/pymc4).

## Installation Instructions
 - Install using `pip`
 ``` bash
 pip install --user git+https://github.com/pymc-devs/pymc4.git#egg=pymc4
 ```

## Simple Example
### Import pymc4 and Edward2
``` python
import pymc4 as pm
from tensorflow_probability import edward2 as ed
```
### Model Initialization
``` python
model = pm.Model()
```

### Model Definition
The model has to be defined in a single function with<EMAIL_ADDRESS>decorator.
``` python
@model.define
def simple(cfg):
    normal = ed.Normal(loc=0., scale=1., name='normal')
```

### Sampling
``` python
trace = pm.sample(model)
```

### Visualize the trace using arviz
``` python
# See https://github.com/arviz-devs/arviz
# pip install git+git://github.com/arviz-devs/arviz.git
import arviz as az
%matplotlib inline

posterior_data = az.convert_to_dataset(trace)
az.plot_posterior(posterior_data, figsize=(8, 4), textsize=15, round_to=2)
```

Here is a [blog post](https://sharanry.github.io/post/eight-schools-model/) showcasing the differences between PyMC3 and PyMC4 using the Eight Schools model.

## Contributors

For a full list of code contributors based on code checkin activity, see the [GitHub contributor page](https://github.com/pymc-devs/pymc4/graphs/contributors).

As PyMC4 builds upon TensorFlow, particularly the TensorFlow Probability and Edward2 modules, its design is heavily influenced by innovations introduced in these packages. In particular, early development was partially derived from a [prototype](https://github.com/tensorflow/probability/blob/9c2a4c8bbeddebded2b998027ec7111dcdfd9070/discussion/higher_level_modeling_api_demo.ipynb) written by Josh Safyan.

## License

[Apache License, Version 2.0](https://github.com/pymc-devs/pymc4/blob/master/LICENSE)


text:
# Satellite Imagery Integration with Planet

Build a live satellite map by integrating GTFS transit data with the most recent images from Planet.

The template file containing a workspace that demonstrates how to generate the map shown in the live demo can be found inside the fmeTemplate folder.

repository: safesoftware/planetSatelliteImagery

repo_name: safesoftware/planetSatelliteImagery


text:
# Dusk Network Technology Whitepaper

## Abstract

In order to satisfy a broad set of data transfer scenario, the Dusk network adds to the IP protocol suite (used mostly in a peer-to-peer fashion) an additional layer of security brought by the adoption of a mix of established strategies and novel techniques with the aim to protect the privacy of the communicating peers from any observer and each other while satisfying a variety of challenging use cases varying from fast communication (e.g. voice calls) to large data transfer (e.g. file transmission).

Dusk circumvents the notorious unreliability of crowd-sourced infrastructures by embedding economic incentives into the core mechanism of the network itself. Such incentives are designed to encourage peers to partake in the network in a permission-less, anonymous and private fashion.

## Paper Outline

The research paper outlines three different parts that constitute the pillars of the Dusk Network:

1. The Dusk Blockchain relying on Segregated Byzantine Agreement consensus algorithm
2. The Dusk Anonymous Network Layer describing the communication layer for the whole network
3. The Secure Tunnel Switching as a protocol for cryptocurrency-related payments of time-unbound transmission (streaming)
4. The protocol for secure file transfers

The sections are preceded by a description of the cryptographic primitives used throughout the paper and outlined in the [Cryptonote paper](https://cryptonote.org/whitepaper.pdf), [BA★](https://arxiv.org/pdf/1607.01341) and other resources.

repository: dusk-network/whitepaper

repo_name: dusk-network/whitepaper


text:
---
title: Joining domain via VPN with Windows Vista
disqus_identifier: 2006-10-joining-domain-via-vpn-with-windows-vista
comments: true
---

After being infected with a crappy piece of spyware, I took the plunge and repaved my machine with RC2 of Windows Vista. As it turns out, that may have been a futile exercise, since rumour has it that Vista will RTM on the 25th of October. But, I digress...

With Windows XP, it was pretty self explanatory on how to join a domain when you were remote. You would create a VPN connection, allow everyone access to it, and then when you'd login, you would select to dial that connection before logging in. That way, you could log in and get the credentials cached.

I spent quite a bit of time trying to figure out how to do this in Windows Vista, and what I ultimately found was that you needed to create the VPN connection with your local account (the one you created during setup). Dial the connection, and then switch user (the little flyout right next to the padlock on the Start menu). From there, you can type in your domain/username/password combination and it will log you in using that connection.

Once this is done, the credentials are cached, and you can log in to the machine using your domain information without actually being connected.