text:
# NoSQL Databases

## Introduction

### Online Transaction Processing (OLTP) systems

- **Store**: structured data, in Relational Databases
- **Queries**: simple (insert, delete, update operations)
- **Relation to Big Data**: Big Data analysis results can augment OLTP data

![](./images/oltp.png)

### Online Analytical Processing (OLAP) systems

- **Store**: data in databases that are optimized for analytics
- **Queries**: are long and complex - part of analytic tasks (business intelligence, data mining, machine learning)
- **Relation to Big Data**: serve as sources and sinks

![](./images/olap.png)

**What are the characteristics of Not only SQL (NoSQL) databases?**

- Non-relational databases
- Highly-scalable and fault-tolerant
- Designed for large, distributed, semi-structured and unstructured data (usually no fixed schema nor joins)
- Mostly for queries, few asynchronous inserts & updates
- Accessible through API-based query interface and data- specific query languages

RECALL: **ACID**

- **Atomicity**: all operations succeed or fail (no partial transactions)
- **Consistency**: all added data needs to conform to constraints
- **Isolation**: concurrent and sequential execution of transactions yield the same result
- **Durability**: a committed transaction cannot be rolled back

**CAP theorem**

**C**onsistency, **A**vailability, **P**artition tolerance

In any distributed system, you have to partition. That leaves either consistency or availability to choose from.

### Characteristics of NoSQL databases: BASE

- **Basically Available**: will always acknowledge a client’s request (answer or success/failure notification)
- **Soft state**: may be inconsistent when data are read
- **Eventually consistent**: reads after write may not return consistent results, but they will once changes propagated to all nodes

### NoSQL and 3Vs of Big Data

- **Volume**
  - NoSQL databases allow scaling out (adding more nodes to a commodity server)

- **Velocity**
  - Fast writes uing schema-on-read (data are applied to a schema as they go out of the database)
  - Low write latency (adding nodes decreases latency)

- **Variety**
  - Can store semi-structured and unstructured data, schema is loose or non-existent

### RDBMS vs. NoSQL

|   |RDBMS|NoSQL|
|---|---|---|
|Elastic Scaling|scale up: bigger load , bigger server|scale out: distribute data across multiple hosts seamlessly|
|Big Data|Huge increase in data RDBMS: capacity and constraints of data volumes at its limits|designed for big data|
|DBA Specialists|require highly trained expert to monitor DB|require less management, automatic repair and simpler data models|
|Flexible data models|need careful schema change management|not need complicated schema management|
|Economic Cost|rely on expensive proprietary servers to manage data|clusters of cheap commodity servers to manage the data and transaction volumes|
|Support|RDBMS vendors provide a high level of support to clients|open source projects with startups supporting them|
|Maturity|stable and dependable|still implementing their basic feature set|
|Lack of Expertise|Whole workforce of trained and seasoned RDMS developers|Still recruiting developers to the NoSQL camp|
|Analytics and Business Intelligence|designed to address this niche|designed to meet the needs of a Web 2.0 application - not designed for ad hoc data queries|

## NoSQL

### 1. Key/value Databases

- Store key-value pairs
- Keys are unique
- The values are only retrieved via keys and are opaque to the database
- Key-value pairs are organized into collections (a.k.a buckets)
- Data are partitioned across nodes by keys
- The partition for a key is determined by hashing the key

**Pros**:

- very fast
- simple model
- able to scale horizontally

**Cons**:

- many data structures (objects) can't be easily modeled as key value pairs

**Suitable when**:

- Unstructured data
- Fast read/writes
- Key suffices for identifying value
- No dependences among values
- Simple insert/delete/select operations

**Unsuitable when**:

- Operations (search, filter, update) on individual attributes of the value
- Operations on multiple keys in a single transaction

### 2. Document Databases

- Store documents in a semi-structured form
- A document is a nested structure in JSON or XML format

**Suitable when**:

- Semi-structured data with flat or nested schema
- Search on different values of document
- Updates on subsets of values
- CRUD operations (Create, Read, Update, Delete)
- Schema changes are likely

**Unsuitable when**:

- Binary data
- Updates on multiple documents in a single transaction
- Joins between multiple documents

### 3. Column-family Databases

- They store columns. Each column has a name and value.
- Group related columns in a row
- A row does not necessarily have fixed schema or number of columns

**Suitable when**:

- Data has tabular structure with many columns and sparsely populated rows (i.e., high-dimensional matrix with many 0s)
- Columns are interrelated and accessed together often
- OLAP
- Realtime random read-write is needed
- Insert/select/update/delete operations

**Unsuitable when**:

- Joins
- ACID support is needed
- Binary data
- SQL-compliant queries
- Frequently changing query patterns that lead to column restructuring

### 4. Graph Databases

- Store graph-structured data
- Optimized for representing connections
- Designed to allow efficient queries for finding interconnected nodes based on node and/or edge attributes

**Suitable when**:

- Data comprised of interconnected entities
- Queries are based on entity relationships
  - Finding groups of interconnected entities
  - Finding distances between entities

**Unsuitable when**:

- Joins
- ACID support is needed
- Binary data
- SQL-compliant queries
- Frequently changing query patterns that lead to column restructuring

**Aplications**

- Social
- Recoomendation
- Geo

## MongoDB

