text:
# Getting started

## Who is this library for?

This library is for any developer that needs to use databases in Go. However, this module cannot do that alone. It requires the vsql_mysql or vsql_postgres to do the actual work. These modules, in turn, rely on the vsql_engine to do their job as well.

The example below is just for MySQL as that was the first one that I wrote. Please see the other modules if you need other databases.

## What is this?

This? This is a library, really. It's a facade around the built-in database/sql package provided by Go. This module itself is just the facade and a few helper methods I've written over and over again in various forms throughout my Go+Database career. To use this module, you need to pair it with another module that implements these interfaces, but for the database you wish to use, such as vsql_mysql or vsql_postgres.

## Quickstart

1. Get a database-specific implementation: ```go get github.com/wojnosystems/vsql_mysql```
1. Create your program:

```go
package main

import (
	"context"
	"database/sql"
	"github.com/go-sql-driver/mysql"
	_ "github.com/go-sql-driver/mysql"
	"github.com/wojnosystems/vsql"
	"github.com/wojnosystems/vsql/param"
	"github.com/wojnosystems/vsql/vquery"
	"github.com/wojnosystems/vsql/vrow"
	"github.com/wojnosystems/vsql/vrows"
	"github.com/wojnosystems/vsql_mysql"
	"log"
	"os"
	"strings"
)

// mustCreateTable demonstrates how to create a table
func mustCreateTable(ctx context.Context, db vquery.Execer) {
	// create your tables
	_, err := db.Exec(ctx, param.New(
		`CREATE TABLE IF NOT EXISTS mytable ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255), age TINYINT UNSIGNED )`))
	if err != nil {
		log.Fatal("cannot create table because ", err)
	}
}

// insertChris INSERT add data
func insertChris(ctx context.Context, db vquery.Inserter) {
	// Use parameterized values for safety!
	res, err := db.Insert(ctx, param.NewNamedWithData(
		// regular query, with named parameters
		`INSERT INTO mytable (name, age) VALUES (:name, :age)`,
		// This is your named placeholder map: vsql.H is just a shortcut for map[string]interface{}
		vsql.H{
			"name": "chris",
			"age":  30,
		}))
	if err != nil {
		log.Fatal("cannot insert record because ", err)
	}
	// Look up the last ID
	lastId, _ := res.LastInsertId()
	_ = lastId // do something with the last inserted id

	howManyDidIInsert, _ := res.RowsAffected()
	_ = howManyDidIInsert // do something with how many inserted
}

// getChris SELECT get data
func getChris(ctx context.Context, db vquery.Queryer) (name string, age int) {
	// Query your row. Grab the first record.
	// vrow.QueryOne is a convenience method to grab the first (and perhaps only) row returned
	// QueryOne each also handles cleaning up after the row and results
	ok, err := vrow.QueryOne(db, ctx, param.NewNamedWithData(
		// regular query, with named parameters
		`SELECT name, age FROM mytable WHERE name = :name`,
		// replacing :name with the parameterized placeholder for chris
		vsql.H{"name": "chris",}),
		// Do something with that row, scan the values or something
		func(ro vrows.Rower) (err error) {
			return ro.Scan(&name, &age)
		})
	// ok means a record was found and the Scan was completed.
	if !ok {
		log.Fatal("cannot look up record because ", err)
	}
	return
}

// getAllAges Look up lots of data
// In this query, we'll look up multiple values and return them as an array of ages
func getAllAges(ctx context.Context, db vquery.Queryer) (ages []int) {
	ages = make([]int, 0, 10)
	// vrow.QueryEach is a convenience method that iterates through results for you
	// you can tell it to STOP at any time (set it to true) or by returning any errors encountered
	// that way you only need to deal with errors at the top-level. If you pass an error, iteration will stop
	// QueryEach each also handles cleaning up after the row and results
	err := vrow.QueryEach(db, ctx,
		param.NewNamedWithData(
			`SELECT age FROM mytable WHERE name = :name LIMIT 1000`,
			vsql.H{"name": "chris",}),
		// Do something with each row. This is the code that extracts data from the query
		func(r vrows.Rower) (stop bool, err error) {
			var theAge int
			err = r.Scan(&theAge)
			if err == nil {
				// only append if the age was read
				ages = append(ages, theAge)
			}
			// default of stop = false, which means iteration will continue, return false to end looping
			// the err is also set from r.Scan, which means if there is an error, looping will stop
			// and that error will be returned from vrow.QueryEach
			return
		})
	if err != nil {
		log.Fatal("cannot get ages because ", err)
	}
	return
}

func main() {
	ctx := context.Background()
	// Connect to your database
	db := mustConnect()

	// Check if your database is alive
	err := db.Ping(ctx)
	if err != nil {
		log.Fatal("cannot connect to the database because ", err)
	}

	mustCreateTable(ctx, db)
	insertChris(ctx, db)
	name, age := getChris(ctx, db)
	_ = name // Do things with them
	_ = age  // Do things with them

	ages := getAllAges(ctx, db)
	_ = ages // Do things with them
}

// mustConnect connects to the database and panics if this fails.
// This method is to hide the implementation details of connecting
// for this example, but it's a good pattern to use, too
func mustConnect() (s vsql.SQLer) {
	var err error
	s = vsql_mysql.NewMySQL(func() (db *sql.DB) {
		// do your MySQL config
		cfg := mysql.Config{
			User:                 os.Getenv("MYSQL_USER"),
			Passwd:               os.Getenv("MYSQL_PASSWORD"),
			Addr:                 os.Getenv("MYSQL_ADDR"),
			DBName:               os.Getenv("MYSQL_DBNAME"),
			AllowNativePasswords: true,
		}
		if strings.HasPrefix(cfg.Addr, "unix") {
			cfg.Net = "unix"
		} else {
			cfg.Net = "tcp"
		}
		db, err = sql.Open("mysql", cfg.FormatDSN())
		return db
	})
	if err != nil {
		log.Fatal(err)
	}
	return s
}
```

# Motivation

Look, Go has a lot going for it and the packages that are part of core are largely awesome. Nobody writes perfect code and this module itself isn't perfect. Thank you to the Go team for all your hard work. Let me give back with a bit of my own for this module ;).

I started learning Go for a work project not too long ago. I've been struggling with the database interfaces that come stock with Go. While I can see why some decisions were made, the interface is cumbersome and difficult to extend. It's impossible to mock out of the box and the interfaces are non-existent. Instead of thinking through what to expose, the objects are shared directly and expose interface calls to the developer, even if they are not sensical in that sense. I've written a version of this library for work, but it's hodgepodge and also didn't consider the larger implications for interfaces (mostly because I had no idea how to use them properly at the time).

One of my biggest pet peeves was in writing a function that implemented a database request and took in a `*sql.DB`. But that means that the code assumes that it's only run OUTSIDE of a transaction. If you wanted that call to run within a transaction, you had to write the method over again or take in an optional argument to represent an optional transaction state. But this is error-prone and extremely un-clean code. The method implementing a database call should not really care if it's in a transaction or not and should take in a vquery.Queryer instead of an object that advertises details about transactions.

However, because some databases (cough!--MYSQL--cough!) don't support nested transactions, I've split the interfaces based on the capabilities of the underlying database. One supports Nested Transactions, the other does not. The ONLY difference is that the TransactionNestedStarter returns a TransactionNester instead of just a Transactioner. This will help ensure that you write code to conform to the interfaces. If you decide you want to use nested transactions and move to a database that supports them, it should be as easy as changing which interfaces you use and adding the Begin calls that you need. However, the library that is implementing the vsql interfaces will need to support this.

## Contexts

I know the database/sql library has versions of the database calls that do not have contexts, I've opted to force all calls to have contexts. If you want to ignore it, use a context.Background(). This simplifies the interface and gives you more control.

# Mocks

I've added stretchr/mock structs for your convenience. I'm constantly mocking database interactions and you can use these mocks to avoid having to write them yourself.

All of the mock'ed structs are named after the interface that they implement+"Mock" so if you want to mock the Pinger interface, PingerMock is what you want to add your method mocks onto.

The _test's have examples of how to use these mocks as this library is unable to connect to any actual databases.

# Other cool features

## aggregators

The is just one, but I'll likely add more aggregators. These simply extract values from queries.

aggregator.Count extracts the only value from a `SELECT COUNT(*) FROM ...` query, as this is a very common pattern

## Named parameters

sqlx got named parameters down pat. I liked it and implemented it in this library as well. I didn't look how they did it, but rolled my own. The major issue with their parameters is that they're not interfaces, which means they're not really portable and extensible :(. You can use mine like:

```go
p := param.NewNamed("SELECT * FROM users where name = :key AND magicNumber = :someNum")
p.Set("key", "value")
p.Set("someNum", 42)
```

The `key` and `someNum` parameters will be replaced with `value` and `42`, respectively.

You can also use the more compact version:

```go
p := param.NewNamedWithData("SELECT * FROM users where name = :key AND magicNumber = :someNum",
	vsql.H{"key": "value", "someNum": 42}
```

If you have no paramters and just want to do a blanket statement such as: `SELECT COUNT(*) FROM users`, you can use `param.New("SELECT COUNT(*) FROM users")` instead

## Row Iterators

One patterns you'll encounter over... and over... and over....... and over again is iterating over datasets in sql. With the base database/sql library, you are constantly stopping for errors along the way.

While this interface doesn't stop you from iterating over the results one at a time just as you would with database/sql, it does offer a more convenient way to write/pass queries and then iterate over the results. You just pass in a predicate function and transform your data as desired. This means you can use and re-use queries as well as use and re-use predicates to transform data. This is a tremendous de-coupling of the logic that's usually entangled in the calls, unless you wrote your own way of doing this in your implementations. I'm here to tell you to stop doing that. Stop it. Use this library instead!

### vrows.Each, vrows.QueryEach, vrows.One, & vrows.QueryOne

These are a set of helper methods to remove boiler plate from database code. Each of these methods operate on result sets. Once these methods return, they clean up the result set for the caller so that you no longer have to call Close on the vrows.Rowser object yourself.

These also remove the `sql.ErrNoRows` errors as I believe these are a mistake. No rows is not an error and usually indicates valuable information, such as the information that nothing exists. Seriously, why would you return an error for non-error states? Anyway, this library fixes that stupidity. If you use these methods, this error will be hidden and this state is communicated to you in other, non-error ways.

#### vrows.Each

Each operates on the result set of a previous query. This is the foundation for QueryEach which you'll probably end up using more as it hides the error handling and other issues so you can focus on getting stuff done.

Each is passed a vrows.Rowser, which is a list of rows expected to have been derived from a previous Query. eachRow is the function that operates on each iteration of the rows in the vrows.Rowser result set.

Here, you can do anything you want on a single row. See vrows.Rower for the interface of what you can do with it, including getting a list of column names, and scanning values out to whatever you wish.

eachRow will be called on each record/row returned from the database unless you set `stop` to true. This tells the underlying loop to stop after the current record. If you pass an error to `err`, this will also halt iteration after this record.

Within the eachRow method you pass in, you should Unmarshal your data from the database into a format you need.

