text:
# LocateiPark

Locate iPark is an app to remember where you parked your car.

How to SetUp
1. to Implement Google Map to Android App
   1. create a google map activity class or fragment activity class or appcompactacitvity class implement OnMapReadyCallback
   2. Add SHA-1 key to res\values\google_maps_api.xml which is autogenerated
   3. register to Google Play services ( Here is the link
   https://developers.google.com/mobile/add?platform=android&cntapi=signin&cntapp=Default%20Demo%20App&cntpkg=com.google.samples.quickstart.signin&cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fandroid%2Fstart%3Fconfigured%3Dtrue&cntlbl=Continue%20with%20Try%20Sign-In
   )
       1. add project name
       2. add SHA-1 key
       3. download google-services.json
       4. add the file under app/ (use this command=> mv path-of-downloaded-file/google-services.json app/) and
       5. follow the steps here (https://developers.google.com/identity/sign-in/android/sign-in?configured=true#add-config)
    4. Sometimes there are version conflict. In this case,check the conflicts and make some changes in gradle.build (both app and project levels)

(More to come...)

App Architecture
1. Implementation of Google Map and google play services to AppCompactActivity
    1. get latlng location from Network connectivity. if not, from GPS.

2. Implementation of Navigation (Drawer)Bar on the left

For updating after every pull from github,

1. change google API Keys and SHA-1 key in /values/google-services.xml with your own keys.

repository: ClaraChenCS/LocateiPark

repo_name: ClaraChenCS/LocateiPark


text:
# clue/json-query [![Build Status](https://travis-ci.org/clue/php-json-query.svg?branch=master)](https://travis-ci.org/clue/php-json-query)

An implementation of the [JSON Query Language](https://github.com/clue/json-query-language) specification in PHP.

The [JSON Query Language](https://github.com/clue/json-query-language) specification is currently in draft mode.
This library implements the [v0.4 draft](https://github.com/clue/json-query-language/releases/tag/v0.4.0).

> Note: This project is in beta stage! Feel free to report any issues you encounter.

## Quickstart example

Once [installed](#install), you can use the following code to get started:

```php
$filter = new QueryExpressionFilter(array('age' => 20));

$filter->doesMatch(array('name' => 'Tester', 'age' => 20))); // true
$filter->doesMatch(array('name' => 'Tester', 'age' => 22))); // false
```

## Install

The recommended way to install this library is [through composer](http://getcomposer.org). [New to composer?](http://getcomposer.org/doc/00-intro.md)

```JSON
{
    "require": {
        "clue/json-query": "~0.3.0"
    }
}
```

## License

MIT

license: MIT

repository: dcarbone/php-json-query

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: dcarbone/php-json-query


text:
etcdcd
==============

[![Build Status](https://travis-ci.org/matt-deboer/etcdcd.svg?branch=master)](https://travis-ci.org/matt-deboer/etcdcd)
[![Docker Pulls](https://img.shields.io/docker/pulls/mattdeboer/etcdcd.svg)](https://hub.docker.com/r/mattdeboer/etcdcd/)

**etcd cluster discovery**

Assists in creation/joining/pruning of an etcd (2.x, 3.x) cluster using the `static` discovery mechanism.
Supports `aws` (ASG-based masters) and `vsphere` deployments currently.

## Motivation

Use this binary (or docker image) to produce appropriate environment variable values for
`ETCD_NAME`, `ETCD_INITIAL_CLUSTER`, `ETCD_INITIAL_CLUSTER_STATE`, and `ETCD_PROXY` used in [static](https://coreos.com/etcd/docs/latest/op-guide/clustering.html#static) cluster configuration mode.

The values are generated using the following algorithm:

1. platform-specific discovery of the set of expected cluster memebers' names and peer & client URLs
1. check with the expected members for a pre-existing cluster

    - if an existing cluster is found, and we are one of the expected members, join the existing cluster--attempting to
      evict any current cluster members that are not in the set of expected members
    - if no existing cluster is found and we are one of the expected members, form a new cluster
    - if we are not one of the expected members, and proxy mode is specified, proxy the new or existing cluster
    - otherwise, report invalid cluster state

## Usage

```
NAME:
   etcdcd -
    Dynamically discover etcd cluster membership for a specific platform.
    Useed to produce appropriate environment variable values for
    'ETCD_NAME', 'ETCD_INITIAL_CLUSTER', 'ETCD_INITIAL_CLUSTER_STATE',
    and 'ETCD_PROXY' for use use in static cluster configuration mode.

USAGE:
   etcdcd [global options] command [command options] [arguments...]

VERSION:
   v0.1

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --platform value              The platform ('aws' or 'vsphere') [$ETCDCD_PLATFORM]
   --platform-config-file value  The platform config file; for platform 'aws', this is
                                       unnecessary/ignored when using an instance role; for platform
                                       'vsphere', this file uses the same format as required by the
                                       vsphere kubernetes cloud provider [$ETCDCD_PLATFORM_CONFIG]
   --output-file value           The path to the output file where results will be
                                       written; uses STDOUT if not specified [$ETCDCD_OUTPUT_FILE]
   --client-port value           The port advertised for etcd client access (default: 2379) [$ETCDCD_CLIENT_PORT]
   --server-port value           The port advertised for etcd client access (default: 2380) [$ETCDCD_SERVER_PORT]
   --client-scheme value         The scheme for etcd client access urls (default: "http") [$ETCDCD_CLIENT_SCHEME]
   --server-scheme value         The scheme for etcd server access urls (default: "http") [$ETCDCD_SERVER_SCHEME]
   --proxy                       Whether to enable proxy mode [$ETCDCD_PROXY_MODE]
   --master-names value          The naming pattern used to locate the masters; for platform 'aws',
                                       this will be the name of the masters autoscaling group;
                                       for platform 'vsphere', this will be a name-glob matching the vm names
                                       of the masters (e.g., 'k8s-master-*') [$ETCDCD_MASTER_NAMES]
   --dry-run                     Don't perform any changes; instead log what would have been done [$ETCDCD_DRY_RUN]
   --verbose, -V                 Log extra information about steps taken [$ETCDCD_VERBOSE]
   --ignore-naming-mismatch      Whether to ignore names (and only compare peer urls) when
                                       looking for existing members [$ETCDCD_IGNORE_NAMING_MISMATCH]
   --help, -h                    show help
   --version, -v                 print the version
```

repository: matt-deboer/etcdcd

repo_name: matt-deboer/etcdcd


text:
# Code Highlighter (Source)

This repository contains the source code of the Code Highlighter website. The site is intended to create inline stylized HTML that is suitable for uploading to D2L discussion boards.

repository: coreglobaltech/highlighter-src

branch_name: refs/heads/main

repo_name: coreglobaltech/highlighter-src


text:
# Word Count

Given a phrase, count the occurrences of each word in that phrase.

For example for the input `"olly olly in come free"`

```text
olly: 2
in: 1
come: 1
free: 1
```

* * * *

For installation and learning resources, refer to the [exercism help page][].

[exercism help page]: http://exercism.io/languages/lfe

To run the provided tests, you will need `make`.
Open a terminal window and run the following from the exercise directory:

```sh
make test
```

You should now be able to see the results of the test suite for the exercise.

## Source

This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour.

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

repository: cmccandless/lfe

repo_name: cmccandless/lfe


text:
# Set-up Sideload IPA

- Get the Apple Music APK and extract it somewhere

> You can download only the slice for your architecture, we don't need everything else

- Move the lib/ folder next to the executable

- \(Optional) remove in lib/ the folders that does not designate your architecture and
delete everything in the remaining folder except *libstoreservicescore.so* and *libCoreADI.so* to
save space


text:
---
title: High engagement, larger screens
metadesc: Android fuels mobile apps on devices that range far beyond your typical small-screen smartphone.
tags:
  - leader's corner
  - trend
  - large screens
  - window management
  - mouse support
  - keyboard support
  - android
  - optimization
authors:
  - allanl
date: 2019-10-24
---

_This article originally appeared on Android Developers Blog._

Android fuels mobile apps on devices that range far beyond your typical small-screen smartphone, from new Chromebooks like the lightweight, high-performance [Google Pixelbook Go](https://store.google.com/us/product/pixelbook_go) to multi-display devices and foldable phones like the [Samsung Galaxy Fold](https://www.samsung.com/us/mobile/galaxy-fold/). Not to mention the [more than 175M Android tablets](/{{locale.code}}/posts/expand-your-app-beyond-mobile-to-reach-android-users-at-large) that have the Google Play Store installed.[^1]

[^1]: The number of tablets only accounts for devices that have the Google Play Store installed (e.g., excluding tablets in China); the actual number of tablets capable of running Android applications is much larger.

These large-screen devices set the stage for more engaging and visually immersive experiences, whether by [creating a larger canvas for creativity](/{{locale.code}}/stories/concepts) or by giving users [faster, more flexible ways to work](/{{locale.code}}/stories/infinite-painter). As we’ve continued to prioritize large-screen devices with OEM partners like Samsung, Asus, and Lenovo, we’ve been able to expand our reach to a huge new audience of users.

During the week of Black Friday in 2018, 1 in 3 notebooks sold in the U.S. were Chromebooks.[^2] Chromebook unit sales also increased 22% YoY, while the rest of the notebook category decreased -6.1%.[^3] And we’re not just reaching more users — we’re reaching more _engaged_ users. In fact, in just the last year, the total amount of time spent in Android apps on Chrome OS has grown 4X.[^4]

[^2]: The NPD Group, Inc., Retail Tracking Service, U.S., Notebook Computers, Chrome OS, based on units, Nov. 18, 2018–Nov. 24, 2018 vs. Nov. 19, 2017–Nov. 25, 2017.
[^3]: The NPD Group, Inc., U.S. Retail Tracking Service, Notebook Computers, based on units, Sept. 2018–Aug. 2019. Sales are adjusted for 5 weeks in Jan. 2018 vs. 4 weeks in Jan. 2019.
[^4]: Google Internal Data, March 2018–March 2019.

![YoY notebook sales in the U.S.](ix://posts/high-engagement-larger-screens-how/yoy-notebook-sales.gif)

By making adjustments for larger screens, you can provide richer experiences across all these devices and tap into a wider audience of app users. Development teams around the world — including Adobe Lightroom, [Evernote](/{{locale.code}}/stories/evernote), and [Gameloft](/{{locale.code}}/stories/asphalt-8), among many others — have already seen some incredible results:

## App developers driving engagement on larger screens

With the goal of allowing users to play any video file, anywhere, on any device or screen size, the developers at VideoLAN project [decided to adapt VLC](/{{locale.code}}/stories/vlc) — an open source, cross-platform multimedia player — for all screens. The team started by adding keyboard and mouse support before designing multiple versions of the layout to allow users to easily scale and resize the app.

Users can now enjoy the same immersive experience across a range of different devices and form factors, and VideoLAN has already received overwhelmingly positive feedback from users around the world.

[War Robots](/{{locale.code}}/stories/war-robots) — a 12-player real-time battle game developed by Pixonic — was originally designed for early-generation phones. The team enabled windowed gameplay so users could play in one window while watching their favorite streamers or upgrading their robots in another, created new tutorials and controls that appear whenever players switch between desktop and tablet mode, and added support for keyboard and mouse input.

More than 100,000 players have already played War Robots on Chrome OS since Pixonic rolled out the latest optimizations, which made War Robots’ battles even more thrilling and engaging on larger screens, and Pixonic has seen 25% longer user sessions on Chromebooks as a result.

## Is your app optimized for large-screen devices? Here are a few things to consider

### 1) Laptop and tablet mode

Test your core app functions to make sure everything works smoothly without crashing as users switch between different modes.

### 2) Window management and layout

Support multi-window mode and free-form window resizing, and be sure to design optimized layouts for both landscape and portrait orientations. Set up your app to correctly handle configuration changes to avoid crashes when people rotate their devices.

![Suite of devices](ix://posts/high-engagement-larger-screens-how/suite-of-devices.png)

### 3) Keyboard and mouse input

Make sure your app is fully functional without touch input, and add support for keyboards, mice, and game controllers (if applicable).

### 4) Hardware support

If you’re using NDK, be sure to support x86 (32 and 64bit) ABIs to ensure the highest possible performance.

## Build, test, and run Android apps on a Chromebook

From the start, our goal has been to make the Chromebook a simple, secure, and speedy environment for everyone. The launch of [Linux on Chrome OS](/{{locale.code}}/linux) allowed Android developers to build and test apps with a Chromebook. And earlier this year at I/O, we announced that [Android Studio 3.5 now fully supports Chrome OS](/{{locale.code}}/posts/chromeos-io-19) with a simple one-click installation.

Since then, we’ve been working on a few improvements that make Chromebooks an even better place for safe and seamless Android app development. Let’s start with the biggest one:

### Deploying an app directly to Chrome OS to enable full Android development

In the past, you could only test your apps by deploying them to Android phones. With Chrome OS’s upcoming M80 release, you’ll be able to deploy Android apps directly to your Chromebook. That way, you can develop and test your app on the same machine, all without a connected device or needing to put your laptop in developer mode. Developers can start testing this feature in developer channel in November.

### GPU acceleration for a snappier, jank-free UI (now in beta channel)

We’ve enabled GPU support to reduce latency and deliver a snappier UI. That goes for developer apps such as Android Studio, Unity Editor, or Visual Studio Code. And for developers who also work on web apps, GPU acceleration means faster testing with Chrome Canary or Firefox.

### Container backup and restore to easily move between devices

Previously, Linux files and apps were tied entirely to the device — if you lost your device, you lost all the work inside of it.  The backup file can be restored at any point, either on the same machine — which is helpful when jumping back to a previous state — or to move to another Chromebook.

You can now find import and export buttons in your Linux settings.

### Picture-in-picture (PiP) support

If you’ve built PIP support into your Android apps, you’ll see that function work seamlessly in Chrome OS in 2020. But you can start testing this feature now by enabling PiP in Android settings → Developer options.

## Build your apps with larger screens in mind

With millions of users on Chromebooks, tablets, foldables, and now multi-display devices, designing app experiences with larger screens in mind is crucial. Seize this opportunity to engage more users by optimizing your existing apps to work great across all screens. And the latest Linux features on Chrome OS give you the power to use a single machine to build and run Android apps. Don’t hesitate to take action to ensure your apps work seamlessly on larger screens with Linux on Chrome OS.

gha_language: JavaScript


text:
GitHubSourceCodeCollector
=========================

Collect source code details from GitHub based on URL and branch

Running in development
----------------------

Type

    mvn spring-boot:run

repository: jstrachan/Hygieia

repo_name: jstrachan/Hygieia


text:
---
layout: post
title:  "New HPO Annotation File Format"
date:   2018-05-02 05:00:00
categories:
---

## New HPO Annotation File Format

The HPO project is transitioning to a new annotation file format in 2018, and we are requesting comments, suggestions, and other feedback prior to making the switch.
The current annotation format dates back to the early days of the HPO project in 2009 and needed some minor improvements to be able to capture more metadata about the phenotypic abnormalities that characterize disease.
The 2009-present format is described here: http://human-phenotype-ontology.github.io/documentation.html#annot
The new 2018-onwards format is described here:
http://hpo-annotation-qc.readthedocs.io/en/latest/annotationFormat.html#new-and-old-big-file-formats

The main differences are

1. The frequency field is now strictly constrained to have one of three formats: HP:0003577 (a term from the frequency subontology) or 12/45 or 22%
2. There is a field that can indicate sex-limited phenotypes
3. There is a field that can be used to record terms from the HPO ClLinical modifier subontology (e.g., “bilateral” or “transient”)
4. The Aspect field has been updated to reflect the fact that annotations can come out of the subontologies Phenotypic abnormality, Inheritance, Clinical course, or Clinical Modifier.

The new annotation file is located on our [Jenkins server](http://compbio.charite.de/jenkins/job/hpo.annotations.2018/) and is called phenotype.hpoa.

Feedback on the format is welcome. We also welcome feedback on the question whether the practice of having a separate file for negative ("NOT") phenotype annotations should be maintained, since we are considering putting all information in one file (the negative lines have a NOT in column 4 in both new and old formats).

Please contact<EMAIL_ADDRESS>with questions or comments.

extension: markdown

gha_language: CSS


text:
# Diploma Thesis: "Dynamic Simulation of Virtual Objects for Augmented Reality Applications. Development of An Augmented Reality Chess"

YouTube Video Playlist: https://www.youtube.com/playlist?list=PLhmsY0CqZsmPTAaMi-jzdsAr4nx75kSkK
More Details: http://mariosbikos.com/an-interactive-augmented-reality-chess

# Abstract

In order to enhance immersion in augmented reality systems, solutions must not only present a realistic rendering of the virtual objects, but also allow natural hand interactions. The main goal of this project was to utilize and introduce advanced techniques for the superimposition and manipulation of virtual objects over the view of the real world for mixed reality simulations. In this work, a board of markers was used for computing the camera pose seamlessly and a pinch gesture detection algorithm was implemented, employing user’s thumb and forefinger to interact with the virtual content, using an RGB-D camera. Ultimately, a Mixed Reality Chess was developed, focused on providing an immersive experience to users, so that they are able to manipulate virtual chess pieces in front of a real table and play against a chess engine.

# Part 1

Virtual Object Manipulation

# Part 2

Occlusion Handling


text:
---
title: Progress Bars
description: Provide progress information to users outside of a BrowserWindow.
slug: progress-bar
hide_title: true
---

# Progress Bars

## Overview

A progress bar enables a window to provide progress information to the user
without the need of switching to the window itself.

On Windows, you can use a taskbar button to display a progress bar.

![Windows Progress Bar](../images/windows-progress-bar.png)

On macOS, the progress bar will be displayed as a part of the dock icon.

![macOS Progress Bar](../images/macos-progress-bar.png)

On Linux, the Unity graphical interface also has a similar feature that allows
you to specify the progress bar in the launcher.

![Linux Progress Bar](../images/linux-progress-bar.png)

> NOTE: on Windows, each window can have its own progress bar, whereas on macOS
and Linux (Unity) there can be only one progress bar for the application.

----

All three cases are covered by the same API - the
[`setProgressBar()`][setprogressbar] method available on an instance of
`BrowserWindow`. To indicate your progress, call this method with a number
between `0` and `1`. For example, if you have a long-running task that is
currently at 63% towards completion, you would call it as
`setProgressBar(0.63)`.

Setting the parameter to negative values (e.g. `-1`) will remove the progress
bar. Setting it to a value greater than `1` will indicate an indeterminate progress bar
in Windows or clamp to 100% in other operating systems. An indeterminate progress bar
remains active but does not show an actual percentage, and is used for situations when
you do not know how long an operation will take to complete.

See the [API documentation for more options and modes][setprogressbar].

## Example

In this example, we add a progress bar to the main window that increments over time
using Node.js timers.

```javascript fiddle='docs/fiddles/features/progress-bar'
const { app, BrowserWindow } = require('electron')

let progressInterval

const createWindow = () => {
  const win = new BrowserWindow({
    width: 800,
    height: 600
  })

  win.loadFile('index.html')

  const INCREMENT = 0.03
  const INTERVAL_DELAY = 100 // ms

  let c = 0
  progressInterval = setInterval(() => {
    // update progress bar to next value
    // values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
    win.setProgressBar(c)

    // increment or reset progress bar
    if (c < 2) c += INCREMENT
    else c = 0
  }, INTERVAL_DELAY)
}

app.whenReady().then(createWindow)

// before the app is terminated, clear both timers
app.on('before-quit', () => {
  clearInterval(progressInterval)
})

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

app.on('activate', () => {
  if (BrowserWindow.getAllWindows().length === 0) {
    createWindow()
  }
})
```

After launching the Electron application, the dock (macOS) or taskbar (Windows, Unity)
should show a progress bar that starts at zero and progresses through 100% to completion.
It should then show indeterminate (Windows) or pin to 100% (other operating systems)
briefly and then loop.

![macOS dock progress bar](../images/dock-progress-bar.png)

For macOS, the progress bar will also be indicated for your application
when using [Mission Control](https://support.apple.com/en-us/HT204100):

![Mission Control Progress Bar](../images/mission-control-progress-bar.png)
[setprogressbar]: ../api/browser-window.md#winsetprogressbarprogress-options

repository: electron/electron

repo_name: electron/electron


text:
# PIG-DICE

> A Pig-dice game
# About

It was written primarily in **html**, **css**,**bootstrap** and **javascript**.

# Contributer

The code was written by [Ondoro Samuel].](https://github.com/Ondoro)

# Purpose

For entertainment and learning how to code
# How to use

save the index.html file in your local machine. open the file with your browser.

# Found a Bug?
You can help fixing by going to (Ondoro/github/pig-dice/Master)

# License

copyright(c) 2017
MIT License

Copyright (c) [2017] [Samuel Ondoro]

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

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

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

![MoringaSchool](http://Ondoro/github.io/pig-dice)

The contents of this repository are bounded by the following [license](https://github.com/Ondoro/pig-dice/Master/LICENSE.txt)

repository: Ondoro/pig-dice

repo_name: Ondoro/pig-dice


text:
---
title: "Adding lyrics to your MP3 via iTunes"
date: 2009-05-03 01:58:00
tags: []
---

I found tonight an interesting site that built an application that insert the lyrics inside your mp3 collection.

It requires iTunes and the .NET framework.

It can be found [here](http://derreckdean.wordpress.com/2008/09/10/lyrics-on-the-iphone-and-late-night-coding-sessions/). I will rewrite the application in C#, improve the source and contact the author if we can put it in Google Code or Codeplex.

Enjoy!

gha_language: Stylus


text:
---
title: "j.hash"
---

Compute a string that identifies a fact.

```typescript
const hash = j.hash(fact);
```

This method returns a base-64 encoded SHA-512 hash of a canonical string produced from the fact's fields and predecessors

## Examples

The hash is best used to stand in for the identity of a fact.
It is suitable for use as a key in a JavaScript dictionary.

```javascript
let messagesByHash = {};
for (const message of messages) {
    const hash = j.hash(message);
    messagesByHash[hash] = message;
}
```

You will also find it useful as a key for a React component.
Use the `j.hash` function inside of the specification to produce a hash for each fact.

```tsx
const projectsForUser = model.given(User).match((user, facts) =>
  facts.ofType(Project)
    .join(project => project.owner, user)
    .select(project => ({
      hash: j.hash(project),
      identifier: project.identifier
    })
  );

export function ProjectsPage() {
  const user = useUser();
  const { loading, data, error } = useSpecification(j, projectsForUser, user);

  return (
    <div>
      {data && <ul>
        {data.map(project => (
          <li key={project.hash}>
            {project.identifier}
          </li>
        ))}
      </ul>}
    </div>
  );
}
```

Object comparison in JavaScript is by reference.
Jinaga does not guarantee that two instances of a fact will have the same reference.
The hash provides a much better method for identity comparison.

```javascript
if (otherUser !== thisUser) {
    // Not correct: two distinct objects could both represent the same fact.
}

if (otherUser.publicKey !== thisUser.publicKey) {
    // Sometimes correct: only suitable for facts with no predecessors and a distinguishing field.
}

if (j.hash(otherUser) !== j.hash(thisUser)) {
    // Preferred: this takes all fields and predecessors into account.
}
```

The hash does not include the fact's type.
In most use cases, you want to distinguish among several facts of the same type.
However, if your use case allows for multiple types, and they have similar shapes, you will want to combine the type with the hash.

```javascript
const key = `${fact.type}:${j.hash(fact)}`;
```


text:
# CCM identification field guide

Identification of a CCM of unknown configuration can be broken down into two
parts: identifying the intended output voltage (1.2, 1.5, or 2.5 Volts = 12,
15, 25) and identifying whether it is a stand-alone single master (A), a master
with support for a slave (M), or a slave (S). Here we'll call these Output
Level and Role, respectively.

## Identifying Output Level

To identify the output voltage of an unknown CCM, first inspect closely the
potentiometer (POT-1). There is a 'B' logo, several arrows for benchmark
points, and a 3-digit number (see picture). The three digit number may be used
to identify the intended output voltage:

![Picture of trimmer pot](trimmer.png)

| Code | Voltage output [V] |
|------|--------------------|
| 104  | 1.2                |
| 203  | 1.5                |
| 502  | 2.5                |

## Identifying the CCM Role

To identify whether the type is (M)aster, (S)lave or (A)lone (a.k.a. single
master), inspect the 6 resistors on the bottom of the CCM (bottom here defined
when the CCM is oriented such that the text is readable). From left to right,
if we denote an empty pad by 0 and a populated resistor by 1, we have:

| Type                                       | Image                                                         |
|--------------------------------------------|---------------------------------------------------------------|
| Subtype A, single master - \[0,0,0,1,1,0\] | ![Sense configuration resistors for xxA CCMs](ccm_id-00a.png) |
| Subtype M, master - \[0,1,0,1,1,0\]        | ![Sense configuration resistors for xxM CCMs](ccm_id-00m.png) |
| Subtype S, slave - \[1,0,1,0,0,1\]         | ![Sense configuration resistors for xxS CCMs](ccm_id-00s.png) |

## Example CCM

An example identification is shown in the picture.
![Example of identifying features on 15M CCM](ccm_id.jpg)

repository: umd-lhcb/ut-hw-doc

gha_language: Nix

repo_name: umd-lhcb/ut-hw-doc


text:
## Logic

task | `code`
- |-
Numeric comparisons | `==, !=, <, <=, >, >=, ===` (last one is true, if value *and* type are the same -> egality)
AND | `x < y && y < z` or (faster) `x < y < z`
OR | `x || y`

**for-loop:**
```
for i in 1:10
	x += i
end
```

**multidimensional for-loop:** `for i in 1:N, j in 1:N`

**while-loop:**
```
while x < 1
	...
end
```

**terminate loop prematurely:** `break` terminates the loop, `continue` skips the current iteration and jumps to the next one, `return` ends the whole function

**if-then-else:**
```
if x == 1
	...
elseif x <= 0
	...
else
	...
end
```
**increase variables:** `x += 1` or also `x *= 2`

repository: ACCakut/julia-physicists-cheatsheet

repo_name: ACCakut/julia-physicists-cheatsheet


text:
# Automated Unit Test Generation

This application generates automatically unit tests. It's aim is to get 100% line coverage but not 100% test coverage.

Current version only works with functions which have basic if-else structure. Anything more complex will not work. This is a proof of concept level application.

## Setup, Running and Testing

Application is based on [Node.js](https://nodejs.org/). Install it before proceeding.

```bash
# Install
npm install

# Run
npm start target.js

# Example usage
npm start test/cases/pick-one.js
npm start test/cases/sum.js

# Test project
npm test
```

## The purpose of tests

[TDD saves resources](https://www.computer.org/csdl/mags/so/2007/03/s3024.pdf) and:

  1. Design aid: Writing tests first gives you a clearer perspective on the ideal API design.
  2. Feature documentation (for developers): Test descriptions enshrine in code every implemented feature requirement.
  3. Test your developer understanding: Does the developer understand the problem enough to articulate in code all critical component requirements?
  4. Quality Assurance: Manual QA is error prone. In my experience, it’s impossible for a developer to remember all features that need testing after making a change to refactor, add new features, or remove features.
  5. Continuous Delivery Aid: Automated QA affords the opportunity to automatically prevent broken builds from being deployed to production.

Source: [Why Bother with Test Discipline?](https://medium.com/javascript-scene/what-every-unit-test-needs-f6cd34d9836d)

## Design Decisions

These aspects greatly affect test generation performance and results:
  1. Scoring function which directs the evolution of the genomes.
  2. Meta nucleotide treshold.
  3. Time allocated to mutations.
  4. Gradien descent part for amplitude change of mutations over iterations and amount of genomes to choose from.

Speeding up factors
  * Befeficially precalculated starting set
  * Different agent programs for different type of modules

Terms
  * A genome is full set of genetic material and is formed by genes. Our genome set is all the possible test cases that could be generated.
  * A gene is a part of genome and defines a unit of heredity. For us a gene represents a test case.
  * A nucleotide is a building block of a gene. Our genes are comprised from numbers and a nucleotide is one of those numbers.

### Scoring

"As a general rule, it is bretter to design performance measures according to what one actually wants in the environment, rather than how one thinks the agent should behave." (Machine Learning - the Third Edition, Russel & Norvig 2010, page. 37)

In simple version it seems to be enought to follow the amount of lines getting covered. A good addition would be the amount of test cases required to get the current result. Less cases would increase the bonus. And the result would aim to get high line coverage with less test cases.

```js
// file: src/scoring.js

function score(stats) {
  return stats.visited.length * 10000;
}
```

### Meta Nucleotide

For a test case there are three kinds of nucleotides:

1. Is a gene active? If it is, print the related test case. If not, do not include the test in the test file. This is meta nucleotide.
2. Type of a parameter. Only basic types for now: uint, small int, int, double, string, bool and null.
3. The value of the previously described type.

The gene structure could be for a two parameter function:

```js
// The first is for activation.
// From the second to the last there are type and value pairs.
// All the values are in one array for the sake of performance and mutation handling.

[0.5, 0.1, 0.4, 0.2, 0.9]
```

There are double amount of possible genes than there are branches in the application. And activation value is for reducing the amount of resulting test cases to bare minimum.

```js
// file: src/data-adapter.js
// The treshold of gene activation.

const isActive = data[0] > 0.3;
```

### Amplitude change

```js
// file: src/case.js
// Per iteration step
amplitude -= 0.001;
if (amplitude < 0.1) amplitude = 0.3;
```

repository: reubber/algoritimo-genetico

repo_name: reubber/algoritimo-genetico


text:
# vue2vis

> This monorepo hosts Vue2 component wrapper for the [visjs](https://github.com/visjs) libraries.
> If you are looking for the old [vis@4.21](https://almende.github.io/vis/) please use the [branch 0.x](https://github.com/alexcode/vue2vis/tree/0.x)

## Usage

Please visit individual packages for installation and usage

- [Timeline](/packages/timeline/README.md)
- [Graph2d](/packages/graph2d/README.md)
- [Network](/packages/network/README.md)

For more details please check the full [VisJs documentation](https://visjs.org).

## List of currently implemented modules

- [x] Timeline
- [x] Graph2d
- [ ] Graph3d
- [x] Network

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

### Build Setup

```bash
# Once you have cloned this repo, install dependencies
yarn install
yarn lerna bootstrap

# build for development and production with minification
yarn prepare

```

## Testing

```bash
yarn test:unit
```

### Run demo locally

```bash
# Run demo at localhost:8080
yarn serve:graph2d
```

or

```bash
yarn serve:network
```

or

```bash
yarn serve:timeline
```

Go to <http://localhost:8080/> to see running examples

NOTE: If you make changes to the library you should run `yarn prepare` again in the root folder.
The dev server should detect modification and reload the demo

## Security

If you discover any security related issues, please email<EMAIL_ADDRESS>instead of using the issue tracker.

## Credits

- [Alex Couturon][link-author]
- [João Menighin](https://github.com/Menighin)
- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[link-author]: https://github.com/alexcode
[link-contributors]: https://github.com/alexcode/vue2vis/graphs/contributors


text:
# Mechanical Design Project

By: Da Huang
Created on 03/05/2015 using the [DMPTool](https://dmp.cdlib.org/) Template: NSF-GEN: Generic

You can find the full-text at [https://dmptool.org/api/v1/plans_full/14368.pdf](https://dmptool.org/api/v1/plans_full/14368.pdf)

## Types of data produced

> Types of data, samples, physical collections, software, curriculum materials, and other materials to be produced in the course of the project.

This data will focus on the process of a mechanical design project by a design team. Every team member will record all details of their work, including brainstorming ideas, design process, prototypes, optimizing process, and all modifications.

Designers will create documents to record their works with original formats and text documents to record related information. Team leader will create storage and file folders to store and manage these documents.

A data management system will guide the team to record the data in a unified naming method, which include the information of title, subtitle, name of recorder, date, and version.

## Data and metadata standards

> Standards to be used for data and metadata format and content (where existing standards are absent or deemed inadequate, this should be documented along with any proposed solutions or remedies).

As a design project, many softwares will be applied to design and draw components. In order to make it easy to manage and apply, the team will use unified softwares as much as possible. Description documents will be created to record related information of images or special files.

Local metadata standards will be set to manage the data. Every file will be named with author, title, date and version. Users or viewer can use the file names to track the process of every step of the project.

Images (.JPG, .BMP) will record the original barnstorming ideas with handwriting. These documents can indicate how an idea start and grow.

3D drawing Pictures (*.prtdot, *.asmdot, *.drwdot) will record the design of components and structures and all versions of prototypes.The design team will use SolidWorks 2014 to draw mechanical structures and prototype.

Print documents (.Pdf) will record the public-used documents, like questionnaires and manuals.

Reports (.docx) will record the essential information in the design process, like the summaries, analyses and conclusions.

Statistical documents (.xlsx) will record the numerical data that used to analyze the design parameters and results.

## Policies for access and sharing

> Policies for access and sharing; Provisions for appropriate protection of privacy, confidentiality, security, intellectual property, or other rights or requirements.

This data will be available in academic websites as a typical design project example after getting permissions of all team members. To gain the access of the data, users should get an account in the academic websites and related licenses. The design team would retain the right to use and modify the data before wider distribution.

Embargo periods: Prototype documents contain the original information and patents. Users should not use them as a profitable use.

Intellectual property rights: Every member of the design team has the right to stop sharing this data.

No ethical issue will appear in the data.

## Policies for re-use, redistribution

> Policies and provisions for re-use, re-distribution, and the production of derivatives.

This data records a complete process of a design project. Users should have some engineering background to understand or apply this data. Engineering students, new designers and project managers would be interested in this data.

Students and designers can use this data as a guide or inspiration to design mechanism according to functions.

Project managers can use this data as a template to manager design teams to finish related tasks.

## Plans for archiving and preservation

> Plans for archiving data, samples, and other research products, and for preservation of access to them.

This data will be stored in the team cloud drive as a backup. Team members will have the responsibilities to update and maintain this data. Team manager will check any modification of the data and make the data reviewable and integrated.

In order to help managing this data, team leader will make rules and methods to restrict the documents that will be upload to the file folders. If documents are edited by more than one team member, they should indicate the first and second author with their responsibilities and contributions.

Because of the patent problem, 3D drawing pictures will be preserved for 3 years. Prototype pictures will be transformed as 2D images to preventplagiarizing.

Processed 2016-09-28 16:57:10.795322

repository: bulib/dmp

repo_name: bulib/dmp


text:
# any-deferred

[![Greenkeeper badge](https://badges.greenkeeper.io/Qard/any-deferred.svg)](https://greenkeeper.io/)

A deferred promise implementation based on any-promise.

## Install

```sh
npm install any-deferred
```

## Usage

```js
const defer = require('any-deferred')
const fs = require('fs')

function readFile (file) {
  const { promise, resolve, reject } = defer()

  fs.readFile(file, (err, res) => {
    if (err) return reject(err)
    resolve(res)
  })

  return promise
}

readFile(__filename).then(console.log)
```

---

### Copyright (c) 2019 Stephen Belanger

#### Licensed under MIT License

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

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

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

repository: Qard/any-deferred

repo_name: Qard/any-deferred


text:
Why `kosher-`? This software does its best to conform to all the holy best practices of JavaScript; including proper style, linting, and testing. It aims to be an acceptable tool as well as an exemplar for learning and instructing good style.

# Quick start

## Store Payment Information

Send the Credit Card information and returns a Transaction ID, which you can use as a token for future transactions.

```javascript
var BluePay = require('kosher-bluepay');
var connection = BluePay.connect({
    accountId: 'ACCOUNT_ID',
    secretKey: 'SECRET_KEY',
    mode: 'TEST'
});

connection
.setCustomerInformation()
.setCardInformation()
.makeToken()
.process()
.then(function (status, transaction) {

}, function (err) {

});
```

## Charge a Customer

```javascript
// Continuing with the example above, using the same customer information.
connection
.sale('3.00')
.process()
.then(function (status, transaction) {

}, function (err) {

});
```
or reuse a transaction token
```javascript
// Clear the transaction specific data from connection
connection.reset();
// Load the transaction and complete the sale.
connection.sale('1.99', token).process();
```

## Check If a Customer Has Enough Credit Available

Determine if customer has enough credit available without charging card.

```javascript
connection.auth('1.99').process();
```

## Return Funds to a Customer

```javascript
connection.refund('1.99', token).process();
```

## Cancel a Transaction

You can cancel a transaction if it has not yet been settled. If a transaction has already been settled, then you must issue a refund instead.

This code cancels single transactions; it doesn't cancel recurring payments.

```javascript
connection.void(transactionId).process();
```


text:
About
=====

Implementation of [Neural Programmer-Interpreters](http://arxiv.org/abs/1511.06279) with Keras.

How to Demo
===========

[Demo Movie](https://youtu.be/s7PuBqwI2YA)

requirement
-----------

* Python3

setup
-----

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

create training dataset
-----------------------
### create training dataset
```
sh src/run_create_addition_data.sh
```

### create training dataset with showing steps on terminal
```
DEBUG=1 sh src/run_create_addition_data.sh
```

training model
------------------
### Create New Model (-> remove old model if exists and then create new model)
```
NEW_MODEL=1 sh src/run_train_addition_model.sh
```

### Training Existing Model (-> if a model exists, use the model)
```
sh src/run_train_addition_model.sh
```

test model
----------
### check the model accuracy
```
sh src/run_test_addition_model.sh
```

### check the model accuracy with showing steps on terminal
```
DEBUG=1 sh src/run_test_addition_model.sh
```

Implementation FAQ
==================
These are questions about implementation that I received in the past.

about pydot
-----------
Q: I am using Python3. I am getting an error "module 'pydot' has no attribute 'find_graphviz'".

A: Let's try `pydot-ng`.

`train_f_enc` method
--------------------
Q: What is the purpose of 'env_model' in 'train_f_enc' method which gets called by 'fit' method? My guess is, it is to train the weights of 'f_enc' layer.

A: Yes, that's right.

----

Q: Why is the target output of 'env_model' - [[first digit of sum], [ carry of sum]]?
Also, why does the target output not have 'output'
As per my understanding the weights of 'f_enc' layer should be trained only in 'self.model'.

A: Yes, in the original paper, 'f_enc' is trained with other layers. It is better not to be trained separately.

The reason of that in my implementation is just difficulty to train the model.
Especially it seemed to hard to train layers before LSTMs (like f_enc layer).
f_enc weights often became some NaNs. (I don't know why... keras problem? or ??)
So, I tried to train f_enc separately, and it seemed good (not best).

NOP program
-----------
Q: what's the purpose of NOP program?

A: I do not remember it much, but NOP (No Operation) is program_id = 0.
I thought that in the early days of learning, the predicted value often becomes 0, and harmless NOPs that do not perform unnecessary movements will learn more efficiently.
Although it is not certain whether it is effective...

`weights = [[1.]]`
------------------

Q: what's the purpose of `weights = [[1.]]` this initialization?

A: You mean `weights = [[1.]]` in `AdditionNPIModel#convert_output()`, don't you?

The `weights` means learning weights of [f_end, f_prog, f_args].
The first `weights = [[1.]]` means "f_end's weight=1".
f_prog and f_args weights are set to 1 if the teacher returns valid values.

gha_language: Python


text:
# AML Studio

An integrated version of [AML Studio](http://amlstudio.codeplex.com)
powers all of the AML inputs and can be run separately from the main
screen.

![AML Studio](aml-studio.png)

This version of AML Studio includes a number of improvements.  They include:

- Improved display of AML in the collapsed state

  ![Collapsed AML](aml-studio-tree.png)

- Table display of AML that is editable and can be converted back to AML statements

  ![Editing a table](aml-studio-table-edit.png)

- Support for parameterized queries leveraging the `@` symbol. Parameters can be
  either the entirety of a property or attribute or a portion of a SQL segment
  within a property or attribute

  ![Parameter substitutions](aml-studio-param.png)

- Support for find/replace including a normal mode, extended mode (supports \r, \n,
  etc.), Regex mode, and XPath mode.

  ![Find/replace](aml-studio-find-replace.png)

- Many useful commands (e.g. viewing items, invoking actions, running reports, etc.)
  can be invoked directly from the output editor's context menu

  ![Context menu](aml-studio-context-menu.png)

- Go directly to items referenced in AML by Ctrl+clicking on the links.

  ![Links](aml-studio-links.png)

- Reference useful queries in the AML Cookbook folder of the Table of Contents

  ![Cookbook](aml-studio-cookbook.png)

- The query currently under the cursor can be executed with `Ctrl+Enter`
- Auto-completion uses single quotes for easier inclusion in C# multi-line strings


text:
---
layout: post
title: The Red Sox's Contact-Heavy Approach
date: 2017-06-08 21:15:00 -0300
use-site-title: true
tags:
- BP Boston
- Offense
- Pace of play
- Strikeouts
- Contact
- Power pitching
---

This week at BP Boston I followed up on the piece I wrote  last week
about the slow pace of the Red Sox offense. Within that article I touched on the fact that while the Red Sox are really slow between pitches,
they tend to put the ball in play; the Red Sox have the lowest strikeout rate in baseball. In the high-strikeout era that we are amidst
this is no small feat. This got me (and my editor at BP Boston) wondering about how a high-contact team like the Red Sox, who rely on stringing
together hits to generate offense, fares against the big, bad strikeout machines of the league. Typically players and teams beat up on the finesse guys
(who tend to not strike many batters out) and do their best to stay alive against the power guys (who get a lot of strikeouts). This is true
for the Red Sox this year, but the difference in their performance against the two opposing pitcher types is smaller than many other teams.
Basically, to this point in the season they have taken a smaller penalty against the power pitchers, which is likely due to their heavy-contact approach.
This is an interesting aspect of this year's group and could have positive ramifications come playoff time, as the number of  innings given to power pitchers tends to be higher in October.
But October is a long-way away, and this offense still needs to ratchet things up a notch if they are even going to be a participant in
the 2017 postseason.

Head over to BP Boston to read the whole deal:  Hitting for Contact in the Strikeout Era

gha_language: HTML


text:
# `Sid\Phalcon\Auth`

Auth component for Phalcon.

Passwords are created using [`Phalcon\Encryption\Security::hash()`](https://github.com/phalcon/cphalcon/blob/v5.0.0/phalcon/Encryption/Security.zep#L413) and verified using [`Phalcon\Encryption\Security::checkHash()`](https://github.com/phalcon/cphalcon/blob/v5.0.0/phalcon/Encryption/Security.zep#L133).

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/SidRoberts/phalcon-auth/tests.yml?style=for-the-badge)](https://github.com/SidRoberts/phalcon-auth/actions)
[![GitHub release](https://img.shields.io/github/release/SidRoberts/phalcon-auth.svg?style=for-the-badge)]()

[![GitHub issues](https://img.shields.io/github/issues-raw/SidRoberts/phalcon-auth.svg?style=for-the-badge)](https://github.com/SidRoberts/phalcon-auth/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/SidRoberts/phalcon-auth.svg?style=for-the-badge)](https://github.com/SidRoberts/phalcon-auth/pulls)

## Version Requirements

[![](https://img.shields.io/badge/Phalcon-%3E%3D%205.0.0-76C39B?style=for-the-badge)]()

[![](https://img.shields.io/badge/PHP-%3E%3D%208.0.0-777BB3?style=for-the-badge)]()

## Installing

Install using Composer:

```json
{
    "require": {
        "sidroberts/phalcon-auth": "dev-master"
    }
}
```

## Documentation

See the [Wiki](https://github.com/SidRoberts/phalcon-auth/wiki).

## License

Licensed under the MIT License.
© [Sid Roberts](https://github.com/SidRoberts)

repository: SidRoberts/phalcon-auth

repo_name: SidRoberts/phalcon-auth


text:
# [Expressions Matter ](https://www.codewars.com/kata/expressions-matter "https://www.codewars.com/kata/5ae62fcf252e66d44d00008e")

**_Given_** *three integers* `a` ,`b` ,`c`, **_return_** *the **_largest number_** obtained after inserting the following operators and brackets*: `+`, `*`, `()`.
___
# Consider an Example :

**_With the numbers are 1, 2 and 3_** , *here are some ways of placing signs and brackets*:

* `1 * (2 + 3) = 5`
* `1 * 2 * 3 = 6`
* `1 + 2 * 3 = 7`
* `(1 + 2) * 3 = 9`

So **_the maximum value_** that you can obtain is  **_9_**.

___
# Notes

* **_The numbers_** *are always* **_positive_**.
* **_The numbers_** *are in the range* **_(1? ?? a,?b,?c? ?? 10)_**.
* *You can use the same operation* **_more than once_**.
* **It's not necessary** *to place all the signs and brackets*.
* **_Repetition_** *in numbers may occur* .
* You **_cannot swap the operands_**. For instance, in the given example **_you cannot get expression_** `(1 + 3) * 2 = 8`.

___
# Input >> Output Examples:

```
expressionsMatter(1,2,3)  ==>  return 9
```
## **_Explanation_**:
*After placing signs and brackets, the **_Maximum value_** obtained from the expression* `(1+2) * 3 = 9`.
___

```
expressionsMatter(1,1,1)  ==>  return 3
```
## **_Explanation_**:
*After placing signs, the **_Maximum value_** obtained from the expression is* `1 + 1 + 1 = 3`.
___

```
expressionsMatter(9,1,1)  ==>  return 18
```
## **_Explanation_**:
*After placing signs and brackets, the **_Maximum value_** obtained from the expression is* `9 * (1+1) = 18`.

repository: ParanoidUser/codewars-handbook

gha_language: Java

repo_name: ParanoidUser/codewars-handbook


text:
## Ship Machine Learning Model to Data Using PyCaret — Part II

### Binary Classification

### by Umar Farooque

![Photo by [Joshua Sortino](https://unsplash.com/@sortino?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)](https://cdn-images-1.medium.com/max/8390/0*3n2RWRuMocf7X67I)

My previous post [**Machine Learning in SQL using PyCaret 1.0](https://towardsdatascience.com/machine-learning-in-sql-using-pycaret-87aff377d90c)** provided details about integrating [**PyCaret](https://pycaret.org/)** with [**SQL Server](https://www.microsoft.com/en-ca/sql-server/sql-server-downloads)**. In this article, I will provide step-by-step details on how to train and deploy a Supervised Machine Learning Classification model in SQL Server using [**PyCaret 2.0](https://pycaret.org/) **(PyCaret is a low-code ML library in Python)**.**

**Things to be covered in this article:**

1. How to load data into SQL Server table

2. How to create and save a model in SQL Server table

3. How to make model predictions using the saved model and store results in the table

## **I. Import/Load Data**

You will now have to import CSV file into a database using SQL Server Management Studio.

Create a table “**cancer**” in the database

![](https://cdn-images-1.medium.com/max/2000/0*js8AFIoUDjQZZSPa.png)

Right-click the database and select **Tasks** **->** **Import Data**

![](https://cdn-images-1.medium.com/max/2000/0*tZSAwhgQU9Oq8-uc.png)

For Data Source, select **Flat File Source**. Then use the **Browse** button to select the CSV file. Spend some time configuring the data import before clicking the **Next **button.

![](https://cdn-images-1.medium.com/max/2000/1*F4b5xric6n9Mc5sjWT4tHg.png)

For Destination, select the correct database provider (e.g. SQL Server Native Client 11.0). Enter the **Server name**; check **Use SQL Server Authentication**, enter the **Username**, **Password**, and **Database **before clicking the **Next **button.

![](https://cdn-images-1.medium.com/max/2000/0*c514MMvjt3DavCyI.png)

In the Select Source Tables and Views window, you can Edit Mappings before clicking the **Next **button.

![](https://cdn-images-1.medium.com/max/2000/0*I4VhN7PyYrQfipU5.png)

Check Run immediately and click the **Next **button

![](https://cdn-images-1.medium.com/max/2000/0*uBqcVcjEyaUQsKNq.png)

Click the Finish button to run the package

## **II. Create ML Model & Save in Database Table**

**Classification **is a type of supervised machine learning to predict the categorical class **labels** which are discrete and unordered. The module available in the [**PyCaret](https://pycaret.org/)** package can be used for **binary** or **multiclass** problems.

In this example, we will be using a ‘**Breast Cancer Dataset**’. Creating and saving a model in a database table is a multi-step process. Let’s go by them step by step:

i. Create a stored procedure to create a trained model in this case an Extra Trees Classifier algorithm. The procedure will read data from the cancer table created in the previous step.

Below is the code used to create the procedure:

    *-- Stored procedure that generates a PyCaret model using the cancer data using Extra Trees Classifier Algorithm*

    DROP PROCEDURE IF EXISTS generate_cancer_pycaret_model;

    Go

    CREATE PROCEDURE generate_cancer_pycaret_model (@trained_model varbinary(max) OUTPUT) AS

    BEGIN

    EXECUTE sp_execute_external_script

    @language = N'Python'

    , @script = N'

    import pycaret.classification as cp

    import pickle

    trail1 = cp.setup(data = cancer_data, target = "Class", silent = True, n_jobs=None)

    *# Create Model*
    et = cp.create_model("et", verbose=False)

    *#To improve our model further, we can tune hyper-parameters using tune_model function.
    #We can also optimize tuning based on an evaluation metric. As our choice of metric is F1-score, lets optimize our algorithm!*

    tuned_et = cp.tune_model(et, optimize = "F1", verbose=False)

    *#The finalize_model() function fits the model onto the complete dataset.
    #The purpose of this function is to train the model on the complete dataset before it is deployed in production*

    final_model = cp.finalize_model(tuned_et)

    *# Before saving the model to the DB table, convert it to a binary object*

    trained_model = []
    prep = cp.get_config("prep_pipe")
    trained_model.append(prep)
    trained_model.append(final_model)
    trained_model = pickle.dumps(trained_model)'

    , @input_data_1 = N'select "Class", "age", "menopause", "tumor_size", "inv_nodes", "node_caps", "deg_malig", "breast", "breast_quad", "irradiat" from dbo.cancer'

    , @input_data_1_name = N'cancer_data'

    , @params = N'@trained_model varbinary(max) OUTPUT'

    , @trained_model = @trained_model OUTPUT;

    END;

    GO

ii. Create a table that is required to store the trained model object

    DROP TABLE IF EXISTS dbo.pycaret_models;

    GO

    CREATE TABLE dbo.pycaret_models (
    model_id  INT NOT NULL PRIMARY KEY,
    dataset_name VARCHAR(100) NOT NULL DEFAULT('default dataset'),
    model_name  VARCHAR(100) NOT NULL DEFAULT('default model'),
    model   VARBINARY(MAX) NOT NULL
    );

    GO

iii. Invoke stored procedure to create a model object and save into a database table

    DECLARE @model VARBINARY(MAX);
    EXECUTE generate_cancer_pycaret_model @model OUTPUT;
    INSERT INTO pycaret_models (model_id, dataset_name, model_name, model) VALUES(2, 'cancer', 'Extra Trees Classifier algorithm', @model);

The output of this execution is:

![Output from Console](https://cdn-images-1.medium.com/max/2000/1*rMPx1cdPMqxZ2xAZDpqzsA.png)

The view of table results after saving model

![SQL Server Table Results](https://cdn-images-1.medium.com/max/2000/1*8DcdhzXZupB_fqiO6SofhQ.png)

## **III. Running Predictions**

The next step is to run the prediction for the test dataset based on the saved model. This is again a multi-step process. Let’s go through all the steps again.

i. Create a stored procedure that will use the test dataset to detect cancer for a test datapoint

Below is the code to create a database procedure:

    DROP PROCEDURE IF EXISTS pycaret_predict_cancer;
    GO

    CREATE PROCEDURE pycaret_predict_cancer (@id INT, @dataset varchar(100), @model varchar(100))
    AS

    BEGIN

    DECLARE @py_model varbinary(max) = (select model

    from pycaret_models

    where model_name = @model

    and dataset_name = @dataset

    and model_id = @id

    );

    EXECUTE sp_execute_external_script

    @language = N'Python',

    @script = N'

    # Import the scikit-learn function to compute error.

    import pycaret.classification as cp

    import pickle

    cancer_model = pickle.loads(py_model)

    *# Generate the predictions for the test set.*

    predictions = cp.predict_model(cancer_model, data=cancer_score_data)

    OutputDataSet = predictions

    print(OutputDataSet)

    '

    , @input_data_1 = N'select "Class", "age", "menopause", "tumor_size", "inv_nodes", "node_caps", "deg_malig", "breast", "breast_quad", "irradiat" from dbo.cancer'

    , @input_data_1_name = N'cancer_score_data'

    , @params = N'@py_model varbinary(max)'

    , @py_model = @py_model

    with result sets (("Class" INT, "age" INT, "menopause" INT, "tumor_size" INT, "inv_nodes" INT,

    "node_caps" INT, "deg_malig" INT, "breast" INT, "breast_quad" INT,

    "irradiat" INT, "Class_Predict" INT, "Class_Score" float ));

    END;

    GO

ii. Create a table to save the predictions along with the dataset

    DROP TABLE IF EXISTS [dbo].[pycaret_cancer_predictions];

    GO

    CREATE TABLE [dbo].[pycaret_cancer_predictions](

    [Class_Actual] [nvarchar] (50) NULL,

    [age] [nvarchar] (50) NULL,

    [menopause] [nvarchar] (50) NULL,

    [tumor_size] [nvarchar] (50) NULL,

    [inv_nodes] [nvarchar] (50) NULL,

    [node_caps] [nvarchar] (50) NULL,

    [deg_malig] [nvarchar] (50) NULL,

    [breast] [nvarchar] (50) NULL,

    [breast_quad] [nvarchar] (50) NULL,

    [irradiat] [nvarchar] (50) NULL,

    [Class_Predicted] [nvarchar] (50) NULL,

    [Class_Score] [float] NULL

    ) ON [PRIMARY]

    GO

iii. Call pycaret_predict_cancer procedure to save predictions result into a table

    *--Insert the results of the predictions for test set into a table*

    INSERT INTO [pycaret_cancer_predictions]

    EXEC pycaret_predict_cancer 2, 'cancer', 'Extra Trees Classifier algorithm';

iv. Execute the SQL below to view the result of the prediction

    *-- Select contents of the table*

    SELECT * FROM [pycaret_cancer_predictions];

![Predictions Result](https://cdn-images-1.medium.com/max/2000/1*kboWnjA4K41DV6a__l79wA.png)

## IV. Conclusion

In this post, we learnt how to build a classification model using a PyCaret in SQL Server. Similarly, you can build and run other types of supervised and unsupervised ML models depending on the need of your business problem.

![Photo by [Tobias Fischer](https://unsplash.com/@tofi?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)](https://cdn-images-1.medium.com/max/8064/0*45eSsUjDsCd_7_-J)

You can further check out the [**PyCaret](http://pycaret.org/)** website for documentation on other supervised and unsupervised experiments that can be implemented in a similar manner within SQL Server.

My future posts will be tutorials on exploring other supervised & unsupervised learning techniques using Python and **PyCaret** within a S**QL Server**.

## V. Important Links

[PyCaret](https://pycaret.org/)

[My LinkedIn Profile](https://www.linkedin.com/in/umarfarooque/)

url: https://raw.githubusercontent.com/hamzafarooq/pycaret/980f4febd782c4adcdf1b12ae4231b3c61de0327/resources/Ship Machine Learning Model into SQL Server using PyCaret.md

repository: hamzafarooq/pycaret

repo_name: hamzafarooq/pycaret


text:
# Real time Markdown Editor
![image](https://user-images.githubusercontent.com/13199349/116452543-1fde8100-a85e-11eb-838f-d1ed39b80870.png)

**TL;DR**
**Markeer**, a collaborative markdown web-editor built with Express (potentionally react), to develop this project further:

```BASH
# Navigate to your projects folder
git clone https://github.com/dewarian/real-time-web-2021.git
npm i
npm run dev
# OR
yarn
yarn run dev
```

Or view the code with [Github1s](https://github1s.com/dewarian/real-time-web-2021/tree/asgmt/).

For school documentation please navigate to the [docs branch](https://github.com/dewarian/real-time-web-2021/tree/docs)

## Table of Content

- [description](#description)
- [Problem](#problem)
- [Solution](#solution)
  - [Sketches](#sketches)
- [Future](#future)
- [Technicalities](#technicalities)
  - [Installation](#installation)
  - [Data lifecycle](#data-lifecycle)
  - [Dependencies](#dependencies)
  - [Coding conventions](#coding-conventions)
  - [Git conventions](#git-conventions)
  - [Build Scripts](#build-scripts)
  - [Frameworks && Libraries](#frameworks--libaries)
  - [API](#api)
- [Honourable Mentions](#honourable-mentions)

## Description

The idea came from writing documentation for the [readme.md](./readme.md). There are many text editors in which you can collaborate but there haven't been many for markdown specifically. The one that came the closest is [Typora](https://typora.io/) and [Notion (export function)](https://www.notion.so/Export-a-page-as-Markdown-69b6031dd9454022abed8e23a86b0e1e).

The base functionality of **Markeer** is to write markdown with multiple users while seeing a live variant of it. The collaborative functionality will be created with [socket.io](https://www.socket.io).

## Problem

What is the problem?
The current problem is that I have zero experience with [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API), this is problematic and thus want to create something with sockets. After some contemplating I decided to create a text editor, specifically an editor to write markdown.

### Current problems
After implementing the core functionalities and testing these I have found the some UX breaking bugs. It is mostly contained in the editing of markdown and saving this markdown. See [issue #7 for the status of this problem.](https://github.com/dewarian/real-time-web-2021/issues/7#issuecomment-828665217)

## Solution

The solution would be a markdown editor created in NodeJS and some client-side. The best solution would be a Google Docs killer or competitor however you want to see it.

It will be done from a Read Me Driven Development manner where the readme is constantly updated to reflect the state of the application.

### Sketches

The interface I am imagining for this markdown editor is to focus on the functionality first. The most important activity would be able to write markdown and see what the user have written. Ideal case is to interpret the markdown and transforming it into the rendered variant without a separate window.

## Future

As mentioned earlier the ideal state of this application is to have a complete markdown editor where you can create multiple files, save those files, or even export those to use it in your next project.

Another cool idea would integration with Github, where you can add the markdown to a wiki or readme without having to manually paste the markdown.

**functionalities**
Actions that should be possible in a markdown editor, ordered in a manner according to the MoSCoW method. The following rows in the tables are activities that an user should be able to complete or enhance it's experience.

|                      |        Must        | Should |       Could        |       Would        |Implemented|
| :------------------- | :----------------: | :----: | :----------------: | :----------------: |--|
| Write Markdown       | :white_check_mark: |        |                    |                    |:heavy_check_mark:|
| Multi User support   | :white_check_mark: |        |                    |                    |:heavy_check_mark:|
| Storage for markdown | :white_check_mark: |        |                    |                    |:heavy_check_mark:|
| Github Intergration  |                    |        |                    | :white_check_mark: ||
| Shortcuts            |                    |        |                    | :white_check_mark: ||
| Prefix auto-complete |                    |        |                    | :white_check_mark: ||
| Delete Markdownn     |                    |        | :white_check_mark: |                    ||
| Export Markdown      |                    |        | :white_check_mark: |                    ||
| **Pleasurable UI state** |                    |        | :white_check_mark: ||:heavy_check_mark:|
| `//To Be continued`  |                    |        |                    |                    ||

**Style decisions**
Style decisions are decisions that are made for the user interface of the application, UI experiences that will be added as the project is being developed.
| |Must|Should|Could|Would|Implemented|
|:-------------------|:-:|:-:|:-:|:-:|--|
|Syntax Highlighting | | | :white_check_mark: | ||
|Dark Mode | | :white_check_mark: | | ||
|HTML styling|:white_check_mark:||||:heavy_check_mark:|
|`//To Be continued` | | | | |

## Technicalities

For this project to be able to developed on your machine there are some requirements:

- [Have node installed.](https://nodejs.org/en/)

### Installation

For development run the following commands:

```BASH
git clone https://github.com/dewarian/real-time-web-2021.git
npm install
npm run dev #or npm start
# or
yarn
yarn run dev #or yarn run start

Navigate to [localhost:8080](localhost:8080)
```

### Data lifecycle

The data flows bi-directional.
The data flows bi-directional because of socket.io, when a user joins a room it retrieves the data and sets that data to every client in that particular room.  Based on these events a certain action happens when the client calls knocks on the door.
 |Name|Action|
 |:-|--|
 |[`Connection`](https://github.com/dewarian/real-time-web-2021/blob/9cbb489161366f9650b4365ca5079e6c2b4899e1/server.js#L40)|Listens when a client connects.|
 |[`Message`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L20)|Emits the data from the markdown to clients.|
 |[`createDoc`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L15)|Create a document (room), enter it and emit event `getCache`.|
 |[`setText`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L24)|On event send object with markdown and roomname then emit `getText` event.|
 |[`getText`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L25)|On event, set data in markdown editor.|
 |[`getListings`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L28)|On event, return object of all documents.|
 |[`setListings`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L29)|On event, create a list view of documents on homepage|
 |[`setCache`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L32)|On event, save data object (room, data) to database.|
 |[`getCache`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L17)|On event, send data from database to the room and insert it in the HTML for markdown rendering.|
 |[`disconnect`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L36)|Yeet the user from the document (room).|
 |[`connect_error`](https://github.com/dewarian/real-time-web-2021/blob/8494f398a30b3128fc0ecacc8932545b2a6decb9/modules/socketEvents.js#L40)| If there is an error with sockets, this will log it and allow me to fix it.|

### Data Model

Current data model is out of date, the data model and explanation mentioned below was based on firestore. Later I decided to go for [lowdb](https://github.com/typicode/lowdb), which is a small JSON database for node and such.

```JSON
{
  "ROOMNAME": {
    "room": "ROOMNAME",
    "text": "Hello World\n\n# Hello\n\n## This is somewhat nifty"
  },
  // etc
}
```
> //INCOMING MESSAGE
>If I decide to extend this application I will use a scalable solution such as firestore or other NoSQL databases to implement a more strict model. if not a postGreSQL Open Source Database such as [Supabase.](https://github.com/supabase/supabase)
> //END MESSAGE

The data model is structured like a real-time database as I am using firestore to keep track of what is happening within a markdown document.

Firestore is built in collections that can have documents but could be diverged deeper with subcollections. To store multiple documents with each their own content I would have to use subcollections as a list of documents that contain information about the document.

```asciiDoc
┌───────────────────┐          ┌─────────────────────────┐
│  Collections      │          │  Documents (subcol)     │
├───────────────────┤          ├─────────────────────────┤
│                   │          │                         │
│  ID: varchar(20)  │1   TO   N│  Timestamp: datetime    │
│                   ├──────────┤  Editors  : arr         │
│                   │          │  Name     : string      │
│                   │          │                         │
└───────────────────┘          └────────────┬────────────┘
                                            │1
                                            │
                                            │TO
                                            │
                                            │N
                               ┌────────────┴────────────┐
                               │  Document               │
                               ├─────────────────────────┤
                               │                         │
                               │  Name        : string   │
                               │  Last_Editor : string   │
                               │  Last_Edit   : datetime │
                               │  Edited_Block: map      │
                               └─────────────────────────┘
```

### Actor Diagram

Describing the end product diagram flow how I imagine a user would go through the application.

![Datacycle](https://user-images.githubusercontent.com/13199349/114987987-1a645c80-9e96-11eb-9ffd-e3a7dc51ef7d.png)

### Dependencies
**Dependencies**
|Name|Functionality|
|:--|--|
|[Express](https://www.npmjs.com/package/express)|Minimalistic unopinionated web framework.|
|[Socket.io](https://www.npmjs.com/package/socket.io)|Node Package that uses WebSockets API and extends upon it.
 Allows for real-time Bi-directional communication.|
|[compression](https://www.npmjs.com/package/compression)|Compression middleware, compresses response bodies.|
|[ejs](https://www.npmjs.com/package/ejs)|Templating engine for express.|
|[firebase](https://www.npmjs.com/package/firebase)|Google's real time database solution and more.|
|[lowdb](https://www.npmjs.com/package/lowdb)|Small JSON database for Node, Electron and, the browser.|

**Dev Dependencies**
|Name|Functionality|
|:--|--|
|[eslint](https://www.npmjs.com/package/eslint)|Linter that find and fixes problems in JavaScript.|
|[eslint-config-google](https://www.npmjs.com/package/eslint-config-google)|ESLint configuration for ESLint. enforces rules from [Google Styleguide](https://google.github.io/styleguide/jsguide.html).|

### Coding conventions

To keep the codebase clean and readable for whoever dares to read the source, it will adhere to a set of rules, conventions commonly found in similar projects.

### Git conventions

Lately I have been following the gitmoji strategy. This means that every commit is prefixed with an emoji tthat depicts what the nature of the commit.

For branching I am following the slash strategy. This is a convention based on agilty and hierachy. The branch shouldn't exist for long... But later I've read that it can cause some problems.
 this has to be researched further before making a concrete decision.

### Linting

This application will be using [ESLint](https://www.npmjs.com/package/eslint) with the extension [Google-Style-Guide ESlint](https://github.com/google/eslint-config-google).

To know what other settings I enabled in ESLint, check the [configuration file](./eslintrc.json).
**Most notable: For Windows VS Code users, change the linebreak style from `CRLF` to `LF`**

### Build scripts

| Keyword | Action                                                   |
| :------ | ---------------------------------------------------------|
| `start` | Start script, usually a build step or `node index.js`    |
| `dev`   | development script, runs `nodemon server.js` continously |

### Frameworks && Libaries

#### Libraries

[Firestore](https://github.com/googleapis/nodejs-firestore) via the Firebase Node.js Server SDK.
Firestore is a document based noSQL data storage solution from Google. In comparison to Firebase it allows for compound queries and receive shallow documents.

For more differences between Firestore and firebase check out [the documentation of google](https://firebase.google.com/docs/database/rtdb-vs-firestore).

# Feedback

9/4/21

real-time data manipuleren op de server.

lijst data kunnen aanpassen veranderen.

chat history niet genoeg, data management beheren.

even kijken naar deze rubric.

data bijhouden, generen, aanpassen.

concept omgooien, van de chat af te gaan./li>

eventueel google docs?

lijst van fav gebruikers = data management?

lijst van fav gebruikers = data management?

# Bibliography

- [Firestore Datamodel](https://firebase.google.com/docs/firestore/data-model)
- [Firestore datatypes](https://firebase.google.com/docs/firestore/manage-data/data-types)
- [Expressing cardinality in ascii](https://dba.stackexchange.com/questions/230840/most-common-way-to-express-cardinality-in-ascii)

# Honourable Mentions
I would like to thank [Shabier](www.github.com/sjagoori) for helping me out with implementing socket.io, recommending [markdown-it](https://github.com/markdown-it/markdown-it) and local database wizardry. He a true wizard

# License

Copyright 2021 Nathan Bommezijn

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

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

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


text:
# Changelog

## 2019 10 19: BETA (still)
Slightly cleaner document. Still some problems generating the cross-references right.
* Generating PDF, HTML, markdown and MS Word documents.
* Consistent use of _italics_ for file names and backticks for `code`.
* Running some basic housekeeping before rendering. See _make_main.r_.
* Clearer explanation of R markdown, knitr, etc.

## 2019 10 17: Alpha
First working version.
* Can be used to generate a PDF or git-flavoured markdown (GFM).

**END OF FILE**

repository: AndyClifton/lit-pro-sci-pub-demo

repo_name: AndyClifton/lit-pro-sci-pub-demo


text:
# winciscovpncli
Update env.py with the correct values of dev and prod credentials and hostnames

    NAME
        vpn

    DESCRIPTION
        Usage python [command] [environment]
        command:
            c - connect
            d - disconnect
        environment:
            dev - development
            prod - production

    FUNCTIONS
        connect(to='dc')
            Connect to VPN

        disconnect()
            Disconnect form vpn

## Create a run command for the cli

    Create a shortcut to the vpn.py file.
    Copy the shortcut to C:\Windows\
        Run command
            "vpn c dev" connects to development environment.
            "vpn c prod" connects to production environment.
            "vpn d" disconnects the vpn

repository: pranavgvrk/winciscovpncli

repo_name: pranavgvrk/winciscovpncli


text:
# Development macOS Setup

[![Build Status](https://travis-ci.org/markosamuli/macos-machine.svg?branch=master)](https://travis-ci.org/markosamuli/macos-machine)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmarkosamuli%2Fmacos-machine.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarkosamuli%2Fmacos-machine?ref=badge_shield)

This is a collection of Ansible roles and tasks to setup a new developer machine
on macOS.

This setup has only been tested on the macOS Sierra and not against existing
installations.

See [markosamuli/linux-machine](https://github.com/markosamuli/linux-machine) for my Ubuntu Linux setup.

## Requirements

- OS X 10.10 or higher
- Xcode installed
- Git installed

## Install

You can run the installer script that will clone the code from GitHub and run
the `setup` script.

```bash
curl -s https://raw.githubusercontent.com/markosamuli/macos-machine/master/install.sh | bash -
```

## Getting Started

Clone this project locally and run the `./setup` script.

```bash
git clone https://github.com/markosamuli/macos-machine
cd macos-machine
./setup
```

## Software installed by the playbooks

### Installation tools

The following tools are prequiresites and always installed during setup if not
already found on the system.

- Xcode Command Line Tools
- [Homebrew](https://brew.sh/)
- [Ansible](https://www.ansible.com/) v2.7 installed with Homebrew
- [Python](https://www.python.org/) v3.7 installed with Homebrew

### Desktop applications

- [iTerm2](https://www.iterm2.com/)
- [Google Drive File Stream](https://support.google.com/drive/answer/7329379?hl=en)
- [Slack](https://slack.com/downloads/osx) desktop application

### Command line tools

- [GNU Wget](https://www.gnu.org/software/wget/)
- [jq](https://stedolan.github.io/jq/) command-line JSON processor
- [The Silver Searcher](https://github.com/ggreer/the_silver_searcher) code
  searcing utility similar to `ack`

### Editors

- [Visual Studio Code](https://code.visualstudio.com/)
- [Atom](https://atom.io/)

### Programming languages and version managers

- [Node Version Manager](https://github.com/creationix/nvm) (NVM)
- [Node.js](https://nodejs.org/en/) stable installed with NMV
- [virtualenv](https://virtualenv.pypa.io/en/latest/)
- [pyenv](https://github.com/pyenv/pyenv)
- [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)
- [Python](https://www.python.org/) v2.7 and v3.7 installed with pyenv
- [Go programming language](https://golang.org/)

### Developer tools

- [Git](https://git-scm.com/)
- [Docker for Mac](https://docs.docker.com/docker-for-mac/)
- [VirtualBox](https://www.virtualbox.org/)
- [Vagrant](https://www.vagrantup.com/)

### DevOps and Cloud tools

- [Terraform](https://www.terraform.io/)
- [Packer](https://packer.io/)
- [Google Cloud SDK](https://cloud.google.com/sdk/)
- [AWS CLI](https://aws.amazon.com/cli/)
- [aws-shell](https://github.com/awslabs/aws-shell) - interactive shell for
  AWS CLI
- [AWS Vault](https://github.com/99designs/aws-vault) - a vault for securely
  storing and accessing AWS credentials in development environments
- [cli53](https://github.com/barnybug/cli53) - command line tool for Amazon
  Route 53
- [Certbot](https://certbot.eff.org/)
- [Nmap](https://nmap.org/) utility for network discovery and security auditing

You can override Google Cloud SDK version in `inventory/group_vars/all.yml`:

```yaml
gcloud_archive_name: google-cloud-sdk-174.0.0-darwin-x86_64.tar.gz
```

## Changes to existing configuration

The installer creates empty `~/.bash_profile` and `~/.bashrc` files and makes
sure `~/.bashrc` is loaded from `~/.bash_profile`.

The installer makes changes to your `~/.bashrc` and `~/.zshrc` files, so take
backup copies of them before running the script.

## Ansible Roles

The following external Ansible roles are installed and used:

| Role | Build status |
|------|--------------|
| [markosamuli.aws-tools] | [![Build Status](https://travis-ci.org/markosamuli/ansible-aws-tools.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-aws-tools) |
| [markosamuli.gcloud] | [![Build Status](https://travis-ci.org/markosamuli/ansible-gcloud.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-gcloud) |
| [markosamuli.golang] | [![Build Status](https://travis-ci.org/markosamuli/ansible-golang.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-golang) |
| [markosamuli.nvm] | [![Build Status](https://travis-ci.org/markosamuli/ansible-nvm.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-nvm) |
| [markosamuli.packer] | [![Build Status](https://travis-ci.org/markosamuli/ansible-packer.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-packer) |
| [markosamuli.pyenv] | [![Build Status](https://travis-ci.org/markosamuli/ansible-pyenv.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-pyenv) |
| [markosamuli.terraform] | [![Build Status](https://travis-ci.org/markosamuli/ansible-terraform.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-terraform) |
| [markosamuli.vagrant] | [![Build Status](https://travis-ci.org/markosamuli/ansible-vagrant.svg?branch=master)](https://travis-ci.orgmarkosamuli/ansible-vagrant) |

[markosamuli.aws-tools]: https://github.com/markosamuli/ansible-aws-tools
[markosamuli.gcloud]: https://github.com/markosamuli/ansible-gcloud
[markosamuli.golang]: https://github.com/markosamuli/ansible-golang
[markosamuli.nvm]: https://github.com/markosamuli/ansible-nvm
[markosamuli.packer]: https://github.com/markosamuli/ansible-packer
[markosamuli.pyenv]: https://github.com/markosamuli/ansible-pyenv
[markosamuli.terraform]: https://github.com/markosamuli/ansible-terraform
[markosamuli.vagrant]: https://github.com/markosamuli/ansible-vagrant

## References

This is based on my previous setup [markosamuli/machine] that was forked off
from  [caarlos0/machine] to suit my needs.

[markosamuli/machine]: https://github.com/markosamuli/machine
[caarlos0/machine]: https://github.com/caarlos0/machine

## License

[MIT](LICENSE)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmarkosamuli%2Fmacos-machine.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarkosamuli%2Fmacos-machine?ref=badge_large)

## Authors

- [@markosamuli](https://github.com/markosamuli)

repository: fossabot/macos-machine

repo_name: fossabot/macos-machine


text:
# Landlord-communication

**
Project name:
** "Landlord Communication"

**
Overall:
**

 *The android application "Landlord communication" was created in accordance to Telerik Academy final project assignment. It is
 designed with the MVP design pattern with dependency injection with Dagger. The backend side of this project was built with Spring
 and Hibernate for relational database access with MariaDB.*

**
Contributors:
**
Nikolay Mateev (nmateev)

Vinchenzo Spasov (vinispasov)

**
Project purpose:
**

*Landlord Communcation gives the user and easy to use user interface with drawer navigation. Login with custom user account, social media
accounts or sing up. The app is individualised depending on the user account type and gives you different options
if you are a tenant or a landlord. Spanning from home section where you can check your current rating and change your user picture to
instant chat for simplified communication with your tenant or landlord. Landlord Communication also lets you keep track of recieved
and sent payments,choose layouts and template messages type depending on preference, option to rent a place, rate your experience, pay
rent and much more.*

**
Functionalities:
**
- login - custom and with social media accounts
- sign up
- change your user profile picture with image from gallery or take a new one with camera
- drawer navigation
- property management - compact and detailed view depending on preference
- filter your properties - by paid status, sort- ascending and descending order
- notifications 5 days before the rent is due
- rate your tenant or landlord
- change rent amount
- pay rent
- see all available landlords with option to search by first and last name
- see all available properties for every landlord
- rent unoccupied properties
- listing all of your chat sessions
- instant chat with option to choose from predefined template messages for people in a hurry
- option to send image to your tenant or landlord in chat
- settings section to personalise your property listing layout or template messages formality level in chat

**
Images:
**

![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/login.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/singup.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/drawer.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/home.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/mypayments.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/propertiescompactview.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/propertiesdetailedview.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/propertiesfilteroptions.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/alllandlords.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/landlordspropertieslist.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/rentdialog.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/propertymanagement.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/ratingdialog.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/paymentoptionextended.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/allchatsessions.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/chatview.png)
![Alt text](https://github.com/nmateev/Landlord-Communication/blob/master/Screenshots/settings.png)

**
Project url:
** https://github.com/nmateev/Landlord-Communication

repository: nmateev/Landlord-Communication

repo_name: nmateev/Landlord-Communication


text:
---
layout: default
---

# 1995-09-20 - Re: Cypherpunks Hold a Cracking Party

## Header Data

From: Duncan Frissell<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: c0d9c08fe2fe00b5ace26868dcfa660f6078d42bc01d92829139d8c5c3e2da14

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-09-20 18:12:55 UTC

Raw Date: Wed, 20 Sep 95 11:12:55 PDT

## Raw message

```
{% raw  %}From: Duncan Frissell<EMAIL_ADDRESS>Date: Wed, 20 Sep 95 11:12:55 PDT
To<EMAIL_ADDRESS>Subject: Re: Cypherpunks Hold a Cracking Party
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 11:28 AM 9/19/95 -0400, Duncan Frissell wrote:
>Just to let everyone know that I've got an assignment from Wired to do a
>story with the above working title.
>

As it turns out, Steven Levy and I had an assignment collision at Wired and
were both assigned the story.  For some unknown reason, they wanted him to
do it instead of me so I will *not* be doing it.

Steve -- feel free to use my title if you like.

DCF

"Anyone know any publications interested in an article on the Crack?"

{% endraw %}
```

## Thread

+ Return to [September 1995](/archive/1995/09)

+ Return to "[Duncan Frissell <frissell@panix.com>](/authors/duncan_frissell_frissell_at_panix_com_)"
+ Return to<EMAIL_ADDRESS>(Ian Goldberg)](/authors/iagoldbe_at_csclub_uwaterloo_ca_ian_goldberg_)"

+ 1995-09-20 (Wed, 20 Sep 95 11:12:55 PDT) - Re: Cypherpunks Hold a Cracking Party - _Duncan Frissell<EMAIL_ADDRESS>  + 1995-09-21 (Wed, 20 Sep 95 22:32:57 PDT) - [Re: Cypherpunks Hold a Cracking Party](/archive/1995/09/b477391447230e9488641eb96c2fc7a75d443180928901bb6464e375a6b65bdd) -<EMAIL_ADDRESS>(Ian Goldberg)_


text:
---
layout: post
title: "Adaptive Fusion for RGB-D Salient Object Detection"
date: 2019-01-05 05:16:46
categories: arXiv_CV
tags: arXiv_CV Salient Object_Detection CNN Prediction Detection
author: Ningning Wang, Xiaojin Gong
mathjax: true
---

* content
{:toc}

##### Abstract
RGB-D salient object detection aims to identify the most visually distinctive objects in a pair of color and depth images. Based upon an observation that most of the salient objects may stand out at least in one modality, this paper proposes an adaptive fusion scheme to fuse saliency predictions generated from two modalities. Specifically, we design a two-streamed convolutional neural network (CNN), each of which extracts features and predicts a saliency map from either RGB or depth modality. Then, a saliency fusion module learns a switch map that is used to adaptively fuse the predicted saliency maps. A loss function composed of saliency supervision, switch map supervision, and edge-preserving constraints is designed to make full supervision, and the entire network is trained in an end-to-end manner. Benefited from the adaptive fusion strategy and the edge-preserving constraint, our approach outperforms state-of-the-art methods on three publicly available datasets.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1901.01369](http://arxiv.org/abs/1901.01369)

##### PDF
[http://arxiv.org/pdf/1901.01369](http://arxiv.org/pdf/1901.01369)


text:
---
layout: post
title:  "How to create a free blog with Jekyll and GitHub Pages in 10 minutes"
description: Jekyll is a simple tool that transforms pages written in HTML, Textile or Markdown into a structured blog without the need of a database or dynamic code in the backend.
categories: jekyll
---

To host this site I used GitHub Pages and to generate the structure in the form of a blog I used Jekyll , a static site generator with the same functionalities as a CMS.

![](https://pbs.twimg.com/media/C4qXkC2WEAMGPZJ?format=jpg)

#### What is Jekyll?

[Jekyll](https://jekyllrb.com "Jekyll") is a simple tool that transforms pages written in HTML, Textile or Markdown into a structured blog without the need of a database or dynamic code in the backend .

#### What is GitHub Pages?

GitHub Pages is a static website hosting provided free by GitHub.

#### What does it take?

- PC with Linux or MacOS
- Account in GitHub
- 10 minutes
- Text editor for HTML like  Brackets , Atom , Sublime.

#### Create a repository on GitHub
- Log in to your GitHub account
- Create a new repository exactly under the name **username.github.io** , where **username** is your username (does not work if you do not enter your username exactly).
- Open the terminal `ctrl + alt + t` and clone the repository

`
$ git clone https://github.com/username/username.github.io`

#### Choose a theme for your website [optional]

- Enter the repository of Jekyll themes and choose your favorite.
- Clone the theme
- Put the theme in your repository (do not forget that username is your username in GitHub).

`$ git clone https://github.com/rosario/kasper `
`$ mv kasper/* username.github.io `
`$ cd username.github.io`

Upload the files to your repository in GitHub it will ask for your username and password

`$ git add --all`
`$ git commit -m "post: Hello World!"`
`$ git push origin master`

 Access your new website The URL is exactly the name of the repository you created. Then, go to: username.github.io . If it is not yet available, wait a few minutes.

And Jekyll? Now that you have a working website, you need to learn how to create new posts. That's where Jekyll comes in.

To create a new post you must create a file inside the folder _postsnamed obeying the following format: YYYY-MM-DD-titulo-do-post.html for example  2015-01-14-hello-world.html. If not obeyed, Jekyll will not know how to organize his posts.

## Get to work:

#### Install Jekylll
`$ gem install jekyll`

Create a file called 2015-01-14-hello-world.html
`$ touch \_posts\2015-01-14-hello-world.html`
Add the following lines in the created file:
```
---
layout: post
title:  Hello World!
date:   2015-01-14 15:00:00
---
<h2>Jekyll</h2>
<p>Y Love You World s3</p>
```
To see how your page will be online, start a Jekyll server
`$ jekyll serve`

visit `localhost: 4000`

 Conquer the world! Repeat step # 3 and see your new post online. If you want to learn more about Jekyll, check out its [official documentation](http://jekyllrb.com/docs/home/ "official documentation") . It is very complete and easy to understand. It is worth taking a look.

Discuss below your experience with Jekyll and the tutorial.


text:
# Auth0 API Authorization

## User Consent

These samples show the use case for **Organizer** a platform allowing you to manage your contacts, appointments and tasks. They are now opening up their API to third party applications like **CalendarApp**, a calendar application allowing you to manage your calendars from different providers (Gmail, Outlook, ...) including **Organizer**


text:
---
layout: post
title: DrupalCon Austin - Integrated Analytics, Pantheon CI
---

  I'll be presenting twice at DrupalCon Austin: one will focus on the fate of Drupal Core's Statistics module, the second will be a much more technical talk on practicing continuous integration on Pantheon. Register here to attend.

### The Future of Drupal Statistics

A Core Conversation covering the Core Statistics module's weaknesses, the ever-expanding web analytics market, and how I believe the Statistics module should fit into the picture going forward.

* Thursday 6/5 at 2:15pm, Room 15 (Commerce Guys | 4th Floor)
* Track: Core Conversation
* [Slides available here](/terson/on/data-first-drupal)

[Full details available here](https://austin2014.drupal.org/session/future-drupal-statistics) on the official DrupalCon Austin website.

### Continuous Integration on Pantheon

A detailed, technical, walkthrough BOF aimed to give you a head start on practicing continuous integration on your Pantheon site.

* Wednesday 6/4 at 1:00pm, Room TBD
* Track: BOF
* [Slides available here](/terson/on/pantheon-ci)