### Overview

- **A document database**
- **Hash-based**
  - Stores hashes (system-assigned id) with keys and values for each document
- **Dynamic shcema**
  - No Data Definition Language
  - Application tracks the schema and mapping
- Uses **BSON** (Binary JSON) format
- **APIs** for many Languages

### CRUD

#### Create

```javascript
db.products.insert({ _id:10, item: "box", qty: 20 })
```

#### Read

```javascript
db.products.update(*****)
```

#### Update

```javascript
db.products.find( { qty: { $gt: 4 } } )
```

#### Delete

```javascript
db.products.remove( {“item”:”box”} )
```

### Replication

Multiple replicas (dataset copies) are stored. Provides scalability (distributed operations), availability (due to

redundancy), and fault tolerance (automatic failover).

**Replica set**: group of <=50 mongod instances that contain the same copy of the dataset

![](./images/mongodb_replication.png)

### Sharding

Sharding is the process of horizontally partitioning the dataset into parts (shards) that are distributed across multiple nodes

![](./images/mongodb_sharding.png)

#### Benefits

1. **Efficient reads and writes**: They are distributed across the shards.
  - More shards, higher efficiency
2. **Storage capacity**: Each shard has a part of the dataset
  - More shards, increased capacity
3. **High availability**: Partial read / write operations performed if shards are unavailable. Reads or writes directed at the available shards can still succeed.
  - More shards, less chance of a shard to be unavailable

### Index Support

B+ tree indices, GeoSpatial indices, text indices

### Fast in-place updates

In-place updates are **fast** because the database does not have to allocate and write a full new copy of the object.

### MapReduce functionality

repository: TengHuo/DataScienceSummary

repo_name: TengHuo/DataScienceSummary


text:
# Hearts Progressive Web App

