text:
## testcontainers

[![Build Status](https://travis-ci.com/romnnn/testcontainers.svg?branch=master)](https://travis-ci.com/romnnn/testcontainers)
[![GitHub](https://img.shields.io/github/license/romnnn/testcontainers)](https://github.com/romnnn/testcontainers)
[![GoDoc](https://godoc.org/github.com/romnnn/testcontainers?status.svg)](https://godoc.org/github.com/romnnn/testcontainers)  [![Test Coverage](https://codecov.io/gh/romnnn/testcontainers/branch/master/graph/badge.svg)](https://codecov.io/gh/romnnn/testcontainers)
[![Release](https://img.shields.io/github/release/romnnn/testcontainers)](https://github.com/romnnn/testcontainers/releases/latest)

A collection of pre-configured [testcontainers](https://github.com/testcontainers/testcontainers-go) for your golang integration tests.

Available containers (feel free to contribute):
- MongoDB (based on [mongo](https://hub.docker.com/_/mongo))
- Zookeeper (based on [bitnami/zookeeper](https://hub.docker.com/r/bitnami/zookeeper))
- Kafka (based on [wurstmeister/kafka](https://hub.docker.com/r/wurstmeister/kafka))

#### Usage

```golang
import (
	"context"
	"testing"
	"time"

	tc "github.com/romnnn/testcontainers"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/mongo/options"
)

// TestDatabaseIntegration tests datababase logic
func TestDatabaseIntegration(t *testing.T) {
	// Start the container
	mongoC, mongoConfig, err := tc.StartMongoContainer(tc.MongoContainerOptions{})
	if err != nil {
		t.Fatalf("Failed to start mongoDB container: %v", err)
	}
	defer mongoC.Terminate(context.Background())

	// Connect to the container
	client, err := mongo.NewClient(options.Client().ApplyURI(mongoConfig.ConnectionURI()))
	if err != nil {
		t.Fatalf("Failed to create mongo client: %v", err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
	defer cancel()
	client.Connect(ctx)

	// TODO: Connect to the database using the URI and implement testDatabaseFunction!
	if err := testDatabaseFunction(client); err != nil {
		t.Fatalf("myDatabaseFunction failed with error: %v", err)
	}
}
```

For full examples of all available containers, see `examples/`.

#### Development

######  Prerequisites

Before you get started, make sure you have installed the following tools::

    $ python3 -m pip install -U cookiecutter>=1.4.0
    $ python3 -m pip install pre-commit bump2version invoke ruamel.yaml halo
    $ go get -u golang.org/x/tools/cmd/goimports
    $ go get -u golang.org/x/lint/golint
    $ go get -u github.com/fzipp/gocyclo
    $ go get -u github.com/mitchellh/gox  # if you want to test building on different architectures

**Remember**: To be able to excecute the tools downloaded with `go get`,
make sure to include `$GOPATH/bin` in your `$PATH`.
If `echo $GOPATH` does not give you a path make sure to run
(`export GOPATH="$HOME/go"` to set it). In order for your changes to persist,
do not forget to add these to your shells `.bashrc`.

With the tools in place, it is strongly advised to install the git commit hooks to make sure checks are passing in CI:
```bash
invoke install-hooks
```

You can check if all checks pass at any time:
```bash
invoke pre-commit
```

Note for Maintainers: After merging changes, tag your commits with a new version and push to GitHub to create a release:
```bash
bump2version (major | minor | patch)
git push --follow-tags
```

#### Note

This project is still in the alpha stage and should not be considered production ready.

repository: leopetter/testcontainers

repo_name: leopetter/testcontainers


text:
---
title: Introducing our official Telegram bot
date: 2021-05-01
---

Since Cusdis have [Webhook](https://cusdis.com/doc#/advanced/webhook) support, users can integrate Cusdis with their own tools. I'm a huge fan of Telegram, which is a messaging app with a focus on security and speed. I made a Telegram bot for my own, when I have new comment on my blog, I will receive a message in Telegram and I can also approve or reply without login:

![](./telegram-bot.png)

I notice that we have some users are using Telegram too. It makes me think about making my bot public and every Telegram users can use without implementing their own bot server.

So we are introducing our official Telegram bot now. It's super easy to setup:

1. Open and start bot https://t.me/CusdisBot
2. send `/gethook` command
3. Copy the URL result and paste in Cusdis project's webhook settings

Besides, this bot works for both hosted service and self-host service.

See more about the Webhook in [documentation](https://cusdis.com/doc#/advanced/webhook).

Here is the source code of this bot: https://github.com/djyde/cusdis-telegram-bot

repository: Cusdis/blog

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Cusdis/blog


text:
# Getting started

## Install TorchServe and torch-model-archiver

1. Install dependencies

    Note: For Conda, Python 3.8 is required to run Torchserve.

    #### For Debian Based Systems/ MacOS

     - For CPU

        ```bash
        python ./ts_scripts/install_dependencies.py
        ```

     - For GPU with Cuda 10.2. Options are `cu92`, `cu101`, `cu102`, `cu111`, `cu113`, `cu116`

       ```bash
       python ./ts_scripts/install_dependencies.py --cuda=cu102
       ```

     Note: PyTorch 1.9+ will not support cu92 and cu101. So TorchServe only supports cu92 and cu101 up to PyTorch 1.8.1.

    #### For Windows

    Refer to the documentation [here](docs/torchserve_on_win_native.md).

2. Install torchserve, torch-model-archiver and torch-workflow-archiver

    For [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install)
    Note: Conda packages are not supported for Windows. Refer to the documentation [here](docs/torchserve_on_win_native.md).
    ```
    conda install torchserve torch-model-archiver torch-workflow-archiver -c pytorch
    ```

    For Pip
    ```
    pip install torchserve torch-model-archiver torch-workflow-archiver
    ```

Now you are ready to [package and serve models with TorchServe](#serve-a-model).

## Serve a model

This section shows a simple example of serving a model with TorchServe. To complete this example, you must have already [installed TorchServe and the model archiver](#install-torchserve-and-torch-model-archiver).

To run this example, clone the TorchServe repository:

```bash
git clone https://github.com/pytorch/serve.git
```

Then run the following steps from the parent directory of the root of the repository.
For example, if you cloned the repository into `/home/my_path/serve`, run the steps from `/home/my_path`.

### Store a Model

To serve a model with TorchServe, first archive the model as a MAR file. You can use the model archiver to package a model.
You can also create model stores to store your archived models.

1. Create a directory to store your models.

    ```bash
    mkdir model_store
    ```

1. Download a trained model.

    ```bash
    wget https://download.pytorch.org/models/densenet161-8d451a50.pth
    ```

1. Archive the model by using the model archiver. The `extra-files` param uses a file from the `TorchServe` repo, so update the path if necessary.

    ```bash
    torch-model-archiver --model-name densenet161 --version 1.0 --model-file ./serve/examples/image_classifier/densenet_161/model.py --serialized-file densenet161-8d451a50.pth --export-path model_store --extra-files ./serve/examples/image_classifier/index_to_name.json --handler image_classifier
    ```

For more information about the model archiver, see [Torch Model archiver for TorchServe](model-archiver/README.md)

### Start TorchServe to serve the model

After you archive and store the model, use the `torchserve` command to serve the model.

```bash
torchserve --start --ncs --model-store model_store --models densenet161.mar
```

After you execute the `torchserve` command above, TorchServe runs on your host, listening for inference requests.

**Note**: If you specify model(s) when you run TorchServe, it automatically scales backend workers to the number equal to available vCPUs (if you run on a CPU instance) or to the number of available GPUs (if you run on a GPU instance). In case of powerful hosts with a lot of compute resources (vCPUs or GPUs), this start up and autoscaling process might take considerable time. If you want to minimize TorchServe start up time you should avoid registering and scaling the model during start up time and move that to a later point by using corresponding [Management API](docs/management_api.md#register-a-model), which allows finer grain control of the resources that are allocated for any particular model).

### Get predictions from a model

To test the model server, send a request to the server's `predictions` API. TorchServe supports all [inference](docs/inference_api.md) and [management](docs/management_api.md) api's through both [gRPC](docs/grpc_api.md) and [HTTP/REST](docs/rest_api.md).

#### Using GRPC APIs through python client

 - Install grpc python dependencies :

```bash
pip install -U grpcio protobuf grpcio-tools
```

 - Generate inference client using proto files

```bash
python -m grpc_tools.protoc --proto_path=frontend/server/src/main/resources/proto/ --python_out=ts_scripts --grpc_python_out=ts_scripts frontend/server/src/main/resources/proto/inference.proto frontend/server/src/main/resources/proto/management.proto
```

 - Run inference using a sample client [gRPC python client](ts_scripts/torchserve_grpc_client.py)

```bash
python ts_scripts/torchserve_grpc_client.py infer densenet161 examples/image_classifier/kitten.jpg
```

#### Using REST APIs

As an example we'll download the below cute kitten with

![kitten](images/kitten_small.jpg)

```bash
curl -O https://raw.githubusercontent.com/pytorch/serve/master/docs/images/kitten_small.jpg
```

And then call the prediction endpoint

```bash
curl http://<IP_ADDRESS>:8080/predictions/densenet161 -T kitten_small.jpg
```

Which will return the following JSON object

```json
[
  {
    "tiger_cat": 0.46933549642562866
  },
  {
    "tabby": 0.4633878469467163
  },
  {
    "Egyptian_cat": 0.06456148624420166
  },
  {
    "lynx": 0.0012828214094042778
  },
  {
    "plastic_bag": 0.00023323034110944718
  }
]
```

All interactions with the endpoint will be logged in the `logs/` directory, so make sure to check it out!

Now you've seen how easy it can be to serve a deep learning model with TorchServe! [Would you like to know more?](docs/server.md)

### Stop TorchServe

To stop the currently running TorchServe instance, run:

```bash
torchserve --stop
```

### Inspect the logs
All the logs you've seen as output to stdout related to model registration, management, inference are recorded in the `/logs` folder.

High level performance data like Throughput or Percentile Precision can be generated with [Benchmark](benchmark/README.md) and visualized in a report.

### Install TorchServe for development

If you plan to develop with TorchServe and change some source code, you must install it from source code.

Ensure that you have `python3` installed, and the user has access to the site-packages or `~/.local/bin` is added to the `PATH` environment variable.

Run the following script from the top of the source directory.

NOTE: This script uninstalls existing `torchserve`, `torch-model-archiver` and `torch-workflow-archiver` installations

#### For Debian Based Systems/ MacOS

```
python ./ts_scripts/install_dependencies.py --environment=dev
python ./ts_scripts/install_from_src.py
```

Use `--cuda` flag with `install_dependencies.py` for installing cuda version specific dependencies. Possible values are `cu111`, `cu102`, `cu101`, `cu92`

#### For Windows

Refer to the documentation [here](docs/torchserve_on_win_native.md).

For information about the model archiver, see [detailed documentation](model-archiver/README.md).


text:
---
title: Interacting with Monero | Monero Documentation
---
# Interacting with Monero

You can interact with Monero via desktop GUI, commandline interface, and programming API.

On top of that, Monero nodes interact with each other in a peer-to-peer network.

## Installation directory overview

Once unpacked you will see several executable files. You will also find a nice PDF guide for the GUI wallet.

Monero project nicely decouples network node logic from wallet logic.
Wallet logic is offered through three independent user interfaces - the GUI, the CLI, and the HTTP API.

```
# cd monero-gui-v<IP_ADDRESS>

# ---- guide to Monero GUI ----

monero-GUI-guide.pdf

# ---- executable files -----------

monerod

monero-wallet-cli
monero-wallet-gui
monero-wallet-rpc

monero-gen-trusted-multisig

monero-blockchain-export
monero-blockchain-import

monero-blockchain-mark-spent-outputs
monero-blockchain-usage
monero-blockchain-ancestry
monero-blockchain-depth

start-gui.sh

# ---- directories ----------------

libs
plugins
qml
```

## Executables - what is what

| Executable                 | Description
| -------------------------- |:-----------------------------------------------------------------------------------------------------------------------------------
| `monerod`                  | The full node daemon. Does not require a wallet.
[Documentation](/interacting/monerod-reference/).
| `monero-wallet-gui`        | Wallet logic and __graphical__ user interface.
Requires `monerod` running.
| `monero-wallet-cli`        | Wallet logic and __commandline__ user interface.
Requires `monerod` running.
| `monero-wallet-rpc`        | Wallet logic and __HTTP API__ (JSON-RPC protocol).
Requires `monerod` running.
| `monero-blockchain-export` | Tool to export blockchain to `blockchain.raw` file.
| `monero-blockchain-import` | Tool to import [blockchain.raw](https://downloads.getmonero.org/blockchain.raw) - ideally your own trusted copy.
| `monero-gen-trusted-multisig`          | Tool to generate a set of multisig wallets.
See chapter on [multisignatures](/multisignature).
| `monero-blockchain-mark-spent-outputs` | Advanced tool to mitigate potential privacy issues related to Monero forks. You normally shouldn't be concerned with that.
See the [commit](https://github.com/monero-project/monero/commit/df6fad4c627b99a5c3e2b91b69a0a1cc77c4be14#diff-0410fba131d9a7024ed4dcf9fb4a4e07) and [pull request](https://github.com/monero-project/monero/pull/3322).
| `monero-blockchain-usage`              | Advanced tool to mitigate potential privacy issues related to Monero forks. You normally shouldn't be concerned with that.
See the [commit](https://github.com/monero-project/monero/commit/0590f62ab64cf023d397b995072035986931a6b4) and the [pull request](https://github.com/monero-project/monero/pull/3322).
| `monero-blockchain-ancestry`           | Advanced research tool to learn ancestors of a transaction, block or chain. Irrelevant for normal users. See this [pull request](https://github.com/monero-project/monero/pull/4147/files).
| `monero-blockchain-depth`              | Advanced research tool to learn depth of a transaction, block or chain. Irrelevant for normal users. See this [commit](https://github.com/monero-project/monero/commit/289880d82d3cb206a2cf4ae67d2deacdab43d4f4#diff-34abcc1a0c100efb273bf36fb95ebfa0).

## Interacting

There are quite a few ways you can interact with Monero software.
Perhaps the most surprising for newcomers is that `monerod` daemon accepts interactive keyboard commands while it is running.

Also, please note that HTTP API is split across `monerod` and `monero-wallet-rpc`. You need to run and call both daemons to explore the full API.
This follows the node-logic vs wallet-logic split mentioned earlier.

All wallet implementations depend on the `monerod` running.

| Executable                 | p2p network         | node commands via keyboard | node HTTP API | wallet commands via keyboard | wallet HTTP API | wallet via GUI
| -------------------------- | ------------------- | -------------------------- | ------------- | ---------------------------- | --------------- | --------------
| `monerod`                  | ✔                   | ✔                          | ✔             |                              |                 |
| `monero-wallet-cli`        |                     |                            |               | ✔                            |                 |
| `monero-wallet-rpc`        |                     |                            |               |                              | ✔               |
| `monero-wallet-gui`        |                     |                            |               |                              |                 | ✔

## Data directory

This is where the blockchain, log files, and p2p network memory are stored.

By default data directory is at:

* `$HOME/.bitmonero/` on Linux and macOS
* `C:\ProgramData\bitmonero\` on Windows

Please mind:

* data directory is hidden as per OS convention
* the `bitmonero` directory name is historical artefact from before Monero forked away from Bitmonero, about 2000 years Before Christ

Data directory contains:

* `lmdb/` - the blockchain database directory
* `p2pstate.bin` - saved memory of discovered and rated peers
* `bitmonero.log` - log file

It can also contain subdirectories for stagenet and testnet, mirroring the same structure:

* `stagenet/` - data directory for Stagenet
* `testnet/` - data directory for Testnet

license: MIT

repository: knaccc/md

gha_license_id: MIT

repo_name: knaccc/md


text:
# Notes About Docker

First you must almost always use `sudo` for some weird reasons based on how I installed with apt-get?, not sure why and not a fan. Mentally add it to all the commands listed below.
It may be possible to deal with [via this](https://docs.docker.com/engine/install/linux-postinstall/).

### Stopping a Container

Run `docker ps` and get a list of the containers running find the id you want to kill and copy it.
Then run `docker kill <ID>`

### Checking installed containers / sizes
`docker images`

### Build a Docker Container

The docker file in Rally of Rockets has some extra notes on the dockerfile, not many, good luck.
`docker build --tag tyrebytes/<CONTAINER_LABEL> -f dockerfile ../`

### Run / Test the container

Run the docker file and let it make port 5000 on the machine act as 9999 inside the container. If a game-server in the container listened on port A the docker container listens on port B and send that to the game as it would expect.
`docker run -p 5000:9999 tyrebytes/rally-of-rockets`

`docker run -it -p 9999:9999 tyrebytes/rally-of-rockets:alpha0.0.2 /bin/bash`

license: Unlicense

branch_name: refs/heads/main

gha_language: JavaScript

gha_license_id: Unlicense


text:
This is an add-on can be used to automatically purchase items at the vendor.
Personal Shopper works by creating a vitual shopping list that is consulted when you visit a vendor.
You may add an item and a quantity to your shopping list, and each time you visit a vendor that sells that item,
Personal Shopper will purchase a number of that item up to that quantity.

# Getting started
1. install World of Warcraft Classic
2. on this web page, click the green **Clone or download** button above and to the right
3. click **Download ZIP**
4. once the ZIP is downloaded, open it on your desktop
5. open the `PersonalShopper-master` folder inside the ZIP file
6. open a new Windows File Explorer window (Windows key + E) and use it to open the World of Warcraft Classic beta installation directory (if you installed World of Warcraft in its default location, you can copy and paste this into the address bar for Windows File Explorer: `%PROGRAMFILES(X86)%\World of Warcraft\_classic_`)
7. open the `Interface` folder (if it doesn't exist, create it)
8. open the `AddOns` folder (if it doesn't exist, create it)
9. copy the `PersonalShopper` folder from the ZIP file into the `AddOns` folder

# Using Personal Shopper
1. the base slash command for using Personal Shopper is /shopper. Entering this by itself will display the help page.
2. enter "/shopper help" into the chat window to see a list of the available slash commands
3. enter "/shopper list" to view your current shopping list. If you list is empty, nothing will be displayed.
4. enter "/shopper add [item link] X" (where [item link] is the actual link to the intended item and X is the intended quantity)
   to add the item and desired quantity to your shopping list. Once an item is in your shopping list, Personal Shopper will buy that item    up to the desired quantity. It will not buy that quantity each time you visit the vendor. Rather, it checks how many of the item you      currently posess and it will buy enough of the item to where you posses X number of the item.
   Note: if the item is already in your list and you enter a new quantity, Personal Shopper will update the list entry with the new          quantity.
5. enter "/shopper remove [item link]" (where [item link] is the actual link to the intended item) to remove an item from your shopping      list

repository: Cormeer/PersonalShopper

gha_language: Lua

repo_name: Cormeer/PersonalShopper


text:
Ti=Termination

sec=Either party may terminate this {_Agreement} upon 30 days prior written notification to the other party.  If this {_Agreement} is so terminated, the parties shall be liable only for performance rendered or costs incurred in accordance with the terms of this {_Agreement} prior to the effective date of termination.

=[G/Z/ol/Base]

repository: CommonAccord/Cmacc-Org

gha_language: CSS

repo_name: CommonAccord/Cmacc-Org


text:
# MobileNewsWeather
jQuery-based mobile application for determining local weather and news using Yahoo and Google API’s.  This project was first created on October 7th, 2012 and was updated recently for changes in API's and to make use of React.

See the [live demo](http://gdicristofaro.github.io/MobileNewsWeather/)

repository: gdicristofaro/MobileNewsWeather

repo_name: gdicristofaro/MobileNewsWeather


text:
![Logo](https://github.com/libobjc/SGPlayer/blob/master/documents/banner.jpg?raw=true)

![Build Status](https://img.shields.io/badge/build-%20passing%20-brightgreen.svg)
![Platform](https://img.shields.io/badge/Platform-%20iOS%20macOS%20tvOS%20-blue.svg)

# SGPlayer

- SGPlayer is a powerful media play framework for iOS, macOS, and tvOS.

## Based On

- FFmpeg
- Metal
- AudioUnit

## Features

- iOS, tvOS, macOS.
- 360° panorama video.
- Background playback.
- RTMP/RTSP streaming.
- Setting playback speed.
- Multiple audio/video tracks.
- H.264/H.265 hardware accelerator.

## Build

```obj-c
git clone https://github.com/libobjc/SGPlayer.git
cd SGPlayer
git checkout 2.0.1 -B latest

// iOS
./build.sh iOS build

// tvOS
./build.sh tvOS build

// macOS
./build.sh macOS build
```

## Usage

- Open demo/demo.xcworkspace with Xcode.

## Dependencies

```obj-c
- SGPlayer.framework
- AVFoundation.framework
- AudioToolBox.framework
- VideoToolBox.framework
- libiconv.tbd
- libbz2.tbd
- libz.tbd
```

## Flow Chart

![Flow Chart](https://github.com/libobjc/SGPlayer/blob/master/documents/flow-chart.jpg?raw=true)

## Related

- [KTVHTTPCache](https://github.com/ChangbaDevs/KTVHTTPCache) - A smart media cache framework.
- [KTVVideoProcess](https://github.com/ChangbaDevs/KTVVideoProcess) - A High-Performance video effects processing framework.

## Communication

- GitHub : [Single](https://github.com/libobjc)
- Email<EMAIL_ADDRESS>

repository: MaddTheSane/SGPlayer

branch_name: refs/heads/madds

gha_language: Objective-C

repo_name: MaddTheSane/SGPlayer


text:
[![Travis-CI Build Status](https://travis-ci.org/magosil86/getmstatistic.svg?branch=master)](https://travis-ci.org/magosil86/getmstatistic)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/magosil86/getmstatistic/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/magosil86/getmstatistic.svg)](https://github.com/magosil86/getmstatistic/issues)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/getmstatistic)](https://cran.r-project.org/package=getmstatistic)
[![Coverage status](https://codecov.io/gh/magosil86/getmstatistic/branch/master/graph/badge.svg)](https://codecov.io/github/magosil86/getmstatistic?branch=master)
[![CRAN_Logs_Rstudio](https://cranlogs.r-pkg.org/badges/grand-total/getmstatistic)](http://cran.rstudio.com/web/packages/getmstatistic/index.html)

# [getmstatistic]()

_M_ - An aggregate statistic, to identify systematic heterogeneity patterns and their direction of effect in meta-analysis

## Overview

 _M_ quantitatively describes systematic (non-random) heterogeneity patterns acting across multiple variants in a GWAS meta-analysis. It's primary use is to identify outlier studies, which either show "null" effects or consistently show stronger or weaker genetic effects than average across, the panel of variants examined in a meta-analysis.

 _M_ differs from conventional heterogeneity metrics (Q-statistic, I2), in that, it measures heterogeneity across multiple independently associated variants, whilst (Q-statistic, I2) measure heterogeneity at individual variants. Essentially, _M_ measures systematic heterogeneity, whilst (Q-statistic, I2) measure random variant-specific heterogeneity.

### Sources of systematic heterogeneity
Systematic heterogeneity can arise in a meta-analysis due to differences in the study characteristics of participating studies. Some of the differences may include: ancestry, allele frequencies, phenotype definition, age-of-disease onset, family-history, gender, linkage disequilibrium and quality control thresholds.

### Practical benefits of exploring systematic heterogeneity

* Reveal studies showing systematically weaker effects than average which could lower the power of a meta-analysis to detect genetic signals. For example, outlier studies that pass typical quality control checks (genotype call rate, Hardy-Weinberg equilibrium cutoffs, genomic control) but might show no association with phenotype of interest due to faulty genotype data (e.g. flipped alleles and/or strands, incorrect minor allele frequencies).

* Reveal studies showing systematically stronger effects than average which can elucidate biologically important differences among the studies e.g. sexual dimorphism or sub-phenotype variability.

## Installation: Stata

* Install getmstatistic [**Stata** command](https://github.com/magosil86/getmstatistic) from SSC

1. Start stata
2. To install the getmstatistic stata module: `ssc install getmstatistic`
3. To get the example dataset in your current working directory: `net get getmstatistic`
4. You're all set, getmstatistic is installed, try some of the examples in the getmstatistic help file

Tip! getmstatistic depends on the following user-written Stata commands which can be installed
 using `ssc install package-name` or findit `package-name`:

* latabstat
* metareg
* savesome
* tabstat
* qqvalue

A full list of getmstatistic dependencies can be found in the help file.

---

* Install getmstatistic [**Stata** command](https://github.com/magosil86/getmstatistic) manually

* Download the getmstatistic zip file: [getmstatistic_0.1.1_stata_ssc.zip](https://github.com/magosil86/getmstatistic/blob/master/getmstatistic_0.1.1_stata/getmstatistic_0.1.1_stata_ssc.zip)

```
1. Unzip the folder

Tip! the folder should contain the following files: getmstatistic.ado getmstatistic.sthlp heartgenes214.dta

2. Start stata

3. Locate your personal directory where stata stores user generated files by typing: `sysdir`
sysdir

Tip! on mac the ado/personal directory is likely to be at: ~/Library/Application Support/Stata/ado/personal/
for linux: ~/ado/personal/
for windows: c:\ado\personal\

4. Copy getmstatistic.ado and getmstatistic.sthlp to the g sub-directory in personal

Tip! if the g sub-directory does not exist, that just means you do not have user generated commands
that start with the letter g. In that case create a folder named g in the personal directory.

5. Type help getmstatistic in Stata to open the getmstatistic help file.

6. Load the example dataset: heartgenes214.dta

7. You're all set, getmstatistic is installed, try some of the examples in the getmstatistic help file

```

## Installation: getmstatistic [**R** package](https://github.com/magosil86/getmstatistic)

```{r}
# To install the release version from CRAN:
install.packages("getmstatistic")

# Load libraries
library(getmstatistic)  # for calculating M statistics
library(gridExtra)      # for generating tables

# To install the development version from GitHub:

# install devtools
install.packages("devtools")

# install getmstatistic
library(devtools)
devtools::install_github("magosil86/getmstatistic")

# Load libraries
library(getmstatistic)  # for calculating M statistics
library(gridExtra)      # for generating tables

```

## Usage

*  Take a look at an [example workflow](https://github.com/magosil86/getmstatistic/blob/master/vignettes/getmstatistic-tutorial.md)

## Details

* Essentially, _M_ statistics are computed by aggregating standardized predicted random effects (SPREs). To read up about the statistical theory behind the _M_ statistic see:

Magosi LE, Goel A, Hopewell JC, Farrall M, on behalf of the CARDIoGRAMplusC4D Consortium (2017) Identifying systematic heterogeneity patterns in genetic association meta-analysis studies. PLoS Genet 13(5): e1006755. [https://doi.org/10.1371/journal.pgen.1006755](https://doi.org/10.1371/journal.pgen.1006755).

## Getting help

To suggest new features, learn about getmstatistic updates, report bugs, ask questions about the mstatistic, or just interact with other users, sign up to the [getmstatistic](https://groups.google.com/forum/#!forum/getmstatistic) mailing list.

## Code of conduct
Contributions are welcome. Please observe the [Contributor Code of Conduct](https://github.com/magosil86/getmstatistic/blob/master/CONDUCT.md) when participating in this project.

## Citation
Magosi LE, Goel A, Hopewell JC, Farrall M, on behalf of the CARDIoGRAMplusC4D Consortium (2017) Identifying systematic heterogeneity patterns in genetic association meta-analysis studies. PLoS Genet 13(5): e1006755. [https://doi.org/10.1371/journal.pgen.1006755](https://doi.org/10.1371/journal.pgen.1006755).

## Acknowledgements.
Roger M. Harbord’s metareg command for computation of standardized predicted random effects which are then incorporated into calculations for the _M_ statistics. Harbord, R. M., & Higgins, J. P. T. (2008). Meta-regression in Stata. Stata Journal 8: 493‚Äì519.

## Authors.
Lerato E. Magosi, Jemma C. Hopewell and Martin Farrall.

## Maintainer.
Lerato E. Magosi<EMAIL_ADDRESS>or<EMAIL_ADDRESS>
## License

See the [LICENSE](https://github.com/magosil86/getmstatistic/blob/master/LICENSE) file.

gha_language: R

gha_license_id: NOASSERTION


text:
# Grind

An event management app developed for an android technical test.

### Requirements

The following functionality was to be implemented

```
● User can create Events by entering:
  ○ Event Title
  ○ Start Date and End Date
  ○ Start Time and End Time
  ○ Event Description
● The Event should be saved to local database
● One should be able to list the events, edit the Event and Delete the Event
```

### Additional functionality

Additional points were to be awarded for the folowing

```
1. Filter the events by Date and Time
2. Search for an event
3. Upload the data to firebase Storage
```

## Deployment

A precompiled apk is available [here](https://github.com/poppinjay13/Grind/releases/tag/v1.0-beta). Feel free to install and review it.

## Authors

* **Ian Odundo** - [Github](https://poppinjay13.github.io/)

## License

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

## Acknowledgments

* Illustrations used are by [Sidhitta Upare](https://dribbble.com/siddhitaupare)


text:
Pet Store
=========

Pet Store is a web portal which can be used by the customers for ordering accessories for their Pets.

This sample is a simple webapp which consists of 5 Docker images (4 microservices and a container to serve the web portal).

* Catalog (Catalog of the accessories available in the pet store)
* Customers (Existing customers of the Pet Store)
* Orders (Orders placed at the Pet Store by Customers)
* Controller (Controller service which fetches data from the above 3 microservices and processes them to provide useful functionality)
* Portal (A simple Node JS container serving a React App with Server Side Rendering)

All 4 micro services are implemented in [node.js](https://nodejs.org/en/) and portal web application is a [React](https://reactjs.org/) application.

This sample is structured into two Cells.

* [pet-be Cell](pet-be/README.md)
* [pet-fe Cell](pet-fe/README.md)

![Pet Store Cell Architecture Diagram](../../docs/images/pet-store/pet-store-architecture.jpg)

## [pet-be cell](pet-be/README.md)
This contains the four components which involves with working with the Petstore data and business logic Only catalog
micro service exposed via cell pet-fe gateway which is used by pet-fe cell. Catalog, customer, and order micro services are not exposed outside the pet-be cell.

## [pet-fe cell](pet-fe/README.md)
This contains a single component `portal`, and it is exposed through a web cell which is able to provide SSO and web content delivery features.

This Pet store sample includes,

1. [Quick run](#quick-run)
2. [View application](#view-application)
3. [Build the cells by your own](#build-the-cells-by-your-own)
4. [Test cell](#run-cell-integration-tests)
4. [Observability](#observability)
5. [Update cell](#update-cell-with-new-version)
6. [Scale cell](#scale-cell)

## Quick run
1. Pet store application can be started by executing the single command as shown below. For more details about flags
refer [here](https://github.com/wso2/cellery/blob/master/docs/cli-reference.md#cellery-run).
```
 $ cellery run wso2cellery/pet-fe-cell:latest -n pet-fe -l petStoreBackend:pet-be -d
```
2. Executed `cellery list instances` and make sure pet-be and pet-fe cells are `Ready` as shown below.
```
  $ cellery list instances

  INSTANCE             CELL IMAGE             STATUS           GATEWAY           COMPONENTS           AGE
 ---------- -------------------------------- -------- ------------------------- ------------ ---------------------
  pet-be     wso2cellery/pet-be-cell:latest   Ready    pet-be--gateway-service   4            2 hours 47 minutes
  pet-fe     wso2cellery/pet-fe-cell:latest   Ready    pet-fe--gateway-service   1            3 hours 16 minutes
```
3. Now view the application by following the [instructions](#view-application).

## View application
Make sure you have configured the host entries correctly as mentioned in [local](https://github.com/wso2/cellery/blob/master/docs/setup/local-setup.md),
[gcp](https://github.com/wso2/cellery/blob/master/docs/setup/gcp-setup.md#configure-host-entries) and [existing setup](https://github.com/wso2/cellery/blob/master/docs/setup/existing-cluster.md#configure-host-entries) before
proceeding to following steps.

1. Access the petstore add via accessing [http://pet-store.com/](http://pet-store.com/). You will be landed in the home page of cellery.
As `/` is configured to be as unsecured context as described [here](pet-fe/README.md), you can see the content of home page without logging in.

2. Click on `sign in`, and you will be directed to the default IDP installed within cellery runtime. You can sign in as user alice (Username: alice, Password: alice123),
and fill the customer information form. This operation will invoke the controller and customer micro-services from the pet store portal web application.

![customer info](../../docs/images/pet-store/customer-info.png)

![pet preference info](../../docs/images/pet-store/pet-preference.png)

3. Once you logged in to the portal application, you can add items to the cart. And then click on the cart to checkout the items. This operation will invoke controller and catalog micro-services.

![add to cart](../../docs/images/pet-store/add-to-cart.png)

![checkout](../../docs/images/pet-store/checkout.png)

4. Return to the home page and click on the orders button which will show the orders placed by that user.

![orders](../../docs/images/pet-store/orders.png)

5. You can logout from pet-store as alice user, and you can login as different user admin (Username: admin, Password:admin), and check for orders, which will
return a empty orders as admin user hasn't placed any order. Therefore, you can realize the pet-store application user specific information.

## [Build the cells by your own](../../docs/pet-store/build-and-run.md)
If you are interested getting in working more with Cellery, you can build and run the sample in your own. You can also make the changes to the
cell files, or actual source of this sample and try out. Please follow the instructions provided [here](../../docs/pet-store/build-and-run.md)
to build and run the pet store application.

Checkout the application source of the [pet-fe](../../src/pet-store/pet-fe/portal) and [pet-be](../../src/pet-store/pet-be),
and feel free to play around the source code.  Follow the instructions provided [here](../../src/pet-store) to build from source.

## [Run cell integration tests](../../docs/pet-store/test-be-cell.md)
You can test the cell endpoints by running cell integration tests. Try running integration tests to validate the
orders endpoint of the Petstore backend by following the instructions given [here](../../docs/pet-store/test-be-cell.md).

## [Observability](../../docs/pet-store/observability.md)
You can observe the pet-store application in runtime, and view cell overeview, request traces, metrics, dependency diagram and much more.
Cellery observability mainly supported by [Cellery Dashboard](https://github.com/wso2/cellery/blob/master/docs/cellery-observability.md#use-cellery-dashboard).
Please follow the instructions provided [here](../../docs/pet-store/observability.md) to use observability with pet-store.

## [Update cell with new version](../../docs/pet-store/component-patch-and-adv-deployment.md)
In this section, we focus on how the cells can be updated in the runtime without having a considerable downtime. Cellery supports rolling updates,
and advanced deployments such as blue-green and canary updates. In this sample, we provide step-by-step details on how to update a component of pet-be cell with the new
version by rolling update, and update a new version of complete cell via blue-green and canary update.
Please follow the instructions provided [here](../../docs/pet-store/component-patch-and-adv-deployment.md) to update the pet-be cell.

## [Scale cell](../../docs/pet-store/scale-cell.md)
In this section, we focus on attaching autoscaling policy and zero scaling policy to pet-be cell. We also use a load-gen
cell to generate the load and test the functionality. Please follow the instructions [here](../../docs/pet-store/scale-cell.md) to get more detailed steps.

# Did you try?
1. [Hello world](../hello-world)
2. [Hello world Api](../hello-world-api)

# What's Next?
- [Hipster shop sample](../../cells/hipster-shop/README.md) - A sample that shows the cellery usage with the original
micro services demo [here](https://github.com/GoogleCloudPlatform/microservices-demo).

repository: hasinthaindrajee/samples

repo_name: hasinthaindrajee/samples


text:
---
title: Inference and Representation Fall 2017 Final Project Proposal
author:
- Zhi-Wei Li
- Alexander Rich
- Anselm Rothe
institute: New York University
geometry: margin=1in
header-includes:
---

Topic models have been used successfully to capture structure in large text
corpora and make these corpora more human-understandable (Blei, Ng & Jordan
2003). However, traditional topic models to not capture the temporal ordering of
documents, and the way topics change over time. Dynamic topic models address
this issue by allowing topic mixing proportions and the distribution of words in
topics to change as a function of time (Blei & Lafferty 2006). In this project, we will apply dynamic
topic modeling to 35 years of the Proceedings of the Cognitive Science Society
to understand and visualize how the research topics of the society have changed
over its history.

# Data Set

The Proceedings of the Cognitive Science Society are a representative corpus of
the ongoing research in the cognitive science community, and are available
online for the 3rd through 38th annual conferences (1981-2016). While we have
not yet counted the documents in the corpus, we expect it to be on the order of
10,000 documents, with each document about 6 pdf pages long. Older proceedings
were scanned and processed using OCR, so there may be some issues with data
quality for these earlier years. We will likely preprocess this data set using
stemming and/or lemmatization techniques, and remove common words that do not
carry interesting meaning.

# Model

We will implement a dynamic topic model (DTM) as described by Blei and Lafferty
(2006). As with traditional topic models, documents are assumed to be generated
by a model in which topic proportions are first generated according to a
Dirichlet distribution, words are assigned to topics according to a multinomial
distribution based on the topic proportions, and then words are generated
according to a multinomial distribution based on the assigned topic. In a
dynamic topic model, topic proportions and word distributions within a topic are
both allowed to drift over time according to a logistic normal distribution. The
full graphical model is summarized in Figure @fig:model. To fit the DTM to our data set,
we will write the model as a directed graphical model using the Stan modeling
language (Stan Development Team, 2017). We will then fit the model using Stan’s
built-in variational inference algorithm.

![
Full graphical model of a dynamic topic model (DTM).
](figures/model.png){#fig:model width=300px}

# Evaluation

Following Blei and Lafferty, we will evaluate the model by fitting the model to
all data up to a given year, and then testing its ability to predict the
articles from that year. For comparison, we will also test traditional topic
models trained on all previous years and on only the most recent previous year.

# Deliverables

Our goal is to use our model to understand how the field of cognitive science
has changed over time, as attempted with traditional topic models by Cohen
Priva & Austerweil (2015) for the journal Cognition (which focuses more squarely
on cognitive psychology). To achieve this, we plan to visualize the models’
topics and their change over time in an understandable manner. Building off the
work of Blei and Lafferty (see Figure @fig:trends), we will visualize each topic by
showing its shifting popularity (i.e., proportion) over time, top words over
time, and a selection of article titles typical of the topic over time. We will
also perform analyses to reveal which topics have changed the most and least in
popularity over time, and which have changed most and least in the distribution
of words within the topics.

![
Trends uncovered by the DTM in Blei and Lafferty (2006).
](figures/trends.png){#fig:trends}

# Acknowledgements

We were granted an exception to form a team of 3 (instead of 2) students by Joan after the lecture on Oct 16.

# References

Blei, D., & Lafferty, J.D. (2006). Dynamic topic models. Proceedings of the 23rd international Conference on Machine Learning. ICML '06, 113-120.

Blei, D.M., Ng, A.Y., & Jordan, M.I. (2003). Latent Dirichlet Allocation. Journal of Machine Learning Research. 993-1022.

Cohen Priva, U., & Austerweil, J.L. (2015). Analyzing the history of Cognition using Topic Models.

Stan Development Team. 2017. The Stan Core Library, Version 2.16.0. http://mc-stan.org

repository: anselmrothe/dtm

repo_name: anselmrothe/dtm


text:
# Vert.x Redis Client

[![Build Status](https://github.com/vert-x3/vertx-redis-client/workflows/CI/badge.svg?branch=master)](https://github.com/vert-x3/vertx-redis-client/actions?query=workflow%3ACI)

The Vert.x Redis client provides an asynchronous API to interact with a [Redis](http://redis.io) data-structure server.

## Running the tests

In order to run the tests, it is expected that a simple cluster is setup in the test environment, you can do this by
running the following container:

```bash
docker run -d \
  -e 'IP=<IP_ADDRESS>' \
  -e 'STANDALONE=true' \
  -e 'SENTINEL=true' \
  -p '7000-7007:7000-7007' \
  -p '5000-5002:5000-5002' \
  grokzen/redis-cluster:latest
```

## Documentation:

The documentation can be read from the official vert.x [Documentation](http://vertx.io/docs/vertx-redis-client/java/).

repository: nsquarednz/vertx-redis-client

repo_name: nsquarednz/vertx-redis-client


text:
+++
title = "Using Cassandra in Grafana"
description = "Guide for using Cassandra in Grafana"
keywords = ["grafana", "cassandra", "guide"]
type = "docs"
[menu.docs]
name = "Cassandra"
parent = "datasources"
weight = 7
+++

# Using Cassandra in Grafana

Grafana ships with a built-in Cassandra data source plugin that allow you to query and visualize
data from a Cassandra.

## Adding the data source

1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select `Cassandra` from the `Type` dropdown.

### Database User Permissions (Important!)

The database user you specify when you add the data source should only be granted SELECT permissions on
the specified database and tables you want to query. Grafana does not validate that the query is safe. The query
could include any CQL statement. For example, statements like `USE otherdb;` and `DROP TABLE user;` would be
executed. To protect against this we **Highly** recommend you create a specific cassandra user with
restricted permissions.

##### Example:

```cql
 CREATE USER IF NOT EXISTS grafana_reader WITH PASSWORD password;
 GRANT SELECT PERMISSION ON KEYSPACE keyspace_name TO grafana_reader;
```

To use password authentication in cassandra edit cassandra.yaml:
```
authenticator: PasswordAuthenticator
role_manager: CassandraRoleManager
```

## Macros

To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros.

Macro example | Description
------------ | -------------
*$__timeFilter(timestamp_column)* | Will be replaced by a time range filter using the specified column name. For example, *WHERE time_column ><PHONE_NUMBER>8344672745 AND time_column <=<PHONE_NUMBER>8344972745*

The query editor has a link named `Generated CQL` that show up after a query as been executed, while in panel edit mode. Click
on it and it will expand and show the raw interpolated CQL string that was executed.

## Table queries

If the `Format as` query option is set to `Table` then you can basically do any type of CQL query. The table panel will automatically show the results of whatever columns and rows your query returns.

You can control the name of the Table panel columns by using regular `as ` CQL column selection syntax.

##### Example:

New dashboard -> Singlestat -> Edit -> Data source: cassandra -> Format as: Table
Query: `SELECT now() FROM system.local`

### Time series queries

If you set `Format as` to `Time series`, for use in Graph panel for example, then there are some requirements for
what your query returns.

- Must be a column named `time_ms` representing a unix epoch in milliseconds.
- Must be a column named `value` representing the time series value.
- Must be a column named `metric` representing the time series name.

##### Example:

New dashboard -> Graph -> Edit -> Data source: cassandra -> Format as: Time series
Query: `SELECT key_column, $__time(timestamp_column), name_column AS metric, value_column AS value FROM test.grafana_test WHERE key_column = 'key1' AND filter_column = 'filter1' AND $__timeFilter(timestamp_column)`

```cql
CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 };

CREATE TABLE IF NOT EXISTS test.grafana_test (
    key_column text,
    filter_column text,
    timestamp_column timestamp,
    name_column text,
    value_column decimal,
    PRIMARY KEY (key_column, filter_column, timestamp_column, name_column)
)  WITH compaction = { 'class' : 'LeveledCompactionStrategy' };

INSERT INTO test.grafana_test (key_column, filter_column, timestamp_column, name_column, value_column) VALUES ('key1', 'filter1', toTimestamp(now()), 'AA', 30);
INSERT INTO test.grafana_test (key_column, filter_column, timestamp_column, name_column, value_column) VALUES ('key1', 'filter1', toTimestamp(now()), 'BB', 80);

INSERT INTO test.grafana_test (key_column, filter_column, timestamp_column, name_column, value_column) VALUES ('key1', 'filter1', toTimestamp(now()), 'AA', 150);
INSERT INTO test.grafana_test (key_column, filter_column, timestamp_column, name_column, value_column) VALUES ('key1', 'filter1', toTimestamp(now()), 'BB', 100);

INSERT INTO test.grafana_test (key_column, filter_column, timestamp_column, name_column, value_column) VALUES ('key1', 'filter1', toTimestamp(now()), 'AA', 70);
INSERT INTO test.grafana_test (key_column, filter_column, timestamp_column, name_column, value_column) VALUES ('key1', 'filter1', toTimestamp(now()), 'BB', 130);
```

repository: pjta/grafana

repo_name: pjta/grafana


text:
---
layout: default
---

# 1996-09-18 - Re: Fear of Flying -- from HotWired

## Header Data

From<EMAIL_ADDRESS>(Bill Frantz)

To: Black Unicorn<EMAIL_ADDRESS>Message Hash: bb3e525cb79243b6aade7e6238b9bd09d3016c2af2c1214cf1e30466237b313c

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-09-18 20:20:17 UTC

Raw Date: Thu, 19 Sep 1996 04:20:17 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Bill Frantz)
Date: Thu, 19 Sep 1996 04:20:17 +0800
To: Black Unicorn<EMAIL_ADDRESS>Subject: Re: Fear of Flying -- from HotWired
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At  1:21 AM 9/18/96 -0400, Black Unicorn wrote:
>> On Thu, 12 Sep 1996 12:03:18 -0700, Bill Frantz wrote:
>> >Gee, biotech has come a long way.  Now I can download the Anthrax DNA
>> >sequence from the net and insert it in some carrier bacteria and start
>> >making Anthrax bacteria.  Neat!
>
>Culturing and growing anthrax is painfully simple.  No DNA required.

Sorry Unicorn, you missed my point.  (1) You need DNA to grow bacteria.
You can get the DNA two ways.  (A) You get a sample of the beast, or (B)
You get a DNA sequence and then regenerate the DNA.  (I don't think B is
technically feasable yet.)  (2) You can't send samples of the beast thru
the net.

-------------------------------------------------------------------------
Bill Frantz       | "Cave softly, cave safely, | Periwinkle -- Consulting
(408)356-8506     | and cave with duct tape."  | 16345 Englewood Ave.
<EMAIL_ADDRESS>|           - Marianne Russo | Los Gatos, CA 95032, USA

{% endraw %}
```

## Thread

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

+ Return to "[Black Unicorn <unicorn@schloss.li>](/authors/black_unicorn_unicorn_at_schloss_li_)"
+ Return to<EMAIL_ADDRESS>(Bill Frantz)](/authors/frantz_at_netcom_com_bill_frantz_)"

+ 1996-09-18 (Thu, 19 Sep 1996 04:20:17 +0800) - Re: Fear of Flying -- from HotWired -<EMAIL_ADDRESS>(Bill Frantz)_
  + 1996-09-18 (Thu, 19 Sep 1996 06:47:43 +0800) - [Re: Fear of Flying -- from HotWired](/archive/1996/09/1f6e06635e6a1bfca0ab8616ed6ba438b275aaf89b2ce2a667d6b3cabf296385) - _Black Unicorn<EMAIL_ADDRESS>


text:
---
layout: post
title:      "'# CLI Gem Project'."
date:       2019-11-15 13:53:27 -0500
permalink:  cli_gem_project
---

What can I say? This was really hard as a first project. I am sitting here trying to finish up what I can for my review, which I will have in less than 3 hours. I have been working non-stop for days, and in the last 48 hours literally non-stop, only a few hours of sleep.

My project is not complete however I am going to do my best to walk through it and get through this assessment. A lot of my time has been spent reviewing notes and going back to labs to try to accomplish a task. I think using time more wisely would have been helpful for me.

Organizing and noting everything I wanted to do for my project in a lot more detail would have also been helpful. I noted multiple errors and tried not to spend hours on them and come back at another time, but some I had to spend time on to move forward. Or so I thought.

Where I am really stuck is scraping to the next level. I watched videos, reviewed notes, asked some questions, yet it still was not clicking for me.

Honestly, the most rewarding part was seeing my code work, but is unrewarding is not fully being able to explain how it works or how I achieved it. I was able to get gem and cli to work, but some parts are not.
I take this as a major lesson learned, even though I really tried and spent so many hours working, yet still struggling up to this point. I am feeling down about having my assessment with uncomplete work, but also motivated to still learn what is needed. I know this is the first of many with projects, but this will only drive me to go harder.

extension: markdown


text:
---
title: "Speak Up & Stay Safe(r)"
weight: 2
---

We recommend you check out this robust walkthrough created by Jaclyn Friedman, Anita Sarkeesian, and Renee Bracey Sherman:

- {{% icon read %}} [GUIDE: Speak Up & Stay Safe\(r\)](https://onlinesafety.feministfrequency.com/en/)

We'll highlight a few ways we suggest you implement their guidance for the SJMD conversations we hope you'll be having as a result of your participation in this course.

repository: sjmd/dotcommunity

gha_language: HTML

repo_name: sjmd/dotcommunity


text:
# Getting Started Suggestions

To learn more, there are many free and available tutorials for React, including the [official React Tutorial](https://reactjs.org/tutorial/tutorial.html) or [the React Docs](https://reactjs.org/docs/getting-started.html).

Ready to get started with a new React project? Some suggestions:

* [create-react-app](https://github.com/facebook/create-react-app) provides an easy, one-line command to bootstrap a new React project and get moving.

    * Other options are well documented on the documentation page [Create a New React App](https://reactjs.org/docs/create-a-new-react-app.html).

* Use an IDE such as [Visual Studio Code](https://code.visualstudio.com/).

* Employ the use of ESLint and the VSCode ESLint extension.

    * ESLint already comes configured with _create-react-app_-built applications.

* Check out the React Ecosystem pages again for popular libraries to enhance the new application.

repository: pgeeh/first-to-react

repo_name: pgeeh/first-to-react


text:
---
layout: default
---

# 1996-06-04 - Re: Fate of Ecash if RSA is cracked?

## Header Data

From: Alan Horowitz<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 1b03a77106c25f7e00740e4c30d243cc5c5f4ba1fa1d6e8a618293c782c38e0a

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-06-04 05:10:12 UTC

Raw Date: Tue, 4 Jun 1996 13:10:12 +0800

## Raw message

```
{% raw  %}From: Alan Horowitz<EMAIL_ADDRESS>Date: Tue, 4 Jun 1996 13:10:12 +0800
To<EMAIL_ADDRESS>Subject: Re: Fate of Ecash if RSA is cracked?
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

US SEcret Service was always on top of criminal counterfeiting. I make
that "criminal" distinction becaue there is allegedly a phenomenon of
low-intensity-warfare going on, with Iran sponsoring more-or-less perfect
counterfeits of hundred dollar bills.

Criminal counterfeiting was a dangerous game. Secret Service pretty much
knew every individuial/company who was involved in bona fide use of the
relevant papers, inks, engraving/printing equipments, etc., and anyone
ordering any of this stuff from the very limited number of suppliers, was
placed under watch. It's a small world out there, kids.

{% endraw %}
```

## Thread

+ Return to [June 1996](/archive/1996/06)

+ Return to "[Alan Horowitz <alanh@infi.net>](/authors/alan_horowitz_alanh_at_infi_net_)"
+ Return to<EMAIL_ADDRESS>(Dr. Dimitri Vulis)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_)"
+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to<EMAIL_ADDRESS>(Greg Miller)](/authors/gregmi_at_galileo_mis_net_greg_miller_)"
+ Return to<EMAIL_ADDRESS>(Igor Chudov @ home)](/authors/ichudov_at_algebra_com_igor_chudov__at__home_)"
+ Return to "["Perry E. Metzger" <perry@piermont.com>](/authors/perry_e_metzger_perry_at_piermont_com_)"

+ 1996-06-03 (Mon, 3 Jun 1996 09:26:23 +0800) - [Fate of Ecash if RSA is cracked?](/archive/1996/06/fb2d83a6483363d32569472743ff6d6f491298b01d1925577b56c422c83a5b96) -<EMAIL_ADDRESS>(Igor Chudov @ home)_
  + 1996-06-03 (Mon, 3 Jun 1996 12:51:40 +0800) - [Re: Fate of Ecash if RSA is cracked?](/archive/1996/06/5cc91c3e1067f5547fc1dc47e13d4837afe0cac9b8bbc1a1288ffe7abf116341) -<EMAIL_ADDRESS>(Dr. Dimitri Vulis)_
    + 1996-06-03 (Mon, 3 Jun 1996 16:05:37 +0800) - [Re: Fate of Ecash if RSA is cracked?](/archive/1996/06/c474a5f1481645a5081e3008057cb78c31bab5d6a8159f47a8c265fe40b980a9) -<EMAIL_ADDRESS>(Igor Chudov @ home)_
      + 1996-06-04 (Tue, 4 Jun 1996 15:12:40 +0800) - [Re: Fate of Ecash if RSA is cracked?](/archive/1996/06/d91e62c1db4475b8dd41893e317173447cc4ea2c8fd9f5c2ab811ee852d9f580) -<EMAIL_ADDRESS>(Greg Miller)_
    + 1996-06-03 (Tue, 4 Jun 1996 05:41:40 +0800) - [Re: Fate of Ecash if RSA is cracked?](/archive/1996/06/4575fd671753ce84b80d6dce24ff9aabbeeaa31dbabe69d50690bce46bdffb14) - _"Perry E. Metzger"<EMAIL_ADDRESS>  + 1996-06-03 (Mon, 3 Jun 1996 15:11:21 +0800) - [Re: Fate of Ecash if RSA is cracked?](/archive/1996/06/c281b0149d32d7956bf2f18c667f04983ec6869d2100f401eb67736b821430b6) -<EMAIL_ADDRESS>(Greg Miller)_
  + 1996-06-04 (Tue, 4 Jun 1996 13:10:12 +0800) - Re: Fate of Ecash if RSA is cracked? - _Alan Horowitz<EMAIL_ADDRESS>    + 1996-06-04 (Tue, 4 Jun 1996 15:59:38 +0800) - [Re: Fate of Ecash if RSA is cracked?](/archive/1996/06/c2e225bf57c24da2b91f393268a11de7d38560a64da9e6d1c7b7cfdec99dee1d) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_


text:
# ADOdb Entities

This program creates [ADOdb](https://github.com/ADOdb/ADOdb) active record classes for a given database model.  This program is intended for use in a database-first approach.

Running `create-entities.php` will read the tables in your database and creates simple active record classes based on the table structure.

# Usage

Example:

    php create-entities.php --hostname=<db host> --database=<db name> --namespace=<namespace of generated classes> --outputDirectory=<directory to write the generated files to>

The list of available options are:

* driver: the ADOdb database driver to use (default "mysqli")
* hostname: the name of the database host (default "localhost")
* username: the username used to login to the database (default "root")
* password: the username's password (default "")
* database: the name of the database to generate active record classes for (default "")
* namespace: the PHP namespace to write at the top of the generated files (default "Models")
* outputDirectory: the directory where the generated files will be written (default "./")  This is typically the directory in your project where you want the model classes to reside.
* includeOverrideMethods: adds method stubs to the generated classes that override some of ADOdb's `ADODB_Active_Record` methods.  This will provide better type-hinting when using the generated classes without changing the functionality of the methods.

repository: jasonmm/adodb-entities

repo_name: jasonmm/adodb-entities


text:
---
name: Task
about: Create a task that should be worked on but is neither a bug nor enhancement
title: ""
labels: best practices
assignees: ''

---

## Task Context
<!---
A clear and concise description of what the task is.
-->

## Acceptance Criteria / Goals
<!---
A list of acceptance criteria and/or goals that need to be fulfilled
in order to consider this task completed.
-->

## Additional Notes
<!---
Add any other notes regarding the task if needed.
-->

Please refer to [CONTRIBUTING.md](https://github.com/jmakhack/hydrate-reminder/blob/master/CONTRIBUTING.md) for info on how to setup, build, run, and test this project.

repository: jmakhack/hydrate-reminder

gha_language: Java

repo_name: jmakhack/hydrate-reminder


text:
---
date: "2020-10-20"
title: "C# 10 First Look: Constant string interpolation"
description: "Constant string interpolation looks to be set for C# 10—let's take a look."
tags: [csharp]
image: /assets/img/constant-string-interpolation.png
---

C# 9 is finally here, everybody.

This summer, we took a look at most of its core features. We looked at [init-only features](https://daveabrock.com/2020/06/29/c-sharp-9-deep-dive-inits), [records](https://daveabrock.com/2020/07/06/c-sharp-9-deep-dive-records), [pattern matching](https://daveabrock.com/2020/07/06/c-sharp-9-pattern-matching), [top-level programs](https://daveabrock.com/2020/07/09/c-sharp-9-top-level-programs), and [target typing and covariant returns](https://daveabrock.com/2020/07/14/c-sharp-9-target-typing-covariants).

Now, we can look forward to C# 10 (what is also referred to as *C# Next*). You probably think I'm crazy to be writing about C# 10 so early—and I am!—but there's a feature slated for C# 10 that looks all set to go, [constant string interpolation](https://github.com/dotnet/csharplang/issues/2951)—a request that's been [hanging out on GitHub since 2015](https://github.com/dotnet/roslyn/issues/4678). Fred Silberberg from the Roslyn team says that [it's implemented in a feature branch and will likely be part of C# 10](https://github.com/dotnet/csharplang/issues/2951#issuecomment-696784012). As a matter of fact, if you [head over to SharpLab](https://sharplab.io/), there's a **C# Next: Constant Interpolated Strings** branch you can play with that's been out there since ... October 18, 2020.

While it's madness to write about a new language feature so early, I don't think it's too crazy to talk about *this specific feature*. It's super easy to implement so I don't see that part changing too much—only when it gets shipped.

We'll discuss the following content in this post.

- [An absurdly quick example](#an-absurdly-quick-example)
- [Why can't I do that now?](#why-cant-i-do-that-now)
- [What about culture impacts?](#what-about-culture-impacts)
- [Wrap up](#wrap-up)

**Heads up!** This should go without saying, but things may change between now and the C# 10 release date. In other words: 🤷♂.
{: .notice--warning}

# An absurdly quick example

These days—in C# 9 or earlier, that is—if you want to merge constant strings together, you will have to use concatenation, and not interpolation (or remove them as `const` variables altogether).

A common use is with paths. In current times, you *have* to do this if you are working with constant strings:

```csharp
const string myRootPath = "/src/to/my/root";
const string myFilePath = myRootPath + "README.md";
```

With constant string interpolation, you can do this:

```csharp
const string myRootPath = "/src/to/my/root";
const string myWholeFilePath = $"{myRootPath}/README.md";
```

Constant interpolated strings would be super convenient when working with attribute arguments. Let's say you want to flag a method with the [ObsoleteAttribute](https://docs.microsoft.com/dotnet/api/system.obsoleteattribute?view=netcore-3.1). Try this:

```csharp
[Obsolete($"Ooh, don't use me. Instead, use {nameof(MyBetterType)}.")]
```

# Why can't I do that now?

When I learned about string interpolation back in C# 6, I was excited to think I'd never have to do concatenation again—so this is a bummer. Why can't I do it, anyway?

If you try to use constant string interpolation in C# 9, you'll get this error back:

```bash
error CS0133: The expression being assigned to 'myFilePath' must be constant
```

When you use string interpolation, the interpolated strings end up getting converted to `string.Format` calls. Once you understand that point, you'll see it as:

```csharp
const string myFilePath = string.Format("{0}/README.md", myRootPath);
```

While it may look like a constant at compile time, it isn't because of the `string.Format` invocation. Of course, concatenation works fine since as there's hardly any magic gluing two string literals together.

# What about culture impacts?

While you may think that your string in question is just constants, you might be wrong and it might not be completely obvious. Even something as simple as outputting a float has impacts across cultures.

For example, here in the US I can do this:

```csharp
Console.WriteLine($"{1200.12}") // output: 1200.12;
```

Try a different culture, and the results are different (and, to our point, not constant):

```csharp
CultureInfo.CurrentCulture = new CultureInfo("es-ES", false);
Console.WriteLine($"{1212.12}"); // output: 1200,12
```

When it comes to constant string interpolation, will there be unintentional side effects when working with culture dependencies? The team insists [that won't be an issue](https://github.com/dotnet/csharplang/issues/2951#issuecomment-559196393):

>This feature won't work in this scenarios. It'll only work for interpolating other constant strings, so locale is not a concern. It's really just a slightly different syntax for string concatenation.

# Wrap up

In this post, we looked at constant string interpolation—a promising addition to C# 10. We discussed how to use it, the reasons why you can't use it now, and addressed culture impacts.

If you're interested in what is currently slated for the next release of C#, head over to the [Language Feature Status page](https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md) in the Roslyn GitHub repo.

gha_language: Ruby


text:
# Layers

Layers is a helper module for [nodejs](http://nodejs.org) web apps. It will
automatically load and loosely couple the layers of your web app.

Layers does not strictly prescribe which layers it supports. Instead it
facilitates the loading of the files which make up your web app running them
(if they're functions) or simply loading them if they're plain old javascript
objects and adding them as properties of your app/server object.

The app is then passed to the wiring function (see below) which wires up the
layers of your application.

Note. Layers v1.0.0 is simplification of 0.0.3 and has api breaking changes.
As of v1.0.0 layers will no longer wire up your application. Instead it will
simply load the components and namespace them on your app according to their
layer. Each component can setup routes or whatever is required of it when
it is initialised.

## Installation

To install Layers:

    $ npm install layers

## Usage

The Layers module accepts a server object (or app in the case of Express),
the path to the files making up your layers and a function which will return
the routes definition object (see Wiring section below).

i.e. for Express:

    var layers = require('layers');
    layers(app, {
        rootPath: __dirname + '/layers'
    });

## Loading Layers by directories

Each directory nested immediately within the layers directory defines a layer.

Each of these layer directories are recursively scanned for javascript files which are imported using require. The result of the require is inspected for two possibilities:

* An object
* A function which returns an object.

The object loaded or returned from the function is appended to the app object under the layer's namespace.

e.g.

/path/to/app/layers/controllers/BookController.js becomes app.IoC.controllers.bookController
/path/to/app/layers/services/AuthorService.js becomes app.IoC.services.authorService

One exception is made when loading the layer files: Any file whose name begins with "Base" is ignored.
This name can be overriden by specifying the `excludePrefix` option.

i.e.

    layers(app, {
        rootPath: __dirname + '/layers',
        excludePrefix: "Abstract"
    });

## Loading Layers by file names

If would like to group your packages by functionality, you can load your layers by file names and you may do it like so:

    layers(app, {
        rootPath: __dirname + '/layers',
        loadRecursivelyPerLayerName: true,
        layers: ['Service', 'Controller'],
        contextName: 'IOCupdated'
    });

e.g.

/path/to/app/layers/book/BookController.js becomes app.IOCupdated.controller.bookController
/path/to/app/layers/book/BookService.js becomes app.IOCupdated.service.bookService
/path/to/app/layers/author/AuthorController.js becomes app.IOCupdated.controller.authorController
/path/to/app/layers/author/AuthorService.js becomes app.IOCupdated.service.authorService

Please notice that the context name is configurable

## Layer Callbacks

If would like to run a callback after a layer has been processed, you may do it like so:

    layers(app, {
        rootPath: __dirname + '/layers',
        callbacks: {
            layername: function(){
                doThis();
            }
        }
    });

## License

(The MIT License)

Copyright (C) 2011 by Dave Elkan<EMAIL_ADDRESS>
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: tusciucalecs/layers

repo_name: tusciucalecs/layers


text:
Week 6 ― README
===============
<!-- vim-markdown-toc GFM -->
:
* [Materials](#materials)
* [Assignments](#assignments)

<!-- vim-markdown-toc -->

Materials
=========

Below are the materials at the center of week 1

+ readings:
  - lecture notes: [`ln_6.pdf`](week5/ln_5.pdf)
+ videos (shared via MS Teams):
  - topic modeling: `v_6`
+ Python scripts/Jupyter notebooks used in the webinar:
  - [`wb_6.ipynb`](week5/wb_5.ipynb): Jupyter notebook used for the application

Assignments
===========

+ `ps_5` is due by June 23 (8:00 PM)
+ `ps_6` due by June 30 (8:00 PM)


text:
# WALL3E I2C Controlled Bot
This sketch is for an Arduino Mega to receive commands from an Uno over an I2C bridge.

The Mega received command events from the I2C channel and then decodes the payload into instructions such as the direction and speed to move in.

## Notes
This code is currently very responsive but crashy- frequently it gets stuck moving in a direction and quits responding to events. This is likely due to the fake delay while loop counter.


text:
---
layout: post
title: linux cut 命令
categories: [cm, linux]
tags: [linux, find]
---

* 参考：
  * <https://shapeshed.com/unix-cut/>

`cut` , a UNIX and Linux command for cutting sections from each line of files.

The cut command in UNIX is a command line utility for cutting sections from each line of files and writing the result to standard output.

It can be used to cut parts of a line by byte position, character and delimiter. It can also be used to cut data from file formats like CSV.

## How to cut by byte position

use the -b option.

~~~ shell
echo 'baz' | cut -b 2
a
echo 'baz' | cut -b 1-2
ba
echo 'baz' | cut -b 1,3
bz
~~~

## How to cut by character

 use the -c option.

Where your input stream is character based -c can be a better option than selecting by bytes as often characters are more than one byte.

In the following example character ‘♣’ is three bytes. By using the -c option the character can be correctly selected along with any other characters that are of interest.

~~~ shell
echo '♣foobar' | cut -c 1,6
♣a
echo '♣foobar' | cut -c 1-3
♣fo
~~~

## How to cut based on a delimiter

use the `-d` option. This is normally used in conjunction with the `-f` option to specify the field that should be cut.

* names.csv
    ~~~
    John,Smith,34,London
    Arthur,Evans,21,Newport
    George,Jones,32,Truro
    ~~~

The delimiter can be set to a comma with `-d ','`. cut can then pull out the fields of interest with the `-f` flag.

~~~ shell
cut -d ',' -f 1 names.csv
John
Arthur
George
~~~

Multiple fields can be cut by passing a comma separated list.

~~~ shell
cut -d ',' -f 1,4 names.csv
John,London
Arthur,Newport
George,Truro
~~~

包括第二个字段以后所有字段

~~~ shell
cut -d ',' -f 2- names.csv

Smith,34,London
Evans,21,Newport
Jones,32,Truro
~~~

## How to cut by complement pattern (not available on the BSD)

use the `--complement` option. The `--complement` option selects the inverse of the options passed to sort.

~~~ shell
echo 'foo' | cut --complement -c 1
oo
~~~

## How to modify the output delimiter (not available on the BSD)

To modify the output delimiter use the `--output-delimiter` option.

In the following example a semi-colon is converted to a space and the first, third and fourth fields are selected.

~~~ shell
echo 'how;now;brown;cow' | cut -d ';' -f 1,3,4 --output-delimiter=' '
how brown cow
~~~

repository: netmicrobe/witech

repo_name: netmicrobe/witech


text:
# ✨ Features

- 🌈 Connect the pod in kubernetes cluster through the terminal to send instructions
- 🐿 The SSH protocol encapsulated by golang can run on both Linux and windows
- 🚀 It can run anywhere in the kubernetes cluster with the help of yaml files

# 🐱 To Do

- 🛡 Perfect log audit function

- ♾ Perfect API interface

- 👬 Multi user system

# 💡what is Kube console on SSH

> Kube console on SSH connects to kubernetes pod based on SSH protocol and does not rely on kubectl Exec command, because Kube console on SSH implements the service end of SSH, so you can use SSH command to connect to Kube console on SSH on any host. If you need to connect to pod on a large scale, you don't need to install kubectl everywhere to enter the container. Through SSH protocol, it is more convenient to enter the container, and more operations will be supported in the future

# 📦  How to install

- install kcos on kubernetes
```bash
// Run kube-console-on-ssh on kubernetes cluster
$ kubectl apply -f https://raw.githubusercontent.com/FrelDX/kcos/master/deploy/deploy.yaml
```
# ♾ Connection to kube-console-on-ssh

Using SSH client to connect to Kube console on SSH
```bash
#ssh nodeip:svcport
ssh <IP_ADDRESS> -p 2222
```

# 💻 How to use it

- Enter p to view the list of pods

- Enter quit to exit the program

- Enter the corresponding number into the corresponding container

- The default SSH password is 12345678, and the account can be any

![Large GIF (942x608)](./doc/readme.gif)
# 📦 Architecture-diagram
![kcos](./doc/kcos.png)

repository: FrelDX/kcos

gha_language: Go

repo_name: FrelDX/kcos


text:
# Update Log

* `0.10.0`
  * Add new traits matching the traits used to generate `zbus::Proxy{,Blocking}` structs.
  * Add new auto-implementations of the new traits for all `*Proxy` and `*ProxyBlocking` types.
  * Make the `Convertable` trait generic.
  * Make all `*Ext` traits generic.
    * NOTE: No implementations are provided for `AccessibleExtBlocking`.
    * Provide implementations of `*Ext` based on implementing (usually) `*` and `*ExtError` traits.
  * All of this means that the implementations are now generic over any type which implementes the appropriate traits.

repository: luukvanderduim/atspi

gha_language: Rust

repo_name: luukvanderduim/atspi


text:
# Clients

Clients will commonly issue `/check/...` requests via `HEAD`. `freno` responds by setting an appropriate [HTTP status code](https://github.com/github/freno/blob/master/doc/http.md#status-codes).

While `GET` method is also supported, the response for `HEAD` requests is shorter and involves less computation by `freno`. `GET` is more useful to humans.

Clients can be expected to issue many requests per second. `freno` is lightweight in resources. It should be just fine to hit `freno` hundreds of times per second. It depends on your hardware and resources, of course.

`freno` probes backend stores continuously and independently of client requests. Client requests merely pick up on the latest metrics collected by `freno`, and do not synchronously wait on servers to be polled.

It makes sense to hit `freno` in the whereabouts of the granularity one is looking at. If your client is to throttle on a `1000ms` replication lag, checking `freno` `200` times per sec may be overdoing it. However if you wish to keep your clients naive and without caching this should be fine.

It is also possible to ask `freno` to write metrics to [memcache](memcache.md), in which case clients can read metrics directly using their favorite `memcache` client.

# Usage samples

### Ruby

[freno-client](https://github.com/github/freno-client) is our official Ruby client for `freno`. It is open sourced and available as a Ruby Gem.

```ruby
require "freno/client"

FRENO_URL = "http://my.freno.com:9777"
faraday   = Faraday.new(FRENO_URL)
freno     = Freno::Client.new(faraday)

freno.check?(app: :my_app, store_name: :my_cluster)
# => true

freno.replication_delay(app: :my_app, store_name: :my_cluster)
# => 0.125
```

### pt-archiver / perl

[pt-archiver](https://www.percona.com/doc/percona-toolkit/2.2/pt-archiver.html) is probably the most popular tool for archiving table data. `pt-archiver` can use `freno` with a plugin. A plugin is available on [FrenoThrottler.pm](../resources/pt-archiver/FrenoThrottler.pm). To make it usable, you will need to:

- Let the plugin know where to find `freno` and which cluster to use (see sample code in comment in plugin file)
- Deploy the plugin. Sample `puppet` deployment would look something like:
  ```
  file { '/usr/share/perl5/FrenoThrottler.pm':
      ensure => file,
      owner  => 'root',
      group  => 'root',
      mode   => '0755',
      source => 'puppet:///modules/percona/usr/share/perl5/FrenoThrottler.pm';
  }
  ```

  This assumes `/usr/share/perl5` is in your `@INC` path (run `perl -e 'print "@INC"'` to confirm).

### shell

```shell
if curl -s -I http://my.freno.com:9777/check/myscript/mysql/main7 | grep -q "200 OK" ; then
  echo "Good to go, do some writes"
else
  echo "Need to throttle; please refrain from writes"
fi
```

### Go

```go
import "net/http"

const frenoUrl = "http://my.freno.com:9777/check/my-go-app/mysql/main7"

func CheckFreno() (canWrite bool, err error) {
	resp, err := http.Head(frenoUrl)
	if err != nil {
		return false, err
	}
	return resp.StatusCode == http.StatusOK, nil
}
```

repository: github/freno

repo_name: github/freno


text:
# MiamiDadeGeo

This library wraps some of the Miami-Dade County geospatial services, including:

* Address to NAD 83 State Plane X and Y coordinate
* NAD 83 State Plane X and Y coordinate to latitude and longitude

# Installation #

Add this line to your application's Gemfile:

~~~ruby
gem 'miami_dade_geo'
~~~

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install miami_dade_geo

## Usage

### Coordinate to Address

~~~ruby
coordinate = MiamiDadeGeo::Coordinate.new(long: -80.199245566240819,
                                          lat: 25.7999410593211)
addr = coordinate.address
addr.address #=> "2390 NW 2ND AVE"
addr.zip #=> 33127
~~~

### Address to Coordinate

~~~ruby
addr = MiamiDadeGeo::Address.new_from_address '2390 NW 2nd Ave'
addr.zip #=> 33127
addr.lat #=> 25.7999410593211
addr.long #=> -80.199245566240819
addr.municipality.name #=> "MIAMI"
~~~

### Coordinate to Municipality

~~~ruby
muni = MiamiDadeGeo::Municipality.new_with_latlong(
  long: -80.199245566240819,
  lat: 25.7999410593211)

muni.name #=> "MIAMI"
~~~

## Links

* <https://rubygems.org/gems/miami_dade_geo>

* <https://github.com/jdiago/miami_dade_geo_api>

* <https://github.com/bkerley/what_municipality>

* <https://radiant-taiga-73968.herokuapp.com/address-meta?address=2390%20NW%202nd%20Ave>

* <https://what-mdc-muni.herokuapp.com>

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/miami_dade_geo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
# objectfasterrcnn
### Faster-RCNN adaption based on tf-faster-rcnn by [endernewton](https://github.com/endernewton/tf-faster-rcnn) built partly on files by Ross Girshick. Modified by me [Tara1000](https://github.com/Tara1000/) to implement two new network models, ResNet-41 and Deeper MobileNet with the purpose of testing performance and accuracy of these modifications. Pre-trained ImageNet weights added from TensorFlow or [endernewton](https://github.com/endernewton). Objectfasterrcnn is tested only on Ubuntu 18-04 on NVidia GTX 1080 Ti.

More details: [https://github.com/endernewton/tf-faster-rcnn](https://github.com/endernewton/tf-faster-rcnn)

COCO 2014 data set can be downloaded from [http://cocodataset.org/#download](http://cocodataset.org/#download)

If you lack pip or conda packages in Anaconda-3 to run the code, see `packagelist.txt` at the google drive for package versions, or setup a virtual environment with the yaml file included in this repository:

`> conda env create -f tfgpuenv.yaml`

`> conda activate tensorflow\_gpuenv`

### Build:

`> cd lib`

If your GPU is not a NVidia 1080 (Ti) change the architecture accordingly

`> vim setup.py`

Change sm\_61 in line 130 to the best fit as shown in [tf-faster-rcnn](https://github.com/endernewton/tf-faster-rcnn)

In lib folder, proceed to build the project:

`> make clean`

`> make`

`> cd ..`

### Configure code base:
Download ImageNet weights (data) and pre-trained COCO models (output) from Faster-RCNN folder at [https://drive.google.com/open?id=1qlXjT-P6vgZk6NylAo7JeJREKY3jccNV](https://drive.google.com/open?id=1qlXjT-P6vgZk6NylAo7JeJREKY3jccNV) into project root, and clone + build coco API:

`> cd data`

`> git clone https://github.com/pdollar/coco.git`

`> cd coco/PythonAPI`

`> make`

`> cd ..`

In `coco` create symlinks of 'images' and 'annotations' folders from your data set folder to here:

`> ln -s your/path/to/coco2014/annotations ./annotations`

`> ln -s your/path/to/coco2014/images ./images`

`> cd ../..`

### Run

To run validation run the test\_faster\_rcnn.sh script with parameter 0 for default GPU 0 and e.g mobile for MobileNet v.1 or res41 for ResNet-41:

`> ./experiments/scripts/test\_faster\_rcnn.sh 0 coco mobile`

To train a network on GPU 0, move or remove its COCO pretrained weights folder from output, e.g. res41 for ResNet-41, and run:

`> ./experiments/scripts/train\_faster\_rcnn.sh 0 coco res41`

repository: himmetozcan/objectfasterrcnn

repo_name: himmetozcan/objectfasterrcnn


text:
# About
LCLS is in need of various tools to support high level application development using python.  This is an effort to locate a single repo that can be referenced for developemnt.

# lcls-tools
Python tools for LCLS:
* Device API (profile monitors, stoppers, magnets, etc...)
* SLAC Logger
* Custom Math Tools
* Image Processing Tools
* Beam calculations (emittance, solenoid alignment corrections, etc...)

# Rules of contribution (and python coding in general)
* Make your code readable (I like good one liners as much as the next person, but pulling apart syntax can be painful)
* Add comments whenever possible
* Try your best to adhere to style guidelines set forth in [PEP8](https://www.python.org/dev/peps/pep-0008/)
* Try to be [idiomatic](https://docs.python-guide.org/writing/style), there is a reason people spent time writing these guides.  People are sick of seeing a simple operation being done a million different ways and having to parse out what insanity was behind some lines of code.
* Add tests (unittest is used currently, please use unit tests at a bare minimum)
* Focus on extensibility (don't shove a bunch of modules/classes into one file or directory and make them reference each other if you can avoid it)
* Try to understand the purpose of each tool and do not overcomplicate with business logic that can live in an application.  These should be small and useful tools/apis with well understood and firm contracts between the api and the user
* Bonus:  If you do all of the above in general, you will be a much better coder

# Why Python27
Unfortunately, the control system LCLS uses has Python27 as a default.  That means these tools need to be compatible.  This is a compliation of code written by different people so it's not entirely uniform, but I believe an upgrade to python 3.x will not break the world.  Speaking of that let's get to the TODO

# TODO
* Upgrade to python 3.7 or above I believe will give us all the things we want.
* Use mocks in unittest once we have upgraded
* Change import scheme to python3 style (soooo much better)
* Update style for everything python3, including asyncio, generators/yield, import changes, etc...
* Test setup.py for machine not on same network as control system and generate mock/debug objects for testing
* Actually verify a requirements.txt file covers all dependencies
* Create a CLI tool
* Provide example application using lcls_tools
* Add more examples
* Document with sphinx (so boring, hoping someone else wants to do this)
* Make a robust and somewhat flexible logger module that knows about SLAC things, current logger is very basic

# Dependancies: See requirements.txt

# CAUTION: This is a POC, use at own risk
## THESE TOOLS ARE IN VARIOUS STAGES OF DEVELOPMENT

repository: Tubbz-alt/lcls-tools

repo_name: Tubbz-alt/lcls-tools


text:
---
date: 2020-08-05T16:50:16+02:00
title: Georeferencing
weight: 25
---

The process of assigning geographic coordinates to an image is known as georeferencing. The process of shifting pixel locations to remove  distortion is known as rectification.  Often the process  of rectification includes georeferencing, because one can both shift the pixels to remove distortion and assign coordinates to those pixels at the same time.

## Ground Control Points

A ground control point (GCP) is feature that you can clearly identify in the raw image for which you have  a known ground coordinate.   Ground coordinates can come from a variety of sources such   as the Global Positioning System (GPS), ground surveys, Geo coded images, vectors, geographic information systems (GIS), topographic maps, chip databases, or by using photogrammetric pro- cesses to extend the number of GCPs in your images. A GCP determines the relationship between the raw  image and the ground by associating the pixel (P) and line (L) image coordinates to the x, y and z coordinates on the ground.

GCPs are specific pixels in an image for which the output map coordinates (or other output coordinates) are known. GCPs consist of two X,Y pairs of coordinates:

* **Source coordinates** — usually data file coordinates in the image being rectified.

* **Reference coordinates** — the coordinates of the map or reference image to which the source image is being registered.

The term map coordinates is sometimes used loosely to apply to reference coordinates and rectified coordinates. These coordinates are not limited to map coordinates. For example, in image-to-image registration, map coordinates are not necessary.

### GCPs in ERDAS IMAGINE

Any ERDAS IMAGINE image can have one GCP set associated with it.  The GCP set is stored in  the image file along with the raster layers. If a GCP set exists for the top layer that is displayed in the Viewer, then those GCPs can be displayed when the Multipoint Geometric Correction tool (IMAGINE ribbon Workspace) or GCP Tool (Classic) is opened.

In the Cell Array of GCP data that displays in the Multipoint Geometric Correction tool or GCP Tool, one column shows the point ID of each GCP. The point ID is a name given to GCPs in separate files that represent the same geographic location. Such GCPs are called corresponding GCPs.

A default point ID string is provided (such as GCP #1), but you can enter your own unique ID strings to set up corresponding GCPs as needed. Even though only one set of GCPs is associated with an image file, one GCP set can include GCPs for a number of rectifications by changing the point IDs for different groups of corresponding GCPs.

### Entering GCPs

Accurate GCPs are essential for an accurate rectification. From the GCPs, the rectified coordinates for all other points in the image are extrapolated. Select many GCPs throughout the scene. The more dispersed the GCPs are, the more reliable the rectification is. GCPs for large-scale imagery might include the intersection of two roads, airport runways, utility corridors, towers,  or buildings.  For small-scale imagery, larger features such as urban areas or geologic features may be used. Landmarks that can vary (for example, the edges of lakes or other water bodies, vegetation, and so forth) should not be used.

The source and reference coordinates of the GCPs can be entered in the following ways: GCPs in IMAGINE Files.

GCPs that are digitized in a Viewer are stored with the raster data that are opened in the Viewer. However, GCPs can also be recorded from a digitizing tablet or straight from the keyboard. In these cases, they are stored alone in IMAGINE files with the extension _.gcc_.

The input image file can be set to:

* **Existing Viewer**

* **Image Layer (New Viewer)**
(Use the mouse to select a pixel from an image in the Viewer. With both the source and reference Viewers open, enter source coordinates and reference coordinates for image-to- image registration. The Multipoint Geometric Correction tool contains the both the source and reference Viewers within the tool)

* **Vector layer (New Viewer)**

* **Annotation Layer (New Viewer)**

* **GCP File (.gcc)**

(Use an existing Ground Control Coordinates file (.gcc file extension). This file contains the X and Y coordinates along with the GCP point ID, saved as an external file.)

* **ASCII File**

* **Digitizing Tablet (Current Configuration)**

Use a digitizing tablet to register an image to a hardcopy map.

* **Digitizing Tablet (New Configuration)**

* **Keyboard Only**

(They may be known a priori, and entered at the keyboard. To enter or edit a GCP from the keyboard, use the Cell Array of GCP coordinates. The X Source, Y Source, X Dest, and Y Dest cells are editable. When you edit a GCP in the Cell Array, the GCP will move in the Viewer if it is opened)

## Map Georeferencing

1. From the Main Icon Panel select the File option and select open from the file menu you have to select raster layer. In the dialog box that appears, select the file From Image File radio button and then select file.img. Click OK. This is the image that has not been georeferenced.
2. You know have a choice of geometric models. From the list of Geometric Models, select
Polynomial and click OK .

![Setting Polynomial as geometric model](/en/basics/georeferencing/images/1.png?classes=shadow)

3. Select the Projection Tab. Since a projection has not yet been defined, no projection will appear. Select the Set Projection from GCP Tool button. A dialog box will appear that gives you choices for the reference input.
4. Click Apply and Close to the Polynomial Model Properties dialog box.  You  would only need  to save the model parameters if you were performing repeated rectification .

![Projection chooser dialog box](/en/basics/georeferencing/images/2.png?classes=shadow)

From the GCP Tool Reference setup dialog box Select Keyboard only .

![ GCP Tools Reference Setup dialog box](/en/basics/georeferencing/images/2a.png?classes=shadow)

5. Move both link boxes so that they cover a common identifiable point feature. This feature should now be seen in both chip viewers. From the GCP Editor Tool bar click the Keep Current Tool icon. Then click the Create GCP icon. Now digitize the common point in each of the chip viewers. Once this is done you will need to click on the Select GCP icon to click and drag the link boxes to other identifiable features.
6. In order to make your GCPs stand out visually, you may want to change their display color. From the GCP Tool Color column, click and select a desired color for all or individual GCPs.

7. You have to select 4 GCPs. Remember to distribute the GCPs evenly throughout the image. Editing out unwanted GCPs is possible through the Cell Array. First select the point and then using hidden functions in the first column, select Delete Selection.
8. When you are satisfied with the accuracy of your GCPs, you can save them. Select File/Save Input. Select/Save Reference. You may need to click yes to saving the GCP tables and they will be added as another no in the .img file structure.
9. From the Geo Correction Tools dialog, click the Display Resample Image Dialog icon .

![Resample image icon](/en/basics/georeferencing/images/rectify.png?classes=shadow)

 In the Resample dialog box  enter the Output file name xrectify.img. For the Resample Method use Neighborhood / Bilinear Interpolation. Click on the Ignore Zeros in Stats. Check box. Ensure that the projection information is displayed at the top of the dialog. Click OK to start the rectification.

![Resampling dialog box](/en/basics/georeferencing/images/3b.png?classes=shadow)

10. When the job is done click OK on the status box. Then close all the Geo Correction dialogboxes.   If you have made any changes to the GCP Editor after the last save,  then you will   be prompted to save the edits. Click yes to saving current Geometric Model and name it xrectify.gms. In the viewers that remain, display xrectify.img in the viewer that contains the previously unrectified image and leaves the  viewer as is.

## Map to Image georeferencing

When rectifying an image, you will use ERDAS IMAGINE to:

* record **ground control points (GCPs)**
* compute a **transformation matrix**, and use that transformation matrix and a **resampling** method to rectify the image.

If you are **reprojecting** georeferenced data from one map projection to another, there is a shortcut for generating GCPs and calculating a transformation matrix using a reprojection  grid.

### steps

* Open **Satellite Image** in ERDAS IMAGINE 2013
![ERDAS IMAGINE 2013 containing both Satellite image and Toposheet](/en/basics/georeferencing/images/map/viewer.png?classes=shadow)

* Then select **Multispectral → Control points**.

In the dialog box appears, select **Polynomial** as Geometrical model.

* From the dialog box appears click on **Image Layer**

![Dialog box showing GCP Tool reference setup](/en/basics/georeferencing/images/map/imagelayer.png?classes=shadow)

* Then select required** Reference Map / Toposheet **(All file based raster format and Click OK. Then a dialog box named Polynomial Data Properties appears.

* In the Projection section select** Add/Change Projection**.

A **Projection Chooser** tab appears .

![ Dialog box showing Projection setup where Projection and Zone can be selected](/en/basics/georeferencing/images/map/projection.png?classes=shadow)

* Select **UTM WGS 84 → Zone 43**, then select **Close**.

A new window containing both Satellite Image and Toposheet appears.

* Then select **create GCP tool**.

![ GCP tool](/en/basics/georeferencing/images/map/gcptool.png?classes=shadow)

* Click on dominant feature (Junctions, Road, and similar permanent objects) first on the Toposheet and then on Satellite image.
* Select such **four GCPs** .

_Each GCP point clicks create a new Row on the bottom of the window comprising Lat and Long values_.

* Select **Display Resample Image Dialog**.
* **Name the Output file** after selecting **Nearest Neighbour** as Resampling method.

![Dialog box showing Resampling options including Resampling method and Output file selection](/en/basics/georeferencing/images/map/Resampling.png?classes=shadow)