#### vrows.One

One operates just like Each, but only grabs the first row. If any additional rows are present, they are ignored. One closes the record/row before it returns. If you need all of the information, consider using QueryEach/Each instead.

Notice in `theRow` that there is no `stop` variable. That's becuase there is no iteration.

The value `ok` is returned true when at least 1 record was returned by the query. `ok` can be true, even if there was a Scan error of you returned an error.

#### vrows.QueryEach

QueryEach is just like Each, but handles the entire Query pipeline for you. This consolidates errors and hides the ErrNoRows error.

You should prefer using this method before using Each as this will hide most of the boiler plate and error repetition for you.

#### vrows.QueryOne

QueryOne is just like One, but handles the entire Query pipeline for you. This consolidates errors and hides the ErrNoRows error.

You should prefer using this method before using One as this will hide most of the boiler plate and error repetition for you.

## Backticking

Use the backtick helper:
```go
original := "mytable"
backTicked := vsql.BT(original) // => "`mytable`"
```

## Transaction Wrapping

Transactions require that you commit or roll them back after executing a set of statements. The `vsql.Txn` and `vsql.TxnNested` provides a clean way to perform transactions as a set. If you need to have transactions span to callers, then don't use these, just call Begin with Commit/Rollback on your own. If, however, you are composing downward dependent transactions (as in, you start a transaction and then perform queries/execs on that transaction or child transactions), this this is what you want.

These methods take care of Begin'ing the transaction and cleaning up after them using Commit/Rollback. In the event of a panic, Rollback is called. It can be used like this:

```go
err := vsql.Txn(c, context.Background(), nil, func(tx vsql.QueryExecer) (commit bool, err error) {
    _, err = tx.Insert(context.Background(), param.NewAppendWithData("INSERT INTO `"+tableName+"` (name,age) VALUES (?,?)", "chris", 21))
    if err != nil {
        t.Error("Error not expected when inserting data")
    }

    count, err := aggregator.Count(context.Background(), tx, param.New("SELECT COUNT(*) FROM `"+tableName+"`"))
    if err != nil {
        t.Error("Error not expected when counting data")
    }
    if 1 != count {
        t.Errorf(`Expected to insert 1 record, but inserted %d`, count)
    }
    return
})
if err != nil {
    t.Fatal("error starting transaction")
}
```

This begins a transaction, inserts the row, counts the row, then rolls the transaction back. If you wanted to commit the transaction, the function needs to `return true, nil`. Because return is called, this means the insert is undone. The rollback occurs when commit is not actively set to true. By default, commit is false, so if you do nothing and have the transaction return, it will be rolled back.

If you return an error, a rollback will be issued as well, but the error will be propagated up and returned to the caller of vsql.Txn.

If your code emits a panic, your transaction will be rolled back, and the panic will be re-panic'ed after the rollback.

There is another version of this function called TxnNested that does exactly the same thing, but the interfaces support spawning nested transactions.

Again, you don't have to use these function to use transactions. This is merely a convenience method if you need to quickly group queries within a single or set of nested transactions.

# License

Copyright 2019 Chris Wojno

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

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

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

repository: wojnosystems/vsql

repo_name: wojnosystems/vsql


text:
# Showcase System
Showcase system for students' projects in Telerik Academy

### Build status