This is a React + Redux implementation of the classic 4 player Hearts card game.  [Go play it!](https://hearts.yocto.ca).

Bootstrapped using [create-react-app](https://github.com/facebookincubator/create-react-app).

Written in ES6 using Babel and Webpack.

Reducer logic unit tests written for Jest.

Single source of truth based on state representation of players, hands, tricks and rounds, with selectors used for calculated states.

Aiming for a 100% score on the [Lighthouse Progressive Web App Audit](https://developers.google.com/web/tools/lighthouse/).

license: MIT

repository: tgevaert/react-redux-hearts

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: tgevaert/react-redux-hearts


text:
---
_id: 5f2ee81944b8b7004a7cf57b
title: "Redis Caching in ASP.NET Core!"
url: 'https://www.codewithmukesh.com/blog/redis-caching-in-aspnet-core/'
category: articles
slug: 'redis-caching-in-aspnet-core'
user_id: 5ece91c4f2bd8f0036781938
username: 'iammukeshm'
createdOn: '2020-08-10T17:59:53.622Z'
tags: [asp.net-core]
---

Redis Caching in ASP.NET Core!

Here are the topics covered.
1. What is Distributed Caching in ASP.NET Core?
2. Pros & Cons of Distributed Caching
3. IDistributedCache interface
4. What is Redis?
5. Setting up Redis on Windows 10
6. Getting to know Redis Better
7. Redis CLI Commands
8. Integrating Redis Caching in ASP.NET Core

repository: dotnetweekly/dnw-gatsby

gha_language: JavaScript

gha_license_id: MIT

repo_name: dotnetweekly/dnw-gatsby


text:
# laravel-slider
Image slider using Laravel

#### Demo
![new1 1](https://user-images.githubusercontent.com/32864560/33128148-5c004364-cfb1-11e7-85bf-e88744636157.png)

#### Preview
![new2 1](https://user-images.githubusercontent.com/32864560/33128164-69ca895a-cfb1-11e7-97fb-ff8dbf9558ef.png)

## Following are the step to configure Image Slider

### Step 1:Laravel slider plugin requires the following components to work correctly

    Intervention Image

#### Step 2:copy vendor using composer

    composer require webelightdev/laravel-slider dev-master

    Or, you may manually update require block and run `composer update`

    "require": {

        "webelightdev/laravel-slider": "dev-master"
    }

    'composer update' will be required.

#### step 3: Once Laravel Slider is installed, You need to register the Service Provider in `config/app.php` Add following in `providers` list

    'providers' => [
     // ...
        Webelightdev\LaravelSlider\ImageSliderServiceProvider::class,
     // ...

    ]

#### step 4: To publish the Config, Migration, Service Provider and Facades Run

	php artisan vendor:publish

#### step 5: Finally, run migration to generate table Run

	php artisan migrate

#### step 6: This packager Required Auth login if you don't have Auth login Run

	php artisan make:auth
    php artisan migrate

#### step 7: Add following link in your blade file for load CSS and Javasript

	   <script src="{{ asset('vendor/assets/js/custome.js') }}"></script>
	   <link href="{{ asset('vendor/assets/css/custome.css') }}" rel="stylesheet">

#### you can view laravel slider by writing:
localhost/yourapp/slider


text:
# REST API request example

```python
import requests

url = "http://www.boredapi.com/api/activity/"
response = (requests.get(url).json())
print(response)
```

- requests - library to make HTTP requests
- url - API endpoint
- request.get() - function returns a response
- json() - fucntion converts to JSON object
- print - displaying the response

repository: PedrosUsername/onelinerhub

branch_name: refs/heads/main

repo_name: PedrosUsername/onelinerhub


text:
# 7 February, 2021

Reviewing the math, I realized yesterday that a two-layer linear network is
still linear in its expresivity.... duh.
Bishop 2006 S5.1 has an example perfectly fitting a `y=x*x` using a
three-layer network, but the range is limited to `[-1,1]` and each layer
has a `tanh()` activation function.

By adding a [ReLU activation function] to the first layer of the network
in [fit_quad.rs](../src/bin/fit_quad.rs), I was able to reduce the error
about 25%, but the fit is still miserable.

The folks at CCRi [have a blog post on learning to model quadratic functions from thier roots](https://ccri.com/can-a-neural-net-learn-the-quadratic-formula/)
and point out that the optimization worked out in PyTorch for them only after

a) using first the input domain `(r1+r2) x (r1*r2)` where the `ri` values
are candidate roots for the function to model, `p(x) = x*x - (r1+r2)*x + r1*r2`,
with the desired output being the roots of the function,
b) then refining loss and evaluation function to order the two network outputs.

repository: jonathanlb/lair

gha_language: Rust

repo_name: jonathanlb/lair


text:
# Server Side Rendering

This library uses styled-components for styling, which works with server-side rendering.
See the styled-components [documentation][ssr] for more on how to use server-side rendering.

```jsx
import { renderToString } from 'react-dom/server'
import { ServerStyleSheet } from 'styled-components'
import LandingPage from './LandingPage'

const sheet = new ServerStyleSheet()
const html = renderToString(sheet.collectStyles(<LandingPage />))
const css = sheet.getStyleTags()
```

[ssr]: https://www.styled-components.com/docs/advanced#server-side-rendering


text:
Welcome to go-m3u-parser

> A parser for m3u files.
It parses the contents of m3u file to a slice of streams information which can be saved as a JSON file.

>> Check [m3u_parser](https://github.com/pawanpaudel93/m3u_parser) also
### 🏠 [Homepage](https://github.com/pawanpaudel93/go-m3u_parser)

## Install
> go get github.com/pawanpaudel93/go-m3u-parser

## Example

```go
package main

import (
	"fmt"

	m3uparser "github.com/pawanpaudel93/go-m3u-parser/m3uparser"
)

func main() {
	// userAgent and timeout is optional. default timeout is 5 seconds and userAgent is latest chrome version 86.
	userAgent := "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
	timeout := 5 // in seconds
	m3uPlaylist := m3uparser.M3uParser{UserAgent: userAgent, Timeout: timeout}
	// file path can also be used /home/pawan/Downloads/ru.m3u
	m3uPlaylist.ParseM3u("https://drive.google.com/uc?id=1VGv8ZYQrrSYPVQ7GCWLgjMl6w9Ccrs4v&export=download", true)
	m3uPlaylist.FilterBy("status", []string{"GOOD"}, true, false)
	m3uPlaylist.SortBy("category", true, false)
	fmt.Println("Saved stream information: ", len(m3uPlaylist.GetStreamsSlice()))
	m3uPlaylist.SaveJSONToFile("pawan.json")
}

```
## Usage
```go
	userAgent := "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
	timeout := 5 // in seconds
	m3uPlaylist := m3uparser.M3uParser{UserAgent: userAgent, Timeout: timeout}
	// file path can also be used /home/pawan/Downloads/ru.m3u
	m3uPlaylist.ParseM3u("https://drive.google.com/uc?id=1VGv8ZYQrrSYPVQ7GCWLgjMl6w9Ccrs4v&export=download", true)
```

>Functions
```go
func (p *M3uParser) ParseM3u(path string, checkLive bool) {

        """Parses the content of local file/URL.
        It downloads the file from the given url or use the local file path to get the content and parses line by line
        to a structured format of streams information.

        path: Path can be a url or local filepath
        checkLive: To check if the stream links are working or not
        """

}

func (p *M3uParser) FilterBy(key string, filters []string, retrieve bool, nestedKey bool) {

        """Filter streams infomation.
        It retrieves/removes stream information from streams information list using filter/s on key.

        key: Key can be single or nested. eg. key='name', key='language-name'
        filters: List of filter/s to perform the retrieve or remove operation.
        retrieve: True to retrieve and False for removing based on key.
        nestedKey: True/False for if the key is nested or not.
        """

}

func (p *M3uParser) ResetOperations() {

        """Reset the stream information list to initial state before various operations."""

}

func (p *M3uParser) RemoveByExtension(extension []string) {

        """Remove stream information with certain extension/s.
        It removes stream information from streams information list based on extension/s provided.

        extension: Name of the extension like mp4, m3u8 etc. It is slice of extension/s.
        """

}

func (p *M3uParser) RetrieveByExtension(extension []string) {

        """Select only streams information with a certain extension/s.
        It retrieves the stream information based on extension/s provided.

        extension: Name of the extension like mp4, m3u8 etc. It is slice of extension/s.
        """
}

func (p *M3uParser) RemoveByCategory(category []string) {

        """Removes streams information with category containing a certain filter word/s.
        It removes stream information based on category using filter word/s.

        category: It is slice of category/categories.

        """
}

func (p *M3uParser) RetrieveByCategory(category []string) {

        """Retrieve only streams information that contains a certain filter word/s.
        It retrieves stream information based on category/categories.

        category: It is slice of category/categories.
        """
}

func (p *M3uParser) SortBy(key string, asc bool, nestedKey bool) {

        """Sort streams information.
        It sorts streams information list sorting by key in asc/desc order.

        key: It can be single or nested key.
        asc: Sort by asc or desc order.
        nestedKey: True/False for if the key is nested or not.
        """
}

func (p *M3uParser) GetStreamsJSON() string {

        """Get the streams information as json."""
}

func (p *M3uParser) GetStreamsSlice() []Channel {

        """Get the parsed streams information list.
        It returns the streams information slice.
        """

func (p *M3uParser) GetRandomStream(shuffle bool) Channel {

        """Return a random stream information
        It returns a random stream information with shuffle if required.

        shuffle: To shuffle the streams information list before returning the random stream information.
        """
}

func (p *M3uParser) SaveJSONToFile(filename string) {

        """Save to json file.
        It saves streams information as a JSON file with a given filename.

        filename: Name of the file to save streams information.
        """
}

```

## Author

👤 **Pawan Paudel**

* Github: [@pawanpaudel93](https://github.com/pawanpaudel93)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/pawanpaudel93/go-m3u-parser/issues).

## Show your support

Give a ⭐ if this project helped you!

Copyright © 2020 [Pawan Paudel](https://github.com/pawanpaudel93).


text:
# Bamboo.SendcloudAdapter

A [Sendcloud](https://www.sendcloud.net) adapter for the [Bamboo](https://github.com/thoughtbot/bamboo).

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `bamboo_sendcloud` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [{:bamboo_sendcloud, "~> 0.2.0"}]
end
```

In `config/config.exs`, or `config.prod.exs`, etc.

```elixir
config :my_app, MyApp.Mailer,
  adapter: Bamboo.SendcloudAdapter,
  api_user: "my_api_user",
  api_key: "my_api_key"
```

## Usage

### Send standard email

```elixir
import Bamboo.Email

email =
  new_email()
  |> from({"Bender"<EMAIL_ADDRESS>  |> to(user)
  |> subject("Welcome!")
  |> text_body("Welcome to the app")
  |> html_body("<strong>Welcome to the app</strong>")
```

### Send template email

```elixir
import Bamboo.Email

email =
  new_email()
  |> from({"Bender"<EMAIL_ADDRESS>  |> to(user)
  |> SendcloudHelper.template("reset_password", %{"%link%" => [reset_password_link]})
```

## Docs

[https://hexdocs.pm/bamboo_sendcloud](https://hexdocs.pm/bamboo_sendcloud).

gha_language: Elixir


text:
# Neighborhood Map

## This project is built according to the project rubric of the Front-End Web Developer Nanodegree Neighborhood Map Project by Udacity by Christopher Regan to finish the Grow-with-Google Scholarship
This app helps the user find some of the best restaurants in New York City according to ME, Christopher Regan, a local. The default is that all of the places are shown as pinpoints on the google map that is displayed. You can choose to hide or show all the points with the so-labeled buttons. If you want more precision you can either select one of the restaurants from the menu or type something into the search box such as part of a restaurant name, type of restaurant, deals and specialties, or address and press the search button.

## External Tools used :-
	JQuery, Ajax
	Google Maps API
	Foursquare API

# How to get Started with the app :-
Unzip the full project.
cd to the project folder
npm install to install all dependencies
npm start to boot up on your preferred internet browser at localhost:3000

path: /Regan's Neighborhood Map React 3/README.md


text:
# create-your-own-php-framework
构建自己的PHP框架

* [搭建基本结构](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/01.md)
* [抽象框架的内容](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/02.md)
* [抽象Controller的基类](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/03.md)
* [定义ORM的接口](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/04.md)
* [实现Model类(1)](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/05.md)
* [实现Model类(2)](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/06.md)
* [实现Model类(3)](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/07.md)
* [创建组件的机制](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/08.md)
* [构建缓存组件(1)](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/09.md)
* [构建缓存组件(2)](https://github.com/CraryPrimitiveMan/create-your-own-php-framework/blob/master/10.md)


text:
# ImageLoaderView

![build](https://github.com/KaustubhPatange/ImageLoaderView/workflows/build/badge.svg)
![Maven Central](https://img.shields.io/maven-central/v/io.github.kaustubhpatange/imageloaderview)

An `ImageView` with cool loading effects eg: Shimmer. The library is backwards compatible till API 19.

I had to built something similar for my client, this one is the complete version of the prototype.

<img src="art/demo.gif" height="400px">

### Why you need this?

Having an effect (shown in gif) requires multiple views to be laid out. For eg: to achieve the Shimmer effect with this [library](https://github.com/facebook/shimmer-android/), you can wrap your `ImageView` inside the `ShimmerFrameLayout` (which it provides) & also the overlay `ImageView` (with circular data-usage icon), you already took 3 layout passes to draw the same thing. In places like `RecyclerView` where each draw calls are expensive we must optimize it.

This view solves the problem & also manage the animation states which would unnecessarily increase boilerplate if done manually.

## Usage

The repository contains the [sample](sample/) project which is basically the above demo (gif) in action.

```xml
<com.kpstv.imageloaderview.ImageLoaderView
    android:id="@+id/imageloaderview"
    android:layout_width="..."
    android:layout_height="..." />
```

- #### Create a shimmer load effect

```xml
<com.kpstv.imageloaderview.ImageLoaderView
   ...
   app:shimmering="true"
   app:corner_radius="10dp"
<EMAIL_ADDRESS>   app:overlay_drawable_tint="?attr/colorControlNormal" />
```

- #### Create overlay tinting effect

```xml
<com.kpstv.imageloaderview.ImageLoaderView
   ...
   app:overlay_tinting="true"
<EMAIL_ADDRESS>   app:corner_radius="10dp"
<EMAIL_ADDRESS>   app:overlay_drawable_tint="@color/fromcolor"
   app:overlay_drawable_secondary_tint="@color/tocolor" />
```

- Once your image is loaded call any of the `setImage**` methods with `animationType` property to `ImageView.CIRCLE_IN` to get the above shown effect, (see example [here](https://github.com/KaustubhPatange/ImageLoaderView/blob/0580871393d0d435d467814dc73f53b481be538e/sample/src/main/java/com/kpstv/imageloaderview_sample/MainActivity.kt#L34)).

- If you don't want a load effect & just directly want to set image onto the view then don't set `animationType` property, but make sure to call `imageview.stopAllSideEffects()` which will make sure to draw your image on top, (example [here](https://github.com/KaustubhPatange/ImageLoaderView/blob/0580871393d0d435d467814dc73f53b481be538e/sample/src/main/java/com/kpstv/imageloaderview_sample/MainActivity.kt#L41-L42).)

Following are the parameters you can optionally specify when inflating this class through XML. All this attributes have their equivalent property methods (Java beans) which can be called programmatically.

| Attributes                            | Type                 |                                                                                |
| ------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `app:backgroundColor`                 | `color`              | Sets the background color of the view, default `Color.Gray`. Do not use `android:background` as it messes with corner radius. |
| `app:anim_duration`                   | `long`               | Defines how long the animation should run, default `1200L`.                                                                   |
| `app:corner_radius`                   | `dimension`          | Sets the corner radius of the view.                                                                                |
| `app:overlay_drawable`                | `reference`, `color` | Sets the overlay drawable display on top of the view.                                                                         |
| `app:overlay_drawable_padding`        | `dimension`          | Sets the padding for the overlay drawable.                                                                                |
| `app:overlay_drawable_tint`           | `color`              | Sets the tint for the overlay drawable.                                                                                |
| `app:overlay_drawable_secondary_tint` | `color`              | Sets the secondary tint for overlay drawable. This is basically used for _overlayTintAnimation_.                              |
| `app:overlay_tinting_duration`        | `long`               | Sets the duration for how long the tint animation to be played.                                                               |
| `app:overlay_tinting`                 | `bool`               | Sets whether the view should start tinting animation immediately after laid out.                                              |
| `app:ripple_color`                    | `color`              | Sets the ripple when the view is clickable.                                                                                |
| `app:selectable`                      | `bool`               | Sets whether the view should receieve touch events like click.                                                                |
| `app:shimmering`                      | `bool`               | Sets whether the view should start shimmering immediately after laid out.                                                     |

## Download

Library is available at `MavenCentral()`.

```groovy
implementation 'io.github.kaustubhpatange:imageloaderview:<version>'
```

## License

- [The Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)

```
Copyright 2020 Kaustubh Patange

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

repository: KaustubhPatange/ImageLoaderView

repo_name: KaustubhPatange/ImageLoaderView


text:
# supLogger

A simple logging library that provides log upload middleware.

## Getting help?

If you having problems? You can  [create an issue]( https://github.com/chudongvip/supLogger/issues ).

## Installation

```javascript
npm install suplogger
```

## Usage

- Require or import library

```javascript
// ES6
import SupLogger from "suplogger";
// or commonjs
let SupLogger = require("suplogger");

let logger = new SupLogger();
```

- Five log levels

The log level follows the sequence DEBUG, INFO, WARNING, ERROR, and NONE. The values are 0, 1, 2, 3, 4.

- Sets the Log Level.

By selecting a level, you can see log information at that level and at all levels above that level. For example:

```javascript
logger.setLogLevel(logger.WARNING);
```

then you can see logs in levels ERROR, and WARNING. The default value is `NONE` and the log is not output.

example:

```javascript
// ES6
import SupLogger from "suplogger";
let logger = new SupLogger();
logger.setLogLevel(logger.WARNING);
logger.error("This is an error msg");
```

and you will see this on console

```
[2019-11-25 14:53:33] supLogger [ERROR] -  This is an error msg
```

if you want to remove or rename the prefix you can do this

```
logger.setLogLevel(logger.WARNING, "");
logger.error("This is an error msg");

//will output
[2019-11-25 14:53:33] [ERROR] -  This is an error msg

logger.setLogLevel(logger.WARNING, "[awsome SDK]");
logger.error("This is an error msg");

//will output
[2019-11-25 14:53:33] awsome SDK [ERROR] -  This is an error msg
```

- Log template

Default template

```javascript
[2019-11-25 14:53:33] supLogger [ERROR] -  This is an error msg
```

if you want

- Outputs Log

example

```
logger.error("This is an error msg");
logger.warning("This is an warning msg");
logger.info("This is an info msg");
logger.debug("This is an debug msg");
```

- Middleware

if want to upload all  output logs , you can create an middle-ware to help you. For example:

```javascript
/**
 * Method use accept a function as a parameter
 * Note:
 * 1. You can control whether the log is output by the next method.
 * 2. Selecting a level via setLogLevel, you can received log information at that level and at all levels above that level.
 **/
logger.use((logData, next) => {
  if (logData.type === "error") {
    // upload error log to your server and not output

  } else {
    // log will be output on console
		next();
  }
});
```

**Tip：** use middle-ware before call outputs function(such as logger.error、logger.info).

## Complete example

```javascript
// ES6
import supLogger from "suplogger";
let logger = new SupLogger();
// set log level
logger.setLogLevel(logger.WARNING);
// create middle-ware
logger.use((logData, next) => {
  if (logData.type === "error") {
    // upload error log to your server and not output

  } else {
    // log will be output on console
		next();
  }
});

// outputs log
logger.error("This is an error msg");
logger.warning("This is an warning msg");
logger.info("This is an info msg");
logger.debug("This is an debug msg");
```

you will see `This is an error msg` and `This is an warning msg` output on console tab.

## License

[check here]( https://github.com/chudongvip/supLogger/blob/master/LICENSES.txt ).

repository: chudongvip/supLogger

repo_name: chudongvip/supLogger


text:
---
layout: page
title: Lean Prover Zulip Chat Archive
permalink: archive/113488general/00534Howdidsimpprovemylemma.html
---

## [general](index.html)
### [How did simp prove my lemma?](00534Howdidsimpprovemylemma.html)

#### [Johan Commelin (Jul 31 2018 at 14:46)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130640952):
```lean
set_option trace.simp_lemmas true

example (i : ℤ) : i ≤ i + 1 := by simp
```
I think the consensus is that this example should not be proven by `simp`. Can Lean tell me what the *morally correct* proof is?

#### [Kenny Lau (Jul 31 2018 at 14:47)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130640973):
`simp` does not prove it in the online version

#### [Johan Commelin (Jul 31 2018 at 14:47)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130640979):
The trace option spits out a lot of noise, but I didn't find the lemma that prove this.

#### [Kenny Lau (Jul 31 2018 at 14:47)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130640991):
neither does it in my local copy

#### [Kenny Lau (Jul 31 2018 at 14:47)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130640993):
but you can use `set_option trace.simplify.rewrite true`

#### [Johan Commelin (Jul 31 2018 at 14:48)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641048):
My `simp` is stronger than yours!
```
0. [simplify.rewrite] [le_add_iff_nonneg_right]: i ≤ i + 1 ==> 0 ≤ 1
```

#### [Kenny Lau (Jul 31 2018 at 14:48)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641052):
you imported stuff

#### [Patrick Massot (Jul 31 2018 at 14:48)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641056):
Cheater!

#### [Johan Commelin (Jul 31 2018 at 14:50)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641165):
O.o.... :distraught:

#### [Johan Commelin (Jul 31 2018 at 14:51)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641187):
Apparently the category libs by Scott import stuff that give `simp` superpowers when dealing with integers.

#### [Johan Commelin (Jul 31 2018 at 14:52)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641248):
I didn't expect that that import would affect the proof.

#### [Patrick Massot (Jul 31 2018 at 14:52)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641265):
Don't forget that one import can hide thousands imports

#### [Johan Commelin (Jul 31 2018 at 14:54)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641352):
Yes, that is true. I think that means I should always import Scott's category libs.

#### [Scott Morrison (Jul 31 2018 at 14:59)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641543):
Eek, I have no idea how or why I could be responsible. :-)

#### [Johan Commelin (Jul 31 2018 at 15:01)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641639):
/me mumbles something about synergy...

#### [Chris Hughes (Jul 31 2018 at 15:03)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641738):
interesting
`example : (0 : ℤ) ≤ 1 = true := rfl`

#### [Kenny Lau (Jul 31 2018 at 15:04)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641790):
because `(0 : ℤ) ≤ 1` can be lifted to `bool`, because it is decidable

#### [Kenny Lau (Jul 31 2018 at 15:04)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641797):
but you already know this

#### [Gabriel Ebner (Jul 31 2018 at 15:06)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641839):
There is no bool in this example, the proposition is indeed definitionally equal to true.

#### [Chris Hughes (Jul 31 2018 at 15:06)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641857):
`bool` isn't involved here. `true` is `true : Prop`
`example : (0 : ℕ) ≤ 1 = true := rfl --doesn't work`

#### [Kenny Lau (Jul 31 2018 at 15:06)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641891):
oops, I misread

#### [Gabriel Ebner (Jul 31 2018 at 15:06)](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/How%20did%20simp%20prove%20my%20lemma%3F/near/130641897):
https://github.com/leanprover/lean/blob/ceacfa7445953cbc8860ddabc55407430a9ca5c3/library/init/data/int/order.lean#L13-L17


text:
# inlamensterms.io website

This repo contains all of the content for the [InLaymansTerms.io](inlaymansterms.io) website.

Feel free to contribute any of your own descriptions.
We can work on those together and get them published with your social handles and bio :).

The website is built using [NuxtJS](https://nuxtjs.org/), [TailwindCSS](https://tailwindcss.com/), and primarily [Nuxt Content](https://content.nuxtjs.org/).

To contribute, you do not need to know any of the above technologies,
as all content is written purely MarkDown,
and to contribute content / improvements to content only requires changing the Markdown files.

Have a look in `content/articles` to see how simple a Layman is.

## Prerequisites

* Node 14.X
* Yarn >v1.22.10

## Running Locally

After cloning the repo

```bash
# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate
```

While developing the content locally, you can double click in the browser to edit your content there

## Contributing

The easiest way to contribute is to add more content, or review / improve existing content.

Most content lives in `content/articles`

Each file has the title, description, and author information for a particular post.

The generation of the website happens automatically on merging to master.

Don't feel too worried about publishing perfect content. If you think it could be remotely interesting,
feel free to add even just the basics, and we can work together to flesh out the content.

If you feel anxious about writing content, but think there is something you'd like to see a Layman for,
feel free to open an issue with your idea, and we can work on building the content.

Once you have something to contribute, feel free to open a PR, and we can review it together,
make it pretty, get it published and shared.

repository: CharlKlein/in-laymans-terms

repo_name: CharlKlein/in-laymans-terms


text:
# Tution-Master-1.0
A stand-alone application using Java Swing to manage student information, fee payments for private education institutes.

## Configurations
  - Database:
    - Run `Wampserver` or `Xampp`
    - Import `student_db.sql`

## Running
  - Application:
    - open terminal in dist folder then `java -jar TutionMaster.jar`
    - or run `TutionMaster.exe` in dist folder


text:
# Contributing

## Release procedure

Releases are pulled automatically by Ansible Galaxy, whenever new release is published on github.

So all you have to do is [create new release](https://github.com/rvm/rvm1-ansible/releases/new) adding a tag to the master branch and copying entries from [CHANGELOG](CHANGELOG.md).

gha_language: Dockerfile


text:
+++
# A Skills section created with the Featurette widget.
widget = "featurette"  # See https://sourcethemes.com/academic/docs/page-builder/
headless = true  # This file represents a page section.
active = true  # Activate this widget? true/false
weight = 30  # Order that this section will appear.

title = "Skills"
subtitle = ""

# Showcase personal skills or business features.
#
# Add/remove as many `[[feature]]` blocks below as you like.
#
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons

[[feature]]
  icon = "r-project"
  icon_pack = "fab"
  name = "R"
  description = "70%"

[[feature]]
  icon = "chart-line"
  icon_pack = "fas"
  name = "Statistics"
  description = "60%"

[[feature]]
  icon = "linux"
  icon_pack = "fab"
  name = "Unix"
  description = "20%"

[[feature]]
  icon = "python"
  icon_pack = "fab"
  name = "Python"
  description = "20%"

[[feature]]
  icon = "database"
  icon_pack = "fas"
  name = "MySQL"
  description = "20%"

[design.background]
  # Background color.
  # color = "navy"

  # Background gradient.
  # gradient_start = "#4bb4e3"
  # gradient_end = "#2b94c3"

  # Background image.
  image = "piglet-1639587_1920.jpg"  # Name of image in `static/media/`.
  image_darken = 0.2  # Darken the image? Range 0-1 where 0 is transparent and 1 is opaque.
  image_size = "cover"  #  Options are `cover` (default), `contain`, or `actual` size.
  image_position = "center"  # Options include `left`, `center` (default), or `right`.
  image_parallax = true  # Use a fun parallax-like fixed background effect? true/false

  # Text color (true=light or false=dark).
  text_color_light = true

[design.spacing]
  # Customize the section spacing. Order is top, right, bottom, left.
  padding = ["10px", "0", "10px", "0"]

# Uncomment to use emoji icons.
# [[feature]]
#  icon = ":smile:"
#  icon_pack = "emoji"
#  name = "Emojiness"
#  description = "100%"

# Uncomment to use custom SVG icons.
# Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary.
# Reference the SVG icon name (without `.svg` extension) in the `icon` field.
# [[feature]]
#  icon = "your-custom-icon-name"
#  icon_pack = "custom"
#  name = "Surfing"
#  description = "90%"

+++

repository: rprendes/starter-academic-rayner

repo_name: rprendes/starter-academic-rayner


text:
# GitHunt for Angular2

A full-stack Apollo Client and Server example app.

[![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](http://www.apollostack.com/#slack)
[![Build Status](https://travis-ci.org/apollostack/GitHunt-angular2.svg?branch=master)](https://travis-ci.org/apollostack/GitHunt-angular2)

Demonstrates:

1. GraphQL schema, resolvers, models, and connectors to read from two different data sources, GitHub REST API and SQL
2. Web server with authentication and basic authorization using Express, Passport, and Apollo Server
3. Angular2 app with Angular2 Router and Apollo Client that displays data and does some writes

As Apollo Client and Server gain more features, we'll add them to this app. Please submit a pull request if you see anything that can be improved!

## Running the app

### 1. Install Node/npm

Make sure you have Node.js installed (the app has been tested with Node `4.4.5` and `5.3.0`)

### 2. Clone and install dependencies

```
git clone https://github.com/apollostack/GitHunt-angular2.git
cd GitHunt-angular2
npm install
```

### 3. Run Migrations

Set up the SQLite database and run migrations/seed data with the following commands:

```
npm run migrate
npm run seed
```

### 4. Get GitHub API keys

- Go to [OAuth applications > Developer applications](https://github.com/settings/developers) in GitHub settings
- Click 'Register a new application' button
- Register your application like below
- Click 'Register application' button

![Github OAuth](screenshots/github-oath-setup.png)

On the following page, grab:

- Client ID
- Client Secret

![OAuth Key](screenshots/github-oauth-keys.png)

### 5. Add Environment Variables
Set your Client ID and Client Secret Environment variables:

```
export GITHUB_CLIENT_ID="your Client ID"
export GITHUB_CLIENT_SECRET="your Client Secret"
```

Or you can use `dotenv`.

`cp .env.default .env` and edit with your Github keys.

### 6. Run the app

```
npm start
```

- Open the client at http://localhost:3000
- Click "Log in with GitHub" in the upper right corner
- You'll be presented with the seed items in the app

![GitHunt App](screenshots/GitHunt-app.png)

#### Submit a Repo
Click the green Submit button and add repo with the username/repo-name pattern.

![GitHunt App](screenshots/GitHunt-add.png)

#### New Item
Review the new item, up vote it and visit the repo via the link.
![GitHunt App](screenshots/GitHunt-new.png)

#### Apollo Server

The server will run on port 3010, but the Webpack dev server proxies it to 3000. You can access the server's GraphiQL UI at <http://localhost:3000/graphql>.

![GitHunt App](screenshots/GitHunt-GraphQL.png)

## Code patterns to demonstrate

1. Routes and data loading
1. Server side rendering and store hydration
1. Merging data from multiple backends/APIs
1. Authentication and basic security
1. Mutations - updating and inserting items
1. Developer tool integrations, like `eslint-plugin-graphql`
1. One place where there is reactivity/streaming data (nice to have)

As new patterns emerge in Apollo development, we should add them to this app.

## App concept

GitHunt - like product hunt for GitHub repositories.

There are three views:

1. The home page feed, which is a ranked list of repositories
1. A page to submit a new repository
1. A repository page, with comments

Does it demonstrate all of the required features above?

- [x] Routes and data loading? Yes, it has multiple pages which require different data.
- [x] SSR/hydration? Yes, the front page should load fast.
- [x] Merging data? Yes, this will merge upvote and comment data from a local database with repository information from GitHub.
- [x] Auth and basic security? Yes, it will have GitHub login, and security so that people can only post comments when logged in, and everyone can only vote once per repo.
- [x] Mutations: Submitting a new repo, voting, and commenting.
- [x] Dev tools: Yes
- [x] Reactivity: we can reactively update the vote count on the repository page via a websocket or poll.

## Technology choices

- Apollo server - to put a nice unified API on top of our GitHub and local data
- Apollo client - to load that data declaratively into our UI
- Angular2 - it's a great way to build UIs
- Angular2 Router (DEPRECATED BETA)
- Webpack - the Meteor build system is by far the most convenient, but comes with a dependency on mongo, its own account system, etc. Since we want to learn how Apollo works without all of these things, we're going to not use it even though it would reduce the complexity of the code.
- TypeScript - to compile our client code.
- Babel - to compile our server code.
- Redux - to manage client side data, perhaps we can also use Redux Form to manage the submission form, but we'll see when we get there.
- Passport.js for login - this seems to be the most common login solution for Express/Node, and has a great GitHub login solution. Jonas has already written a tutorial for using that with GraphQL.
- SQL for local data - We'll use SQLite for dev, and Postgres for production. TBD - should we use Sequelize or some other ORM? Or just Knex for query building?
- Bootstrap for styling - I already know how to use it, and I don't want the styling to be the focus of the app. Let's keep it as simple as possible.


text:
---
permalink: "blog/soda-club/"
tags: posts
title: Soda Club
date: 2007-05-15
layout: layouts/post.njk
---

First rule of Soda Club: Do not talk about Soda Club.

So in my continuing effort to become a little greener, a little less wasteful, and a little more financially responsible, I took the leap and joined [Soda Club][1], which is not really a club per se, but a kit to make your own soda at home.

How does this make me greener, you ask? Well, the plastic bottles are reusable, making my aluminum can and plastic bottle consumption basically nothing, although I'm sure there will be the odd occasion when I'll buy a bottle from the gas station.

Also, since I won't be buying from the grocery store anymore, that'll save in transport for those cases of soda I used to buy.

It'll save me money too. Not a ton mind you, but $10-$20/month.

My next resolution: No more using the drive-through at restaurants. This resolution is 2-fold. 1. It will discourage me from getting food at places that have a drive-through. That's good for my health and my diet. And 2. It'll save my gas mileage when I'm just sitting there in the drive-through, burning gas but not moving anywhere.

Please note: I don't believe I'm changing the world with my little resolutions, but I'm a firm believer that if everyone in America did as little as I did to conserve energy and reduce waste, the world would be a very different place.

 [1]: http://www.sodaclubusa.com

repository: timwasson/timwasson

gha_language: HTML

repo_name: timwasson/timwasson