text:
#### Nr: 45
#### [Back to Main list](index.md)
# SQLSaturday #45 - Louisville 2011
Start Time (24h)|Speaker|Track|Title
---|---|---|---
00:00:00|Michael Coles|BI|[High Performance SSIS Dimensional Datamart Loads ](#sessionid-28470)
00:00:00|Michael Coles|Advanced DBA|[SQL Server Encryption - Secure Your Data @ Rest!](#sessionid-28471)
00:00:00|Michael Coles|DBA|[Build Your Own Search Engine With SQL Server](#sessionid-28473)
00:00:00|Arie Jones|BI|[Better Data Visualizations with SSRS](#sessionid-28816)
00:00:00|Arie Jones|Advanced DBA|[Monitoring Data Changes with Change Data Capture](#sessionid-28818)
00:00:00|Allen White|Advanced DBA|[Manage SQL Server System and Performance Data with](#sessionid-28918)
00:00:00|Allen White|Advanced DBA|[Automate Policy-Based Management using PowerShell ](#sessionid-28919)
00:00:00|Kevin Cross|Developer|[Effective SQL: Understanding Order of Operations](#sessionid-28960)
00:00:00|Tim Chapman|Advanced DBA|[Capturing SQL Server performance diagnostics](#sessionid-29438)
00:00:00|Tim Chapman|Developer|[Writing faster queries](#sessionid-29439)
00:00:00|Dave Fackler|BI|[ETL from the Trenches: SSIS in the Real World](#sessionid-29710)
00:00:00|Louis Davidson|DBA|[Database Design Fundamentals](#sessionid-30011)
00:00:00|Eddie Wuerch|DBA|[Find Performance Problems by Reading the Waits](#sessionid-30167)
00:00:00|Eddie Wuerch|Developer|[Drive SQL Server Performance: I/O For Developers](#sessionid-30168)
00:00:00|John Welch|Developer|[Moving Data with SQL Azure and SSIS](#sessionid-30939)
00:00:00|Randy Knight|DBA|[Become a Bilingual DBA! Oracle for the SQL Server ](#sessionid-32373)
00:00:00|Randy Knight|Developer|[Visual Studio 2010 Database Projects ](#sessionid-32374)
00:00:00|Steve Jones|Developer|[Red Gate SQL Monitor](#sessionid-32948)
00:00:00|Craig Utley|BI|[PowerPivot: Delivering Self-Serve BI](#sessionid-32985)
00:00:00|Craig Utley|BI|[Do It Right: Best Practices for Analysis Services ](#sessionid-32987)
00:00:00|Thomas LaRock|DBA|[Performance Tuning Made Easy](#sessionid-33061)
00:00:00|William E Pearson III|BI|[Attribute Discretization in Analysis Services](#sessionid-33971)
00:00:00|Kathi Kellenberger|Advanced DBA|[Achieving Separation of Duties with SQL Server](#sessionid-34702)
00:00:00|Mala Mahadevan|DBA|[Women in Technology Luncheon](#sessionid-34749)
#
#### SessionID: 28470
# High Performance SSIS Dimensional Datamart Loads
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: BI
## Speaker: Michael Coles
## Title: High Performance SSIS Dimensional Datamart Loads
## Abstract:
### Performance-driven SSIS ETL solutions require a mix of both SQL and SSIS developer optimizations. In this session attendees will learn SQL code and SSIS data flow optimizations, tips and best practices that are specifically geared to obtain the best performance from your enterprise ETL solution. This session is specific to Datamart ETL, but much of the information presented can be applied to any SSIS solution.

#
#### SessionID: 28471
# SQL Server Encryption - Secure Your Data @ Rest!
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Advanced DBA
## Speaker: Michael Coles
## Title: SQL Server Encryption - Secure Your Data @ Rest!
## Abstract:
### In 2007 the media was buzzing with reports that hackers stole 45.7 million credit card numbers from a major retailer's databases. Experts agree the damage could have been mitigated with database encryption.  In this presentation attendees will learn how to secure their corporate data in SQL Server 2008.  Attendees will explore cell-level encryption, cryptographic hash functions, transparent database encryption (TDE), extensible key management (EKM), and even SQL CLR.  By attending this presentation you will learn techniques that will ensure that your company doesn't appear in the headlines in the headlines for all the wrong reasons. Don't become another statistic; data security is a topic that no database professional can afford to ignore.
#
#### SessionID: 28473
# Build Your Own Search Engine With SQL Server
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: DBA
## Speaker: Michael Coles
## Title: Build Your Own Search Engine With SQL Server
## Abstract:
### SQL Server 2008 once again improves on the classic built-in SQL Server full-text search (FTS) functionality by making FTS more efficient and transparent.  In this course attendees will learn both the basics of the new Integrated FTS (iFTS) and how to build user-friendly Google-style search interfaces on top of SQL Server for the benefit of their end users.
#
#### SessionID: 28816
# Better Data Visualizations with SSRS
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: BI
## Speaker: Arie Jones
## Title: Better Data Visualizations with SSRS
## Abstract:
### SQL Server 2008 R2 provides many compelling reasons to upgrade especially in the area of Reporting Services. In this session, we will walk through all of the new data visualizations that are available in the latest release from Microsoft. You will learn how to use Sparklines, Indicators, Data Bars, as well as the integrated Bing Maps control in order for you to create more captivating data visualizations for your BI projects. Along the way we'll also delve into other important new features such as shared datasets, new data sources, and the Report Part Gallery. You'll leave this session with the knowledge you need to take your next BI project to the next level.
#
#### SessionID: 28818
# Monitoring Data Changes with Change Data Capture
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Advanced DBA
## Speaker: Arie Jones
## Title: Monitoring Data Changes with Change Data Capture
## Abstract:
### Most modern enterprise database environments require some measure of auditing their data. Previously, the DBA would need to put together a complicated web of triggers and history tables in order to properly track data changes. Now in SQL Server 2008, Change Data Capture allows the DBA to readily enact a very straight-forward method for tracking the changes and understanding easily how they took place. In this session, we will examine how to set-up, configure, use, and administer the Change Data Capture process in your environment
#
#### SessionID: 28918
# Manage SQL Server System and Performance Data with
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Advanced DBA
## Speaker: Allen White
## Title: Manage SQL Server System and Performance Data with
## Abstract:
### Maintaining a solid set of information about our servers and their performance is critical when issues arise, and often help us see a problem before it occurs.  Buiding a baseline of performance metrics allows us to know when something is wrong and help us to track it down and fix the problem.  This session will walk you through a series of PowerShell scripts you can schedule which will capture the most important data and a set of reports to show you how to use that data to keep your server running smoothly.

#
#### SessionID: 28919
# Automate Policy-Based Management using PowerShell
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Advanced DBA
## Speaker: Allen White
## Title: Automate Policy-Based Management using PowerShell
## Abstract:
### The Policy-Based Management feature in SQL Server 2008 provides a great way to ensure your systems are configured consistently and correctly, but it can be tedious to implement on each server in your environment.  PowerShell scripts allow you to automate the implementation of your policies so you can focus on more important problems.  This session will walk you through how PBM works, how to define your policies in PowerShell, and how to set up Agent jobs to evaluate those policies regularly to let you know when you need to take action.

#
#### SessionID: 28960
# Effective SQL: Understanding Order of Operations
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Developer
## Speaker: Kevin Cross
## Title: Effective SQL: Understanding Order of Operations
## Abstract:
### Demonstrate what my dear Aunt Sally has to do with your T-SQL code as we explore order of operations and a select statement's execution order in general.
#
#### SessionID: 29438
# Capturing SQL Server performance diagnostics
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Advanced DBA
## Speaker: Tim Chapman
## Title: Capturing SQL Server performance diagnostics
## Abstract:
### Ever wonder if there is an easy way to gather performance metrics?  Look no further...there is!  In this session, we'll look at how to use free SQL Server diagnostic tools.  We'll cover capturing performance counters, DMV data along with SQL trace data and correlate the information.  A must have for quickly and easily finding system bottlenecks.
#
#### SessionID: 29439
# Writing faster queries
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Developer
## Speaker: Tim Chapman
## Title: Writing faster queries
## Abstract:
### Poor database performance is Achilles' heel of any system. Better and faster hardware can improve systems to a certain point. However, for truly great performing systems, there is no substitute for properly written queries and designed indexes. In this session we'll take a look at some common query performance killers, along with some no so obvious things that we can do to our queries to make them as fast as possible.
#
#### SessionID: 29710
# ETL from the Trenches: SSIS in the Real World
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: BI
## Speaker: Dave Fackler
## Title: ETL from the Trenches: SSIS in the Real World
## Abstract:
### Sure you've read the SSIS books. And sure you've seen a lot of SSIS presentations. But how do you put it all together to create a solid ETL framework for loading your data warehouse environment? In this (updated for 2010) session, we'll look at the ins and outs of a real-world ETL environment built using SSIS. We'll discuss the ETL design patterns used to handle a multi-tiered data warehouse environment with multiple data sources, different loading schedules, and different data transformation requirements. We'll also discuss how the development team responsible for the ETL environment at the Department of Veterans Affairs handles package auditing and logging, team development, package testing, and automated deployments.
#
#### SessionID: 30011
# Database Design Fundamentals
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: DBA
## Speaker: Louis Davidson
## Title: Database Design Fundamentals
## Abstract:
### In this session I will give an overview of how to design a database, including the common normal forms and why they should matter to you if you are creating or modifying SQL Server databases. Data should be easy to work with in SQL Server if the database has been organized as close as possible to the standards of normalization that have proven for many years. Many common T-SQL programming "difficulties" are the result of struggling against the way data should be structured and can be avoided by applying the basic normalization techniques and are obvious things that you find yourself struggling with time and again (i.e. using the SUBSTRING function in a WHERE clause meaning you can't use an index efficiently).
#
#### SessionID: 30167
# Find Performance Problems by Reading the Waits
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: DBA
## Speaker: Eddie Wuerch
## Title: Find Performance Problems by Reading the Waits
## Abstract:
### Start with a simple proposition: a process is either working or waiting.  You can tune the working part, but are you seeing the whole picture? There are many different resources on which your process could be waiting – a lock, memory, disk, CPU, and much more.  When a process must wait, SQL Server will log it. There are hundreds of different wait types, and they are a gold mine of data for finding and solving performance problems – and proving the changes worked.  After attending this session, you will be able to gather wait stats and use them to zero in on performance issues affecting your databases.  Stop guessing, start knowing!
#
#### SessionID: 30168
# Drive SQL Server Performance: I/O For Developers
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Developer
## Speaker: Eddie Wuerch
## Title: Drive SQL Server Performance: I/O For Developers
## Abstract:
###   An often-overlooked aspect to data optimization is what is happens under the covers – how does SQL Server store and access data?  There are plenty of common rules covering tuning, but this session looks at data access from the physical layer, detailing how table access and indexes work, showing why some designs perform poorly, and why adding more indexes may not help.  This will not be a discussion of normal forms or design rules. Instead, it will be a technical session providing the foundation for you to choose which concepts to apply to your designs.
  The session starts with the notion that SQL Server is not a magic box – most of what happens is well-documented and must be taken into consideration when designing or tuning databases.
#
#### SessionID: 30939
# Moving Data with SQL Azure and SSIS
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Developer
## Speaker: John Welch
## Title: Moving Data with SQL Azure and SSIS
## Abstract:
### SQL Azure allows you to host your data in SQL Server in the cloud. That provides some big benefits in scalability and management. However, it leaves open the question, “How do you get your data into / out of the cloud?” At some point, you are going to need to move data to or from an on-premise store to SQL Azure. In this session, we’ll discuss the available options for this, including SSIS, the Sync Framework, and BCP. We’ll cover the pros and cons for each. We’ll drill into one of the options, SSIS, in detail, and review performance options and potential issues that you may encounter when doing this.
#
#### SessionID: 32373
# Become a Bilingual DBA! Oracle for the SQL Server
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: DBA
## Speaker: Randy Knight
## Title: Become a Bilingual DBA! Oracle for the SQL Server
## Abstract:
### In today's enterprise environments, it is becoming increasingly necessary to integrate data from a variety of sources. As SQL Server continues its march into the enterprise, the days of focusing 100% on one platform are over. At a bare minimum, we need to be able to communicate with DBA's for other platforms. Terminology as simple as Instance and Database mean very different things in Oracle than they do in SQL Server. In this session, we will compare and contrast the two platforms in terms of features and terminology. We will also discuss some of the best practices and pitfalls when integrating the two.
#
#### SessionID: 32374
# Visual Studio 2010 Database Projects
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Developer
## Speaker: Randy Knight
## Title: Visual Studio 2010 Database Projects
## Abstract:
### Managing DDL scripts has always been one of the biggest challenges facing Database Developers. How do you keep your Development, Test, Stage, and Production Environments in sync? Why aren't databases tightly integrated into source control systems like application code is? Visual Studio 2010 Database projects solve all these problems and more. In this session, we will learn how to use Visual Studio to treat database objects as the first-class citizens they have always been.
#
#### SessionID: 32948
# Red Gate SQL Monitor
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Developer
## Speaker: Steve Jones
## Title: Red Gate SQL Monitor
## Abstract:
### This is a vendor session.
#
#### SessionID: 32985
# PowerPivot: Delivering Self-Serve BI
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: BI
## Speaker: Craig Utley
## Title: PowerPivot: Delivering Self-Serve BI
## Abstract:
### If you are always looking for better ways to deliver value to the business as part of a BI project, make sure you examine the capabilities of PowerPivot. Using existing data and tools, users now have the ability to analyze vast quantities of data without first designing dimensions and measure groups. Users can explore the data and optionally share their analysis with others. See how Gemini opens the power of Analysis Services to non-technical users while still allowing the IT organization to administer and secure the data.
#
#### SessionID: 32987
# Do It Right: Best Practices for Analysis Services
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: BI
## Speaker: Craig Utley
## Title: Do It Right: Best Practices for Analysis Services
## Abstract:
### Are you seeking practical, in-depth technical advice for building a BI solution using SSAS? Analysis Services changed tremendously with the advent of SQL Server 2005. It introduced a new way of building dimensions and cubes that required a new way of modeling the solution. This session examines the best practices for properly designing cubes for performance and usability. It discusses some high-level topics but also looks at advanced topics such as alternative approaches to many-to-many dimensions, SCOPE statements, aggregation design, scalability issues, processing techniques, server properties, and more.
#
#### SessionID: 33061
# Performance Tuning Made Easy
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: DBA
## Speaker: Thomas LaRock
## Title: Performance Tuning Made Easy
## Abstract:
### Performance tuning is hard, everyone knows that. Attend this session and learn how to define, measure, and analyze performance issues as well as implementing changes and also how to make sure those changes continue to have the desired effects. In short, I break down performance tuning into pieces that anyone can understand. Leave this session knowing what actions to take when you get back to work on Monday.
#
#### SessionID: 33971
# Attribute Discretization in Analysis Services
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: BI
## Speaker: William E Pearson III
## Title: Attribute Discretization in Analysis Services
## Abstract:
### Attribute discretization is an oft-overlooked feature in Analysis Services that allows us to automatically create a manageable number of groups of attribute values that are clearly separated by boundaries. Discretization can help us to make it easier for information consumers to work with large numbers of possible attribute member values. In this session, we will discuss the varied options, the design (and other) considerations involved, and best practices surrounding the use of this capability.
#
#### SessionID: 34702
# Achieving Separation of Duties with SQL Server
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: Advanced DBA
## Speaker: Kathi Kellenberger
## Title: Achieving Separation of Duties with SQL Server
## Abstract:
### SQL Server provides a rich set of security features that allow customers to satisfy their security goals. Everything from encrypting sensitive data to recording all activity within a particular database is easily attainable with the features introduced in 2008. While SQL Server does not provide a packaged solution to facilitate Separation of Duties, it does provide functionality that allows Separation of Duties to be achieved. Come to this session to understand how to leverage the functionality available in SQL Server implemented through free community tools and achieve all of your compliance goals.
#
#### SessionID: 34749
# Women in Technology Luncheon
#### [Back to calendar](#nr-45)
Event Date: 22-01-2011 - Session time: 00:00:00 - Track: DBA
## Speaker: Mala Mahadevan
## Title: Women in Technology Luncheon
## Abstract:
### A panel discussion headed by Kathi Kellenberger of Microsoft. Details to be updated soon.

repository: andrekamman/sqlsathistory

repo_name: andrekamman/sqlsathistory


text:
m4_include(setup.m4)

# Interactive - 01 - Create Table

Create a table with 3 columns.  The table name will be "name_list".
The columns are:

- real_name a text column
- age an integer
- state a 2 character field for a US state code.

```
create table <name> (
	<column>,
	<column>,
	<column>,
	...
	<column>
);
```
The columns are a comma `,` separated list.   The set of
columns tars with a `(` and ends with a `)`.

A `;` (semicolon) is used to mark the end of the statement.

Officially this is call the Data Definition Language or DDL.

We have to declare what we want to store before storing it.

We will get back to data-types and SQL in a future homework.

so with 3 columns

```
m4_include(hw01_1.sql)
```

Book: Pages 5 to 7

#### Tags: "create table","type text","type int","type varchar","hw01"

#### Validate: SQL-Select,"select 'PASS' as x"

license: MIT

repository: andey-robins/school

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: andey-robins/school


text:
# scrolled-past
### A package within [web-sparkle](https://github.com/christinecha/web-sparkle).
Implement easy-peasy CSS-based scroll-triggered changes (animation, etc.).

## Usage

````sh
$ npm install scrolled-past
````

````js
const ScrolledPast = require('scrolled-past')

const getOffset = el => el.height * 0.5

// Use a function to calculate offset
const scrolledPast = new ScrolledPast(getOffset, document.body)

// Or, just pass in a number
const scrolledPast = new ScrolledPast(200, document.body)
````

---

## Reference

Add elements you want to affect using the data-attribute `data-scrolled-past`, like so:

```html
<div data-scrolled-past="false"></div>
```

You can set it to `false` initially like above or just leave it valueless.
Depends what you want your first-load state to look like.

### new ScrolledPast(offset = 200, $container = document.body)
Create a new instance of ScrolledPast. Pass in an optional offset amount and parent container.

**Params**

- offset `Number` OR `Function`- The distance (in px) you'd like to wait before marking an element as "scrolled-past".
If you want to be fancy, pass in a function to calculate it using the `el` object you get passed in. It'd look like this:

```js
const calculateOffset = el => {
  // Dynamically offset based on the element's height.
  // Available values: el.$node, el.start, el.end, el.height
  return el.height * 0.5
}
```

- $container `DOMElement` - The parent container for all the nodes you want watched.

---

## Development
To run the example locally, run the following commands:

```sh
npm install
npm run dev
npm start
```

---

## Credits
This readme is maintained by [hello@christinecha.com](mailto:hello@christinecha.com).

---

## License
MIT

repository: christinecha/web-sparkle

repo_name: christinecha/web-sparkle


text:
In these cases, declaring a Go module dependency on the applications to access the API types often leads to our application inheriting unwanted and conflicting transitive dependencies of the third-party application's internals.

In these cases, because working with the Go types instead of unstructured types is convenient, but because we can't leverage Go modules without unwanted dependency coupling, the workaround is to simply copy any such Go types into our tree.

All third-party API types which can't easily be declared as Go module dependencies are copied in their most minimal form to the `thirdparty` package and updated from their original sources manually as needed.

### How-to: Update Third-party API Go types

In all cases, any `_test.go` and conversion files can be ignored. All we need are the bare minimum types to speak over the wire to the apiserver.

For `sigs.k8s.io/cluster-api`:

1. Copy the relevant types from the [upstream api packages](https://github.com/kubernetes-sigs/cluster-api) to
   to the local `thirdparty/clusterapi` package.
2. Adjust any import paths to reference `thirdparty` as necessary.

For `sigs.k8s.io/cluster-api-provider-aws`:

1. Copy the relevant types from the [upstream api packages](https://github.com/kubernetes-sigs/cluster-api-provider-aws) to
   to the local `thirdparty/clusterapiprovideraws` package.
2. Adjust any import paths to reference `thirdparty` as necessary.

### How-to: Visualize the Go dependency graph

On MacOS, get a nice PDF of the graph:

```
brew install graphviz
go get golang.org/x/exp/cmd/modgraphviz
go mod graph | modgraphviz | dot -T pdf | open -a Preview.app -f
```

repository: hanqiuzh/hypershift

branch_name: refs/heads/main

repo_name: hanqiuzh/hypershift


text:
---
layout: post
title: Understanding gRPC
tags: [gRPC, REST, performance, HTTP2]
---

gRPC is a Remore Procedure Call framework developed by Google.
It uses HTTP2 as a transport and Protocol Buffers as the Interface Definition Language.

# Why gRPC?

Performance
-----------

Bi-directional Streaming

Deadline Propagation

gha_language: HTML


text:
# ChemDrawOAuthExample
This is an example add-in that shows how to authorize an application using OAuth. It uses Dropbox as the identity provider. The add-in demonstrates the use of `registerURLTriggeredCallback` and `openURLInDefaultBrowser` APIs to execute the authorization workflow.

This add-in is written in TypeScript and uses React. It also uses Bootstrap and Reactstrap libraries.

To install all required modules run the following command
`npm install`

To build the add-in, run:
`npm run build`

Once the build completes successfully, the _build_ folder will contain an _index.html_ file and a _static_ folder that contains the compiled CSS and JavaScript code. In order to create an add-in bundle, the following needs to be zipped into one archive:
* _index.html_
* _static_ folder
* Add-in metadata file

Change the zipped archive extension to _.chemdrawaddin_


text:
# Components

## Installation

Add this gem to your gemfile, and include 'components.css' and 'components.js'
to your header.

This "gem" owes it's entire inspiration to @ianfeather's [excellent talk on
Rizzo](http://ianfeather.co.uk/a-maintainable-style-guide). I just wanted to
know what it would be like to write one from scratch, to see how the insides
worked.

I am presently thinking long and hard about using actual ruby objects instead
of passing around arrays of hashes for options, and trying to leverage the
rails partial lookup magic rather.

So ideally... `= component "user", @user` would become `render @user`.

repository: evantravers/components

repo_name: evantravers/components


text:
# diffmah

For a typical development environment in conda:

```bash
conda create -n diffit python=3.7 numpy numba flake8 pytest jax ipython jupyter matplotlib scipy h5py
```

You can install the package into your environment with
```
$ conda activate diffit
$ cd /path/to/root/diffmah
$ python setup.py install
```

Data for this project can be found [at this URL](https://portal.nersc.gov/project/hacc/aphearin/diffmah_data/).

repository: abensonca/diffmah

repo_name: abensonca/diffmah


text:
# Roumegueriella Speg. GENUS

#### Status
ACCEPTED

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

#### Published in
in Roumeguère, Revue mycol. , Toulouse 2(1): 18 (1880)

#### Original name
Roumegueriella Speg.

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
[![](http://assets.jisho.org/assets/jisho-logo-v4@2x-7330091c079b9dd59601401b052b52e103978221c8fb6f5e22406d871fcc746a.png)](http://jisho.org/)
# JishoElixir [![Hex pm](http://img.shields.io/hexpm/v/jisho_elixir.svg?style=flat)](https://hex.pm/packages/jisho_elixir)

A wrapper around Jisho.org's API (http://jisho.org).

### What is [Jisho.org](http://jisho.org/)?
It's an online Japanese to English dictionary that you can read about [here](http://jisho.org/about).

### JishoElixir currently Supports

1. Searching by word
2. Searching by tags [http://jisho.org/docs](http://jisho.org/docs)
3. Searching for verbs
4. And much more if you combine them.

## Installation

First, add JishoElixir to your mix.exs dependencies:
```elixir
def deps do
  [
    {:jisho_elixir, "~> 0.1.0"}
  ]
end
```

and run $ mix deps.get

## Usage

Your best bet is to visit the hex docs, but:

```elixir
	JishoElixir.search("峠", ["n", "exp"], 1)
```
```elixir
	JishoElixir.tag("jlpt-n1")
```
```elixir
	JishoElixir.verb("prance")

```

## FAQ
### What about formatting the response?

The library returns a map that's been parsed directly from json. I leave it up to you to write a wrapper around it.

### Do I need an API key?

Nope.

### Where can I find documentation for the Jisho API

At the moment, just [here](http://jisho.org/forum/54fefc1f6e73340b1f160000-is-there-any-kind-of-search-api).

### What about kanji?

It's been hinted by the Jisho team that it's on the way, but for now you can search kanji the same way you search a word. The downside is kanji _tags_ (found [here](http://jisho.org/docs)) won't work.

## Thanks

Thank you to the [Jisho.org](http://jisho.org/) team, especially [Kimtaro](https://github.com/Kimtaro).

gha_language: Elixir


text:
+++
title = "Fun Links 2013-09-27"
date = 2013-09-27T15:19:00Z
categories = ["Fun links"]
postid = 19
+++
Hopefully some useful ones this time around, productivity tools and software development articles, so a bit different that my usual fare.

**Editr.js**
http://lab.idered.pl/editr/
Like Codepen or JsFiddle, but you host it yourselves. Great for demos, samples, etc.

**Trello**
https://trello.com/colinbate/recommend (yes, I benefit if you sign up (it’s free))
From the fine folks at Fog Creek, Trello is a tool for creating boards with lists and cards. Perfect for scrum, kanban or just planning your day. Lots of great features and all for free.

**Polyglot Persistence**
http://martinfowler.com/bliki/PolyglotPersistence.html
Talks about creating applications which use multiple storage systems to best solve the problems at hand. We/I’ve been using the term Hybrid Data, but this is something that I think we can benefit from even more than we are now.


text:
# Learn To Code: Javascript Series by Techmecolor
This repository includes all course information, weekly readings & challenges, presentation slides for Techmecolor's Learn to Code: Javascript Series.

## Course Philosophy:
#### "The better you understand what you are doing, the better you will do it." - Max Kanat-Alexander
A conceptual foundation is a set of deeply internalized mental tools that make new concepts easier to grasp. This course aims to help beginners build such a conceptual basis for continued learning in computer science and programming. The course aims at developing a precise understanding of a small set of universal ideas rather than a fuzzy understanding of a broad range of ideas.

This means that specific topics which might be important to finding your first job as a programmer won't be covered. However, it also means that you'll have the foundational mental tools to study those topics efficiently.

## Goals
The conceptual foundation we will build together consists of the following:
* Understanding the nature of computers and programs.
* Finding effective patterns for thinking about logical problems in general.
* Practical programming experience (with Javascript).
* Practical experience creating web applications (with Javascript).

## Three Helpful Attitudes for Learning
### Comfort with Discomfort

Embrace the process of pushing the edge of your understanding.

If a challenge is nice and comfortable, seek out something that is a little harder. The deliciousness of mental challenges is an acquired taste. You'll need to get comfortable with whole new ways of thinking and being challenged.

### Delayed Gratification

Prioritize long term benefits over short term frustrations.

Be willing to not figure it out today, take a walk, and come back to it. Learning takes time and goes step by step. Every true "A-ha" comes after a great deal of "I have no idea" and often "I give up." Take a deep breath, take your your time, and be methodical about your obstacles. Your obstacles are your opportunity.

### The Beauty of It

Tap into your child-like wonder and curiosity about the world.

Learning something as weird and wonderful as programming shouldn't feel like a chore (all the time). While some dry work is unavoidable, there are beautiful moments of emotional and intellectual discovery that learning a true art form offers.

The context of changing your career trajectory and seeking to improve your financial situation can make learning to code feel like a time investment with a lot riding on it. A little bit of that stress is a positive motivator, but too much can feel overwhelming. In class, we encourage you to feel free to relax your mind and focus completely on solving the problems in front of you. We encourage you to view problem solving as a playful, enjoyable activity in which all external concerns dissappear for a while. Programming is a long term investment and each class is just a small step in getting that started. We hope you'll enjoy the journey as well as experiencing professional growth along the way.

Embrace your curiosity. Allowing yourself to ask and experiment with questions that interest you will make you a better programmer in a very practical sense. The most important questions to your intellectual growth are the ones you come up with yourself, since these clearly mean something to you.

## What you'll be doing
The course should take participants about 10 hours a week for 3.5 months (14 weeks). We feel that spending significantly less than this may not result in the kind of consistent practice required to develop the deep mental skills for programming.

Class time will be primarily dedicated to solving programming problems in small groups. At the beginning of each class, we will spend about 30 minutes reviewing the conceptual building blocks introduced in the reading and checking our understanding of them. Once in a while, a short talk may be given to provide deeper technical background on something.

Weekly reading will be assigned primarily from the free online book "eloquent javascript". Additionally, a weekly list of recommended practice problems will be curated to bring the concepts from the reading into practice. Honoring the following two commitments should result in a firm understanding and strong practical ability:
* Do the reading carefully and check your own understanding of each conceptual building block. Before you begin a close read of the chapter, scan the sub-headings for the whole chapter to create "hooks" to hang the details on.
* Dedicate 6 hours to the practice problems and spread this effort out across several days of the week rather than all at once on your off-day. This spreading out is called spaced repetition and is important to effective learning.

Projects suitable for a professional portfolio will be pursued in the second module of the curriculum.

#### Typical Week:
##### Class
* Review & Check Conceptual Building Blocks: 30 Minutes
* Group Practice on Programming Challenges: 1.5 hours.
##### Independent Work
* 2 Hours of Reading
* 6 Hours of Independent Exercises and Projects

## Course Content
#### Module 1: Foundations of Programming
* Week 1 - Problem Solving and Computation
* Week 2 - Values, Types, and Operators
* Week 3 - Program Structure
* Week 4 - Review & Mastery of Previous Topics
* Week 5 - Recursion and Abstraction (Functions, Purity, Closures)
* Week 6 - Data Structures: Objects and Arrays
* Week 7 - Review & Mastery of Previous Topics
* Week 8 - Higher Order Functions
* Week 9 - Object Oriented Programming & Prototypes
* Week 10 - Review & Mastery of Previous Topics
* Week 11 - Programmer's Best Friend: Bugs & Errors.
#### Module 2: Programming for the Web
* Week 12 - Asynchronous Programming, Javascript and the Browser
* Week 13 - The Document Object Model
* Week 14 - Event Handling
Bonus Topics:
HTTP and Forms,
Node.js and Back End Applications

## People
* Kimberly Harris is the organizer of the TechMeColor meetup faciliating this course.
* Sam Fisher is the primary teacher and curriculum designer.

The program is entirely volunteer-run as an act of service to the community.

repository: swfisher/TMCLearnToCode

repo_name: swfisher/TMCLearnToCode


text:
# Python Tools for Data Science, Machine Learning and Scientific computing - 2020

Python is a general purpose programming languague that has become the leader in the [scientific computing and data science landscape](https://towardsdatascience.com/kaggle-user-survey-2019-326e187ff207).

![Kaggle Survey 2019](./assets/survey-python.png)
Source: Kaggle Survey 2019

Python success has been driven primarily because of its **intuitive syntaxis**, **flexibility**, and **extensivility**, meaning that it's easy to learn, it can be used for a wide variety of taks, and incorporating numerical computing libraries written in high-performance languages like C++ and Fortran is straightforward. Additionally, Python benefits from a large and strong community of developers commited to free and open source software.

Python libraries for Scientific Computing and Data Science are **extensive**, **secure**, and **mature**. Companies like Google, Microsoft, Apple, Dropbox, and Netflix, use Python for several critical applications, in particular the ones based on data processing and machine learning. Companies like Instagram and Youtube were built from the ground up in Python.

In academia, Python is the facto standard for research and applications in artificial intelligence (AI), machine learning (ML), and big data analysis. All the major frameworks for AI and ML, i.e., [Tensorflow](https://www.tensorflow.org/), [Keras](https://keras.io/), [PyTorch](https://pytorch.org/), and [MXNet](https://mxnet.apache.org/), are based on Python.

Python also has a continiously growing an strong presence in the Data Visualization field, with libraries like [Matplotlib](https://matplotlib.org/), [Seaborn](https://seaborn.pydata.org/), [Altair](https://altair-viz.github.io/), and [Plotly](https://plotly.com/).

Python presence in statistics is weaker and less mature than the one of languages like R, STATA, and SPSS. Libraries like [Statsmodels](https://www.statsmodels.org/stable/index.html) and [PyMC3](https://docs.pymc.io/) are in constant development and helping too close the gap between Python and other frameworks. This is not to say that you cannot do statistics in Python. As a matter of fact, you can do absolutely everything that can be done in other languages, but it may requiere more effort or more advance knowledge of Python.

The two pillars of Scientific Computing and Data Science in Python are **[NumPy](https://numpy.org/)** and **[Pandas](https://pandas.pydata.org/)**. NumPy is a library for numerical computing, particularly matrix-like computation. Pandas is a library for data analysis and data frame manipulation. NumPy and Pandas are commonly used in tandem as the base for any kind of data processing and modeling.

In this project, I focus in the fundamentals of **NumPy** and **Pandas** for Data Science, Machine Learning, and Scientific Computing in Python. I will also plan to introduce the UNIX shell and Python basics such that you can use NumPy and Pandas effectively.

If you want to acquire the math fundamentals before approaching Python and its libraries, I am working in a another project which covers that ([here](https://github.com/pabloinsente/math-app-ml)). The Linear Algebra chapters is the most important and can be found [here](https://pabloinsente.github.io/intro-linear-algebra).

## Table of contents

I'll cover the following topics:

0. Introduction to the UNIX shell and Bash![progress](https://progress-bar.dev/25/ "progress")
1. Introduction to Jupyter Notebooks: set-up, user-guide, and best practices  ![progress](https://progress-bar.dev/100/ "progress")
2. Introduction to Python basics
3. Introduction to NumPy   ![progress](https://progress-bar.dev/100/ "progress")
4. Introduction to Pandas

The content of each section will be delivered as a Jupyter Notebook and/or Markdown files.

## Usage

There are two alternatives to access the contents: **remote** and **local**.

The **remote option** does not require any installation or configuration from your part. It is click and play. But, you will have a lot less control over the Python set up, you will probably have to use a slow machine in the cloud, and you won't be able to save and recover anything you change in the Notebooks (you will  have to download the Notebooks with the changes). Since this is a begginer workshop, I highly recommend to use this option, as performance and control are not issues at this point.

The **local option** does require to follow a series of instructions to download and set up everything in your computer. I do provide the code to copy-paste and run in the terminal, but such instructions only work for Linux-based systems, like Macbooks are Linux-machines. If you are a Windows users, you have two options:

1. downloading and installing terminal emulators like [GitBash](https://gitforwindows.org/) and [Cygwin](https://www.cygwin.com/)
2. to install the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10).

If you are a beginner, [GitBash](https://gitforwindows.org/) and [Cygwin](https://www.cygwin.com/) should work just fine. I do not advise trying (WSL) unless you feel comfortable with using the terminal.

### Option 1: Cloud-based environment (prefered)

Click in the ```binder``` icon -> [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pabloinsente/intro-sc-python/master/?urlpath=lab)

This will build an online development environment with the repository contents. Beware that it may take 2-3 minutes to be ready.

Then navigate to the `notebooks` directory and click on `TURORIAL-NAME.ipynb`

### Option 2: Local environment

To obtain the files locally, run this in the command line:

```git
git clone https://github.com/pabloinsente/intro-sc-python.git
```

To set up your system, you need Python 3.6 installed in a Linux/Mac machine. Check you have Python installed by running this in the terminal:

```bash
python3 --version
```

you should see something like

```bash
python 3.6.X # the X stands for any number
```

If you do not have Python 3.6 installed, go to the [Python website](https://www.python.org/downloads/), search Python 3.6.8 under the "Looking for a specific release?" section, and follow the downloading and installing instructions.

Once you have Python installed, It is recommended to use a [virtual environment](https://docs.python.org/3/tutorial/venv.html) before installing the dependencies. To do this, navigate into the cloned repository in the console by:

```bash
cd intro-sc-python
```

Note that you may need to change the path to `cd` into the directory.

Then run this inside that directory to create the virtual environment:

```Python
python3 -m venv venv
```

And activate your environment by running:

```bash
source venv/bin/activate
```

Make sure to have the latest pip version:

```bash
pip install --upgrade pip
```

Install dependencies by running:

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

**To run the notebook**, navigate to the ```notebooks``` directory and launch Jupyter Lab as:

```Python
jupyter lab ./notebooks/TURORIAL-NAME.ipynb
```

repository: ramet/intro-sc-python

repo_name: ramet/intro-sc-python


text:
The Puli Service Provider for Silex
===================================

[![Build Status](https://travis-ci.org/puli/silex-provider.svg?branch=master)](https://travis-ci.org/puli/silex-provider)
[![Build status](https://ci.appveyor.com/api/projects/status/yufuha6h89il7glj/branch/master?svg=true)](https://ci.appveyor.com/project/webmozart/silex-provider/branch/master)
[![Build Status](https://scrutinizer-ci.com/g/puli/silex-provider/badges/build.png?b=master)](https://scrutinizer-ci.com/g/puli/silex-provider/build-status/master)
[![Latest Stable Version](https://poser.pugx.org/puli/silex-provider/v/stable.svg)](https://packagist.org/packages/puli/silex-provider)
[![Total Downloads](https://poser.pugx.org/puli/silex-provider/downloads.svg)](https://packagist.org/packages/puli/silex-provider)
[![Dependency Status](https://www.versioneye.com/php/puli:silex-provider/1.0.0/badge.svg)](https://www.versioneye.com/php/puli:silex-provider/1.0.0)

Latest release: none

PHP >= 5.3.9

Integrates Puli with the [Silex microframework].

Just register the service provider to your app:

```php
$app->register(new \Puli\SilexProvider\PuliServiceProvider());
```

This will give you the possibility to use the Puli paths instead of classic Twig paths:

```php
$this->get('/', function () use ($app) {
    return $app['twig']->render('/app/views/index.html.twig');
});
```

To disable the Twig integration, use:

```php
$app->register(new \Puli\SilexProvider\PuliServiceProvider(), array(
    'puli.enable_twig' => false,
));
```

Authors
-------

* [Bernhard Schussek] a.k.a. [@webmozart]
* [The Community Contributors]

Installation
------------

Install Silex using [Composer](http://getcomposer.org/).
Follow the [Installation guide] guide to install Puli in your project.

Finally install the PuliServiceProvider adding `puli/silex-provider` to your composer.json or from CLI:

```
$ composer require puli/silex-provider
```

Documentation
-------------

Read the [Puli Documentation] to learn more about Puli.

Contribute
----------

Contributions to Puli are always welcome!

* Report any bugs or issues you find on the [issue tracker].
* You can grab the source code at Puli’s [Git repository].

Support
-------

If you are having problems, send a mail to<EMAIL_ADDRESS>or shout out to
[@webmozart] on Twitter.

License
-------

All contents of this package are licensed under the [MIT license].

[Silex microframework]: http://silex.sensiolabs.org/
[Puli]: http://puli.io
[Bernhard Schussek]: http://webmozarts.com
[The Community Contributors]: https://github.com/puli/silex-provider/graphs/contributors
[Installation guide]: http://docs.puli.io/en/latest/installation.html
[Puli Documentation]: http://docs.puli.io/en/latest/index.html
[issue tracker]: https://github.com/puli/issues/issues
[Git repository]: https://github.com/puli/silex-provider
[@webmozart]: https://twitter.com/webmozart
[MIT license]: LICENSE

repository: puli/silex-provider

gha_language: PHP

repo_name: puli/silex-provider


text:
rosauth [![Build Status](https://api.travis-ci.org/GT-RAIL/rosauth.png)](https://travis-ci.org/GT-RAIL/rosauth)
=======

#### Server Side tools for Authorization and Authentication of ROS Clients
For full documentation, see [the ROS wiki](http://ros.org/wiki/rosauth).

[Doxygen](http://docs.ros.org/indigo/api/rosauth/html/) files can be found on the ROS wiki.

### License
rosauth is released with a BSD license. For full terms and conditions, see the [LICENSE](LICENSE) file.

### Authors
See the [AUTHORS](AUTHORS.md) file for a full list of contributors.


text:
# :warning: THIS PROJECT IS DEPRECATED :warning:

# dns-exporter

[![Release](https://img.shields.io/github/v/release/anton-yurchenko/dns-exporter)](https://github.com/anton-yurchenko/dns-exporter/releases/latest)
[![codecov](https://codecov.io/gh/anton-yurchenko/dns-exporter/branch/master/graph/badge.svg)](https://codecov.io/gh/anton-yurchenko/dns-exporter)
[![Go Report Card](https://goreportcard.com/badge/github.com/anton-yurchenko/dns-exporter)](https://goreportcard.com/report/github.com/anton-yurchenko/dns-exporter)
[![tests](https://github.com/anton-yurchenko/dns-exporter/actions/workflows/tests.yml/badge.svg)](https://github.com/anton-yurchenko/dns-exporter/actions/workflows/tests.yml)
[![Docker Build](https://img.shields.io/docker/cloud/build/antonyurchenko/dns-exporter)](https://hub.docker.com/r/antonyurchenko/dns-exporter)
[![Docker Pulls](https://img.shields.io/docker/pulls/antonyurchenko/dns-exporter)](https://hub.docker.com/r/antonyurchenko/dns-exporter)
[![License](https://img.shields.io/github/license/anton-yurchenko/dns-exporter)](LICENSE.md)

You are most certainly apply proper Backup procedures for your deployed application, version control your code and so on.... **But what will you do in case one of your DNS entries was misconfigured or deleted?** It will probably mean a downtime to your application while you are trying to figure out where that missing CNAME was pointing or what was stored in that TXT record!

**DNS-EXPORTER** is designed especially for those cases! Run it periodically against a DNS providers to document your domains configuration.

## Features

- Export all DNS records in Zonefile-like format.
- Export to local/remote Git repository allowing easy tracking of changes.
- Supported DNS providers: **CloudFlare, Route53**
- Supported Public / Private zones.

## Example Export

```
;; SOA Record
domain.com.	900	IN	SOA	ns-245.awsdns-33.com. awsdns-hostmaster.amazon.com. 1 7200<PHONE_NUMBER> 86400

;; NS Records
domain.com.	172800	IN	NS	ns-1800.awsdns-33.co.uk.
domain.com.	172800	IN	NS	ns-245.awsdns-33.com.
domain.com.	172800	IN	NS	ns-1352.awsdns-33.org.
domain.com.	172800	IN	NS	ns-736.awsdns-33.net.
dns.domain.com.	300	IN	NS	ns2.amazon.org
dns.domain.com.	300	IN	NS	ns1.amazon.com
dns.domain.com.	300	IN	NS	ns3.amazon.net
dns.domain.com.	300	IN	NS	ns4.amazon.co.uk

;; MX Records
mail.domain.com.	300	IN	MX	10 mailserver.domain.com.
mail.domain.com.	300	IN	MX	20 mailserver2.domain.com.

;; A Records
multiple-a.domain.com.	300	IN	A	<IP_ADDRESS>
multiple-a.domain.com.	300	IN	A	<IP_ADDRESS>
multiple-a.domain.com.	300	IN	A	<IP_ADDRESS>
short-a.domain.com.	60	IN	A	<IP_ADDRESS>
simple-a.domain.com.	300	IN	A	<IP_ADDRESS>

;; AAAA Records
ipv6.domain.com.	300	IN	AAAA	fe80:0:0:0:202:b2fe:fe1e:8329

;; CNAME Records
cname.domain.com.	300	IN	CNAME	multiple-a.domain.com

;; TXT Records
simple-txt.domain.com.	300	IN	TXT	"Sample Text Entries"

;; SRV Records
server.domain.com.	300	IN	SRV	1 10 5269 xmpp-server.domain.com.

;; PTR Records
pointer.domain.com.	300	IN	PTR	www.domain.com

;; SPF Records
policy.domain.com.	300	IN	SPF	"v=spf1 ip4:<IP_ADDRESS>/16-all"

;; NAPTR Records
name-auth.domain.com.	300	IN	NAPTR	100 100 "U" "" "!^.*$!sip:info@bar.example.com!" .

;; CAA Records
ca.domain.com.	300	IN	CAA	0 issue "caa.example.com"
ca.domain.com.	300	IN	CAA	0 issuewild ";"

;; Route53 Alias Records
alias-a.domain.com.	0	IN	A	a0123456789abcdef.awsglobalaccelerator.com.
alias-c.domain.com.	0	IN	CNAME	a0123456789abcdef.awsglobalaccelerator.com.
alias-caa.domain.com.	0	IN	CAA	a0123456789abcdef.awsglobalaccelerator.com.
```

## Manual

- [Configuration](docs/configuration.md)
  - [Permissions](docs/permissions.md)
- Execution
  - [Docker](docs/docker.md)
  - [Kubernetes](docs/kubernetes.md)

## Remarks

- **Exported files should never be imported directly!** Those exports does not follow DNS Zonefile format precisely and are intended to be read by human.

## License

[MIT](LICENSE.md) © 2019-present Anton Yurchenko

repository: anton-yurchenko/dns-exporter

gha_language: Go

repo_name: anton-yurchenko/dns-exporter


text:
# Temporary Repo

The fix in this repo should be upstreamed, and will be in time. `go get` from here to get a working copy though!

# putio-sync

putio-sync is a cross-platform command line program to download your preferred Put.io directory to your computer.

It periodically watches for changes and downloads new content when they arrive.

![](https://s3-eu-west-1.amazonaws.com/putio-mac-app/putio-sync-ss.png)

## Features

* Cross platform
* Synchronizes upstream folder to make directory hiearchy identical
* Checks for file hash equality
* Pause/resume support
* HTTP API for external clients
* Web UI

# Installation

If you have Go installed, try checking out the latest release:

```sh
go get -u github.com/porty/putio-sync
```

# Usage

Run `putio-sync -server` and visit `http://<IP_ADDRESS>:3000`

# License

MIT. See LICENSE file.

repository: porty/putio-sync

repo_name: porty/putio-sync


text:
# Test Example 08
## Making a sounder sensor

A Microphone is a tranducer, that whioch converts energy from one form to another - in this case sound energy into electrical signals.  For all intents and purposes the opposite of a speaker.  In this specific example,  I used a electret condensor micrphone.  - a common pience of electronics comonly found in laptops, mobile phones and other devices.

The microphone carries to parralel pates as in a capacitor a capaticance priniciple is applied.  In this case one plate is fixed and the other is movable.  The strikes the movalble diaphran plate thereby changing the capacitance between plates and in turn current flow.

![Wiring Diagram](https://github.com/AGHG46087/ardex/blob/master/T08_SoundSensor/T08_Wiring.jpg "Wiring Diagram")


text:
# Disaster Response Pipeline Project

[//]: # (Image References)
[app0_img]:./app0_img.png
[app1_img]:./app1_img.png
[test_result_img]:./test_result_img.png

## Introduction

This repository contains the completed Disaster Response Pipeline Project, which implements a supervised training model to  classify messages incoming from a disaster area to highlight what is happening and/or what type of response may be needed from first responders.

When first launched the app should show a histogram of genres pulled from a database of messages used for training/testing the model.

![][app0_img]

After a message is entered, the app will classify the message according to one or more of 36 possible disaster related categories such as *food*, *water*, *medical help*, etc...

![][app1_img]

## Training Data

The training data for the model is found in the two files:

 * *./data/disaster_messages.csv*
 * *./data/disaster_categories.csv*

Messages in the first file and categories in the second file correspond
through an id tag found in each. A message can correspond to more than one
category. For example, the following row in *disaster_categories.csv*

```
73,related-1;request-1;offer-0;aid_related-1;medical_help-1;medical_products-0;
search_and_rescue-0;security-0;military-0;child_alone-0;water-0;food-0;shelter-0;clothing-0;
money-0;missing_people-0;refugees-0;death-0;other_aid-1;infrastructure_related-1;transport-0;
buildings-1;electricity-0;tools-0;hospitals-1;shops-0;aid_centers-0;other_infrastructure-0;
weather_related-1;floods-0;storm-1;fire-0;earthquake-0;cold-0;other_weather-0;direct_report-0
```

means messages that have **id** = 73 correspond to (are classified in) the categories: **related**,**request**,**medical_help**,**other_aid**, **infrastructure_related**,**buildings**,**hospitals**, and **weather-related**.

## Web Application Interface
The interface to the model is a Web application accessed simply through a browser. The front end of the application is built using the [Bootstrap](https://getbootstrap.com/) library, and receives data from the model in the back end via the [Flask](https://en.wikipedia.org/wiki/Flask_(web_framework)) framework.

To get the application up and running, we need to do the following three steps.

1. Clean the data and archive to a database.

   Run the process_data.py in the project root directory
   ```shell
	python data/process_data.py data/disaster_messages.csv data/disaster_categories.csv data/DisasterResponse.db
   ```

2. Build and train a model based on the data in the database.

   ```shell
   python models/train_classifier.py data/DisasterResponse.db models/classifier.pkl
   ```
   Part of the training set here is reserved for testing the model and the results will be output here. Test results
   are shown for each of the 36 categories.

   ![][test_result_img]

   The column **support** refers to the number of messages in the test. For the *STORM* category there are 498 messages
   that are classified in this category (1.0) and 4746 messages that are not (0.0).

   **precision** is the ratio of true positives (pred =1;test=1) to all positive (affirmative) predictions (pred = 1;test=
   0,1), whereas

   **recall** is the ratio of true positives (pred =1;test=1) to all correct predictions  (pred = test).

   The **f1-score** is simply the harmonic mean of the precision and recall, and the

   **accuracy score** is the ratio of correct predictions to the number of messages in the test set (for the given
   category). So for *EARTHQUAKE*, %98.89 of 5244 test messages were predicted correctly to either correspond to this
   category or not.

   We can expect that recall may be fairly low for a category where we have only a relatively small number of
   in-category messages, because the numerator of the recall , number of true positives, will be small compared
   to the number of false negatives (pred=0;test=0) in the denominator. This is demonstrated in the *FIRE* category in the
   print out above.

3. Run the web application with the model running in the back end.

   Run the following command in the app's directory to run the web app.
    ```shell
    python run.py
    ```

   Navigate your web browser to http://<IP_ADDRESS>:3001/ or http://<IP_ADDRESS>:3001 (or wherever you call home).

   Enter a text message and hit the "Classify Message" button. Referring to the image above, the graphic on the left
   shows the categories that were found to be significant (colored cells) vs. those that were not. The graphic on the right
   shows the probabilities for the significant categories. These are the probabilities that are input to a scoring function  	to determine significance (converts to 0 or 1) and are typically 60% or larger.

repository: jfude/DSND-DisasterResponse

repo_name: jfude/DSND-DisasterResponse


text:
# Tips for productive Chromium code reviews

This page is meant to help both CL authors and reviewers have a more productive,
efficient, and mutually beneficial code review. **None of these tips represent
formal policy**, but following this guidance should help you get your changes
reviewed and landed faster.

Please also read [Respectful Changes](cl_respect.md) and [Respectful Code
Reviews](cr_respect.md).

## Keep changes under 500 LoC

Large changes take longer to review than smaller changes. Reviewers generally
need to familiarize themselves with the content of a CL after each round of
review, so the larger a CL is, the longer that process takes. Large CLs can also
fatigue a reviewer who goes line-by-line through a CL. Try to keep changes below
500 lines of code – including tests. There is a balance here, though: 200 lines
of code (LoC) of production code with 600 LoC of tests might be fine, especially
if the test code follows a regular pattern. Conversely, 400 LoC of production
code with 200 LoC of test code may not provide enough coverage.

If your CL is larger than that, seriously consider splitting it into smaller,
reviewable units. When splitting CLs, you should tag each CL with the same
tracking bug, so that the association is clear. You can also use the [relation
chain of dependent CLs](contributing.md#uploading-dependent-changes) to allow
the reviewer to see the progression before it is landed.

## Share context for the CL

Providing context for the review is important for understanding the motivation
behind a change. The amount of context to share depends on the scale of the
change: a thorough CL description can be sufficient for a single, independent
patch. But sometimes it may be better to provide the context on a linked bug,
that e.g. documents the investigation that led to the proposed fix. If your
change is large, it is helpful to provide reviewers context for the series of
small-to-medium-sized CLs via a [design
doc](https://docs.google.com/document/d/14YBYKgk-uSfjfwpKFlp_omgUq5hwMVazy_M965s_1KA/edit#heading=h.7nki9mck5t64).
Highlight the problem that needs solving, an overall description of the proposed
solution, and any alternatives you considered.

Your CL description should always document **what** you are changing and
**why**. CL descriptions are stored in the repository history, so they should be
written to stand the test of time. Ask yourself, "if another engineer, five
years from now, needed to understand why this CL landed based on the
description, would they be able to?"

## Guide the reviewer though complex CLs

While the CL description goes on record, you can also leave comments on the CL
as well: If your CL contains one major change and a lot of fallout from that
change, you can point out where to start the review process. If you made a
design decision or trade-off that does not justify a comment in the source code,
you may still proactively leave a comment on the CL to inform the reviewer.

## Separate behavior changes from refactoring

CLs should only effect one type of change. If you need to both refactor
something and change its behavior, it is best to do so over two separate CLs.
Refactoring generally should not change behavior. This benefits the reviewer,
who can more quickly evaluate a refactoring as a move-code-only change that does
not change behavior, and the author, who potentially avoids unnecessary reverts
and re-lands due to regressions caused by the behavior change.

## Encapsulate complexity, but don’t over-abstract

One way to keep changes small is to build up composable units (functions,
classes, interfaces) that can be independently tested and reviewed. This helps
manage the overall change size, and it creates a natural progression for
reviewers to follow. However, do not over-design abstractions for an unknown
future. Allowing for extensibility when it’s not necessary, creating
abstractions where something concrete would suffice, or reaching for a design
pattern when something simpler would work equally well adds unnecessary
complexity to the codebase. The codebase is inherently mutable and additional
abstractions can be added _if and when_ they are needed.

## Optimize for reducing timezone latency

The Chromium project has contributors from around the world, and it is very
likely that you will not be in the same timezone as a reviewer. You should
expect a reviewer to be responsive, per the code review policy, but keep in mind
that there may be a significant timezone gap. Also see the advice about
[minimizing lag across
timezones](https://www.chromium.org/developers/contributing-code/minimizing-review-lag-across-time-zones/).

## Get a full review from a single, main reviewer, before asking many OWNERs

If your CL requires the approval from 3+ OWNERs, get a small number of main
reviewers (most commonly 1) to review the entire CL so that OWNERs don’t need to
deal with issues that anybody can detect. This is particularly useful if OWNERs
are in a different timezone.

## Depend on more-specific owners

Wherever possible, choose reviewers from the deepest OWNERS files adjacent to
the most significant aspects of your change. Once their review is complete, add
OWNERS from parent/less-specific directories for getting approvals for any API
change propagations. The parent-directory reviewers can typically defer to the
more-specific reviewers’ LGTM and simply stamp-approve the CL.

Avoid adding multiple reviewers from the same OWNERS file to review a single
change. This makes it unclear what the responsibilities of each reviewer are.
Only one OWNERS LGTM is needed, so you only need to select one. You can use the
file revision history to see if one reviewer has been more recently active in
the area.

repository: chromium/chromium

repo_name: chromium/chromium


text:
# Working with Endpoints via Tooling

You can create a new endpoint or import an existing endpoint from an XML
file, such as a Synapse configuration file using WSO2 Integration
Studio.

!!! tip

You need to have WSO2 Integration Studio installed to create a new
endpoint or to import an existing endpoint. For instructions, see
[Installing WSO2 Integration
Studio](https://docs.wso2.com/display/EI650/Installing+WSO2+Integration+Studio)
.

When you create an endpoint, you need to give it a name, at which point
it appears in the **Defined Endpoint** section of the tool palette in
WSO2 Integration Studio. To use a defined endpoint, simply drag and drop
the endpoint from the palette to the sequence, proxy service, or other
artifact where you want to reference it.

#### Creating a new endpoint

Follow these steps to create a new endpoint. Alternatively, you can
[import an existing endpoint](#WorkingwithEndpointsviaTooling-import) .

1.  Open **WSO2 Integration Studio,** and click **Miscellaneous → Create
    New Config Project ** in the **Getting Started** tab.
    ![](attachments/119131929/119133621.png){width="800" height="397"}

2.  Enter a project name and click **Finish** .

3.  The new project will be listed in the project explorer.
4.  Right click the project and go to **New → Endpoint** to open the
    **New Endpoint Artifact** dialog.
5.  Select **Create a New Endpoint** and click **Next** .
6.  Type a unique name for the endpoint, and then specify the [type of
    endpoint](_ESB_Endpoints_) you are creating.
    -   **[Address Endpoint](_Address_Endpoint_)** - Defines the direct
        URL of the service.
    -   **[Default Endpoint](_Default_Endpoint_)** - Defines additional
        configuration for the default target.
    -   **[Configuring Failover
        Endpoints](_Configuring_Failover_Endpoints_)** - Defines the
        endpoints that the service will try to connect to in case of a
        failure. This will take place in a round robin manner.
    -   **[HTTP Endpoint](_HTTP_Endpoint_)** - Defines a URI template
        based REST service endpoint.
    -   **[Load Balance Endpoint](_Load-balance_Group_)** - Defines
        groups of endpoints for replicated services. The incoming
        requests will be directed to these endpoints in a round robin
        manner. These endpoints automatically handle the fail-over cases
        as well.
    -   **[Recipient List Group](_Recipient_List_Endpoint_) -** Defines
        the list of endpoints a message will be routed to.
    -   **[Template Endpoint](_Template_Endpoint_)** - Allows to create
        a custom Endpoint template.
    -   **[WSDL Endpoint](_WSDL_Endpoint_)** - Defines the WSDL, service
        and port.
7.  Do one of the following:
    -   To save the endpoint in an existing ESB Config project in your
        workspace, click **Browse** and select that project.
    -   To save the endpoint in a new ESB Config project, click **Create
        new Project** and create the new project.
    -   To save the endpoint in a Registry Resource Project, click
        **Make this a Dynamic Endpoint** , click the **Browse** button
        next to **Save endpoint in** and select the registry, and then
        select the registry (Configuration or Governance) where you want
        to save the endpoint. Lastly, type the endpoint name in the
        **Registry Path** box.

                !!! tip

                For instructions on creating a Registry Resource Project, see
                [Working with Registry
                Artifacts](https://docs.wso2.com/display/EI620/Working+with+Registry+Artifacts)
                .

8.  Click **Add Property** to open the **Properties** tab and add the
    required properties.

    Parameter Name
    Description

    Name
    The name of the endpoint property.

    Value
    The value of the endpoint property.

    Scope
    The scope of the property. Possible values are as follows.

Synapse

Transport

Axis2

axis2-client

For more information about these scopes, see XPath Extension Functions .

    Action
    This parameter allows you to delete a property.

9.  Open the Endpoint artifact from the project explorer, go to the
    **Form** view, and update the additional configurations (which
    changes based on the type of endpoint you are creating).

Field Name

Description

Suspend Error Codes

This parameter allows you to select one or more error codes from the List of Values. If any of the selected errors is received from the endpoint, the endpoint will be suspended.

Initial Duration (in mili seconds))

The time duration for which the endpoint will be suspended, when one or more suspend error codes are received from it for the first time.

Max Duration (Millis)

The maximum time duration for which the endpoint is suspended when suspend error codes are received from it.

Factor

The duration to suspend can vary from the first time suspension to the subsequent time. The factor value decides the suspense duration variance between subsequent suspensions.

On Timeout Error codes

A list of error codes. If these error codes are received from the endpoint, the request will be subjected to a timeout.

Retry

The number of re-tries in case of a timeout, caused by the above listed error codes.

Retry Delay(in milliseconds)

The delay between retries in milliseconds.

Timeout Action

The action to be done at a timeout situation. You can select from:

Never Timeout

Discard Message

Execute Fault Sequence

Timeout Duration (in milliseconds)

The duration in milliseconds before considering a request to be subjected to a time-out.

WS-Addressing

Adds WS-Addressing headers to the endpoint.

Separate Listener

The listener to the response will be a separate transport stream from the caller.

WS-Security

Adds WS-Security features as described in a policy key (referring to a registry location).

    Non Retry Error Codes

When a child endpoint of a failover endpoint or load-balance endpoint fails for one of the error codes specified here, the child endpoint will be marked for suspension and the request will not be sent to the next endpoint in the group.

    Retry Error Codes
    When adding a child endpoint to a failover endpoint or load-balance endpoint , you can specify the error codes that trigger this node to be retried instead of suspended when that error is encountered. This is useful when you know that certain errors are transient and that the node will become available again shortly. Note that if you specify an error code as a Retry code on one node in the group but specify that same code as a Non Retry error code on another node in the group, it will be treated as a Non Retry error code for all nodes in the group.

10. Click **Finish** . The endpoint is created in the
    `          endpoints         ` folder under the ESB Config or
    Registry Resource project you specified, and the endpoint opens in
    the editor.

#### Importing an endpoint

Follow these steps to import an existing endpoint from an XML file such
as a Synapse configuration file, into an ESB Config project.
Alternatively, you can [create a new
endpoint](#WorkingwithEndpointsviaTooling-create) .

1.  Open **WSO2 Integration Studio,** and click **Miscellaneous → Create
    New Config Project ** in the **Getting Started** tab.
    ![](attachments/119131929/119133621.png){width="800" height="397"}

2.  Enter a project name and click **Finish** .

3.  The new project will be listed in the project explorer.
4.  Right click the project and go to **New → Endpoint** to open the
    **New Endpoint Artifact** dialog.
5.  Select **Import Endpoint** and click **Next** .
6.  Specify the endpoint file by typing its full path name or clicking
    **Browse** and navigating to the file.
7.  In the **Save Endpoint In** field, specify an existing ESB Config
    project in your workspace where you want to save the endpoint, or
    click **Create new Project** to create a new ESB Config project and
    save the endpoint there.
8.  In the **Advanced Configuration** section, select the endpoints you
    want to import.
9.  Click **Finish** . The endpoints you selected are created in the
    `          endpoints         ` folder under the ESB Config project
    you specified, and the first endpoint opens in the editor.

!!! info

You also have the option of using the management console to create
endpoints: Click the **Main** tab on the management console, go to
**Service Bus** -\> **Endpoints** **,** and then click the **Add
Endpoint** tab. Select the type of endpoint you want to create and
follow the instructions on the screen.


text:
# Encryption

The encrypt module is included with Koseven, but needs to be enabled before you can use it. To enable, open your
`application/bootstrap.php` file and modify the `$modules` variable by including the encrypt module like so:

    $modules = [
        ...
        'encrypt' => MODPATH.'encrypt',
        ...
    ];

Also ensure you either have the Mcrypt, OpenSSL or Sodium extension loaded to your PHP config.

## Configuration
Copy the default config/encryption.php to your application/config folder.
The default Encryption config file looks like this:

    <?php

    return array(
        'default' => [
        		'type'	 => 'openssl',
        		'key'	 => NULL,
        		'cipher' => Encrypt_Engine_Openssl::AES_256_CBC
        	],
        	.....
    );

A couple of notes about the config.
First, you may have multiple first-level keys other than 'default' if you need to.
Second, notice there is no key provided. You need to add that.
It is strongly recommended that you choose a high-strength random key.
You can generate those for example by using the [pwgen linux program](http://linux.die.net/man/1/pwgen)...

    shell> pwgen 63 1
    trwQwVXX96TIJoKxyBHB9AJkwAOHixuV1ENZmIWyanI0j1zNgSVvqywy044Agaj

...or by going to [GRC.com/passwords.htm](https://www.grc.com/passwords.htm).

The 'type' key tells the Encryption module which driver engine to use.
The following Engines are currently supported by default:

- mcrypt (deprecated)
- openssl
- sodium

## Basic Usage

To use the Encryption class, obtain an instance of the Encrypt class by calling it's *instance* method, optionally
passing the desired configuration group. If you do not pass a config group to the instance method, the default group
will be used.

    $encrypt = Encrypt::instance('tripledes');

### Encoding Data

Next, encode some data using the *encode* method:

    $encrypt = Encrypt::instance('tripledes');
    $encrypted_data = $encrypt->encode('Data to Encode');
    // $encrypted_data now contains pCD5Z6oVdb9hbLxxV+FgGrhwVzZuhQoH

[!!] Raw encrypted strings usually won't print in a browser, and may not store properly in a VARCHAR or TEXT field. For this reason, Koseven's Encrypt class automatically calls base64_encode on encode, and base64_decode on decode, to prevent this problem.

[!!] One word of caution. The length of the encoded data expands quite a bit, so be sure your database column is long enough to store the encrypted data. If even one character is truncated, the data will not be recoverable.

### Decoding Data

To decode some data, load it from the place you stored it (most likely your database) then pass it to the *decode* method:

    $encrypt = Encrypt::instance('tripledes');
    $decoded_string = $encrypt->decode($encrypted_data);
    echo $decoded_string;
    // prints 'Data to Encode'

You can't know in advance what the encoded string will be, and it's not reproducible, either.
That said, you can encode the same value over and over, but you'll always obtain a different encoded version,
even without changing your key, cipher and mode. This is because Koseven adds some random entropy before encoding it
with your value. This ensures an attacker cannot easily discover your key and cipher, even given a collection of encoded
values.

repository: uBizzy/koseven

branch_name: refs/heads/devel

gha_license_id: NOASSERTION

repo_name: uBizzy/koseven


text:
---
permalink: manage-security-groups-and-rules/
audit_date: '2019-02-07'
title: Manage security groups and rules
type: article
created_date: '2019-01-23'
created_by: Rackspace Community
last_modified_date: '2019-02-07'
last_modified_by: William Loy
product: Cloud Servers
product_url: cloud-servers
---

This article provides instructions for creating security groups, applying inbound and outbound rules, and deleting rules by using the Rackspace Control Panel and Application Programming Interface (API).

### Create a security group

1. Log in to [my.rackspace.com](https://my.rackspace.com).

2.  Navigate to **Networking** and click **Security Groups**.

3.  Click **Create Security Group**.

4.  In the box labeled as **Step 1 of 2: Create Security Group**, enter a name, region, and an optional description. Then click **Create Security Group**.

5. In the box labeled **Step 2 of 2: Add Inbound Rule**, enter the Internet Protocol (IP) version, protocol, and source IP address or IP range for the rule that you are adding.

    **Note:** Creating an inbound security group rule is optional and can be skipped by clicking **No thanks. I'll add rules later**.

6. Click **Add Rule**.

### Create Outbound security group Rule

You must create outbound rules by using the API. Use the Client URL (`curl`) command example in this section to create an outbound security group rule. Update the following variables in the `curl` example by using the appropriate values for your account referenced in the following:

- `region` - Use the region for the security group.

- `yourAuthToken` - Use the authentication token for your user account. See [How curl commands work](https://developer.rackspace.com/docs/cloud-networks/v2/getting-started/send-request-ovw/#how-curl-commands-work) for information on authentication using `curl` commands.

- `portNumber or null` - Replace this with the port number that you want to add to the rule (such as 22, 80, or 443).

- `IPv4 or IPv6` - Specify IPv4 or IPv6.

- `desiredProtocol` - Replace this with the protocol that you want to use.

- `yourSGID` - **Security Group UUID**. The **Security Group UUID** is located on the security group Details Page next to **Group ID**.

Create an outbound security rule by using the following `curl` command example:

        curl -XPOST https://<region>.networks.api.rackspacecloud.com/v2.0/security-group-rules \

            -H "Content-type: application/json" \

            -H "X-Auth-Token: <yourAuthToken>" \

            -H "User-Agent: python-novaclient" \

            -H "Accept: application/json" \

            -d '{"security_group_rule":{"direction":"egress","port_range_min":"<portNumber or null>","ethertype":"<IPv4 or IPv6>","port_range_max":"<portNumber or null>","protocol":"<desiredProtocol>","security_group_id":"<yourSGID>"}}' \

            | python -m json.tool

This command puts the rule you have just added in a JavaScript® Object Notation (JSON) block.

**Note:** The `id` field in the JSON output is the value you use for the `securityGroupRuleID` field to delete the rule using the `curl` method.

### Apply a security group to cloud server

Use the following instructions to apply a security group rule to a cloud server:

1. Navigate to **Servers** and select the server to which you want to apply the security group rules.

2. Navigate to **Networks and Security Groups** on the **Server Details** page .

3. Click the gear icon next to the network interface you want to apply the security group rule to.

    **Note:** You can only apply security group rules to **PublicNet** and **ServiceNet**.

4. Click **Select Security Groups**.

5. Select the check box or the corresponding security group and click **Save Selected Security Group**.

### Delete a security group Rule through the Control Panel

Use the following instructions to delete a security group rule through the Control Panel:

1. Select the **Networking** tab in the Control Panel and select **Security Groups**.

2. Select the security group from which you want to remove the rule.

3. On the **Security Group Details** page under **Rules**, select the check box and click **Delete**.

### Delete a security group rule through the API

Update the following variables in the following curl example by using the appropriate values from your rule creation and for your account:

- `securityGroupRuleID` - The `id` field in the JSON output from creating the rule originally is the value you use for the `securityGroupRuleID`.

- `yourAuthToken` - Use the authentication token for your user account. See [How curl commands work](https://developer.rackspace.com/docs/cloud-networks/v2/getting-started/send-request-ovw/#how-curl-commands-work) for information on authentication using `curl` commands.

Use the following `curl` command example to delete a security group rule through the API:

        curl -XDELETE https://<region>.networks.api.rackspacecloud.com/v2.0/security-group-rules/<securityGroupRuleID> \

            -H "Content-type: application/json" \

            -H "X-Auth-Token: <yourAuthToken>" \

            -H "Accept: application/json" \

            | python -m json.tool

### Remove a security group from a server

1. Navigate to **Servers** in the Control Panel and select the cloud server from which you want to remove the security group.

2. Navigate to the **Networks and Security Groups** section.

3. Click the gear icon next to the network interface from which you want to remove the security group.

4. Click **Select Security Groups**.

5. Uncheck the check box next to the security group and click **Save Selected Security Group**.

repository: rackerlabs/rackspace-how-to

gha_language: Shell

repo_name: rackerlabs/rackspace-how-to


text:
title:Github pages gh-pages branch from a sub folder\
subtitle:When your root folder is not what you want as the root of your Github Pages root directory.\
classes: language-markup\
pubDate:2016-03-11T17:48:55+00:00

<header>
<hgroup>
Github pages gh-pages branch from a sub folder
==============================================

Alternatives to have the build output directory be the project's page.
----------------------------------------------------------------------

</hgroup>
</header>
Currently I'm working with a static site generator, and it builds to a sub-folder. I want this subfolder to be the one served as the project page.

So far I've found a couple decent solutions:

1.  [Set gh-pages as an orphan branch on the build folder](#ac1)
2.  [Do a subtree push to the gh-pages branch](#ac2)
3.  [Build and deploy with https://github.com/X1011/git-directory-deploy](#ac3)

Let's say we have a repo called `my-project` inside we have the folder `build/dist` and that's the one you want to have as the root of the `gh-pages` site.

Orphan branch {#ac1}
-------------

Let's start maybe with the most intuitive one, at least for me. This I had done before, it has proven pretty flexible specially for Styleguide pages, it works but is a bit of a hasstle to setup, and each time you have to add, commit and push separately from the main branch.

First, if you don't already have it on the `.gitignore` file you have to add the `./build/dist` path to it. In case you need to, also remove it from the repo with.

git rm -r -f --cached build/dist

Then you `cd build/dist` cd into your folder, and clone the `my-project` repo inside this folder.  And each time after you build.

git add -A\
git commit -m "Some message"\
git push origin gh-pages

Althought it could be scripted to be part of the deploy step, it is a bit cumbersome and is probably why I had forgotten about this solution. That's why I went looking again for a good solution and found the following two.

Subtree push {#ac2}
------------

This is more elegant and much more straight forward.

You have a regular repo, the `build/dist` folder must **not** be ignored. After building and commiting your branch you do the magic trick.

git subtree push --prefix build/dist origin gh-pages

Done, you'll see your build folder deployed by Github briefly.

Git Directory deploy {#ac3}
--------------------

This is by far the most hard-core option, but it requires that you are developing in a linux environment, or somewhere you can run shell scripts.

<https://github.com/X1011/git-directory-deploy>

As I'm constantly jumping between a mac, a Linux and a Windows machine and I never know in which one I'll be developing in, I rather not rely on shell scripts. But I read the code and it is very clever, I will use it for sure when I have somthing bigger to deploy.

Conclusion
----------

I'll be using subtree push the most, it's the most straight forward option of them all.

repository: baamenabar/blog-inabar

repo_name: baamenabar/blog-inabar


text:
---
title: /annotations
position: 1.5
type: delete
description: Delete annotation
---

The whole URL of the request is identical to the IIIF style annotation ID, e.g.,
`http://annotations.ten-thousand-rooms.yale.edu/annotations/76d24e36-e255-41db-883f-64606c4ff08e`

gha_language: Ruby


text:
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Unreleased]

### Changed

- Updated dependency versions

## [0.1.1] 2017-06-03

### Added

- Missing POM metadata

## [0.1.0] 2017-06-02

### Added

- Initiated the change log
- Initiated read me
- Clojure and ClojureScript wrapper for diff from Google’s
  [Diff, Match and Patch library][diff-match-patch] by Neil Fraser.

[diff-match-patch]: https://code.google.com/archive/p/google-diff-match-patch/

[Unreleased]: https://github.com/plumula/diff/compare/0.1.1...HEAD
[0.1.1]: https://github.com/plumula/diff/compare/0.1.0...0.1.1
[0.1.0]: https://github.com/plumula/diff/compare/init...0.1.0

repository: chourave/diff

repo_name: chourave/diff


text:
# @xstate/react

This package contains utilities for using [XState](https://github.com/statelyai/xstate) with [React](https://github.com/facebook/react/).

- [Read the full documentation in the XState docs](https://xstate.js.org/docs/packages/xstate-react/).
- [Read our contribution guidelines](https://github.com/statelyai/xstate/blob/main/CONTRIBUTING.md).

## Quick start

1. Install `xstate` and `@xstate/react`:

```bash
npm i xstate @xstate/react
```

**Via CDN**

```html
<script<EMAIL_ADDRESS>```

By using the global variable `XStateReact`

or

```html
<script<EMAIL_ADDRESS>```

By using the global variable `XStateReactFSM`

2. Import the `useMachine` hook:

```js
import { useMachine } from '@xstate/react';
import { createMachine } from 'xstate';

const toggleMachine = createMachine({
  id: 'toggle',
  initial: 'inactive',
  states: {
    inactive: {
      on: { TOGGLE: 'active' }
    },
    active: {
      on: { TOGGLE: 'inactive' }
    }
  }
});

export const Toggler = () => {
  const [state, send] = useMachine(toggleMachine);

  return (
    <button onClick={() => send('TOGGLE')}>
      {state.value === 'inactive'
        ? 'Click to activate'
        : 'Active! Click to deactivate'}
    </button>
  );
};
```

repository: michaelfriedman/xstate

repo_name: michaelfriedman/xstate


text:
LRU Cache
---------

A `golang` implementation of last recently used cache data structure.

To install:

    go get github.com/cloudflare/golibs/lrucache

To test:

    cd $GOPATH/src/github.com/cloudflare/golibs/lrucache
    make test

For coverage:

    make cover

Basic benchmarks:

    $ make bench  # As tested on my two core i5
    [*] Scalability of cache/lrucache
    [ ] Operations in shared cache using one core
    BenchmarkConcurrentGetLRUCache       5000000               450 ns/op
    BenchmarkConcurrentSetLRUCache       2000000               821 ns/op
    BenchmarkConcurrentSetNXLRUCache     5000000               664 ns/op

    [*] Scalability of cache/multilru
    [ ] Operations in four caches using four cores
    BenchmarkConcurrentGetMultiLRU-4     5000000               475 ns/op
    BenchmarkConcurrentSetMultiLRU-4     2000000               809 ns/op
    BenchmarkConcurrentSetNXMultiLRU-4   5000000               643 ns/op

    [*] Capacity=4096 Keys=30000 KeySpace=15625
                vitess          LRUCache        MultiLRUCache-4
    create      1.709us         1.626374ms      343.54us
    Get (miss)  144.266083ms    132.470397ms    177.277193ms
    SetNX #1    338.637977ms    380.733302ms    411.709204ms
    Get (hit)   195.896066ms    173.252112ms    234.109494ms
    SetNX #2    349.785951ms    367.255624ms    419.129127ms

repository: cloudflare/cloudflared

repo_name: cloudflare/cloudflared


text:
# Branching

Goal

- Create releases from $master
- Releases can be hotfixed
- New features to new version are created from branching from $master, merged back with a PR
- Evaluate $dev for major changes

## Starting a new PR

1. Create a new branch from destination branch (i.e. $master)
`git checkout -b feature/branch-name`
1. Commit changes
`git commit -a -m "Description of change"`
1. Push branch to origin `git push --set-upstream origin features/branch-name`
1. Start pull request on GH

To optionally squash changes before making a PR refer to https://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git

`git reset --soft HEAD~3 && git commit`

## Creating a new release

To create a release using bash we need to install [hub](https://github.com/github/hub#installation).

```bash
hub release create -m "v1.5" v1.5
```

To delete a release: `hub release delete v1.5`\
To delete a tag locally: `git tag -d v1.5`\
To delete a remote tag: `git push --delete origin v1.5`

## Fix bug in a release

1. Create new branch (if not existent)

```bash
# create and set branch
git checkout -b release/v1.5 v1.5

# push remote
git push --set-upstream origin release/v1.5
```

2. Make changes and PR to it release/v1.5

```bash
# create and set branch
git checkout -b features/fix-for-v1.5.1

# commit changes
git commit -a -m "Fix error in v1.5.1"

# push to origin
git push --set-upstream origin features/fix-for-v1.5.1

# create PR in GitHub web site

```

3. Make a new release => v1.5.1

```bash
# create release v1.5.1 from branch release/v1.5
hub release create -m "v1.5.1" -t release/v1.5 v1.5.1
```

4. Fix $master too through PR or cherry-pick

4.1 Pull request

Do the pull request from bug fix branch to $master

4.2 Merging

```bash
# create branch to merge fix
git checkout -b feature/bug-fix-branch-to-master

# merge from bug fix branch
git merge feature/bug-fix-branch

# commit merge
git commit -a -m "Fix xxx"

# push change and make PR on GH
git push --set-upstream origin feature/bug-fix-branch-to-master

```

## Working on a major change

Scenario where 2 or more branches are created to make a major change. All should derive work from a common branch that is ahead of $master.

Proposed solution is:
```text
-> use $dev
  -> create $feature/dev-feature-a, $feature/dev-feature-b
  -> merge back to $dev
-> PR $dev changes to $master
```

repository: fbeltrao/branching

gha_language: C#

repo_name: fbeltrao/branching


text:
# Scenario

## Nordmart Apps

Nordmart consists of five apps

- [Catalog](https://github.com/stakater-lab/stakater-nordmart-catalog) is a spring boot api that provides information about all the different products such as their name, desc, price etc.
- [Inventory](https://github.com/stakater-lab/stakater-nordmart-inventory) is a Spring boot + Wildfly-swarm Api that keeps track of stock of different products.
- [Cart](https://github.com/stakater-lab/stakater-nordmart-cart) is a spring boot app that keeps track of products being purchased by user.
- [Gateway](https://github.com/stakater-lab/stakater-nordmart-gateway) is a vertx app that condenses the Catalog, Cart and Inventory api to be used by front-end.
- [Web](https://github.com/stakater-lab/stakater-nordmart-web) is the front-end app built using angular JS. It has two views, the home view lists all the products and the cart view lists product added to cart by the user.

## Problem

Right now the front-end app has the images for the products. And when it receives products form backend it finds image based on product name and displays it. This is wrong as when we need to update products i.e add new product or update image of an older product, we have to modify both the Web and Catalog Projects and re-deploy them which demolishes the point of using microservices.

## Solution

Catalog service should save the images of Products and serve them to customers.

## Task Breakdown

The task can be split as follows:

- Update Catalog
  - We should update the Product Domain to have a new field named `fileName` to save product image filename.
  - We should save the images for different products with correct filename in src/main/resources/images directory.
  - We should add a resource handler in the Spring boot main application to server the images.
  - Update `import.sql` and add filename to all the queries
- Update Cart
  We should update Product wrapper in the cart project to return filename as well(It will receive it from catalog).
- Update gateway
  Gateway has handlers written for all the different APIs. The ProductHandler needs a new method to proxy requests for images coming from front-end to catalog service. The router needs a new route named `/api/images/:fileName` which should trigger the new image method in product handler and forward request to `/images/:fileName`.
- Update Frontend to display images based on fileName property.
  - The home page needs to be updated to render image from backend. The baseURL of api would need to be made available by doing:
    - Expose baseURL from catalog service in `catalog.js`.
    - Add baseURL to scope in `homeController` using catalog's baseURL.
    - Update URL in `home.html` to point to correct endpoint.
  - The cart page needs to be updated to render image from backend. The baseURL of api would need to be made available by doing:
    - Expose baseURL from cart service `cart.js`.
    - Add baseURL to scope in `cartController` using cart's baseURL.
    - Update URL in `cart.html` to point to correct endpoint.

## Deployment

To update the deployment after changing the code, just push the code to the repo and create a PR.

Jenkins will be notified automatically via webhook and it will create a docker image for you with a snapshot tag if code can be compiled and tests are successful. After the pull request is approved by your team lead, you can merge it.

Once merged, Jenkins will be notified again and it will create a new version tagged image which will be pushed to nexus.

The dev stack is running using GitOps via flux, so as soon as new image gets pushed to nexus, it will update the image version automatically in [nordmart-dev-apps](https://github.com/stakater-lab/nordmart-dev-apps) repo and update the app deployment with the latest version.

The prod stack is running using CIOPS so when you want to update the image on the production stack, update the image version in the corresponding helm release in the [nordmart-prod-apps](https://github.com/stakater-lab/nordmart-prod-apps/) repository.

repository: boriphuth/stakater-devops-labs

repo_name: boriphuth/stakater-devops-labs


text:
# Install Jupyter Notebook

- install notebook and xeus-cling kernel to run C++ code on Jupyter Notebook for teaching and learning C++

1. run Bash Terminal
2. run the following commands

    ```bash
    conda install notebook # Note: it takes a while; if update looks paused, hit enter
    conda install -c conda-forge xeus-cling
    conda install -c conda-forge jupyter_contrib_nbextensions
    conda install -c conda-forge jupyter_nbextensions_configurator
    jupyter nbextensions_configurator enable --user
    ```

    - enter **y** to proceed when asked on the installation steps

repository: jeremybergen/DevEnvSetup

repo_name: jeremybergen/DevEnvSetup


text:
---
code: false
type: page
title: Operators | API | Core
description: Koncorde operators list
order: 200
---

# Operators

Filters in Koncorde are constituted of **clauses** and **operators**.

In this section, you will find an exhaustive listing of all the available operators.

## `and`

The `and` filter takes an array of filter objects, combining them with AND operators.

### Given the following documents:

```js
{
  firstName: 'Grace',
  lastName: 'Hopper',
  city: 'NYC',
  hobby: 'computer'
},
{
  firstName: 'Ada',
  lastName: 'Lovelace',
  city: 'London',
  hobby: 'computer'
}
```

### The following filter validates the first document:

```js
{
  and: [
    {
      equals: {
        city: 'NYC'
      }
    },
    {
      equals: {
        hobby: 'computer'
      }
    }
  ];
}
```

## `or`

The `or` filter takes an array containing filter objects, combining them using OR operators.

### Given the following documents:

```js
{
  firstName: 'Grace',
  lastName: 'Hopper',
  city: 'NYC',
  hobby: 'computer'
},
{
  firstName: 'Ada',
  lastName: 'Lovelace',
  city: 'London',
  hobby: 'computer'
},
{
  firstName: 'Marie',
  lastName: 'Curie',
  city: 'Paris',
  hobby: 'radium'
}
```

### The following filter validates the first two documents:

```js
{
  or: [
    {
      equals: {
        city: 'NYC'
      }
    },
    {
      equals: {
        city: 'London'
      }
    }
  ];
}
```

## `not`

The `not` filter omits the matching data.

### Given the following documents:

```js
{
  firstName: 'Grace',
  lastName: 'Hopper',
  city: 'NYC',
  hobby: 'computer'
},
{
  firstName: 'Ada',
  lastName: 'Lovelace',
  city: 'London',
  hobby: 'computer'
}
```

### The following filter validates the first document:

```js
{
  not: {
    equals: {
      city: 'London';
    }
  }
}
```

## `bool`

Returns documents matching a combination of filters.

This operator accepts the following attributes:

- `must` all listed conditions must be `true`
- `must_not` all listed conditions must be `false`
- `should` one of the listed condition must be `true`
- `should_not` one of the listed condition must be `false`

Each one of these attributes are an array of filter objects.

### Given the following documents:

```js
{
  firstName: 'Grace',
  lastName: 'Hopper',
  age: 85,
  city: 'NYC',
  hobby: 'computer'
},
{
  firstName: 'Ada',
  lastName: 'Lovelace',
  age: 36
  city: 'London',
  hobby: 'computer'
},
{
  firstName: 'Marie',
  lastName: 'Curie',
  age: 55,
  city: 'Paris',
  hobby: 'radium'
}
```

### The following filter validates the second document:

```js
{
  bool: {
    must : [
      {
        in : {
          firstName : ['Grace', 'Ada']
        }
      },
      {
        range: {
          age: {
            gte: 36,
            lt: 85
          }
        }
      }
    ],
    'must_not' : [
      {
        equals: {
          city: 'NYC'
        }
      }
    ],
    should : [
      {
        equals : {
          hobby : 'computer'
        }
      },
      {
        exists : {
          field : 'lastName'
        }
      }
    ]
  }
}
```

repository: kuzzleio/kuzzle

repo_name: kuzzleio/kuzzle