[![Build status](https://ci.appveyor.com/api/projects/status/m0g2ef0358847bra?svg=true)](https://ci.appveyor.com/project/NikolayIT/showcasesystem)

### How to run
- Install [NodeJS](http://nodejs.org/)
- Install [Gulp](http://gulpjs.com/) globally with

		npm install -g gulp

- Navigate the terminal to the client folder

		\Source\Client\Showcase.Client.App

- Install missing NPM packages with

		npm install

- Run the Gulp watch task with

		gulp watch

- For minified scripts and styles use

		gulp watch --env production

- Or optionally use the [Task Runner Explorer](https://visualstudiogallery.msdn.microsoft.com/8e1b4368-4afb-467a-bc13-9650572db708) extension to Visual Studio 2013 which is already configured to run the Gulp watch task on every solution build

license: MIT

repository: spptest/Telerik

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: spptest/Telerik


text:
# IFLYLameSDK

[![CI Status](https://img.shields.io/travis/zhangchengcai3615<EMAIL_ADDRESS>[![Version](https://img.shields.io/cocoapods/v/IFLYLameSDK.svg?style=flat)](https://cocoapods.org/pods/IFLYLameSDK)
[![License](https://img.shields.io/cocoapods/l/IFLYLameSDK.svg?style=flat)](https://cocoapods.org/pods/IFLYLameSDK)
[![Platform](https://img.shields.io/cocoapods/p/IFLYLameSDK.svg?style=flat)](https://cocoapods.org/pods/IFLYLameSDK)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

IFLYLameSDK is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'IFLYLameSDK'
```

## Author

<EMAIL_ADDRESS><EMAIL_ADDRESS>
## License

IFLYLameSDK is available under the MIT license. See the LICENSE file for more info.

repository: iFlyCai/IFLYLameSDK

repo_name: iFlyCai/IFLYLameSDK


text:
# Sending your docker logs
Sending logs securely via syslog tls docker containers to Logit.io

## How to run

```sh
docker run -d \
  --name="logit" \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  logit/logitio-docker:latest \
  syslog+tls://<LOGSTASH-ENDPOINT>:<SYSLOG-TLS-PORT>
```

This container will gather logs from other containers that are started without the -t option and are configured with a logging driver that works with docker logs (journald and json-file).

This container is built on top of logspout: https://github.com/gliderlabs/logspout

repository: logit-io/logitio-docker

repo_name: logit-io/logitio-docker


text:
---
type: rule
title: Do you use User Stories format when appropriate?
uri: spec-do-you-use-user-stories
authors:
  - title: Adam Cogan
    url: https://ssw.com.au/people/adam-cogan
  - title: Ulysses Maclaren
    url: https://ssw.com.au/people/ulysses-maclaren
  - title: Cameron Shaw
    url: https://ssw.com.au/people/cameron-shaw
related: []
redirects:
  - spec-do-you-use-user-stories-when-appropriate
created: 2009-11-03T10:33:18.000Z
archivedreason: null
guid: 0daa42ed-f103-4e4b-9d27-e9b77647b4b6
---
Product Backlog Items (PBIs) can be described in the form of a "User Stories" when appropriate. It ensures the developers will know the context for a PBI.

::: greybox
As a **\[type of User]**\
I want  **\[some goal]**\
So that **\[some reason]**
:::
**Figure: User Story - template for description**

<!--endintro-->

![Figure: Example User Story in an Azure DevOps PBI](user-story-azuredevops.png)

![Figure: Example User Story in a GitHub Issue](userstory-github.png)

::: greybox
I want to be able to search for customers.
:::
::: bad
Figure: Bad Example - the user story is too vague and broad in scope
:::

::: greybox
As a **Marketing Manager**,
I want to **be able to search for customers by country and last name**,
So that **I can find their numbers and call customers that are close to me**.
:::
::: good
Figure: Good Example - Clear user story following the [INVEST principle](https://en.wikipedia.org/wiki/INVEST_(mnemonic))
:::

branch_name: refs/heads/main

gha_language: TSQL


text:
# Puccinia varia (Dietel) Arthur SPECIES

#### Status
ACCEPTED

#### According to
Index Fungorum

#### Published in
J. Bot. , London 5: 487 (1918)

#### Original name
Uredo varia Dietel

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# V1LeaseSpec

LeaseSpec is a specification of a Lease.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**acquire_time** | **datetime** | acquireTime is a time when the current lease was acquired. | [optional]
**holder_identity** | **str** | holderIdentity contains the identity of the holder of a current lease. | [optional]
**lease_duration_seconds** | **int** | leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed renewTime. | [optional]
**lease_transitions** | **int** | leaseTransitions is the number of transitions of a lease between holders. | [optional]
**renew_time** | **datetime** | renewTime is a time when the current holder of a lease has last updated the lease. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

repository: kubernetes-client/python

gha_language: Python

repo_name: kubernetes-client/python


text:
# Installation

This part of the documentation (common to all nf-core pipelines) is hosted on [nf-co.re
](https://nf-co.re/)

[nf-co.re/usage/installation](https://nf-co.re/usage/installation)

repository: nf-core/coproid

gha_language: Nextflow

gha_license_id: MIT

repo_name: nf-core/coproid


text:
# Histopathologic Cancer Detection

## Background

Early cancer diagnosis and treatment play a crucial role in improving patients' survival rate. One of the most  important early diagnosis is to detect metastasis in lymph nodes through microscopic examination of hematoxylin and eosin (H&E) stained histopathology slides.

Significant discordance on detection results among different pathologist has also been reported.

## References

- Deep Learning for Identifying Metastatic Breast Cancer [[arxiv](<https://arxiv.org/pdf/1606.05718.pdf>)].
- Detecting Cancer Metastases on Gigapixel Pathology Images [[arxiv](https://arxiv.org/pdf/1703.02442.pdf)]
- Pathology-images-analysis-using-CNN (<https://github.com/sdw95927/pathology-images-analysis-using-CNN>)
- Localize the tissue regions in whole slide pathology images. (<https://github.com/PingjunChen/tissueloc>)
- Cancer metastasis detection with neural conditional random field (NCRF) [[pdf](https://openreview.net/pdf?id=S1aY66iiM)][[github](https://github.com/baidu-research/NCRF)]

## Dataset

PatchCamelyon (PCAM) benchmark dataset [[github](https://github.com/basveeling/pcam)].

It consists of 327.680 color images (96x96 px) extracted from histopathologic scans of lymph node sections. Each image is annotated with a binary label indicating presence of metastatic tissue.

## Concepts

- **Whole slide imaging (WSI)**

  Refers to scanning of conventional glass slides in order to produce digital slides, is the most recent imaging modality being employed by pathology departments worldwide.

## Considerations

- Is spatial correlation among slide patches important?


text:
# Express Caching Middleware Plugin for [DocPad](http://docpad.org)

<!-- BADGES/ -->

[![NPM version](http://badge.fury.io/js/docpad-plugin-st.png)](https://npmjs.org/package/docpad-plugin-st "View this project on NPM")

<!-- /BADGES -->

Add static caching for Express using the 'st' package

## Install

```
docpad install st
```

## Usage

Once installed, files will be served from a /static folder.

You can set your own custom st settings in the plugins config

```coffee
plugins:
	st:
		path: "public_html/", # resolved against the process cwd
		url: "/", # defaults to '/'
		cache: # specify cache:false to turn off caching entirely
			fd:
				max: 1000, # number of fd's to hang on to
				maxAge: 1000*60*60, # amount of ms before fd's expire

			stat:
				max: 5000, # number of stat objects to hang on to
				maxAge: 1000 * 60, # number of ms that stats are good for

			content:
				max: 1024*1024*64, # how much memory to use on caching contents
				maxAge: 1000 * 60 * 10, # how long to cache contents for

			index:  # irrelevant if not using index:true
				max: 1024 * 8, # how many bytes of autoindex html to cache
				maxAge: 1000 * 60 * 10, # how long to store it for

			readdir:  # irrelevant if not using index:true
				max: 1000, # how many dir entries to cache
				maxAge: 1000 * 60 * 10, # how long to cache them for

		index: "index.html" # true for auto-index, the default, false returns 404's for directories

		dot: true # allow dot-files to be fetched normally, false return 403 for any url with a dot-file part

		passthrough: false # calls next/returns instead of returning a 404 error, false returns a 404 when a file or an index is not found
```

## Deployment Notes
On Heroku, set cache to false. This will disable backend caching, which is unsupported on Heroku. Untested on other hosted platforms

<!-- HISTORY/ -->

## History
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/stongo/docpad-plugin-st/blob/master/HISTORY.md#files)

<!-- /HISTORY -->

<!-- LICENSE/ -->

## License

Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)

<!-- /LICENSE -->

repository: stongo/docpad-plugin-st

repo_name: stongo/docpad-plugin-st


text:
# Ethereum EI Connector

The Ethereum is a decentralized platform that runs smart contracts. The Ethereum [Connector](https://docs.wso2.com/display/EI640/Working+with+Connectors) allows to access the Ethereum blockchain.

## Prerequisites

> NOTE: To work with the Ethereum connector, you need to have installed the Ethereum client called geth.<br/>

## Compatibility

| Connector version | Supported geth version | Supported WSO2 ESB/EI version |
| ------------- | ------------- | ------------- |
| [1.0.0] |  1.8.19-stable | EI 6.1.0, EI 6.4.0 |

## Getting started

#### Download and install the connector

1. Download the connector from the [WSO2 Store]
2. Then you can follow this [Documentation](https://docs.wso2.com/display/EI640/Working+with+Connectors+via+the+Management+Console) to add and enable the connector via the Management Console in your EI instance.
3. For more information on using connectors and their operations in your EI configurations, see [Using a Connector](https://docs.wso2.com/display/EI640/Using+a+Connector).
4. If you want to work with connectors via EI tooling, see [Working with Connectors via Tooling](https://docs.wso2.com/display/EI640/Working+with+Connectors+via+Tooling).

#### Configuring the connector operations

To get started with ethereum connector and their operations, see [Configuring Ethereum Operations](docs/config.md).

## Building From the Source

Follow the steps given below to build the Ethereum connector from the source code:

1. Get a clone or download the source from [Github]().
2. Run the following Maven command from the `esb-connector-ethereum` directory: `mvn clean install`.
3. The ethereum connector zip file is created in the `esb-connector-ethereum/target` directory.

## How You Can Contribute

As an open source project, WSO2 extensions welcome contributions from the community.
Check the [issue tracker]() for open issues that interest you. We look forward to receiving your contributions.

gha_language: Java


text:
# Grafana Dashboards

This directory contains various Grafana Dashboard that we created.

Internally, we have Grafana set up to directly download the dashboard from Github.

## Dashboards

* **Traefik 1.7 Dashboard** - a dashboard to monitor the various traefik 1.7 instances we have. Based on [this dashboard](https://grafana.com/grafana/dashboards/4475)
* **Pod Dashboard** - a dashboard to monitor the status of all the pods within our clusters.
* **Pod Alerting Dashboard** - a dashboard to alert us when our pods exceed normal conditions. This dashboard is required because Grafana currently doesn't allow for variable datasources within an alert.
* **Cert Manager Dashboard** - a dashboard to see the status of our TLS certificates. Based on [this dashboard](https://grafana.com/grafana/dashboards/11001)

repository: pennlabs/infrastructure

gha_language: TypeScript

repo_name: pennlabs/infrastructure


text:
---
title: Simulation Process
toc: true
weight: 2
---

## INTRODUCTION

Using CONSELF means entering a new mindset, a new philosophy of simulating. Therefore, in order to be able to read and understand the following tutorials, bear in mind the following key definitions:

**Simulation**: a mathematical procedure that allows to reproduce in a virtual environment - software - a physical behavior. Compared to laboratory tests, it is a quicker and cheaper process. Ultimately, simulations help engineers validate the hypothesis behind every design phase.

**Case**: any single test performed by using a simulation system.

**Step**: any single phase the user has to accomplish in order to run a complete case simulation.

Although each CASE simulation depends on the users' needs, CONSELF defines an identical path for every simulation. This path is divided into the following STEPS:

1. Geometry
2. Mesh
3. CFD
4. Results

Obviously, in order to perform a certain STEP all previous ones must be completed. Furthermore, it is possible to run multiple STEP from the same precursor (i.e. run multiple CFD by using the same mesh). For this reason, when starting a new STEP it is always required to link it to a precursor, as shown in the picture.

{{< figure src="/images/Step_selection.png" alt="Selection of a precursor MESH step when starting a CFD one" title="Selection of a precursor MESH step when starting a CFD one" >}}

In the present manual, each of these steps are accurately described and displayed, with examples taken form CONSELF-run tutorials.

#### CASE MANAGEMENT

After having logged in, the CONSELF dashboard appears on screen. On the menu on the left side, the last entry is the **Simulations** tab. Click on it to be redirected to the simulations front page, shown in the following figure. There are three main sections: two in the upper part and one in the bottom part as also highlighted by the following image.

{{< figure src="/images/CarSimulationCaseCreation.png" alt="Definitions of the zones in which the user interface is divided" title="Definitions of the zones in which the user interface is divided" class="figure-80" >}}

When defining a new case, the user is requested a certain number of inputs:

- *Case name*: the case name has to be inserted in the edit box and must be no longer than 255 characters.
- *Application selection* drop-down menu. This menu defines the application to be used in the current case among the available ones. The following table clearly shows the currently available applications and the simulation feature the user access when using it.

|Sector|Application name|Main features|
|----------|----------------|-------------|
|CFD|GENERAL|Compressible and incompressible with steady and transient features.|
|CFD|TURBO - SRF PUMPS|Single reference frame (rotating) incompressible flow. Steady simulation for pumps.|
|CFD|OIL&GAS - FLOW WITH PARTICLES|Incompressible flow with with solid particles transported.|
|CFD|OIL&GAS - MULTIPHASE FLOW|Incompressible flow of two inmiscible species.|
|CFD|HVAC - PASSIVE SCALAR TRANSPORT|Passive scalar transport for compressible and incompressible flows.|
|MECH|STATIC - LINEAR ELASTIC|Mechanical simulation using an isotropic linear elastic material.|
|MECH|DYNAMIC - FREQUENCY|Modal analysis of an isotropic linear elastic material.|

- *Create* button redirects the user to the [GEOMETRY]({{< ref "geometry.md" >}}) step of the created case.

{{% notice info %}}
Type the first part of the application name to filter the available choices.
{{% /notice %}}

On the right handside, it is possible to access previously created simulations which have not been erased yet. All the data are in fact stored using the cloud [space available]({{< ref "simulation-process.md#disk-management" >}}) according to your active subscription.

- *Selection of case*: the user can open a previously created case from the drop-down list.
	- *Open* button redirects the user to the section/step where they left the last time that particular case was edited.

It is possible also to have an overview of recent activities in the platform, i.e. finished steps and cases using the *Activity* button on top of this page. This button opens a further window which shows a list of recently submitted steps, with the information regarding each of them.

{{< figure src="/images/ActivitySummary.png" alt="Recent activities notification" title="Recent activities notification" class="figure-50">}}

The bottom part of this page is actually peculiar because it gives quite a few information about the steps which are submitted to the system to be processed.

{{< figure src="/images/ProgressBar.png" alt="Progress bar" title="Progress bar" class="figure-80">}}

- *Case name*: as inserted by the user during the creation
- *Step type*: the step that is running in that moment
- *Step name*: the name assigned to the running step
- *State*: Status of the current step. It can be one among
	- PREPARED -> Process is waiting for the system to start it
	- RUNNING -> Process is running
- *Progress*: both progress and percentage bars show the completion status for a given step
- *ETA*: estimated time remaining to the end of the current step
- *Operations*: functionalities to interact with the running process and in particular:
	- Residuals button -> Check the residuals graph of the running step (only for CFD and MECH steps)
	- Stop button -> Stop the execution of the current process

It is important to note that there is no limit of number of contemporary running steps a user can have, as long as there are sufficient credits.

#### DISK MANAGEMENT

CFD and FEM simulations are quite expensive in terms of storage resources. According to the subscription you are using, a limit is applied to the storage available to your user. If you filled the amount of storage available it is possible to:

- [Download]({{< ref "results.md#downloads" >}}) the results of completed case in your local machine
- Erase old cases which are no more in use.

Under the **storage** page, the user can find analytical data about his storage usage. At the same time it is possible to delete old cases by selecting them one by one. In this way you are removing non necessary data and you can free more storage space for future cases.

{{< figure src="/images/Storage_page.png" alt="Disk management interface with reference to the area of the screen and the information displayed" title="Disk management interface with reference to the area of the screen and the information displayed" class="figure-50">}}

## CONSELF STEP BY STEP

CONSELF guides you through the simulation literally step by step; in fact, in order to complete a simulation, the user has to go through several steps, each of which fulfills a precise task. Given the high flexibility of this method, users, less experienced as well, may take advantage of this philosophy of work: they have the ability to control the process, start over or modify what had previously been done. When a CASE is opened, a STEP interface is accessed, as shown in the picture below.

{{< figure src="/images/General_STEP_page.png" alt="General STEP page" class="figure-50" >}}

The application is generally divided into two sides:

- *Left side*: current step options to be defined by the user
- *Right side*: view of the simulation results up to the current step

A fundamental part of the application is given by the *Steps completed* button, which gives access to a detailed summary table of the performed steps within the current case. After clicking this button a new windows pops-up with one row for every step submitted in the current case.

{{< figure src="/images/SimulationStep.png" alt="Summary table of all the performed steps within a single case." class="figure-80" >}}

The data available for each step are:

- *Step Type*: type of the performed step
- *Operations*: a set of functionalities to interact with the current step
	- *View settings*: opens the settings used
	- *Reload settings*: reload the settings defined in the current step in a new one. This option is only available if we are now in a new step with the same type as the one we want to reload.
	- *Initialize CFD*: [initialize a new CFD step](https://conself.com/blog/cfd-restart-now-available/) from the results of a previous one. This option is only available if we are now in a new CFD step.
	- *View problems*: in case of *ERROR* or *WARNING*, it opens a new pop-up window where the user can visualize where the problem was.
- *Step name*: name assigned to the current step. To edit the name double click this field.
- *Result code*: result code obtained after the execution is completed. It can be one among
	- *SUCCESS*
	- *ERROR*
	- *WARNING*
- *Result message*: communication and suggestion of action to take in case of *ERROR* or *WARNING*.

To discover the resolution of the most common error experienced when using CONSELF web-application check the [error page]({{< ref "common-errors.md" >}}).

repository: CONSELF/conself-docs

repo_name: CONSELF/conself-docs


text:
# Scimitar GUI project
This was built as a reasonably high performance GUI framework, based on Vulkan. It should be cross-platform but it was mainly developed for Windows.

The project tries to use preprocessor definitions to figure out the capabilities of the system it's being build on. If it ever gets to the point where I would want to distribute this in a more binary format I'll have to think of something else but for the foreseeable future I feel this is a very reasonable approach.

Notable features:
- Vulkan
- heavy use of C++20 (concepts, constexpr, coroutines)


text:
# Relativity

[![CI Status](https://travis-ci.org/dfed/Relativity.svg?branch=master)](https://travis-ci.org/dfed/Relativity)
[![Carthage Compatibility](https://img.shields.io/badge/carthage-✓-e2c245.svg)](https://github.com/Carthage/Carthage/)
[![Version](https://img.shields.io/cocoapods/v/Relativity.svg)](http://cocoadocs.org/docsets/Relativity)
[![License](https://img.shields.io/cocoapods/l/Relativity.svg)](http://cocoadocs.org/docsets/Relativity)
[![Platform](https://img.shields.io/cocoapods/p/Relativity.svg)](http://cocoadocs.org/docsets/Relativity)

Relativity provides a DSL for programmatic layout that makes it easy to achieve pixel-perfect spacing and alignment.

## Programmatic Layout

There are four basic steps to laying out views programmatically.

1. **Create views**. Do this in `init` or `viewDidLoad`.
2. **Create view hierarchy** with `addSubview()`. Do this in `init` or `viewDidLoad`.
3. **Size views**. Do this in `layoutSubviews`.
4. **Position views**. Do this in `layoutSubviews`.

### Positioning Views

Each view has nine anchors that are used for alignment.

topLeft	top	topRight

left	middle	right

bottomLeft	bottom	bottomRight

Positioning views is done by aligning the desired anchor on a view to another view’s anchor, plus an offset. A `-->` moves the view on the left side to the position described on the right side. A `<--` moves the view on the right side to the position described on the left side. You can also explicitly align views using the `align(to:xOffset:yOffset)` method in [ViewPosition.swift](Sources/ViewPosition.swift#L105).

#### Examples

To align view `a` to be 10 points to the left of view `b`:

```swift
  a.right --> 10.horizontalOffset + b.left
```

To align view `a` to be 10 points to the right of view `b`:

```swift
  b.right + 10.horizontalOffset <-- a.left
```

To align view `a` to be 10 points below its superview’s top center:

```swift
  a.top --> 10.verticalOffset + .top
```

For more examples, check out the [ViewPositionVisualization](RelativityVisualization.playground/Pages/ViewPositionVisualization.xcplaygroundpage/Contents.swift) playground page.

#### UILabels

Relativity makes it easy to position your `UILabel`s to your designer’s spec. Design teams (and design products like [Sketch](https://www.sketchapp.com) and [Zeplin](https://zeplin.io)) measure the vertical distance to a label using the font’s [cap height](https://en.wikipedia.org/wiki/Cap_height) and [baseline](https://en.wikipedia.org/wiki/Baseline_(typography)). Relativity’s `align` methods measure `UILabel` distances the same way. So if your spec says that label `b` should be eight vertical points below label `a`, all you need is:

```swift
  a.bottom --> 8.verticalOffset + b.top
```

For a visual example, check out the [FontMetricsVisualization](RelativityVisualization.playground/Pages/FontMetricsVisualization.xcplaygroundpage/Contents.swift) playground page.

### Flexible distribution of subviews

Since views need to be laid out flexibly over various iOS device sizes, Relativity has the ability to easily distribute subviews with flexible positioning along an axis.

Subview distribution can be controlled by positioning fixed and flexible spacers in between views. Fixed spaces represent points on screen. Fixed spaces are created by inserting `CGFloatConvertible` (`Int`, `Float`, `CGFloat`, or `Double`) types into the distribution expression, or by initializing a `.fixed(CGFloatConvertible)` enum case directly. Flexible spacers represent proportions of the remaining space in the superview after the subviews and fixed spacers have been accounted for. You can create flexible spacers by surrounding an `Int` with a spring `~` operator, or by initializing the `.flexible(Int)` enum case directly. A `~2~` represents twice the space that `~1~` does. Views, fixed spacers, and flexible spacers are bound together by a bidirectional anchor `<>` operator.

#### Examples

To equally distribute subviews `a`, `b`, and `c` at equal distances along a horizontal axis:

```swift
  superview.distributeSubviewsHorizontally() {
    a <> ~1~ <> b <> ~1~ <> c
  }
```

To make the space between `a` and `b` twice as large as the space between `b` and `c`:

```swift
  superview.distributeSubviewsHorizontally() {
    a <> ~2~ <> b <> ~1~ <> c
  }
```

To pin `a` to be 8pts from the left side, and distribute `b` and `c` with equal spacing over the remaining space:

```swift
  superview.distributeSubviewsHorizontally() {
    8 <> a <> ~1~ <> b <> ~1~ <> c
  }
```

To equally distribute subviews `a`, `b`, and `c` at equal distances along a vertical axis, but align the subviews within the left half of `superview`:

```swift
  superview.distributeSubviewsVertically(within: CGRect(x: 0.0, y: 0.0, width: superview.bounds.midX, height: superview.bounds.height)) {
    a <> ~1~ <> b <> ~1~ <> c
  }
```

For a visual example, check out the [ViewPositionVisualization](RelativityVisualization.playground/Pages/ViewPositionVisualization.xcplaygroundpage/Contents.swift) playground page.

### Pixel Rounding

Relativity ensures that you never align a frame to a non-integral pixel, so no need to worry about blurry UI! I’ve also vended a public [PixelRounder](Sources/PixelRounder.swift) for those who want to use it for frame sizing.

## Requirements

* Xcode 8.0 or later.
* iOS 8 or later.
* Swift 3.0 or later.

## Installation

### CocoaPods

To install Relativity in your iOS project with [CocoaPods](http://cocoapods.org), add the following to your `Podfile`:

```
platform :ios, '8.0'
pod 'Relativity', '~> 0.9.0'
```

### Carthage

To install Relativity in your iOS project with [Carthage](https://github.com/Carthage/Carthage), add the following to your `Cartfile`:

```ogdl
github "dfed/Relativity"
```

Run `carthage` to build the framework and drag the built `Relativity.framework` into your Xcode project.

### Swift Package Manager

To install Relativity in your iOS project with [Swift Package Manager](https://github.com/apple/swift-package-manager), the following definition can be added to the dependencies of your `Project`:

```swift
  .Package(url: "https://github.com/dfed/Relativity.git", majorVersion: 0, minor: 9),
```

### Submodules

To use git submodules, checkout the submodule with `git submodule add git@github.com:dfed/Relativity.git`, drag Relativity.xcodeproj to your project, and add Relativity as a build dependency.

## Contributing

I’m glad you’re interested in Relativity, and I’d love to see where you take it. Please read the [contributing guidelines](Contributing.md) prior to submitting a Pull Request.

Thanks, and happy positioning!

## Attribution

Shout out to [Peter Westen](https://twitter.com/pwesten) who inspired the creation of this library.

repository: vadoff/Relativity

repo_name: vadoff/Relativity


text:
---
layout: default
---

# 1996-02-05 - violating politicians privacy

## Header Data

From: attila<EMAIL_ADDRESS>To: Karl Ike<EMAIL_ADDRESS>Message Hash: eca6afa9c5e5d4912bddc485dd60907bbe638d30a482af55077357e3a5467f17

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-02-05 19:02:08 UTC

Raw Date: Tue, 6 Feb 1996 03:02:08 +0800

## Raw message

```
{% raw  %}From: attila<EMAIL_ADDRESS>Date: Tue, 6 Feb 1996 03:02:08 +0800
To: Karl Ike<EMAIL_ADDRESS>Subject: violating politicians privacy
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

    attila sez:

	well, I take it as assumed correct that illegally violating the
    credit and personal information of member os Congress (might as well
    include the Clintons and the Gores) would get a response on privacy.

	but you would be a targt of an incredible manhunt. For example,
    I can give you the name of an online information provider (if I was
    so disposed --which I am _not_, as I do not wish to be labelled as a
    conspirator) who would provide the credit, medical, and background
    reports of 500+ individuals for $20-25 a pop.  then you take out an
    account on a system with a false id and does not require credit cards
    (pay cash, not cheque)  --mail each one to the target rep/sen/bubba
    after mailing the whole set to Geraldo, or some other slimball.

	but, I think I would put my money on further laws to really
    clamp down on free speech. and, if you ever were caught, don't
    expect all of us to donate one day a month for 10-50 years to visit
    you in the slammer.

	more laws, more political police, more prisons  --that's their
    motto.

	enjoy

_________________________________________________________________ attila__

On Sun, 4 Feb 1996, Karl Ike wrote:

> It is impossible to get changes in the Fair Credit Reporting Act in the
> traditional way. Credit reporting agencies have far too much personal
> information that is passed out with incrediable ease at the consumers expense.
>
> I have a suggestion!
>
> Today, with TRW, Equifax and TransUnion's vast network, it is easy to obtain
> anyone's credit report from various sources. Do you think if someone,
> outside of the USA, obtained the credit reports on half, maybe all, of the
> US Senators, congressmen, judges, etc, and published them in their entirity,
> on the internet, from outside the US, would get their attention? Then there
> would be changes, overnight, protecting the right of privacy! Let them
> become the victim of credit reporting agencies once and shit will happen
> overnight.
>
> If someone who is not a US citizen does this from outside the US, I don't
> think that they can be held accountable under US law? I am new to the
> internet and don't have a clue how to do it, but someone out there does and
> probably has a friend in Bankok that will help him. Put the word out!
>

__________________________________________________________________________
    go not unto usenet for advice, for the inhabitants thereof will say:
      yes, and no, and maybe, and I don't know, and fuck-off.
_________________________________________________________________ attila__

    To be a ruler of men, you need at least 12 inches....
    There is no safety this side of the grave.  Never was; never will be.

{% endraw %}
```

## Thread

+ Return to [February 1996](/archive/1996/02)

+ Return to "[attila <attila@primenet.com>](/authors/attila_attila_at_primenet_com_)"
+ Return to<EMAIL_ADDRESS>(Karl Ike)](/authors/karl_ike_at_sihope_com_karl_ike_)"

+ 1996-02-05 (Tue, 6 Feb 1996 00:23:01 +0800) - [No Subject](/archive/1996/02/92a7ec19417c9e83c242e1244066eca4127ba96c6d0acdbbdad8a6724de00e09) -<EMAIL_ADDRESS>(Karl Ike)_
  + 1996-02-05 (Tue, 6 Feb 1996 03:02:08 +0800) - violating politicians privacy - _attila<EMAIL_ADDRESS>


text:
# IP Address Resource

IP Address resource allows to assign an IP.

## Example Usage

Creating an IP address:
```
resource "solidserver_ip_address" "myFirstIPAddress" {
  space   = "${solidserver_ip_space.myFirstSpace.name}"
  subnet  = "${solidserver_ip_subnet.myFirstIPSubnet.name}"
  name    = "myfirstipaddress"
  device  = "${solidserver_device.myFirstDevice.name}"
  class   = "AWS_VPC_ADDRESS"
  class_parameters = {
    interfaceid = "eni-d5b961d5"
  }
}
```

## Argument Reference

* `space` - (Required) The name of the space into which creating the IP address.
* `subnet` - (Required) The name of the subnet into which creating the IP address.
* `pool` - (Optional) The name of the pool into which creating the IP address.
* `request_ip` - (Optional) An optional request for a specific IP address. If this address is unavailable the provisioning request will fail.
* `name` - (Required) The name of the IP address to create. If a FQDN is specified and SOLIDServer is configured to sync IPAM to DNS, this will create the appropriate DNS A Record.
* `device` - (Optional) Device Name to associate with the IP address (Require a 'Device Manager' license).
* `class` - (Optional) An optional object class name allowing to store and display custom meta-data.
* `class_parameters` - (Optional) An optional object class parameters allowing to store and display custom meta-data as key/value.

## Attribute Reference

* `id` - The id of the IP Address.
* `name` - The name of the IP Address.
* `address` - The IP Address itself.
* `space` - The parent IP Space of the IP Address.
* `subnet` - The parent IP Subnet of the IP Address.
* `pool` - The parent IP Pool of the IP Address (if any).
* `request_ip` - The requested IP Address (if any).
* `mac` - The MAC address of the IP Address.
* `device` - The Device Name associated with the IP address.
* `class` - The class name of the IP Address.
* `class_parameters` - The class parameters of the IP Address.

repository: tsenay/terraform-provider-solidserver

repo_name: tsenay/terraform-provider-solidserver


text:
# squirrel-viz
Visualization of the squirrels counted during the 2018 Central Park Squirrel Census

https://johnjmurray.github.io/squirrel-viz/
Colors: Gray, Cinnamon, Black (no data = Purple)

[10-28-21 : squirrels with no color data are represented as purple]

TODO:
- Zoom on desktop
- Date/shift slider
- Hover-overs w/ more squirrely details

inspired by https://kaczmarj.github.io/covid19vis/

repository: johnjmurray/squirrel-viz

gha_language: JavaScript

repo_name: johnjmurray/squirrel-viz


text:
# svg-injector

[![npm version](https://img.shields.io/npm/v/@tanem/svg-injector.svg?style=flat-square)](https://www.npmjs.com/package/@tanem/svg-injector)
[![build status](https://img.shields.io/github/actions/workflow/status/tanem/svg-injector/ci.yml?branch=master&style=flat-square)](https://github.com/tanem/svg-injector/actions?query=workflow%3ACI)
[![coverage status](https://img.shields.io/codecov/c/github/tanem/svg-injector.svg?style=flat-square)](https://codecov.io/gh/tanem/svg-injector)
[![npm downloads](https://img.shields.io/npm/dm/@tanem/svg-injector.svg?style=flat-square)](https://www.npmjs.com/package/@tanem/svg-injector)
[![minzipped size](https://img.shields.io/bundlephobia/minzip/@tanem/svg-injector?style=flat-square)](https://bundlephobia.com/result?p=@tanem/svg-injector)

> A fast, caching, dynamic inline SVG DOM injection library.

## Background

There are a number of ways to use SVG on a page (`object`, `embed`, `iframe`, `img`, CSS `background-image`) but to unlock the full potential of SVG, including full element-level CSS styling and evaluation of embedded JavaScript, the full SVG markup must be included directly in the DOM.

Wrangling and maintaining a bunch of inline SVG on your pages isn't anyone's idea of good time, so `SVGInjector` lets you work with simple tag elements and does the heavy lifting of swapping in the SVG markup inline for you.

## Basic Usage

```html
<div id="inject-me" data-src="icon.svg"></div>
```

```js
import { SVGInjector } from '@tanem/svg-injector'

SVGInjector(document.getElementById('inject-me'))
```

## Avoiding XSS

Be careful when injecting arbitrary third-party SVGs into the DOM, as this opens the door to XSS attacks. If you must inject third-party SVGs, it is highly recommended to sanitize the SVG before injecting. The following example uses [DOMPurify](https://github.com/cure53/DOMPurify) to strip out attributes and tags that can execute arbitrary JavaScript. Note that this can alter the behavior of the SVG.

```js
import { SVGInjector } from '@tanem/svg-injector'
import DOMPurify from 'dompurify'

SVGInjector(document.getElementById('inject-me'), {
  beforeEach(svg) {
    DOMPurify.sanitize(svg, {
      IN_PLACE: true,
      USE_PROFILES: { svg: true, svgFilters: true },
    })
  },
})
```

## Live Examples

- Basic Usage: [Source](https://github.com/tanem/svg-injector/tree/master/examples/basic-usage) | [Sandbox](https://codesandbox.io/s/github/tanem/svg-injector/tree/master/examples/basic-usage)
- API Usage: [Source](https://github.com/tanem/svg-injector/tree/master/examples/api-usage) | [Sandbox](https://codesandbox.io/s/github/tanem/svg-injector/tree/master/examples/api-usage)
- MooTools: [Source](https://github.com/tanem/svg-injector/tree/master/examples/mootools) | [Sandbox](https://codesandbox.io/s/github/tanem/svg-injector/tree/master/examples/mootools)
- UMD Build (Development): [Source](https://github.com/tanem/svg-injector/tree/master/examples/umd-dev) | [Sandbox](https://codesandbox.io/s/github/tanem/svg-injector/tree/master/examples/umd-dev)
- UMD Build (Production): [Source](https://github.com/tanem/svg-injector/tree/master/examples/umd-prod) | [Sandbox](https://codesandbox.io/s/github/tanem/svg-injector/tree/master/examples/umd-prod)

## API

**Arguments**

- `elements` - A single DOM element or array of elements, with `src` or `data-src` attributes defined, to inject.
- `options` - _Optional_ An object containing the optional arguments defined below. Defaults to `{}`.
  - `afterAll(elementsLoaded)` - _Optional_ A callback which is called when all elements have been processed. `elementsLoaded` is the total number of elements loaded. Defaults to `() => undefined`.
  - `afterEach(err, svg)` - _Optional_ A callback which is called when each element is processed. `svg` is the newly injected SVG DOM element. Defaults to `() => undefined`.
  - `beforeEach(svg)` - _Optional_ A callback which is called just before each SVG element is added to the DOM. `svg` is the SVG DOM element which is about to be injected. Defaults to `() => undefined`.
  - `cacheRequests` - _Optional_ Use request cache. Defaults to `true`.
  - `evalScripts` - _Optional_ Run any script blocks found in the SVG. One of `'always'`, `'once'`, or `'never'`. Defaults to `'never'`.
  - `httpRequestWithCredentials` - _Optional_ Boolean that indicates whether or not cross-site Access-Control requests should be made using credentials. Defaults to `false`.
  - `renumerateIRIElements` - _Optional_ Boolean indicating if SVG IRI addressable elements should be renumerated. Defaults to `true`.

**Example**

```html
<div class="inject-me" data-src="icon-one.svg"></div>
<div class="inject-me" data-src="icon-two.svg"></div>
```

```js
import { SVGInjector } from '@tanem/svg-injector'

SVGInjector(document.getElementsByClassName('inject-me'), {
  afterAll(elementsLoaded) {
    console.log(`injected ${elementsLoaded} elements`)
  },
  afterEach(err, svg) {
    if (err) {
      throw err
    }
    console.log(`injected ${svg.outerHTML}`)
  },
  beforeEach(svg) {
    svg.setAttribute('stroke', 'red')
  },
  cacheRequests: false,
  evalScripts: 'once',
  httpRequestWithCredentials: false,
  renumerateIRIElements: false,
})
```

## Installation

> ⚠This library uses [`Array.from()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from), so if you're targeting [browsers that don't support that method](https://kangax.github.io/compat-table/es6/#test-Array_static_methods), you'll need to ensure an appropriate polyfill is included manually. See [this issue comment](https://github.com/tanem/svg-injector/issues/97#issuecomment-483365473) for further detail.

```
$ npm install @tanem/svg-injector
```

There are also UMD builds available via [unpkg](https://unpkg.com/):

-<EMAIL_ADDRESS>-<EMAIL_ADDRESS>
## Credit

This is a fork of a [library](https://github.com/iconic/SVGInjector) originally developed by [Waybury](http://waybury.com/) for use in [iconic.js](https://useiconic.com/tools/iconic-js/), part of the [Iconic](https://useiconic.com/) icon system.

## License

MIT

repository: tanem/svg-injector

repo_name: tanem/svg-injector


text:
# Chinese Poetry Generation
This project aims to implement and improve upon the classical Chinese poetry generation system proposed in ["Chinese Poetry Generation with Planning based Neural Network"](https://arxiv.org/abs/1610.09889).

## Generated Sample
![Sample generated Chinese poetry](data/resource/generated_poem.png)

## Dependencies
[Python 2.7](https://www.python.org/download/releases/2.7/)
[TensorFlow 1.2.1](https://www.tensorflow.org/)
[Jieba 0.38](https://github.com/fxsjy/jieba)
[Gensim 2.0.0](https://radimrehurek.com/gensim/)
[pypinyin 0.23](https://pypi.python.org/pypi/pypinyin)

## Features
**Network:**
- [x] Bidirectional encoder
- [x] Attention decoder

**Training and Predicting:**
- [x] Alignment boosted word2vec
- [x] Data loading mode: only keywords (no preceding sentences)
- [x] Data loading mode: reversed
- [x] Data loading mode: aligned
- [x] Training mode: ground truth
- [x] Training mode: scheduled sampling
- [x] Predicting mode: greedy
- [x] Predicting mode: sampling
- [ ] Predicting mode: beam search

**Refinement:**
- [x] Output refiner
- [ ] Reinforcement learning tuner
- [ ] Iterative polishing

**Evaluation:**
- [x] Evaluation: rhyming
- [x] Evaluation: tonal structure
- [ ] Evaluation: alignment score
- [ ] Evaluation: BLEU score

## Project Structure
**Data**
`data`: directory for `raw` data, `processed` data, pre-processed `starterkit` data, and generated poetry `samples`
`model`: directory for saved neural network models
`log`: directory for training logs
`notebooks`: directory for exploratory/experimental IPython notebooks
`training_scripts`: directory for sample scripts used for training several basic models

**Code**
`model.py`: graph definition
`train.py`: training logic
`predict.py`: prediction logic
`plan.py`: keyword planning logic
`main.py`: user interaction program

## Data Processing
To prepare training data:
```sh
python data_utils.py
```

> **Detail**
> This scrip does the following in order:
> 1. Parse corpus
> 2. Build vocab
> 3. Filter quatrains
> 4. Count words
> 5. Rank words
> 6. Generate training data

> **Note**
> The TextRank algorithm may take many hours to run.
> Instead, you can choose to interrupt the iterations and stop it early,
> when the progress shown in the terminal has remained stationary for a long time.

Then, to generate the word embedding:
```sh
python word2vec.py
```

> **Alternative**
> As an alternative, we have also provided pre-processed data in the `data/starterkit` directory
> You may simply perform `cp data/starterkit/* data/processed` to skip the data processing step

## Training

To train the default model:
```sh
python train.py
```

To view the full list of configurable training parameters:
```sh
python train.py -h
```

> **Note**
> Thus you should almost always train a new model after modifying any of the parameters.
> Models are by default saved to `model/`. To train a new model, you may either remove the existing model from `model/`
> or specify a new model path during training with `python train.py --model_dir :new_model:dir:`

## Generating

To start the user interation program:
```sh
python main.py
```

Similarly, to view the full list of configurable predicting parameters:
```sh
python main.py -h
```

> **Note**
> The program currently does not check that predication parameters matches corresponding training parameters.
> User has to ensure, in particular, the data loading modes correspond with the ones used during traing.
> (e.g. If training data is `reversed` and `aligned`, then prediction input should also be `reversed` and `aligned`.
> Otherwise, results may range from subtle differences in output to total crash.

## Evaluating

To generate sample poems for evaluation:
```sh
python generate_samples.py
```

> **Detail**
> This script by default randomly samples 4000 poems from the training data and saves them as `human` poems.
> Then it uses entire poems as inputs to the planner, to create keywords for the predictor.
> The predicted poems are saved as `machine` poems.

To evaluate the generated poems:
```sh
python evaluate.py
```

## Further Reading
**Auxiliary**
1. ["Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks"](https://arxiv.org/abs/1506.03099)
2. ["Sequence-to-Sequence Learning as Beam-Search Optimization"](https://arxiv.org/abs/1606.02960)
3. ["Tuning Recurrent Neural Networks with Reinforcement Learning"](https://arxiv.org/pdf/1611.02796v2.pdf)
4. ["Deep Reinforcement Learning for Dialogue Generation"](https://arxiv.org/pdf/1606.01541.pdf)

**Poetry Generation**
1. May 10, 2017: ["Flexible and Creative Chinese Poetry Generation Using Neural Memory"](https://arxiv.org/pdf/1705.03773.pdf)
2. Dec 7, 2016: ["Chinese Poetry Generation with Planning based Neural Network"](https://arxiv.org/pdf/1610.09889.pdf)
3. June 19, 2016: ["Can Machine Generate Traditional Chinese Poetry? A Feigenbaum Test"](https://arxiv.org/pdf/1606.05829.pdf)

## Acknowledgement
1. The data processing source code is based on [DevinZ1993](https://github.com/DevinZ1993/Chinese-Poetry-Generation)'s implementation.
2. The neural network implementation is inspired by [JayParks](https://github.com/JayParks/tf-seq2seq)'s work.

branch_name: refs/heads/develop

gha_language: Jupyter Notebook


text:
---
title: "Armhole depth factor"
---

Controls the depth of your armhole, as a factor of your shoulder to shoulder measurement.

## Effect of this option on the pattern

![This image shows the effect of this option by superimposing several variants that have a different value for this option](tamiko_armholedepthfactor_sample.svg "Effect of this option on the pattern")

repository: freesewing/freesewing

repo_name: freesewing/freesewing


text:
---
layout: post
title:  "Building your own Telescope"
date:   2016-07-20
excerpt: "Plans for a 6 inch newtonian telescope that anyone can build"
comments: false
category: Resources
---

Yes, it "looks like a cannon," but the above is really a ten-inch (measured by the diameter of the objective) Newtonian telescope that almost anybody can build. Here you will find plans to build a 6 inch telescope of similar design.

Overview

 Materials List

 Section A

 Section B

 Section C


text:
# Mapping and Gathering

The goal of the challenge is to demonstrate the capability the robot has to map an environment and to retrieve specific objects on it.

## Expected

Considering that the appropriate data are streamed in ROS topics (odom, scam, camera/image, transformations...) the robot is capable of generating a map of its environment and the position in the map of objects of interest.

Technically, the data would be provided by a `rosbag` and the object to recognize and localize are bottles of nuka-cola, in any position possible.
The data flow is built with a moving robot (teleoperate for instance).

The map would be published in a `/map` topic all over the SLAM process and the position of the bottle in `/bottle`.
The `/bottle` caring visualization_msgs/Marker messages.
A message is published each time a bottle is detected by the robot.
The marker takes the form of a green Cube at the position of the bottle in the map frame.

* [visualization_msgs package](http://wiki.ros.org/visualization_msgs)
* [regarding rviz](https://wiki.ros.org/rviz/DisplayTypes/Marker)

## consigns

Each group commit the minimal required files in a specific `challenge2` git branch.

### The required files:

* a `README.md` file in markdown syntax introducing the project.
* a directory `grp_'color'` matching a ros package **and only this package**
* Inside the `grp_'color'` package, the code (python scripts or cpp sources) for the relevant nodes to the challenge.
* The launch file `challenge2.launch` starting the appropriate nodes for demonstrating the capability of the robot to map and to gather bottles when appropriate data are streamed in appropriate topics (`challenge2.launch` does not start the rosbag player).

## Criteria

Minimal:

1. The group follows the consigns (i.e. the repository is presented as expected)
3. The robot build a map in `/map` topic
4. The robot detect 1st-version-bottle (orange one) and publish markers `/bottle` topic at the position of the robot.

Optional:

4. Information is returned to rviz (started automaticaly, with appropriate configuration).
5. The map is good shapped even in large environement.
6. The robot detect 2d-version-bottle (black one)
7. The position of bottle in the map is precise.
8. The position of the bottle is streamed one and only one time in the `/bottle` topic.
9. All the bottle are detected (wathever the bottle position and the background).
10. Only the bottle are detected (even if similar object are in the environment).
11. A service permit to get all bottle positions

## Evaluation protocol

Here the evaluation protocol applied.
It is highly recommended to process it yourself before the submission...

1. clone the group’s repository
1. check out the appropriate branch `git checkout challenge2`
2. Take a look to what is inside the repository and read the `README.md` file (normally it states that the project depends on `mb6-tbot`, make sure that `mb6-tbot` project **is not included in the studient project** but already installed aside). `README.md` also mention if the group targeted (and how) some of the optional features.
3. make it: `catkin_make` and `source` from the catkin directory.
4. Launch the demonstration: `roslaunch grp-color challenge2.launch`, echo the `bottle topic`, start rviz to visualize the map (if it is not automaticaly started)
5. Appreciate the solution with differents `rosbag`.
6. Stop everything.
7. Take a look to the code, by starting from the launchfiles.

* Example of [rosbag](https://partage.imt.fr/index.php/s/B479W73SZt5ZLeK) (you can use `unzip` command to... unzip the file before to use it)

## Make your own rosbag:

Turn-on the robot in a first terminal:

```
roslaunch tbot_bringup start_teleop.launch
```

Start recording the minimal needed topics (Example without 3D data):

```
rosbag record -o larm /tf /tf_static /odom /scan /camera/color/image_raw /camera/aligned_depth_to_color/image_raw /mobile_base/commands/velocity
```

Return to your first terminal and control the robot with `ijkl` keys.

**To notice that rosbag are heavy files. It is not recommended to add those file to git versioning.**

To play the *rosbag* and map the environment, we will use the clock of the rosbag. First you have to specify the use of simulated clock on your launch file, then you will play the rosbag with clock option.

In the launchfile:

```xml
<param name="/use_sim_time" value="true" />
```

To ply a ROSBag:

```bash
rosbag play --clock yourRecordedFile.bag
```

repository: ceri-num/uv-larm

repo_name: ceri-num/uv-larm


text:
# Zerobase API Server

This repository contains the back end for the Zerobase smart tracing platform. Refer to the [smart-tracing repo](https://github.com/zerobase-io/smart-tracing) for the front end. We are using Kotlin and Neo4j with cloud storage on Heroku. We are using Dropwizard for the REST framework. Kotlin requires Java and Maven.

Any commands shown in this read-me are written in bash. If you are on Windows or use an alternate shell, like fish, please adjust the commands
accordingly.

There are other README files throughout the project. They are located in the source folders that most closely align with the
readme contents.

## Development Setup

### Kotlin
The backend is written in Kotlin. While you can work on it in any editor, such as vim or VS Code, it is significantly easier to use an IDE. We recommend [IntelliJ](https://www.jetbrains.com/idea/download/index.html).
If you are using Intellij, the Kotlin plugin must be **at least 1.3.70**.

### Java 11

This project targets the current LTS version of Java: 11. You are welcome to use any of the JDK implementations locally, but deployments
will be done using an AdoptOpenJDK build. If you want to use Oracle's official JDK, it can be dowloaded [here](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html).
We recommend, however, that you install the JDK using a package manager, such as `brew` on macOS, to easily stay up to date.

### Maven
Maven is a dependency management and build tool that is commonly used in the Java world. It is available for installation via package
managers, such as `brew` on macOS, for easy updating (recommended way) but can also be installed manually.

#### Install manually
* Download Maven from [here](https://maven.apache.org/download.cgi)
* Follow these installation instructions [here](https://maven.apache.org/install.html)
* Add the full path to your ~/.bash_profile, ~/.zshrc, or similar.

### Docker
Docker is used to run external services locally for front-end development or tests instead of requiring access to a cloud environment.
Some of the resources can be run without docker, but some don't really have local install options. Install docker manually by following
this [guide](https://www.docker.com/get-started) or via a package manager.

## Running Locally for Front-end Development or Testing

### Docker Compose
We have a docker compose file that will spin up all the pieces necessary and expose the API on your local machine. There are several
environment variables that can be used to configure it:

* `DB_PORT`: Used if you want to connect to the gremlin server manually and play with the graph.
* `APP_VERSION`: By default, it will use latest. If you need to run a specific version, or one that isn't in DockerHub yet, set this to the version tag you want.
* `APP_PORT`: By default, it will be 9000.

### Manually with Docker
#### Database - Gremlin
* Pull the Gremlin server image
    ```sh
    $ docker pull tinkerpop/gremlin-server
    ```
* Run the gremlin image. By default, the Gremlin server does not support the string ids we are using with Neptune. As such we need
  to override the settings so it will.
    ```sh
    $ docker run -d \
            -p 8182:8182 \
            -v $(pwd)/src/test/resources/tinkergraph-overrides.properties:/opt/gremlin-server/conf/tinkergraph-empty.properties \
            --name=zerboase-db \
            tinkerpop/gremlin-server:latest
    ```
By default, there are no credentials for the local install

#### Localstack - AWS Fakes
Follow their startup documentation: https://github.com/localstack/localstack.

#### App
```sh
$ docker run -d --name=zerobase-api \
    -e WRITE_ENDPOINT=<gremlin-api host> \
    -e DB_PORT=<gremlin mapped port> \
    -e AWS_SES_ENDPOINT=<localstack ses http url (including port)>
    zerobaseio/smart-tracing-api:<version>
```

### Manually without Docker
#### Run Gremlin without Docker
If you're unable to use Docker to run Gremlin, there is an alternative available. The desktop version can be downloaded
from [here](https://www.apache.org/dyn/closer.lua/tinkerpop/3.4.6/apache-tinkerpop-gremlin-server-3.4.6-bin.zip). The configuration
instructions are found [here](http://tinkerpop.apache.org/docs/3.4.6/reference/#gremlin-server). The default configuration should
suffice.

#### AWS SES
Follow the documentation for a non-Docker SES fake. Here's one: https://github.com/csi-lk/aws-ses-local

#### Project
After cloning the project there are two ways to deploy it locally: using an IDE or via the command line. By default, the app listens on
port 9000. You can override that with an environment variable of `PORT` if you need to. The `local-config.yml` defaults to `localhost`
and `8182` for the database. Both can be overriden with environment variables, using `WRITE_ENDPOINT` and `DB_PORT` respectively.

**Running in an IDE**

The following directions use Intellij as the IDE, but the steps should be similar if you are using a different IDE.

* If necessary, navigate to File/Project Structure. Update the SDK for the project to JDK11.
* Open `Main.kt`
* In `Main.kt`, click on the run button next to main and select `Create Main.kt` to create a run configuration.

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

* Set the name to something reasonable. If running locally, it's recommended to use the `local-config.yml` instead of
`config.yml`. The configuration will target running locally against Gremlin, while the normal config will target AWS Neptune.
* Set the program arguments as `server <the config file you want to use>`. Options for config files are:
    * `src/main/resources/config.yml`
    * `src/main/resources/local-config.yml`
* By default, the `local-config.yml` expects the database to be running at `localhost:8182`. If you need to override the port,
set an environment variable of `DB_PORT` to the port your gremlin server is running on.

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

* Click `OK` and run the configuration you just made.

**Running from the command line.**
* From the project's root directory, build the project.
    ```sh
    $ mvn clean install
    ```
* Set the environment variables (if needed), either as an export or inline, and run the jar.
    * Export
        ```sh
        $ export DB_PORT=12345
        $ java -jar target/smart-tracing-api.jar server target/classes/local-config.yml
        ```
    * Inline
    ```sh
    $ PORT=8888 java -jar target/smart-tracing-api.jar server target/classes/local-config.yml
    ```

### Debugging / Calling end points
* Once you're running the project, you can double check if all is well by visiting `http://localhost:8081` in your browser. You
  shoudl see a simple page that exposes metrics and healthcheck results. You can also curl `http://localhost:8081/healthchecks` if
  you prefer the command line.
* App endpoints are available at `http://localhost:9000`

repository: knorrium/smart-tracing-api

repo_name: knorrium/smart-tracing-api


text:
# todo

> minimalist todo list progressive web app

https://guillaumeliard.github.io/todo

Add todos and manage them

Can be saved as an app from the browser to the user operating system (pwa).

Todos user data is locally saved inside browser's localstorage.

## Technologies

nuxt (vue, vuex, ...)
vuex-persistedstate (for localstorage data sync)
vuetify (material design framework)
pwa module (workbox, icon, ...)
vuedraggable
...

## Build Setup

``` bash
# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm start

# build for production and launch server
$ npm run build-server
$ npm start-server

# generate static project
$ npm run build
```

For detailed explanation on how things work, checkout [Nuxt.js docs](https://nuxtjs.org).

## LICENSE

MIT

repository: GuillaumeLiard/todo

repo_name: GuillaumeLiard/todo


text:
EE199
=====
## Linux Device Driver Tutorial Development
![Impulse](/assets/graphics/brb1.png)

For this EE 199 Project, I created tutorials for user-mode Linux Device Drivers based off of existing code.

## Contributors

### Contributors on GitHub
* [Anthony Nguyen](https://github.com/resolutedreamer)

### Third party libraries
*  [The Big Red Button - OpenSensors.io](http://blog.opensensors.io/blog/2013/11/25/the-big-red-button/)
*  [temper-python](https://github.com/padelt/temper-python)

## License
* This project is licensed under the Apache License - see the [LICENSE](https://github.com/resolutedreamer/EE199/blob/master/LICENSE) file for details

## Version
* Version 1.0

## Contact
#### Anthony Nguyen
* Homepage: [http://www.resolutedreamer.com](http://www.resolutedreamer.com)

Last Updated 2014/06/14


text:
+++
title = "Leveraging Structured Pruning of Convolutional Neural Networks"
publishDate = 2017-01-01T00:00:00Z
date = 2022-11-02T00:00:00Z
authors = ['Hugo Tessier', 'Vincent Gripon', 'Mathieu Leonardon', 'Matthieu Arzel', 'David Bertrand', 'Thomas Hannagan']
publication_types = ["1"]
abstract = "Structured pruning is a popular method to reduce the cost of convolutional neural networks, that are the state of the art in many computer vision tasks. However, depending on the architecture, pruning introduces dimensional discrepancies which prevent the actual reduction of pruned networks. To tackle this problem, we propose a method that is able to take any structured pruning mask and generate a network that does not encounter any of these problems and can be leveraged efficiently. We provide an accurate description of our solution and show results of gains, in energy consumption and inference time on embedded hardware, of pruned convolutional neural networks."
featured = false
publication = "IEEE SiPS 2022"
doi = "10.1109/SiPS55645.2022.9919253"
+++

repository: bonben/academic-kickstart

repo_name: bonben/academic-kickstart


text:
---
layout: default
title: Downloads
---

# Downloading rspamd

Download rspamd-1.0.11

## Using your OS resources

Rspamd is intended to run on Unix-like operating systems only. FreeBSD users can use ports
collection via [mail/rspamd](http://www.freshports.org/mail/rspamd) for installation.

### Arch, CentOS, Debian, Fedora, openSUSE, SLE, Ubuntu

Also there are pre-built packages at the OpenSUSE build service for debian, fedora, opensuse and
various versions of ubuntu:

<http://software.opensuse.org/download.html?project=home%3Acebka&package=rspamd>

Rspamd is also available in Debian's [testing](https://packages.debian.org/source/testing/rspamd) and [unstable](https://packages.debian.org/source/unstable/rspamd) distributions and the universe repository in [some versions](http://packages.ubuntu.com/search?keywords=rspamd&searchon=names&suite=all&section=all) of Ubuntu.

For CentOS 6 on x86_64 platform you might also use the optimized version of rspamd with pcre-jit, luajit and hiredis bundled. This also contain gmime 2.6 build compatible with the major centos environment. To use this reporitory you can do the following steps:

	# wget -O /etc/yum.repos.d/rspamd.repo http://rspamd.com/CentOS/6/os/x86_64/rspamd.repo
	# rpm --import http://rspamd.com/vsevolod.pubkey
	# yum update
	# yum install rspamd

These packages are also tested on the recent Ubuntu 14.04 LTS. However, you might want to fix `systemd` specific routines
in `/etc/rspamd/workers.conf` and `/etc/rspamd/logging.conf`.

If you want to check the integrity of your source archive downloaded, then you could use the following [GPG signature](/downloads/rspamd-1.0.11.tar.xz.asc).
This signature can be verified against my [GPG public key](https://rspamd.com/vsevolod.pubkey).

There is a [guide](https://rspamd.com/doc/quickstart.html) that describes the process of rspamd installation and initial configuration for various operating systems.

## Nightly releases

If you'd like to test the current rspamd version, you might use nightly builds that are currently available for **CentOS 6** and debian based distributives:

- Debian wheezy
- Debian jessie
- Ubuntu precise
- Ubuntu trusty
- Ubuntu vivid

Nightly builds are not as stable as mainline ones but they contain additional features and bugs are fixed very fast when detected.

To use nightly builds on CentOS 6, please follow these instructions:

	wget -O /etc/yum.repos.d/rspamd-nightly.repo http://rspamd.com/CentOS/6/nightly/x86_64/rspamd.repo
	rpm --import http://rspamd.com/CentOS/6/nightly/x86_64/nightly.key
	yum update
	yum install rspamd

To use nightly builds on Debian based distirbutive, do the following (we assume that `codename` is your distributive name):

	apt-get install -y lsb-release # optional
	CODENAME=`lsb_release -c -s`
	wget -O- http://rspamd.com/apt/gpg.key | apt-key add -
	echo "deb http://rspamd.com/apt/ $CODENAME main" > /etc/apt/sources.list.d/rspamd.list
	echo "deb-src http://rspamd.com/apt/ $CODENAME main" >> /etc/apt/sources.list.d/rspamd.list
	apt-get update
	apt-get install rspamd

To learn your codename, you could try command `lsb_release -s -c` from the package called `lsb-release`.

## Development resources

Rspamd uses [github](https://github.com) as the main development platform. Should you have any questions
about rspamd development then you can visit:

<https://github.com/vstakhov/rspamd>


text:
# Change Log
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

Generated by [auto-changelog](https://github.com/CookPete/auto-changelog)

## Unreleased

### Fixed
* Fixed badges and added flavours, Touches #14 Resolves #8 [`#8`](https://github.com/SAFAD/Moshi/issues/8)
* Textarea is now cute and charming : Resolves #7 [`#7`](https://github.com/SAFAD/Moshi/issues/7)
* Resolves #10 : task runner is finished no need for clean task [`#10`](https://github.com/SAFAD/Moshi/issues/10)
* Resolves #5 : Bye Bye Prelude [`#5`](https://github.com/SAFAD/Moshi/issues/5)

repository: SAFAD/Moshi

repo_name: SAFAD/Moshi


text:
---
layout: post
title: "OS: Journaling File Systems"
date: 2016-11-28
sources: lecture; Modern Operation Systems, Tanenbaum & Bos
type: summary
---

## Why are Journaling File Systems Used?
When a user modifies files, the computer initially stores these modifications in main memory and then writes the modifications to disk, which takes more time. If the computer crashes before fully writing the changes to disk, the disk could hold inconsistent files. For example, file directories on disk might point to garbage if directories are updated before their files. Even if the computer only performs bottom-up updates to avoid this problem, garbage blocks could still exist. For example, the computer might update a file but crash before it updates the directory to point to the updated file. To avoid this problem, journaling file systems make consistent updates.

## How Do Journaling File Systems Work?

### Transactions
Journaling File Systems group operations into transactions, and ensure that these transactions have the following properties (ACID):

* Atomicity: each transaction either happens fully or not at all
* Consistency: each transaction brings the system to a valid state
* Isolation: transactions have the appearance of occuring sequentially (though a certain sequence is not specified)
* Durability: transactions remain in place after they have occurred

### Logging
When carrying out a transaction, the system creates a log and performs the write-ahead process. This process writes operations that carry out the transaction in the log and writes the log to disk. Each of these operations must be idempotent. Then, it writes "commit" at the end of the log and begins the write-behind process. In this process, the system writes the log's updates to disk and then clears the log.

The computer needs to make sure that logs survive a system crash. To do this, it could write the log to disk, but this adds a large amount of overhead. Instead, the computer can write the log to NVRAM. NVRAM, another form of nonvolatile memory, is smaller than disk but writing to NVRAM takes less time. However, since the log does not include a lot of data, it can be stored on NVRAM.

### Dealing with Crashes
After a system crashes, it looks at the log. If the log has a "commit" statement, then the system re-starts the write-behind process from the beginning of the log. Since each operation in the log is idempotent, it is okay that the system might carry out an operation multiple times.


text:
# Validator HTTP Daemon

You can start the validator as an HTTP-Server. This server is based on the [JDK HTTP server](https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html) functionality
and should work with OpenJDK based distributions. Keep this in mind, if you want to deploy this in production scenarios with heavy load.

## Basic usage

To use the validator daemon as is, start the _Daemon-Mode_ with the `-D` option and supply a suitable
 [validator configuration](configurations.md).

```shell
java -jar  validationtool-<version>-standalone.jar  -s <scenario-config-file> -D
```

Per default the HTTP-Server listens on _localhost_ at Port 8080.

You can configure the daemon with `-H` for IP Adress and `-P` for port number:

```shell
java -jar  validationtool-<version>-standalone.jar  -s <scenario-config-file> -D -H 192.168.1.x -P 8081
```

## Customized usage

You can also leverage the API to create a customized version of the daemon. Just instantiate, configure and start the daemon like this:

````java
Configuration config = Configuration.load(...);

Daemon daemon = new Daemon();
daemon.setPort("8090");
// further config goes here
daemon.startServer(config);
````

The possible customizations are:

* `bindAddress` - the interface to bind the daemon to
* `port` - the port to expose
* `threadCount` - number of worker threads to handle results
* `guiEnabled` - enable or disable the basic GUI with usage information

## Access the HTTP interface

The validation service listens to `POST`-requests on any server URL. You need to supply the xml/object to validate in the HTTP body.
The last segment of the request URI is treated as the name of the input. E.g. requests to `/myfile.xml`, `/mypath/myfile.xml` and `/mypath/myfile.xml?someParam=1`
would all result in an input named `myfile.xml`. If you don't specify a specific request URI (e.g. POST to `/`), the name is auto generated for you.

The service expects a single XML input in the HTTP body, e.g. `multipart/form-data` is NOT supported.

Examples:

* `cURL`
```shell script
curl --location --request POST 'http://localhost:8080' \
--header 'Content-Type: application/xml' \
--data-binary<EMAIL_ADDRESS>```

* `java` (Apache HttpClient)
```java
HttpClient httpClient = HttpClientBuilder.create().build();
HttpPost postRequest = new HttpPost("http://localhost:8080/");
FileEntity entity = new FileEntity(Paths.get("some.xml").toFile(), ContentType.APPLICATION_XML);
postRequest.setEntity(entity);
HttpResponse response = httpClient.execute(postRequest);
System.out.println(IOUtils.toString(response.getEntity().getContent()));
```

* `javascript`
```javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/xml");

var file = "<file contents here>";

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: file,
  redirect: 'follow'
};

fetch("http://localhost:8080", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

* `PHP` (Symfony HttpClient)
```php
$httpClient = HttpClient::create();

$response = $httpClient->request('POST', 'http://localhost:8080', [
  'headers' => [
    'Content-Type' => 'application/xml',
  ],
  'body' => fopen('/path/to/some.xml', 'r'),
]);

echo $response->getContent();

```

## Status codes
| code | description |
|-|-|
| 200  | The xml file is acceptable according to the scenario configurations |
| 400 | Bad request. the request contains errors, e.g. no content supplied  |
| 405 | Method not allowed. Thec check service is only answering on POST requests |
| 406 | The xml file is NOT acceptable according to the scenario configurations|
| 422 | Unprocessable entity. Indicates an error while processing the xml file. This hints to errors in the scenario configuration |
| 500 | Internal server error. Something went wrong |

## Authorization
There is no mechanism to check, whether client is allowed to consume the service or not. The user is responsible to secure access to the service.
This can be done using infrastructural service like a forwarding proxies (e.g. `nginx` or `Apache http server`) or by implementing a custom solution.

## Monitoring and administration

The validation service can be integrated in monitoring solutions like `Icinga` or `Nagios`. There is a `health` endpoint exposed under `/server/health` wich returns some basic information about the service like memory consumption, general information about the version and a status `UP` as an XML file.

## GUI

The daemon provides a simple GUI when issuing `GET` requests providing the following:

 1. usage information
 1. information about the actual [validator configuration](configurations.md) used by this daemon
 1. a simple form to test the daemon with custom inputs

 The GUI can be disabled using the API (see above) or via CLI:

 ```shell script
java -jar  validationtool-<version>-standalone.jar  -s <scenario-config-file> -D --disable-gui
```


text:
---
title: Moving away from Meetup
author: mvaltie
date: 2019-10-14T22:54:27+00:00
url: /2019/10/14/moving-away-from-meetup/
categories:
  - Chicago

---
It's been an interesting day for user group and event organizers. A friend shared Sam Stepanyan's [tweet][1] that started it all:

      If you are using #MeetUp it's time to look for an alternative provider: from November they will charge you $1 per RSVP of a FREE event, so if you have 1000 attendees RSVP-ing to your FREE meetup you as the organiser will be charged $1000 per meetup https://t.co/eq78hPRW2b pic.twitter.com/HSaBFTXYOY

— Sam Stepanyan (@securestep9)

    October 14, 2019

That's right, either your attendees pay $2 to attend an event you want to put on \*for free\* or absorb the fees as the organizer of a free event.

The [replies to Sam's twee][1]t keep growing. There is plenty of good reading there on alternatives and reactions. Could it be a cash grab for parent company WeWork? What are other tools? Are alternatives mature enough? Could Meetup inflate attendee numbers and charge organizers ridiculous fees?

I want to know what other group organizers are doing. So far, I've heard from international folks that non-profit status will help. Others already use Meetup Pro and are shielded from the fees. One AWS ugroup leader suggested Amazon/AWS just build their own platform for us!

## Off to Eventbrite for me.

What I want to know is what's next. I've polled Slack groups, emailed fellow organizers, and generally searched for how others are reacting.

Just deleting the AWS Chicago Meetup group and events is not an option, since that is how most AWS users find us. We have over 4,700 people in the group (now I wonder if those are all real!?). Each monthly event draws about 200 RSVPs, and roughly 60 attendees.

#### Doing it right unintentionally

For over a year now I've been double creating events in Eventbrite and posting to Meetup. Luckily, I've been on to something.

On Meetup, I do not allow folks to RSVP, and instead direct them to Eventbrite. I started this in January 2018 when an event host's building required a exact list of attendee names that matched IDs to get in. More than 5 user group members promised they'd RSVP'd but weren't on the meetup list. Meetup does not give me, the organizer/group owner a good way to export an attendee list – it's a PDF of people's meetup names. So a "Bob S" or "sequin37" can register but that's pretty useless for ID checks.

I hated having to turn people away from that event so I switched to the Meetup-as-an-advertisement and Eventbrite-as-event-tool set up. It's another step user group members have to go through. I have to double post events (and frequently make typos). I also started using an email list to announce events and drive people to Eventbrite.

 Here's what I do:

  * create Eventbrite event once I have all the details – date, time, location, sponsor/host, and talk topics. Copy link.
  * create Meetup event and copy/paste info from Eventbrite. I click through ‘create' ‘announce' and then quickly select ‘close to rsvps'
  * add link to Eventbrite event in at least 3 locations on the Meetup page
  * email the group via Meetup announcements and the mailing list (I use Mailchimp) with links to Eventbrite
  * share on twitter and Linkedin. Then do it again 2 weeks before and the week of.
  * still answer emails like this:

<img src="http://<IP_ADDRESS>/wp-content/uploads/2019/10/email-1-1-667x1024.jpg" alt="" class="wp-image-2290" />

## Questioning the approach

**should AWS Chicago charge attendees to encourage accurate headcount?** NO! This is a gating factor to anyone who can't pay electronically. I want free, open, equitable events.

**should AWS Chicago just pay up for Meetup Pro?** I'm strongly opposed to paying this ransom to support an organization that is so poorly run.

**can AWS Chicago just use Eventbrite?** Maybe. Meetup does seem to be the way new folks find the AWS user group so I'd hate for anyone to miss out on finding the group. Meetup is unfortunately pretty embedded into tech user events and communities. Eventbrite is built for one-off events and I find it hard to build community through it. There is no concept joining or managing a group on Eventbrite (yet?).

## A quick rant on how terribly this was announced

  1. Organizers / group owners found out when everyone else did. Heck, I found out from a link to a tweet. I still haven't seen an email from Meetup or any details for group owners.
  2. Changes to the announcement page throughout the day. Originally the page had a $1 option but it's been updated. Luckily [someone captured changes. ][2]
  3. Zero heads up. The top of the page says "Beginning in October" but the FAQs says "at the end of October". TODAY IS OCTOBER 14TH. Time is kinda key here, especially for the planners.

 [1]: https://twitter.com/securestep9/status/1183798804371386369?s=12
 [2]: https://web.archive.org/web/20191014195239/https://www.meetup.com/lp/paymentchanges?mpId=9038

repository: margaretvaltie/blog

repo_name: margaretvaltie/blog


text:
> The Issues page for this repository is not a support forum, it is for reporting potential bugs in this module, which
[composes](https://github.com/koajs/compose) webpack-hot-middleware and webpack-dev-middle for use with koa2.
If you have arrived here because you cannot get [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middlewar)
or [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware/) working, please review the documentation
for the respective middleware you are experiencing a problem with. If you proceed with this form, please fill out *_all_* fields, or your issue may be closed as "invalid." Please remove this header to acknowledge this message.

* Node Version:
* NPM Version:
* koa Version:
* koa-wepback Version:

If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.

```js
// webpack.config.js
```

```js
// app.js
```

### Expected Behavior

### Actual Behavior

### How can we reproduce the behavior?

repository: JimmyRice/rsshubdocs

repo_name: JimmyRice/rsshubdocs


text:
---
title: "Idobo75"
summary: ""
crosslink: "true"
authors: [glennji]
tags: [ortholinear, 75key]
categories: [Keyboards]
date: 2020-07-21T16:13:20+10:00
---
The Idobo75 kit from YMDK comes with a coffee-brown aluminium case and backplate, and hot-swappable, QMK-programmable
PCB. I'll be installing Kailh brown switches (because I have some, and to stick with the coffee colouring) and DSA
keycaps. It's an ortholinear 'board, which may take some getting used to but I'm hopeful that the extra keys (5x15 = 75)
will let me add Fn keys as I miss those from the GK61.

Hopefully the case is sturdier than the "hover plates" that come with the Nyquist and Planck boards (do I even have the
Planck kit anywhere? Weird), and once the pandemic is over I can impress some people at work with my strangeness.

> An ortholinear keyboard that’s designed to increase efficiency and reduce finger travel when typing, the 75 Keys aluminum kit comes with everything you’ll need to build a functioning mechanical keyboard.
>
> Crafted with CNC'd aluminum, the case is durable and stable. What’s more, the hot-swappable switch inserts allow you to swap out switches on the fly, without ever picking up a soldering iron.
>
> The PCB supports RGB LEDs if you want to set the tone with underlighting. Backed by a Type-C USB connection, the keyboard connects to most new laptops and computers.

repository: glennji/website

gha_language: HTML

repo_name: glennji/website