text:
# Real-Time-Sentiment-Analyzer-of-Twitter-Trends

✔ The live Twitter data correlating to a given query from the user is classified into positive or negative. This real-time
data is graphed, thereby giving a Trend Analysis of the given query overtime.

✔ The following two classifiers were created:

1. An ensemble of Sentiment Analysis classifiers ([custom_sentimentanalyzer.py](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/custom_sentimentanalyzer.py)), resulting in a voted
majority classifier trained using nltk and scikit-learn is created and pickled, returning the category (pos or neg)
and the confidence factor (sentiment polarity).

2. Another [TextBlob](https://textblob.readthedocs.io/en/dev/) Sentiment Analysis classifier is used for returning the category and sentiment polarity.

✔ When the user enters a query, the Twitter data relevant to the query is streamed using [Tweepy](http://www.tweepy.org/), which is then
parsed and cleaned to remove links and special characters. The data is then passed into both the classifiers to
get the category and the confidence factor ([twittersentimentanalysis.py](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/twittersentimentanalysis.py)). The categories for both classifiers are
then written into separate files.

✔ The [twitter-feed-custom.txt](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/twitter-feed-custom.txt) and
[twitter-feed-textblob.txt](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/twitter-feed-textblob.txt) are then used for graphing the live data on every hit
of the query while streaming, using matplotlib. The overall percentage of "pos" and "neg" is also updated for a
realistic trend of the query ([custom_livetwittergraph.py](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/custom_livetwittergraph.py)) and ([textblob_livetwittergraph.py](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/textblob_livetwittergraph.py)).

✔ The existing pickles can be used for training, or you can train your own customized ensemble classifier by
running [custom_train.py](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/custom_train.py).

✔ To test the sentiment of any text of your choice, [test_sentiment.py](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/test_sentiment.py) can be used.

✔ An example of ensemble classifier for custom sentiment analysis is done for Movie Reviews and can be \
found here ([ensemble_classifer.py](https://github.com/gauthkris/Real-Time-Sentiment-Analyzer-of-Twitter-Trends/blob/master/ensemble_classifier.py)).


text:
Many core packages are managed by communities with names of the form
Julia\[Topic\].

|                           |                                                  |
| ------------------------- | ------------------------------------------------ |
| Statistics                | JuliaStats                                       |
| Automatic differentiation | JuliaDiff                                        |
| Numerical optimization    | JuliaOpt                                         |
| Plotting                  | JuliaPlots                                       |
| Network (Graph) Analysis  | JuliaGraphs                                      |
| Web                       | JuliaWeb                                         |
| Geo-Spatial               | JuliaGeo                                         |
| Machine Learning          | JuliaML                                          |
| Super-used Packages       | `DataFrames    # linear/logistic regression`
`Distributions # Statistical distributions`
`Flux          # Machine learning`
`Gadfly        # ggplot2-likeplotting`
`LightGraphs   # Network analysis`
`TextAnalysis  # NLP` |

license: MIT

repository: ageron/Julia-Cheat-Sheet

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: ageron/Julia-Cheat-Sheet


text:
---
layout: post
title:  "AWS Mobile Services"
author: shraddha
categories: [ aws ]
image: assets/images/aws_mobile_services_diagram.jpg
tags: featured
---

There are few AWS services listed below which can be used in mobile applications so that applications are sophisticated cloud-powered.

1. Amazon Cognito ( Identity )
    simplifies the task of authenticating users and storing, managing, and syncing their data across multiple devices, platforms, and applications. It works online or offline, and allows you to securely save user-specific data such as application preferences and game state. Cognito works with multiple existing identity providers and also supports unauthenticated guest users.

2. Lambda
    AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.

3. Amazon cognito ( Sync )
    Amazon Cognito helps you identify unique users, retrieve temporary, limited-privilege AWS credentials and also offers data synchronization services.

4. Amazon Mobile Analytics
    This will help you to collect, visualize, and understand app usage, engagement, and revenue at scale. Analytics can be collected via the AWS Mobile SDK or a set of REST APIs. Metrics are available through a series of reporting tabs in the AWS Management Console.

5. Amazon S3
    Amazon S3 Transfer Manager makes it easy for you to upload and download files from Amazon S3 while optimizing for performance and reliability.

6. Amazon CloudFront
    Amazon CloudFront is a global content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to your viewers with low latency and high transfer speeds.

7. Amazon SNS Mobile Push.
    Amazon Simple Notification Service (SNS) is a flexible, fully managed pub/sub messaging and mobile notifications service for coordinating the delivery of messages to subscribing endpoints and clients. With SNS you can fan-out messages to a large number of subscribers, including distributed systems and services, and mobile devices. It is easy to set up, operate, and reliably send notifications to all your endpoints – at any scale.

8. Amazon DynamoDB
    Amazon DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale. It is a fully managed cloud database and supports both document and key-value store models. Its flexible data model, reliable performance, and automatic scaling of throughput capacity, makes it a great fit for mobile, web, gaming, ad tech, IoT, and many other applications.

9. Device Farm
    AWS Device Farm is an app testing service that lets you test and interact with your Android, iOS, and web apps on many devices at once, or reproduce issues on a device in real time. View video, screenshots, logs, and performance data to pinpoint and fix issues before shipping your app.

Reference:
https://www.slideshare.net/AmazonWebServices/getting-started-with-aws-mobile-services-64034000
https://aws.amazon.com/

repository: prbale/Andronify

gha_language: CSS

repo_name: prbale/Andronify


text:
# 🌿Cassava Leaf Disease Classification 🌿
### Identify the type of disease present on a Cassava Leaf image
[![License](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)
[![CodeFactor](https://www.codefactor.io/repository/github/nhtlongcs/cassava-leaf-disease-classification/badge)](https://www.codefactor.io/repository/github/nhtlongcs/cassava-leaf-disease-classification)

[Contest website](https://www.kaggle.com/c/cassava-leaf-disease-classification/overview/description)

"As the second-largest provider of carbohydrates in Africa, cassava is a key food security crop grown by smallholder farmers because it can withstand harsh conditions. At least 80% of household farms in Sub-Saharan Africa grow this starchy root, but viral diseases are major sources of poor yields. With the help of data science, it may be possible to identify common diseases so they can be treated.

Existing methods of disease detection require farmers to solicit the help of government-funded agricultural experts to visually inspect and diagnose the plants. This suffers from being labor-intensive, low-supply and costly. As an added challenge, effective solutions for farmers must perform well under significant constraints, since African farmers may only have access to mobile-quality cameras with low-bandwidth.

In this competition, we introduce a dataset of 21,367 labeled images collected during a regular survey in Uganda. Most images were crowdsourced from farmers taking photos of their gardens, and annotated by experts at the National Crops Resources Research Institute (NaCRRI) in collaboration with the AI lab at Makerere University, Kampala. This is in a format that most realistically represents what farmers would need to diagnose in real life.

Your task is to classify each cassava image into four disease categories or a fifth category indicating a healthy leaf. With your help, farmers may be able to quickly identify diseased plants, potentially saving their crops before they inflict irreparable damage."

_**Quoted from contest decription.**_

## Dataset

![Sample images](img/sample_images.jpg)

**Train set**: ~26,000 images (21367 images of the 2020 contest was merged with 500 images from the 2019 contest).
**Test set**: ~15,000 images.
**Public test**: 31% of the test set.
**Private test**: 69% of the test set.

**Classes mapping**

|  Class | Numeric label|
|---|---|
| Cassava Bacterial Blight (CBB)  | 0 |
| Cassava Brown Streak Disease (CBSD)  |  1 |
|  Cassava Green Mottle (CGM)  | 2  |
|Cassava Mosaic Disease (CMD) |3 |
| Healthy|4|

![classes distribution](img/classes_distribution.png)
Credit: https://www.kaggle.com/foolofatook/starter-eda-cassava-leaf-disease

## To-do list

- [x] Code baseline and trainer on GPU + TPU
- [x] Transforms: [albumentations](https://github.com/albumentations-team/albumentations)
- [x] Implement models: EfficientNet, ViT, Resnext
- [x] Implement losses: Focal loss, CrossEntropy loss, Bi-Tempered Loss
- [x] Implement optimizers: SAM
- [x] Implement schedulers: StepLR, WarmupCosineSchedule
- [x] Implement metrics: accuracy
- [x] Write inference notebook
- [x] Implement Stratified K-folding
- [x] Merge 2019 dataset and 2020 dataset
- [x] Implement gradient_accumulation
- [x] Implement Automatic Mixed Precision
- [x] Write Optuna scripts for hyperparams tuning
- [x] Evaluate classes distribution of public leaderboard test.

## Our approach

### Summary

The final model is a stacking of three CNN-based models, [EfficientNet](https://arxiv.org/abs/1905.11946), [ResneXt](https://arxiv.org/abs/1611.05431) and [Densenet](https://arxiv.org/abs/1608.06993).

![final_model](img/final_model.png)

### Training configuration

The dataset is in fact noisy (contains irrelevant images of the tree roots, or distorted images) and clearly imbalanced.

We tackled the first problem by splitting the training set into 5 equal-size folds, while each fold has the same classes distribution as the original set (this splitting scheme is called [Stratified K-folding](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.StratifiedKFold.html)). This way of training gives every image in the training set a chance to contribute to the final predictions. We tried to adapt some robust loss functions like [Bi-Tempered Loss](https://ai.googleblog.com/2019/08/bi-tempered-logistic-loss-for-training.html) and [Taylor CE Loss](https://www.ijcai.org/Proceedings/2020/0305.pdf) but none of them showed significant improvements over the CV score. Later on we merged the training set of the last year competition to the current set, and thus improved the CV and public score. For the second problem of imbalanced dataset, [Focal Loss](https://arxiv.org/abs/1708.02002) gave a stable performance.

Most models we used are from the [Timm library](https://github.com/rwightman/pytorch-image-models).

* resnext50_32x4d - [training config](src/configs/resnext.yaml)

* efficientnet-b4 - [training config](src/configs/effnet.yaml)

* densenet121 - [training config](src/configs/densenet.yaml)

**Result**

| Model          | fold0    | fold8    | fold2    | fold3    | fold4    | CV       | Public | Private |
|----------------|----------|----------|----------|----------|----------|----------|--------|---------|
| densenet121    | 0.884346 | 0.881308 | 0.878710 | 0.873802 | 0.888993 | 0.881431 | 0.889  | **0.887**   |
| effnetB4       | 0.889018 | 0.889252 | 0.881046 | 0.876840 | 0.888525 | 0.884936 | 0.896  | **0.894**   |
| resnext50_32x4 | 0.884813 | 0.880140 | 0.881748 | 0.878008 | 0.892498 | 0.883441 | 0.895  | **0.891**   |

**Training notebooks**
* GPU version:  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1z-Koz7hGElNZxqlWOTXHHI-6XLo-XC6P?usp=sharing)
* TPU version: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1PWWU3Hk-5PvOkop8hV7SVcdYtKbQyrTp?usp=sharing)
* [Optuna](https://optuna.org/) facilitated the process of hyperparameters tuning: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1acE4A9RnfczR6_p6i_gXTqy_cf65OcZA?usp=sharing)

### Optimizers

* [Adam](https://arxiv.org/abs/1412.6980)
* [SAM](https://arxiv.org/abs/2010.01412) <-- Didn't really work, perhaps there were bugs in our implementation :(.

### Loss functions

* Cross-entropy Loss.
* [Focal Loss](https://arxiv.org/abs/1708.02002).

### Metrics

* Accuracy - We save model checkpoints whenever the validation accuracy is improved.

### Test-time Augmentation

Another Kaggle trick is to use [Test-time Augmentation](https://arxiv.org/abs/2011.11156) (TTA). The way this work is similar to data augmentation at training time, but now applying augmentations at testing time instead! We ran TTA 3 times on the test images, and took the average of the softmax vectors in the end.

### Model stacking

[Model stacking](https://blogs.sas.com/content/subconsciousmusings/2017/05/18/stacked-ensemble-models-win-data-science-competitions/#:~:text=Model%20stacking%20is%20an%20efficient,a%20new%20set%20of%20predictions.) is a powerful ensemble method in which the final predictions is generated by a level 2 model that optimally combines the predictions of level 1 models (Efficientnet, ResNeXt, Densenet). It gives a significant boost to the overall accuracy/score. Nowadays, most Kaggle winners' solutions is very likely to involve the usage of stacking.  For this particular competition, participants observed that using a simple level 2 model stacking yields the best result, whereas fancy ML models like [CatBoost](https://catboost.ai/) failed miserably.

Our stacked model was just a aggregation of weighted predictions of the level 1 models. We searched for those set of weights (using [Optuna](https://optuna.org/)) by optimizing for the local CV score.

Stacking notebook: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/16pkbfXxpMhkNSbiMi29XUJrYzbNLs6VU?usp=sharing)

**Optimal weights**

| fold | accuracy | effnet_weight | resnext_weight | densenet_weight |
|------|----------|---------------|----------------|-----------------|
| 0    | 0.896962 | 0.432610      | 0.284500       | 0.282888        |
| 1    | 0.895794 | 0.497473      | 0.277661       | 0.224865        |
| 2    | 0.892030 | 0.541973      | 0.395530       | 0.062496        |
| 3    | 0.889460 | 0.316127      | 0.418937       | 0.264934        |
| 4    | 0.899742 | 0.391536      | 0.344358       | 0.264104        |

CV score: 0.894
Public score: 0.897
**Private score: 0.898**

[Submitted notebook](https://www.kaggle.com/kvu207/inference-notebook-ensembled)

## Final result

![rank](img/ranking.JPG)

Our score is in the top 8% (Bronze Medal) among 3900 teams.

### What we did not try (or did not work)

* Vision Transformer models like [ViT](https://arxiv.org/abs/2010.11929) and [Deit](https://arxiv.org/abs/2012.12877). The CV and public score of these two were not high (~0.83-ish) in this competition.
* Taylor Loss and Bi-Tempered Loss didn't improve the score, but they worked well for other teams.
* SAM optimizer didn't work due to implementation bugs.
* We could have produced a bigger training set using Generative models (GAN).
* [Unsupervised Data Augmentation](https://arxiv.org/abs/1904.12848) seems cool but we didn't have time to try.

branch_name: refs/heads/main


text:
# Four more cases of legionnaires' disease confirmed in Moncton

Published at: **2019-11-05T01:48:00+00:00**

Author: **Kate Walker, Reporter**

Original: [atlantic.ctvnews.ca](https://atlantic.ctvnews.ca/four-more-cases-of-legionnaires-disease-confirmed-in-moncton-1.4670245)

MONCTON -- The outbreak of legionnaires' disease in greater Moncton that was declared over in September may not be over after all.
Sixteen people in Moncton fell ill with the pneumonia-like disease this past summer. That number has now jumped to 20.
"Since declaring the outbreak over on Sept. 10, we've had four additional cases reported to public health," said Dr. Yves Leger, the regional medical health officer.
Claudette Lirette was one of the 16 patients who contracted legionnaires' disease from a cooling tower in the west end of Moncton.
When she found out there were four new cases, she couldn't help but wonder if the new patients got sick from the same source.
"I thought that these people are related to the same case that we are," Lirette said.
Leger says the four new cases are not related to the original outbreak.
The latest patients were diagnosed between Sept. 30 and Oct. 21.
"We do an extensive 14-day travel history to see where cases have been, their travel patterns, and we map all that information on maps and compare that between different cases," Leger said.
Leger says these are considered sporadic cases, unrelated, and without a common source.
One of the four people was from out of town and spent minimal time in the Moncton area.
"Out of those other three, we were able to get one specimen collected for culture, which was sent to the health laboratories in Quebec, and typing was done on that specimen," Leger said.
Results indicated that case was not a match to the cooling tower where legionella was originally found.
That site has not been identified by Public Health -- something that triggered frustration among the original 16 who contracted legionnaires'.
Some of those patients held a meeting recently to consider taking legal action.
"We're going to try to go for the class-action lawsuit and we filled out all the papers," Lirette said.
Leger says Public Health stands by its decision not to disclose the location of the cooling tower and that a site linking to the new cases has yet to be found.
As for the four new cases, Leger says they are doing well and there were no fatalities, though some could take months to recover.
He also said he has no reason to believe there is any ongoing source of legionnaires' in the community.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# MVC Template Sample With Fluent Actions

This project demonstrates an MCV template project that has integrated fluent actions.

See [this commit](https://github.com/ExplicitlyImplicit/AspNetCore.Mvc.FluentActions/commit/68415086cc913ff73593771e615124f4eaa426b7)
to view the changes that were made to the original template.


text:
# NXPlay

NXPlay is an open source streaming entertainment service created with Laravel.

> If you like this repo don't forget to give a star! ⭐

### Installation Instructions

-   Clone the repo.

```shell
    cd nxplay

    composer install

    cp .env.example .env

    php artisan key:generate

    php artisan jwt:secret

    php artisan storage:link
```

-   Edit `.env` file with your `database`, `Pusher` and other credentials.
-   check `.env.example` file for details.

```shell
    php artisan migrate --seed
```

-   If you are using `npm`

```shell
    npm install && npm run dev
```

-   Or if you are using `yarn`

```shell
    yarn install && yarn run dev
```

-   Run the application

```shell
    php artisan serve
```

-   Check [http://localhost:8000/](http://localhost:8000/)

-   Also run these commands in seperate console tab for queues, and schedules to work:

```shell
    php artisan schedule:work

    php artisan queue:work
```

### Contributing

Thank you for considering contributing to the NXPlay!

### Contribution Guideline

-   Fork the repo.
-   Clone the repo.
-   Run `git checkout dev`
-   Create a new local branch
-   Work on your local branch
-   Push to remote
-   When work tested, done or ready, push to remote
-   Merge to dev

### License

The NXPlay is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

repository: thaivanan/nxplay

repo_name: thaivanan/nxplay


text:
# Agaricus muscarius var. umbrinus (Pers.) Fr., 1838 VARIETY

#### Status
SYNONYM

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

#### Published in
Epicr. syst. mycol. (Upsaliae) 5 (1838)

#### Original name
Amanita umbrina Pers., 1797

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Amanitaceae/Amanita/Amanita regalis/ Syn. Agaricus muscarius umbrinus/README.md

repo_name: mdoering/backbone


text:
# UnityMake
Unity Make generate all files needed for an Unity Build

# Binaries
You can download the latest version of UnityMake.js from the GitHub [releases](https://github.com/YoannLaala/UnityMake/releases)

# Usage
```
UnityMake.exe --input path/to/source/ --output path/to/output/
```

repository: YoannLaala/UnityMake

repo_name: YoannLaala/UnityMake


text:
---
layout: post
title: Deploy Quarkus Apps into the Cloud
date: 2021-06-10
tags: [ Quarkus ]
---

As part of my position on the QE team in [Quarkus](https://quarkus.io/), we need to play with a lot of integration tools and frameworks. Also, we need to use many cloud infrastructures like OpenShift and Kubernetes.

This post is a guide to deploy Quarkus applications into cloud infrastructures. For now, it only covers OpenShift and Kubernetes, but I will try to add all the options that Quarkus allows like AWS and Azure in the future. Moreover, I will try to keep these steps up-to-date.

## Getting Started

Before going forward, I'm assuming that you already have a Quarkus application in place. If not, please proceed first with [the official getting started guide](https://quarkus.io/get-started/) in Quarkus.

As an example, using the [Quarkus CLI](https://quarkus.io/version/main/guides/cli-tooling) tool, you can easily create a Quarkus application by doing:

```
quarkus create app
```

This command will create a simple Quarkus application at `./code-with-quarkus`.

## OpenShift

For all the methods, we recommend first to create a new OpenShift project where to deploy our resources:

```
oc new-project my-project
```

### Using s2i: From Binaries and Sources

OpenShift offers a really useful feature called [Source-to-IMage (s2i)](https://docs.openshift.com/container-platform/4.7/cicd/builds/understanding-image-builds.html#understanding-image-builds). Basically, OpenShift can build our App images from binaries or from a source repository. Let's see how to do this using a Quarkus application.

To use this method, we need to create our Build Configuration that will be used to generate our Quarkus applications. OpenShift s2i delegates the build onto a image, so the important bit is to select the right image.

For Quarkus, the right images are:

| Quarkus JVM  | Quarkus Native |
| ------------- | ------------- |
| registry.access.redhat.com/ubi8/openjdk-11 | quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0 |

In this tutorial, we're using only JVM build, so I will be using only `registry.access.redhat.com/ubi8/openjdk-11`.

- **From Binaries**

Let's create the Build configuration:

```
oc new-build registry.access.redhat.com/ubi8/openjdk-11 --name quarkus-app --binary=true
```

Or simply apply the YAML format:

```yaml
apiVersion: "build.openshift.io/v1"
kind: "BuildConfig"
metadata:
  name: "quarkus-app"
spec:
  source:
    binary: {}
  strategy:
    sourceStrategy:
      from:
        kind: "DockerImage"
        name: "registry.access.redhat.com/ubi8/openjdk-11"
```

Now, let's trigger the previous Build configuration using our binaries:

```bash
mvn clean install
```

And trigger the s2i from the `target/quarkus-app` location:

```
oc start-build quarkus-app --from-dir=target --follow=true --wait
```

| Note that we're assuming that you're using [the `fast-jar` package type](https://quarkus.io/guides/maven-tooling#fast-jar) which is the default option. If not, basically you need to pick the folder where the `.jar` file is.

When finished, the App image should be installed in our project:

```
> oc get imagestream
NAME          IMAGE REPOSITORY                                                                 TAGS     UPDATED
quarkus-app   default-route-openshift-image-registry.apps.XXXX/my-project/quarkus-app          latest   41 minutes ago
```

And, finally, let's deploy it and expose the service.

```
oc new-app quarkus-app:latest
oc expose svc/quarkus-app
```

Check out the generated routes for our app:

```
> oc get routes
NAME           HOST/PORT                                 PATH   SERVICES   PORT       TERMINATION   WILDCARD
quarkus-app    quarkus-app-my-project.apps.XXXX          app               8080-tcp                 None
```

We should be able to invoke our App which is up and running in our OCP instance!

```
> curl quarkus-app-my-project.apps.XXXX/hello
Hello RESTEasy!
```

- **From Sources**

This method is even easiest, but we need our sources to be publicly available in a repository like [github.com](github.com) and then create all the application resources in one go:

```
oc new-app registry.access.redhat.com/ubi8/openjdk-11~https://github.com/quarkusio/quarkus-quickstarts.git --context-dir=getting-started --name=quarkus-app
```

| Note that `registry.access.redhat.com/ubi8/openjdk-11` is the image builder, see the introduction for further details.

This command will create the deployment config, the service, the build config and will start the build in one go. In order to see how the build goes:

```
oc logs -f bc/quarkus-app
```

When finished, we can expose the service and use it:

```
oc expose svc/quarkus-app
```

Check out the generated routes for our app:

```
> oc get routes
NAME           HOST/PORT                                 PATH   SERVICES   PORT       TERMINATION   WILDCARD
quarkus-app    quarkus-app-my-project.apps.XXXX          app               8080-tcp                 None
```

And we should be able to invoke our App which is up and running in our OCP instance!

```
> curl quarkus-app-my-project.apps.XXXX/hello/greeting/quarkus
hello quarkus
```

### Using Quarkus OpenShift extension

Is there an even easiest way to deploy Quarkus apps into OpenShift? Yes! Using [the Quarkus OpenShift](https://quarkus.io/guides/deploying-to-openshift) extension.

All we need is to add the Quarkus OpenShift extension into our pom.xml:

```xml
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-openshift</artifactId>
</dependency>
```

Or using the [Quarkus CLI](https://quarkus.io/version/main/guides/cli-tooling) tool:

```
> quarkus extension add quarkus-openshift
[SUCCESS] ✅ Extension io.quarkus:quarkus-openshift has been installed
```

And deploy it using the Maven command:

```
mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus.openshift.route.expose=true
```

| Note that if you are using an OpenShift with unsecure SSL, you also need to append `-Dquarkus.kubernetes-client.trust-certs=true` to the Maven command.

| Internally, this method will use the Binaries s2i to build the image and then start the application. However, you can configure this method by using either Docker or [jib](https://github.com/GoogleContainerTools/jib). More in [here](https://quarkus.io/version/main/guides/deploying-to-openshift#non-s2i-builds).

When the Maven command finished, your app should be up and running!

```
> oc get routes
NAME           HOST/PORT                                 PATH   SERVICES   PORT       TERMINATION   WILDCARD
quarkus-app    quarkus-app-my-project.apps.XXXX          app               8080-tcp                 None
```

And we should be able to invoke our App which is up and running in our OCP instance!

```
> curl quarkus-app-my-project.apps.XXXX/hello
Hello RESTEasy!
```

### Manual: Using Container Registry

Do you like to do everything on your own? Fair enough! Let's explain how to deploy Quarkus applications without using s2i or the Quarkus OpenShift extension, but directly docker and a container registry where to push/pull images.

First thing you need is to have access to a container registry and be logged in:

```
docker login <container-registry>
```

Where `<container-registry>` could be `quay.io`.

Then, we need to build our images locally. The good news is that the auto generated project by code starters contains the necessary `Dockerfile`, so all you need to do is:

```
> docker build -f src/main/docker/Dockerfile.jvm -t quarkus-app:latest .
(...)
Successfully tagged quarkus-app:latest
```

| This example only shows the JVM build, but the native Dockerfile is also present by default when generating a new Quarkus project.

Let's push the recently created `quarkus-app:latest` image into our container registry:

```
docker tag quarkus-app:latest <container-registry>/<namespace>/quarkus-app:latest
docker push <container-registry>/<namespace>/quarkus-app:latest
```

Now, we can create our application in our OpenShift project using this image:

```
oc new-app <container-registry>/<namespace>/quarkus-app:latest
```

And expose it:

```
oc expose svc/quarkus-app
```

Check out the generated routes for our app:

```
> oc get routes
NAME           HOST/PORT                                 PATH   SERVICES   PORT       TERMINATION   WILDCARD
quarkus-app    quarkus-app-my-project.apps.XXXX          app               8080-tcp                 None
```

And we should be able to invoke our App which is up and running in our OCP instance!

```
> curl quarkus-app-my-project.apps.XXXX/hello
Hello RESTEasy!
```

## Kubernetes

We don't have s2i in Kubernetes, but there are other many options to deploy applications into Kubernetes. For now, I've only included the container registry strategy.

Again, we recommend first to create a new Kubernetes project where to deploy our resources:

```
kubect create namespace my-project
```

### Manual: Using Container Registry

First thing you need is to have access to a container registry and be logged in:

```
docker login <container-registry>
```

Where `<container-registry>` could be `quay.io`.

Then, we need to build our images locally. The good news is that the auto generated project by code starters contains the necessary `Dockerfile`, so all you need to do is:

```
> docker build -f src/main/docker/Dockerfile.jvm -t quarkus-app:latest .
(...)
Successfully tagged quarkus-app:latest
```

| This example only shows the JVM build, but the native Dockerfile is also present by default when generating a new Quarkus project.

Let's push the recently created `quarkus-app:latest` image into our container registry:

```
docker tag quarkus-app:latest <container-registry>/<namespace>/quarkus-app:latest
docker push <container-registry>/<namespace>/quarkus-app:latest
```

Now, we can create our application in our Kubernetes project using this image:

```
kubectl create deployment --image=<container-registry>/<namespace>/quarkus-app:latest quarkus-app
```

And expose it:

```
kubectl expose deployment quarkus-app --port=8080 --name=quarkus-app-http
```

And we should be able to invoke our App which is up and running in our Kubernetes instance!

## Future Cloud Infrastructure to cover

- Amazon
- Azure
- Google Cloud


text:
# How it works

![How it works](images/cvejob_pipeline.svg)

The diagram above shows how CVEjob works under the hood.

It's basically a simple pipeline. It always starts with a CVE from NVD and ends with CVEjob YAML file
stored in the local database. Or it ends without any YAML file if given CVE was not identified by CVEjob
as affecting a package from one of the supported ecosystem.

When deployed as an OpenShift cronjob, CVEjob periodically (once a day) checks what's new in the [CVE-Modified NVD feed](https://nvd.nist.gov/vuln/data-feeds#JSON_FEED)
and then opens pull requests in [fabric8-analytic/cvedb GitHub repository](https://github.com/fabric8-analytics/cvedb/).

## The pipeline

CVEjob is a pipeline and CVEs from given NVD data feed are processed one-by-one.

Pipeline steps:

* **input checks/filters**: initial set of checks which can filter out CVEs which don't belong to any of the supported ecosystem.
Note it may happen that, in some cases, the checks will filter out even valid CVEs.
The primary purpose of this step is to reduce the number of false positives, i.e. CVEs incorrectly associated with supported ecosystems.
Only CVEs which satisfy following conditions will be processed by the rest of the pipeline:

  * given CVE is no older that specified "age" (age=1 means that CVE must be have been added or modified in the last day).
  * given CVE has been analyzed by NVD - CVEs in NVD can be in "awaiting analysis" state,
  i.e. they can be later accepted or rejected by NVD. CVEs that haven't been analyzed yet lack information
  like for example associated CPE names or affected version ranges.
  CVEjob only translates data from NVD to a different format (and tries to map CVEs to proper package name),
  nothing more. Therefore CVEs need to be analyzed by NVD first.
  * additional input checks don't filter out given CVE based on description or references.

* **package name identifier**: step which tries to identify names of packages which might be affected by given CVE.
The output is up to 10 package name candidates. The candidates will be further evaluated in following steps.

* **selector**: step which performs additional checks on package name candidates identified in the previous step
and tries to narrow down the selection to a single package name.

* **version range identifier**: this step translates information about affected and unaffected versions from NVD to CVEjob YAML file.

* **output writer**: this step takes the input CVE from NVD, package name identified by CVEjob, and version ranges,
and it creates a YAML file in the local database (`database/` directory).

The pipeline doesn't directly open pull requests in [fabric8-analytic/cvedb GitHub repository](https://github.com/fabric8-analytics/cvedb/).
There is a script called `open_pull_requests.sh` for that purpose. It can be used independently.
Typically, CVEjob will be run on CVEs from NVD and then the script will be called. When running CVEjob locally,
it is possible to curate results (modify resulting YAML files) before opening pull requests.

gha_language: Python


text:
---
layout: post
title: "Lightmapping for Unity"
description: "Lightmapping for Unity"
tags: [sample post, video]
---

<iframe width="560" height="315" src="//www.youtube.com/embed/qcLBFVFUsI8?start=2233" frameborder="0" allowfullscreen> </iframe>

At Imagination Technologies I was a lead engineer on the Unity 5 Progresive Lightmapper project, which is released in Unity 5.6. Check my presentation out to get an idea of what I was working on.


text:
# hyper-material-spacegray
A port of the Material Spacegray color scheme (originating from base16-ocean.dark) for the `hyper` terminal.
![](http://i.imgur.com/40Oxuae.png)

## Usage
Add `"hyperterm-material-spacegray"` to your `plugins` fields that is in `config` object in your `~/.hyper.js` file, and your terminal should automatically reload with theme changes.

## License
MIT


text:
# nestjs-mongoose-discriminator

A sample app showing how to deal with mongoose's discriminators in [Nest](https://github.com/nestjs/nest).

## Description

This NestJS API uses an in-memory MongoDB to demonstrate the validation of polymorphic data in a document's array.

## Installation

```bash
$ npm install
```

## Running the app

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

Once running, you can use the OpenAPI/Swagger UI to try out the API by going to http://localhost:3000/open-api.

## Stay in touch

- Author - [Rémi<EMAIL_ADDRESS>- Twitter - [@RSormain](https://twitter.com/RSormain)

repository: lamboap/nestjs-mongoose-discriminator

repo_name: lamboap/nestjs-mongoose-discriminator


text:
## Export API

In addition to the Console, you can also trigger exports through Java and any other language that runs on the JVM, by using the [ODatabaseExport](https://github.com/orientechnologies/orientdb/blob/master/core/src/main/java/com/orientechnologies/orient/core/db/tool/ODatabaseExport.java) class.

For example:

```java
ODatabaseDocumentTx db = new ODatabaseDocumentTx("plocal:/temp/mydb");
db.open("admin", "admin");
try{
  OCommandOutputListener listener = new OCommandOutputListener() {
    @Override
    public void onMessage(String iText) {
      System.out.print(iText);
    }
  };

  ODatabaseExport export = new ODatabaseExport(db, "/temp/export", listener);
  export.exportDatabase();
  export.close();
} finally {
  db.close();
}
```

repository: orientechnologies/orientdb-docs

repo_name: orientechnologies/orientdb-docs


text:
# {{projectName}}

## Build Setup

``` bash
# Install dependencies
npm install

# Start development mode with REPL
npm run dev
{{#jest}}

# Run unit tests
npm test

# Run continuous test mode
npm run ci
{{/jest}}
{{#lint}}

# Run ESLint
npm run lint
{{/lint}}
```


text:
---
toc: false
layout: post
comments: true
description: Constructing the simplest possible code
categories: [clean-code, tools]
last_modified_at: 2020-05-11T20:42:15.210883
title: Clean Code Resources and Tools
permalink: /clean_code_tools/
---

**Index**: [Tips on writing Clean Code]({{ site.baseurl }}/clean_code/)

#### Linters

SonarLint is good for most cases.

- Python: **SonarLint** or PyLink

- Java: **SonarLint** or Sonar Cube

- Typescript: TSLint

#### Domain/Language-specific tips

- For Deep Learning/Machine Learning: [fastai coding style](https://docs.fast.ai/dev/style.html)

- Java: [Google Java Style Guide](http://Google Java Style Guide)

- Python: [pep8](https://realpython.com/python-pep8/) or [Google Python Style Guide](http://google.github.io/styleguide/pyguide.html)

- [Angular official style guide](https://angular.io/guide/styleguide)

#### Natural next steps:

- Design patterns: [Design patterns for Humans](https://github.com/kamranahmedse/design-patterns-for-humans) and [Java Design Patterns in Stories](https://www.programcreek.com/java-design-patterns-in-stories/)

- [Anti-Patterns](https://sourcemaking.com/antipatterns)

- [Falsehoods](http://Awesome Falsehood)

- The Clean Code Book

- Cleaner REST APIs: [RESTful API Designing guidelines — The best practices](https://hackernoon.com/restful-api-designing-guidelines-the-best-practices-60e1d954e7c9)

- [Microservices](https://microservices.io/articles/applying.html) and Micro frontend.

repository: ankschoubey/blog

gha_language: HTML

repo_name: ankschoubey/blog


text:
### Enable usernames and namespaces for user projects

This command will enable the namespaces feature introduced in v4.0. It will move every project in its namespace folder.

Note:

* Because the **repository location will change**, you will need to **update all your git url's** to point to the new location.
* Username can be changed at [Profile / Account](/profile/account)

**Example:**

Old path: `git@example.org:myrepo.git`
New path: `git@example.org:username/myrepo.git` or `git@example.org:groupname/myrepo.git`

```
bundle exec rake gitlab:enable_namespaces RAILS_ENV=production
```

### Enable auto merge

This command will enable the auto merge feature. After this you will be able to **merge a merge request** via GitLab and use the **online editor**.

```
bundle exec rake gitlab:enable_automerge RAILS_ENV=production
```

Example output:

```
Creating satellite for abcd.git
[git clone output]
Creating satellite for abcd2.git
[git clone output]
done
```

repository: dasbh/gitlabhq

repo_name: dasbh/gitlabhq


text:
# BladeRunner

Required fonts:
 - Nasalization Regular
 - Nasalization Bold

## Screenshots

![BladeRunner](bladerunner.png)

### More

The font "Nasalization" is used by default to give it a futuristic look. If you won't install the font, it will be replaced by "Arial" on Windows, and "sans-serif" on Linux.

Main, sidebar and player background colours are same and based on Dracula gtk: https://draculatheme.com/gtk/

Slightly edited user.css is based on Nord spicetify: https://github.com/morpheusthewhite/spicetify-themes/tree/master/Nord

Author: https://github.com/canbeardig


text:
Installation
============

For now only installation on Mac OS X is supported. To install, you will
need access to the internet.

Downloading OpenFrameworks
==========================
Download the OpenFrameworks source bundle from [their website](http://openframeworks.cc "OpenFrameworks").
The bundle can be unzipped anywhere, the important part is that you lay out the directory structure as
described below.

Directory Structure
-------------------

The of-alljoyn-basic folder (this repository) into should be placed in the
`apps` folder of the OpenFrameworks source. Otherwise, the relative paths
expected by the OpenFrameworks configuration will be incorrect and everything
will explode in a shower of header-missing errors.

Downloading and Building AllJoyn
================================
Follow Qualcomm's [build instructions](https://www.alljoyn.org/docs-and-downloads/build-environment/configuring-build-environment-ios-and-osx-rev).
**Note:** it is important to use their recommended root directory (`~/alljoyn`) for this one.
Their *XCode Build* should work. If not, open Terminal to manually build the source with the following commands:
    cd ~/alljoyn/alljoyn_core
    CONFIGURATION=debug scons -u OS=darwin WS=off VARIANT=debug
You should now have files in `~/alljoyn/alljoyn_core/build/darwin/x86/debug/dist/cpp/`. If you don't, try running
the manual build.

Running the Examples
====================

You should now be able to run the examples by opening their XCode Project files in XCode. The fail-safe way to run
them is on the same computer.

Debugging Common Errors
=======================

ofMain.h Not Found
------------------
Make sure that of-alljoyn-basic is in the `apps` directory of OpenFrameworks. On my computer, this
looks like `of_v0.7.4_osx_release/apps/of-alljoyn-basic`.

qcc/Platform.h Or alljoyn/BusAttachment.h Not Found
---------------------------------------------------
Make sure that AllJoyn is installed in your home directory. If you really do not want it to be there,
adjust the variable ALLJOYN_ROOT in the XCode project's build settings.

Linker Missing Symbols or Library not found for -lalljoyn
---------------------------------------------------------
Make sure that AllJoyn Core built without errors. If it built without errors,
`~/alljoyn/alljoyn_core/build/darwin/x86/debug/dist/cpp/` should have at least the `lib`, `bin`,
and `inc` folders present.

Undefined symbol: `typeinfo`
----------------------------
Go to the alljoynBasicServer or alljoynBasicClient project's Target. The Target should have a Build Phases
tab which in turn should have a Compile Sources menu. In this menu, add the `-fno-rtti` flag to any file
involving `<alljoyn/BusObject.h>`. Note that any file with this flag set can not use OpenFrameworks functions.

repository: hobinjk/of-alljoyn-basic

repo_name: hobinjk/of-alljoyn-basic


text:
# Citrix
Citrix Project

To setup the environment:

1. Ensure all the files are in the same folder. If not, modify the file links inside the code.
2. Install NetScaler CPX.
3. Install Quagga Routing Engine.
4. Manually set up the lbvservers and the services.
5. Web App is the file named home.html

For further details, refer the videos in https://drive.google.com/folderview?id=1TjEHYnBQpnQqdRPgP-ivs-bAjrDsNPkf


text:
# Contributing to the Sparkle framework

## Message to the Contributor
First and foremost, the __Sparkle.css__ framework development team would like to thank you for having interest in our project, and for the time you took, or are taking, to contribute to this project. The team is already working hard to provide a renovative and simple design platform for websites and apps; and your contribution helps, and will help, us achieve that possibility.

Before you can commit to our project, we would like to emphasize the importance of reading the guidelines for contributing to this project, so that it clears out a few questions or concerns you may have. Again, thank you for your time and efforts and interest. :smile:

## Code of Conduct
Our team wants to emphasize and encourage teamwork, good communication, and respect. We understand that not everyone is on the same level of experience and understanding. But everyone had a starting point, somewhere in the past. Therefore, we want to help you the best way we can, and we also want you to help others who might need help, if we cannot reach them in time.

Disrespect is __not__ tolerated, and it will result in your receiving a strong warning and potentially being banned from the team. Please, be mindful of others, as you would like others to be mindful of you. Note that contstructive criticism (which are very well appreciated and encouraged) is __not__ the same thing as insults or any other forms of disrespect!

## Questions and Concerns
Our team strives to provide as much help as we can, and in a timely manner, to make sure your experience using and designing with __Sparkle.css__ is a positive one. Questions can be published in our [__Issues__](https://github.com/jdriviere/sparkle-css/issues) page with the following format:

```
Version Used: x.y.z

Question(s): This is where you as your question(s), or address your concerns.
```

## Issues, Bugs, and Solutions
Our development team always seeks ways to improve the framework. But nothing is perfect. Extra brains like yours can catch things that may have escaped us. Therefore, we encourage you to send us the bugs that you may have found, or share your issues and solutions with us, as well as the community.

```
Version Used: x.y.z

Origin of the Problem:
This is where you describe where (e.g.: from which file, folder, or page) the problem comes from.

Overview of the Problem:
This is where you give a brief description of the problem.

Description of the Problem:
This is where you describe, with pictures or videos (GIF) if possible, the problem that you are having. Be as specific as you can be in that section, concerning the problem that you're experiencing. If need be, please provide your code in this section too.

Steps to Reproduce the Problem:
This is where you define the steps you took to arrive at the problem.

Expected Behavior:
This is where you describe what you were trying to achieve, and expected from your code.

Actual Behavior:
This is where you describe what you received from your code. Pictures are welcomed on this section too.

Proposed Solutions (if any):
This is where you describe how you have solved, if have done so, the problem you had. This section is especially useful as reference for anyone who may have similar problems in the future.
```

If you see any errors on our [__official website__](https://sparklecss.herokuapp.com), this template can also be used to address them.

## New Features
Do you have any new features or fixes you'd like to bring to our attention? We are open to them! Simply submit your request as an [__Issue__](https://github.com/jdriviere/sparkle-css/issues) or as a new [__Pull Request__](https://github.com/jdriviere/sparkle-css/pulls) in the main repository. Keep in mind that *__all__* your submissions must follow the required format proposed for the Sparkle framework. In another note, all ideas are welcomed--but not all of them can be implemented, unfortunately*.

```
Version Used: x.y.z

Type of Feature (New | Patch/Fix):
This is where you address what kind of feature (i.e.: new or patch/fix) you would like to see implemented, or fix(es) you would like to propose.

Purpose of the Feature:
This is where you describe why the feature may be useful. Make sure it is simple to implement.
```

*If you would like to join our team and expand the Sparkle framework universe, we encourage you to build your own Sparkle-based expansion and submit it [here](https://github.com/sparkle-css).

repository: jdriviere/sparkle-css

repo_name: jdriviere/sparkle-css


text:
# Performance Calculator

A tool for calculating the difficulty of beatmaps and the performance of replays.

## Tweaking

Difficulty and performance calculators for all rulesets may be modified to tweak the output of the calculator. These exist in the following directories:

```
../osu/osu.Game.Rulesets.Osu/Difficulty
../osu/osu.Game.Rulesets.Taiko/Difficulty
../osu/osu.Game.Rulesets.Catch/Difficulty
../osu/osu.Game.Rulesets.Mania/Difficulty
```

## Usage

### Help
```
> dotnet run -- --help

Usage: dotnet PerformanceCalculator.dll [options] [command]

Options:
  -?|-h|--help  Show help information

Commands:
  difficulty    Computes the difficulty of a beatmap.
  performance   Computes the performance (pp) of replays on a beatmap.
  profile       Computes the total performance (pp) of a profile.
  simulate      Computes the performance (pp) of a simulated play.

Run 'dotnet PerformanceCalculator.dll [command] --help' for more information about a command.
```

### Difficulty
```
> dotnet run -- difficulty --help

Computes the difficulty of a beatmap.

Usage: dotnet PerformanceCalculator.dll difficulty [arguments] [options]

Arguments:
  path                       Required. A beatmap file (.osu), or a folder containing .osu files to compute the difficulty for.

Options:
  -?|-h|--help               Show help information
  -r|--ruleset:<ruleset-id>  Optional. The ruleset to compute the beatmap difficulty for, if it's a convertible beatmap.
                             Values: 0 - osu!, 1 - osu!taiko, 2 - osu!catch, 3 - osu!mania
  -m|--m <mod>               One for each mod. The mods to compute the difficulty with.Values: hr, dt, hd, fl, ez, 4k, 5k, etc...
  -o|--output <file.txt>     Output results to text file.
```

Computes the difficulty attributes of a beatmap. These attributes are used in performance calculation.

Example output of osu!-mode difficulty:
```
Aim            : 2.43558005796213
Speed          : 2.09240115454506
stars          : 4.69957066421573
```

### Performance
```
> dotnet run -- performance --help

Computes the performance (pp) of replays on a beatmap.

Usage: dotnet PerformanceCalculator.dll performance [arguments] [options]

Arguments:
  beatmap                 Required. The beatmap file (.osu) corresponding to the replays.

Options:
  -?|-h|--help            Show help information
  -r|--replay <file>      One for each replay. The replay file.
  -o|--output <file.txt>  Output results to text file.
```

Computes the performance of one or more replays on a beatmap. The provided output includes raw performance attributes alongside the un-weighted pp value.

```
Aim            :<PHONE_NUMBER>45539
Speed          : 44.7315288123673
Accuracy       : 61.9354071284508
pp             :<PHONE_NUMBER>36267
```

### Profile
```
> dotnet run -- profile --help

Computes the total performance (pp) of a profile.

Usage: dotnet PerformanceCalculator.dll profile [arguments] [options]

Arguments:
  user                       User ID is preferred, but username should also work.
  api key                    API Key, which you can get from here: https://old.ppy.sh/p/api

Options:
  -?|-h|--help                   Show help information
  -r|--ruleset <ruleset-id>      The ruleset to compute the profile for. 0 -
                                 osu!, 1 - osu!taiko, 2 - osu!catch, 3 -
                                 osu!mania. Defaults to osu!.
  -c|--columns <attribute_name>  Extra columns to display from beatmap category
                                 attribs, for example 'Tap Rhythm pp'. Multiple
                                 can be added at once -c col1 -c col2
  -s|--sort <attribute_name>     What column to sort by (defaults to pp of the
                                 play)
  -o|--output <file.txt>         Output results to text file.
```

Computes the performance of a user profile's performance. Takes 100 top plays of a user and recalculates and reorders them in order of the performance calculator's calculated performance.

```
User:     chocomint
Live PP:  14937,5 (including 305,6pp from playcount)
Local PP: 15310,0 (+372,5)

╔═══╤════════════════════════════════════════════════════════════════════════════════════════════════════════╤════════╤═══════╤════════╤════╤═════════╤════════╤═════════╤═══════════════╗
║ # │beatmap                                                                                │  mods  │live pp│  acc   │miss│  combo  │local pp│pp change│position change║
╟───┼────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼───────┼────────┼────┼─────────┼────────┼─────────┼───────────────╢
║1  │ 1031991 - ...s Dead Decadence - Yomi yori Kikoyu, Koukoku no Tou to Honoo no Shoujo. (DoKito) [Kyouaku]│      HD│  712,1│ 99,07 %│   4│2936/4353│   948,8│    236,8│      +19      ║
╟───┼────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼───────┼────────┼────┼─────────┼────────┼─────────┼───────────────╢
║2  │ 129891 - xi - FREEDOM DiVE (Nakagawa-Kanon) [FOUR DIMENSIONS]                                          │   HR|HD│  894,4│ 99,83 %│   0│2385/2385│   850,4│    -44,0│      -1       ║
╟───┼────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼───────┼────────┼────┼─────────┼────────┼─────────┼───────────────╢
║3  │ 1432943 - ...oshi o Kakeru Adventure ~ we are forever friends! ~ [Long ver.] (Battle) [Imagined Voyage]│   HR|HD│  764,3│ 99,41 %│   0│2336/2640│   833,4│     69,1│      +4       ║
╟───┼────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼───────┼────────┼────┼─────────┼────────┼─────────┼───────────────╢
║4  │ 1869619 - Umeboshi Chazuke - Bison Charge (Nao Tomori) [Extreme]                                       │      HD│  725,5│ 99,70 %│   0│  886/886│   829,9│    104,4│      +10      ║
╟───┼────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼───────┼────────┼────┼─────────┼────────┼─────────┼───────────────╢
...
```

### LocalScores
```
> dotnet run -- localscores --help
Recalcs all of your osu local scores on ranked maps and gives you a new top 500

Usage: dotnet PerformanceCalculator.dll localscores [options]

Options:
  -?|-h|--help                   Show help information
  -u|--user <username>           Process only the replays with the given
                                 username. Multiple names can be specified at
                                 once: -u user1 -u user2
  -c|--columns <attribute_name>  Extra columns to display from beatmap category
                                 attribs, for example 'Tap Rhythm pp'. Multiple
                                 can be added at once -c col1 -c col2
  -s|--sort <attribute_name>     What column to sort by (defaults to pp of the
                                 play)
  -t|--test-run                  Only run on 20 beatmaps to test the command
                                 output
  -r|--recent-sort               Sort top 500 by replay date
  -o|--output <file.txt>         Output results to text file.
```

### Simulate
```
> dotnet run -- simulate --help

Computes the performance (pp) of a simulated play.

Usage: dotnet PerformanceCalculator.dll simulate [options] [command]

Options:
  -?|-h|--help  Show help information

Commands:
  mania         Computes the performance (pp) of a simulated osu!mania play.
  osu           Computes the performance (pp) of a simulated osu! play.
  taiko         Computes the performance (pp) of a simulated osu!taiko play.

Run 'simulate [command] --help' for more information about a command.
```

Computes the performance of a simulated play on a beatmap. The provided output includes raw performance attributes and pp value.

#### osu!
```
> dotnet run -- simulate osu --help

Computes the performance (pp) of a simulated osu! play.

Usage: dotnet PerformanceCalculator.dll simulate osu [arguments] [options]

Arguments:
  beatmap                     Required. The beatmap file (.osu).

Options:
  -?|-h|--help                Show help information
  -a|--accuracy <accuracy>    Accuracy. Enter as decimal 0-100. Defaults to 100. Scales hit results as well and is rounded to the nearest possible value for the beatmap.
  -c|--combo <combo>          Maximum combo during play. Defaults to beatmap maximum.
  -C|--percent-combo <combo>  Percentage of beatmap maximum combo achieved. Alternative to combo option. Enter as decimal 0-100.
  -m|--mod <mod>              One for each mod. The mods to compute the performance with. Values: hr, dt, hd, fl, ez, etc...
  -X|--misses <misses>        Number of misses. Defaults to 0.
  -M|--mehs <mehs>            Number of mehs. Will override accuracy if used. Otherwise is automatically calculated.
  -G|--goods <goods>          Number of goods. Will override accuracy if used. Otherwise is automatically calculated.
  -o|--output <file.txt>      Output results to text file.
```

#### osu!taiko
```
> dotnet run -- simulate taiko --help

Computes the performance (pp) of a simulated osu!taiko play.

Usage: dotnet PerformanceCalculator.dll simulate taiko [arguments] [options]

Arguments:
  beatmap                     Required. The beatmap file (.osu).

Options:
  -?|-h|--help                Show help information
  -a|--accuracy <accuracy>    Accuracy. Enter as decimal 0-100. Defaults to 100. Scales hit results as well and is rounded to the nearest possible value for the beatmap.
  -c|--combo <combo>          Maximum combo during play. Defaults to beatmap maximum.
  -C|--percent-combo <combo>  Percentage of beatmap maximum combo achieved. Alternative to combo option. Enter as decimal 0-100.
  -m|--mod <mod>              One for each mod. The mods to compute the performance with. Values: hr, dt, hd, fl, ez, etc...
  -X|--misses <misses>        Number of misses. Defaults to 0.
  -G|--goods <goods>          Number of goods. Will override accuracy if used. Otherwise is automatically calculated.
  -o|--output <file.txt>      Output results to text file.
```

#### osu!mania
```
> dotnet run -- simulate mania --help

Computes the performance (pp) of a simulated osu!mania play.

Usage: dotnet PerformanceCalculator.dll simulate mania [arguments] [options]

Arguments:
  beatmap                 Required. The beatmap file (.osu).

Options:
  -?|-h|--help            Show help information
  -s|--score <score>      Score. An integer 0-1000000.
  -m|--mod <mod>          One for each mod. The mods to compute the performance with. Values: hr, dt, fl, 4k, 5k, etc...
  -o|--output <file.txt>  Output results to text file.
```

repository: aticie/osu-tools

gha_language: C#

repo_name: aticie/osu-tools


text:
# PermissonManager
A Simple Library that searches for permissions in the merged Android Manifest file automatically and creates request for those permissions.

This Library also displays customizable Dialog for permissions when they are denied so that the dev may inform the user why the permission is needed.
If the app can no longer request permission due to "Don't ask again" on permission it will open the app specific settings allowing the user to grant the permission manually.

Setup:
Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        implementation 'com.github.Tc2r1:PermissonManager:{Latest_VERSION}'
	}

//To Automatically get Permissions needed and make request.

//It will Dynamically search for apps permission and request for the same.

//Add the below code in onCreate function.

```
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
	      permission = new PermissionManager() {};
	      permissionManager.checkRequestPermissions(this);
    }
```
// Add Below code in onRequestPermissionsResult function
```
@Override
    public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults) {
        permissionManager.checkResult(requestCode, permissions, grantResults, false);

        // The last param should be true if you want the denied permission to close the application.
        // The last peram should be false if your app ahs functionality to continue with the permission denied.
    }
```

//Customized by overriding method shown below.
```
permission=new PermissionManager() {
            @Override
            public void ifDeniedAndCanRequest(Activity activity)
            {
                // Customized code goes here for the condition in which a permission is denied withoutchecking "Don't ask again".
                // Use super.ifDeniedAndCanRequest(activity); or Don't override this method if not in use
            }

            @Override
            public void ifDeniedAndDontAskAgain(final Activity activity, boolean closeIfDenied)
            {
                // When user checks "Don't ask again" and denies a permission, this code block will execute.
                // Use super.ifDeniedAndDontAskAgain(activity); or Don't override this method if not in use
            }

            @Override
            public String[] getRequiredPermissions()
            {
                // Use super.getRequiredPermissions() or don't override this method if you want
                // library to check manifest for permissions.

                String[] customPermissions = new String[]{Manifest.permission.READ_CONTACTS};
                return customPermissions;
            }
        };
```

//To initiate checking permission
```
permissionManager.checkRequestPermissions(this);
```

//To get Granted Permission and Denied Permission
```
@Override
    public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults) {
        permissionManager.checkResult(requestCode, permissions, grantResults, false);
        //To get Granted Permission and Denied Permission
        ArrayList<String> allowed = permissionManager.getStatus().get(0).allowed;
        ArrayList<String> denied =  permissionManager.getStatus().get(0).denied;
    }
```

repository: complextheory/PermissonManager

repo_name: complextheory/PermissonManager


text:
# Approach

For the ElectionGuard repositories, these are the concepts that guide the approach for developers and writers.

## ✅ Simplicity

Simplicity is the first and foremost goal of the code. The intent is for others to be able to easily transliterate the code to any other programming language with little more than structures and functions. This simplicity applies to all aspects of the code design, including naming.

## ✅ Transparency

ElectionGuard is open source first. Our code, our issues and even our Continuous Integration (CI) is designed to be visible to the public. This is to allow others to both be able to trust the code, learn, and hopefully help improve ElectionGuard.

GitHub tools have been our primary tool to maintain transparency. Our cards are all GitHub issues. Our continuous integration uses GitHub Workflows to be out in the open.

## ✅ Readability

Whether developing or writing for ElectionGuard, the goal is to create easy to read and understand text. We will always be improving in this area, but the goal is to make the system easy to grasp for not only developers, but for the public. This is the primary reason that Python was chosen as the primary reference implementation. Understanding the code and the written word is essential for confidence.

## ✅ Testability

The goal is to maximize code coverage and testing on the reference implementations. Tests are essential to the repositories for both providing proof the code functions but also to provide an understanding of how the code works. This means writing code that can be tested and writing the accompanying tests.

## ✅ Extendable and Interpretable

The reference implementations are intentionally general-purpose to support the different use cases of voting systems. Different projects may wish to use different pieces and parts of each repository.

--8<-- "includes/abbreviations.md"

repository: microsoft/electionguard

repo_name: microsoft/electionguard


text:
# n-dimensional-random
An n-dimensional random number generator.

### NPM

```
npm install n-dimensional-random
```

### Example

```javascript
const RNG = require('rng.js');

const next2 = RNG(Date.now(), 2), next3 = RNG(Date.now(), 3);

console.log(next2(1, 2));//a random number between 0 and 1
console.log(next3(1, 2, 3));//a random number between 0 and 1
```

repository: HadiSalehWeb/n-dimensional-random

repo_name: HadiSalehWeb/n-dimensional-random


text:
---
title: S-plus version 7
author: Steve Simon
source: http://www.pmean.com/05/SplusVersion7.html
date: 2005-04-19
categories:
- Blog post
tags:
- Being updated
- Statistical computing
output: html_document
---
**[StATS]:** **S-plus version 7 (April 19, 2005)**

I attended a web seminar by David Smith introducing the latest version
of S-plus, version 7.This software, produced by Insightful Corporation,
is one of my favorite products for producing advanced statistical
analyses. Dr. Smith cited four advantages of Insightful software
products:

1.  integrating statistics into business processes,
2.  flexible and rapid prototyping,
3.  visualization and custom reporting, and
4.  deriving value from large data sets.

He mentioned how Pillsbury Bakery had produced a web based statistical
application to allow non-statisticians to review quality reports and
charts. Ratings managers at Lipper (Reuters) use the rapid prototyping
to react faster to new mutual funds introduced to the market. Eli Lilly
uses custom reporting and visualization tools to assist with high
throughput screening. At Kraft, product quality managers use these
graphics to visualize sensory panel data to adjust recipes for
consistency and aroma. At Verizon, managers process massive amounts of
network performance data to optimize their networks.

The new features of S-plus Server include

1.  statistical techniques,
2.  enterprise-class development,
3.  analysis of very large data sets.

A new library by Chao, Pinheiro, et al, allows for analyses of mixed
models with non-Gasussian responses, such as repeated measures of counts
and proportions with random effects. A library by Terry Thernau allows
you to build mixed effects Cox models. This allows you to include random
effects in a survival data model.

The S-plus workbench provides an integrated development environment of S
programming teams. It includes a smart code editor that recognizes the
particulars of the language and offers appropriate syntax highlighting
and indenting. The code editor has an outline function which allows you
to jump to various segments of your code and a history window that lists
the previously submitted commands. You can integrate task within the
code by including comments in the code itself. These tasks are
highlighted in a special window and allow you to jump to the appropriate
code. This workbench is based on the industry standard
[Eclipse](http://www.eclipse.org/) framework.

S-plus now has a
[pipeline](http://www.corporate-ir.net/ireye/ir_site.zhtml?ticker=**IFUL&scripthttp://en.wikipedia.org/wiki/Pipeline_(computer))
architecture for scalable data analysis. You can now manipulate and
analyze data sets in the gigabyte size range. Previous verison of S-plus
stored all of the data in memory, the new system stores data on the
disk. S-plus has a new data type, the bdFrame (Big Data Frame). There
are variants for time series and vector data.

The bdFrame uses the same tools as other S-plus objects such as the
ability to use the square brackets to selects portions of the data
frame. The bdFrame has news data manipulation functions for appending
and merging and filtering data sets. S-plus has the ability to use
[SQL](http://en.wikipedia.org/wiki/SQL) code for data manipulation. For
large data sets, S-plus has the ability to produce hex-bin charts rather
than scatterplots. With large data sets, a scatterplot often looks like
a big blob of ink that is difficult to interpret.

S-plus has new out-of-memory algorithms for linear, logistics, and
Poisson<U+FFFD> regression. You can apply arbitrary S-plus functions to data
blocks using the bd.by.group() function.

Dr. Smith ended with a case study using US 2000 Census data. To read the
data in as a bdFrame, the code looks like

- census \<-
importData("/projects/census/census.csv",stignasAsFactors=F,,bigdata=T)

You can remove rows with zero population totals using standard S
subscripting techniques

- census \<- census\[census\[,"poptotal"\]\>0,\]

but this requires two passes through the data. A new and faster
alternative is

- census \<- bd.filter.rows(census,"popTotal\>0")

You can also use [regular
expressions](http://en.wikipedia.org/wiki/Regular_expression) to filter
this data.

There are new "Big Vector" data types: bdNumeric, bdFactor,
bdCharacter, bdLogical, bdTimeDate. These data types have the same
efficiency advantages of the bdFrame.

There are two white papers:

- Delivering the Power of Predictive Analytics Across the Enterprise,
and
- Analyzing Large Data Sets with S-plus 7 Enterprise Developer.

A new course, S-plus 7 - Working With Big Data, is also available.

You can also browse
for pages similar to this one at [Category: Statistical
computing](../category/StatisticalComputing.html).

You can find an [earlier version][sim1] of this page on my [website][sim2].

[sim1]: http://www.pmean.com/05/SplusVersion7.html
[sim2]: http://www.pmean.com

repository: pmean/build-website

repo_name: pmean/build-website


text:
# Wild Workouts

Wild Workouts is an **example Go DDD** project that we created to show how to build Go applications that are **easy to develop, maintain, and fun to work with, especially in the long term!**

*The idea for this series, is to apply DDD by refactoring. This process is in progress! Please check articles, to know the current progress.*

No application is perfect from the beginning. With over a dozen coming articles, we will uncover what issues you can find in the current implementation. We will also show how to fix these issues and achieve clean implementation by refactoring.

### Articles

#### "Too modern" application

1. [**Too modern Go application? Building a serverless application with Google Cloud Run and Firebase**](https://threedots.tech/post/serverless-cloud-run-firebase-modern-go-application/?utm_source=github.com) _[[v1.0]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v1.0)_
2. [**A complete Terraform setup of a serverless application on Google Cloud Run and Firebase**](https://threedots.tech/post/complete-setup-of-serverless-application/?utm_source=github.com) _[[v1.1]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v1.1)_
3. [**Robust gRPC communication on Google Cloud Run (but not only!)**](https://threedots.tech/post/robust-grpc-google-cloud-run/?utm_source=github.com) _[[v1.2]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v1.2)_
4. [**You should not build your own authentication. Let Firebase do it for you.**](https://threedots.tech/post/firebase-cloud-run-authentication/?utm_source=github.com) _[[v1.3]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v1.3)_

#### Refactoring

5. [**Business Applications in Go: Things to know about DRY**](https://threedots.tech/post/things-to-know-about-dry/?utm_source=github.com) _[[v2.0]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.0)_
6. [**When microservices in Go are not enough: introduction to DDD Lite**](https://threedots.tech/post/ddd-lite-in-go-introduction/?utm_source=github.com) _[[v2.1]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.1)_
7. [**Repository pattern: painless way to simplify your Go service logic**](https://threedots.tech/post/repository-pattern-in-go/?utm_source=github.com) _[[v2.2]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.2)_
8. [**4 practical principles of high-quality database integration tests in Go**](https://threedots.tech/post/database-integration-testing/?utm_source=github.com) _[[v2.3]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.3)_
9. [**Introducing Clean Architecture by refactoring a Go project**](https://threedots.tech/post/introducing-clean-architecture/?utm_source=github.com) _[[v2.4]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.4)_
10. [**Introducing basic CQRS by refactoring**](https://threedots.tech/post/basic-cqrs-in-go/?utm_source=github.com) _[[v2.5]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.5)_
11. [**Combining DDD, CQRS, and Clean Architecture**](https://threedots.tech/post/ddd-cqrs-clean-architecture-combined/?utm_source=github.com)
12. [**Microservices test architecture. Can you sleep well without end-to-end tests?**](https://threedots.tech/post/microservices-test-architecture/?utm_source=github.com) _[[v2.6]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.6)_
13. [**Repository secure by design: how to sleep better without fear of security vulnerabilities**](https://threedots.tech/post/repository-secure-by-design/?utm_source=github.com)
14. [**Running integration tests on Google Cloud Build using docker-compose**](https://threedots.tech/post/running-integration-tests-on-google-cloud-build/?utm_source=github.com) _[[v2.7]](https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/releases/tag/v2.7)_
15. *More articles are on the way!*

### Community

We're building a Discord community focused on modern business applications. It's the place to discuss hard topics, request a review, or ask if something's not clear. [Come join us!](https://discord.gg/kTVsGjPYDn)

### Directories

- [api](api/) OpenAPI and gRPC definitions
- [docker](docker/) Dockerfiles
- [internal](internal/) application code
- [scripts](scripts/) deployment and development scripts
- [terraform](terraform/) - infrastructure definition
- [web](web/) - frontend JavaScript code

### Live Demo

The example application is available at [https://threedotslabs-wildworkouts.web.app/](https://threedotslabs-wildworkouts.web.app/).

### Running locally

```go
> docker-compose up

# ...

web_1             |  INFO  Starting development server...
web_1             |  DONE  Compiled successfully in 6315ms11:18:26 AM
web_1             |
web_1             |
web_1             |   App running at:
web_1             |   - Local:   http://localhost:8080/
web_1             |
web_1             |   It seems you are running Vue CLI inside a container.
web_1             |   Access the dev server via http://localhost:<your container's external mapped port>/
web_1             |
web_1             |   Note that the development build is not optimized.
web_1             |   To create a production build, run yarn build.
```

### Google Cloud Deployment

```go
> cd terraform/
> make

Fill all required parameters:
	project [current: wild-workouts project]:       # <----- put your Wild Workouts Google Cloud project name here (it will be created)
	user [current<EMAIL_ADDRESS>               # <----- put your Google (Gmail, G-suite etc.) e-mail here
	billing_account [current: My billing account]:  # <----- your billing account name, can be found here https://console.cloud.google.com/billing
	region [current: europe-west1]:
	firebase_location [current: europe-west]:

# it may take a couple of minutes...

The setup is almost done!

Now you need to enable Email/Password provider in the Firebase console.
To do this, visit https://console.firebase.google.com/u/0/project/[your-project]/authentication/providers

You can also downgrade the subscription plan to Spark (it's set to Blaze by default).
The Spark plan is completely free and has all features needed for running this project.

Congratulations! Your project should be available at: https://[your-project].web.app

If it's not, check if the build finished successfully: https://console.cloud.google.com/cloud-build/builds?project=[your-project]

If you need help, feel free to contact us at https://threedots.tech
```

### Screenshots

![Wild Workouts login](https://threedots.tech/media/serverless-cloud-run-firebase-modern-go-app/login.png "Logo Title Text 1")
![Wild Workouts trainer's schedule](https://threedots.tech/media/serverless-cloud-run-firebase-modern-go-app/schedule.png "Logo Title Text 1")
![Wild Workouts schedule training](https://threedots.tech/media/serverless-cloud-run-firebase-modern-go-app/new-training.png "Logo Title Text 1")

gha_language: Go


text:
### M3DB PHP Example

This example uses the [influxdb](https://github.com/influxdata/influxdb-php) library to connect to M3DB and write a data point.

#### Pre-Requisites

An M3DB service that you can connect to.

The PHP InfluxDB library (for InfluxDB v1, beware of the newer package with a similar-but-different name for Influx v2), which is included in `composer.json` so just run:

```
composer install
```

#### Running The Example

The parameters you will need are:

* host
* port
* user
* password

With all those values ready, run the command:

```
php m3_write --host <host> --port <port> --user <user> --password <password>
```

If it worked, you should see the output `bool(true)`.

#### Inspecting The Data

Congratulations, you have written data to M3DB. To see it, add a Grafana integration if you haven't already, and choose the data field `php_example_metric` to see what you sent. Feel free to edit the script to send more different data points too.

repository: aiven/aiven-examples

repo_name: aiven/aiven-examples


text:
---
layout: about
title: About
permalink: /
subtitle: PhD student at Sapienza University of Rome

profile:
  align: right
  image: personal-photo.png
  address:

news: true  # includes a list of news items
selected_papers: true # includes a list of papers marked as "selected={true}"
social: true  # includes social icons at the bottom of the page
---

**Hi!**

My name is Luigi and I am a third-year PhD student in the [SapienzaNLP Group](http://sapienzanlp.uniroma1.it/) led
by [Prof. Roberto Navigli](http://wwwusers.di.uniroma1.it/~navigli/).

I am currently working on Semantic Parsing and Word Sense Disambiguation, and I have a real passion for generative
models (those seq2seq-s are amazing).

I attained my bachelor's degree in *Computer Engineering* from [Università degli Studi Roma Tre](https://www.uniroma3.it/)
and, a couple of years later, my master's degree in *Engineering in Computer Science* from
[Sapienza Università di Roma](https://www.uniroma1.it/).

The master's degree was quite the crossroad for me, finding both AI and Security very appealing. Eventually, I went
for AI, but Security still had a significant impact: no matter where I go, within a couple of months, I always
inevitably become the Linux/DevOps guy (thank you, past self).

I am quite the binge-watcher, I like playing padel (even though skying still remains
my favorite sport) and I enjoy playing videogames now and then.

If you wish to contact me, feel free to use any of the social channels below!


text:
#Project name: SongSuggester

##Information
Programmer: Chase Pranga
Language: Python
Libraries: json, requests, time.sleep, os.path.exists
Description: queries the Last.fm API to obtain users top songs, and then queries the API again with each of those songs to find similar songs. Lastly, script suggests songs based on frequency of appearance.
Installation: Python3 required
Usage


text:
# Badges, Buttons & Icons {octicon}`rocket`

(badges)=

## Badges

Inline badges can be used as a labelling component.
Badges are available in each semantic color, with filled and outline variants:

- {bdg}`plain badge`
- {bdg-primary}`primary`, {bdg-primary-line}`primary-line`
- {bdg-secondary}`secondary`, {bdg-secondary-line}`secondary-line`
- {bdg-success}`success`, {bdg-success-line}`success-line`
- {bdg-info}`info`, {bdg-info-line}`info-line`
- {bdg-warning}`warning`, {bdg-warning-line}`warning-line`
- {bdg-danger}`danger`, {bdg-danger-line}`danger-line`
- {bdg-light}`light`, {bdg-light-line}`light-line`
- {bdg-dark}`dark`, {bdg-dark-line}`dark-line`

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/badge-basic.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/badge-basic.txt
:language: rst
```
````
`````

`bdg-link-` and `bdg-ref-` variants are also available for use with links and references.
The syntax is the same as for the `ref` role.

{bdg-link-primary}`https://example.com`

{bdg-link-primary-line}`explicit title <https://example.com>`

{bdg-ref-primary}`badges`

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/badge-link.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/badge-link.txt
:language: rst
```
````
`````

See [Bootstrap badges](https://getbootstrap.com/docs/5.0/components/badge/) for more information, and related [Material Design chips](https://material.io/components/chip).

(buttons)=

## Buttons

Buttons allow users to navigate to external (`button-link`) / internal (`button-ref`) links with a single tap.

```{button-link} https://example.com
```

```{button-link} https://example.com
Button text
```

```{button-link} https://example.com
:color: primary
:shadow:
```

```{button-link} https://example.com
:color: primary
:outline:
```

```{button-link} https://example.com
:color: secondary
:expand:
```

```{button-ref} buttons
:color: info
```

```{button-ref} buttons
:color: info

Reference Button text
```

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/button-link.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/button-link.txt
:language: rst
```
````
`````

Note that by default sphinx converts the content of references to raw text.
For example `**Bold text**` with `ref-type` set to `ref` will be rendered without bold:

```{button-ref} buttons
:ref-type: ref
:color: primary

**Bold text**
```

However, if using [myst-parser](https://myst-parser.readthedocs.io/), you can set the `ref-type` to `myst`, and the content will be properly rendered:

```{button-ref} buttons
:ref-type: myst
:color: primary

**Bold text**
```

Use the `click-parent` option to make the button's parent container also clickable.

:::{card} Card with an expanded button

```{button-link} https://example.com
:color: info
:expand:
:click-parent:
```

:::

See the [Material Design](https://material.io/components/buttons) and [Bootstrap](https://getbootstrap.com/docs/5.0/components/buttons/) descriptions for further details.

### `button-link` and `button-ref` options

ref-type (`button-ref` only)
: Type of reference to use; `any` (default), `ref`, `doc`, or `myst`

color
: Set the color of the button (background and font).
  One of the semantic color names: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, `light`, `dark`, `muted`.

outline
: Outline color variant

align
: Align the button on the page; `left`, `right`, `center` or `justify`

expand
: Expand to fit parent width

click-parent
: Make parent container also clickable

tooltip
: Add tooltip on hover

shadow
: Add shadow CSS

class
: Additional CSS classes

(icons)=

## Inline Icons

Inline icon roles are available for both the [GitHub octicon](https://octicons-git-v2.primer.now.sh/octicons/) or [FontAwesome](https://fontawesome.com/icons?d=gallery&m=free) libraries.

Octicon icons are added as SVG's directly into the page with the `octicon` role.

By default the icon will be of height `1em` (i.e. the height of the font).
A specific height can be set after a semi-colon (`;`) with units of either `px`, `em` or `rem`.
Additional CSS classes can also be added to the SVG after a second semi-colon (`;`) delimiter.

A coloured icon: {octicon}`report;1em;sd-text-info`, some more text.

````{tab-set-code}
```{literalinclude} ./snippets/myst/icon-octicon.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/icon-octicon.txt
:language: rst
```
````

````{dropdown} All Octicons
:open:

```{_all-octicon}
```
````

FontAwesome icons are added via the Fontawesome CSS classes.
If the theme you are using does not already include the FontAwesome CSS, it should be loaded in your configuration from a [font-awesome CDN](https://cdnjs.com/libraries/font-awesome), with the [html_css_files](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_css_files) option, e.g.:

```python
html_css_files = ["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css"]
```

Use either `fa` (deprecated in font-awesome v5), `fas` or `fab` for the role name.

````{tab-set-code}
```markdown
An icon {fas}`spinner;sd-bg-primary sd-bg-text-primary`, some more text.
```
```rst
An icon :fas:`spinner;sd-bg-primary sd-bg-text-primary`, some more text.
```
````

An icon {fas}`spinner;sd-bg-primary sd-bg-text-primary`, some more text.

By default, icons will only be output in HTML formats. But if you want fontawesome icons to be output on LaTeX, using the [fontawesome package](https://ctan.org/pkg/fontawesome), you can add to your configuration:

```python
sd_fontawesome_latex = True
```

repository: martinacantaro/sphinx-design

repo_name: martinacantaro/sphinx-design


text:
# Contributing to prometheus-sql

**First:** if you're unsure or afraid of _anything_, just ask or submit the issue or pull request anyways. You won't be yelled at for giving your best effort. The worst that can happen is that you'll be politely asked to change something. We appreciate any sort of contributions, and don't want a wall of rules to get in the way of that.

However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This document will cover what we're looking for. By addressing all the points we're looking for, it raises the chances we can quickly merge or address your contributions.

## Issues

### Reporting an Issue

* Make sure you test against the latest released version. It is possible
  we already fixed the bug you're experiencing.

* Provide a reproducible test case. If a contributor can't reproduce an
  issue, then it dramatically lowers the chances it'll get fixed. And in
  some cases, the issue will eventually be closed.

* Respond promptly to any questions made by the maintainers of this project.
  Stale issues will be closed.

## Coding convention

* General guideline is to read some at the golang page [Effective Go](https://golang.org/doc/effective_go.html).
* Be sure to run [gofmt](https://golang.org/cmd/gofmt/) before you contribute.

## Opening an Pull Request

Please send a [GitHub Pull Request to prometheus-sql](https://github.com/chop-dbhi/prometheus-sql/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)).

## How To Build locally for test

### Build binary and run tests

*Important!* Since Go modules are used make sure you have set environment variable `GO111MODULE`:

```bash
export GO111MODULE=on
```

1. Go to the project root directory.

2. Build prometheus-sql:

    ```bash
    go build
    # To build for other platforms
    # GOOS=windows GOARCH=amd64 go build
    ```

3. Run tests

    ```bash
    go test
    ```

### Build Docker image

1. Go to the project root directory.

2. Follow steps above to build binary

3. Build Docker image:

    Using Docker (require Docker v17.06 or later):

    ```bash
    docker build --rm --no-cache --tag dbhi/prometheus-sql:latest .
    ```

4. Done!

repository: chop-dbhi/prometheus-sql

repo_name: chop-dbhi/prometheus-sql


text:
%{
    "Id":"187",
    "Title": "chicken bon chon",
    "Url":"chicken-bon-chon",
    "PubDate":"15-Jul-2012",
    "Tags": ["personal"],
    "Preview": "",
}%
[Source](http://markhughneri.com/blog/276/chicken-bon-chon/
 "Permalink to the kimerran logs - Chicken Bon Chon")

# the kimerran logs - Chicken Bon Chon

published: Jul 15, 2012

Personally I think the new Spiderman movie was not as good as the last 3 by Toby Maguire. Might be because it focuses more on spidey's past rather than the villains as portrayed by the last 3 movies. But all in all, it is still a great movie to watch.

We had [Kettle Korn][1] BBQ (50 pesos for the large one) and [Gong Cha milk tea][2] while we watched [The Amazing Spiderman][3]. The movie started around 5:00 PM and finished at around 7:30 PM â€“ exact time for dinner.

We decided to try out Bon Chon â€“ one of the new chicken restaurant in the Philippines. It is a South Korean based and these days one of the restaurants where you will find it difficult to find a vacant chair.

We ordered two boxed meals for 145 pesos each and chosen option B which is the breast fillet. This comes with drinks already and you may choose if you want Soy Garlic or Spicy flavor.

Option A is the wings part. Option B is the breast fillet. Option C is drumstick. You can also have non-chicken boxed meals such as crispy fish, crispy squid, fish and chips, and bulgogi meals such as beef bulgogi, crunchy chicken bulgogi or bulgogi wrapbox.

If you don't want a complete meal, you can also order Big Box in which you can choose either the wings, breast or drumstick chicken part. Small box will cost 185 peso, medium for 365 pesos and the large one for 720 pesos.

If you want 50 pieces of Bon Chon Chicken Wings, you can have it for 1395 pesos or for the same amount you can already have 32 chops or the breast fillet part.

They also serve other main dishes such as Chapchae, fish taco, calamari and the bulgogi meals. Price range is from 75 to 125 pesos.

Side dishes are also available such as fries, kimchi coleslaw, tofu salad and caesar salad which you can have additional chicken as well. Price range is from 45 to 125 pesos.

Drinks available are iced tea, softdrinks, beer, stella artois and hoegaarden which will costs you 28 to 45 pesos. Stella artois will cost you 125 pesos while the Hoegaarden costs 150 pesos.

If you want some sweets for dessert, you may want to try KoYo or Korean Yogurt for 75 pesos only.

There's no question while there are a lot of people dining on this chicken restaurant. Will definitely comeback to try out other dishes. Hope to see more branches around the metro.

![http://spicykendi.comx.ph/drinks/milk-tea/gong-cha-still-the-best-milktea-for-us/][4]

![http://spicykendi.comx.ph/drinks/milk-tea/gong-cha-still-the-best-milktea-for-us/][5]

### Share and Enjoy

* * *

* * *

[1]: http://spicykendi.comx.ph/food/popcorn/kettle-korn-cheese/
[2]: http://spicykendi.comx.ph/drinks/milk-tea/gong-cha-still-the-best-milktea-for-us/
[3]: http://www.imdb.com/title/tt0948470/
[4]: http://markhughneri.com/blog/assets/loading.gif "bon chon chicken"
[5]: http://www.sisigbytes.com/food/wp-content/uploads/sites/2/2012/07/07142012522.jpg "bon chon chicken"

repository: kimerran/kimerran-blog

repo_name: kimerran/kimerran-blog


text:
# Variations #

Variations on the Theme

**Sketch 1**

- Some silhouette forms (3 maybe more each swinging gently in light circles / close iris crop).
- When a visitor / puppeteer dwells - the silhouette saturates through greyscale to colour.
- After a further duration of  dwelling, the figure is sent impulses to it's control joints and gets increasingly agitated.

**Sketch 2**

- Like above each silhouette form appears swinging gently in circles / close iris crops).
- Visitor numbers are counted using openTSPS (TSPS a cross platform Toolkit for Sensing People in Spaces) it uses OSC and speaks to Unity.
- Visitor movement / stillness is tracked

**Sketch 3**

- Track visiter held blobs using openTSPS and map the blobs positions onto simplified spring controllers on a set of figures.
- Offset slightly, so one person can control many different (almost dancing) puppets

more to come...

repository: iboy/devart-template

repo_name: iboy/devart-template


text:
# API Sandbox Bundle

This bundle is designed to prevent requests using your real controllers and responding with a fake
response you defined. It integrates nicely with `NelmioApiDocBundle` and `FOSRestBundle`.

When using `NelmioApiDocBundle` this bundle will generate `curl` examples for your provided sandbox
requests automatically which will show in the documentation.

## Requirements

ApiSandboxBundle requires php >= 5.5 and symfony >= 2.7.

## Installation

The easiest way to install this library is through [composer](http://getcomposer.org/).
Just add the following lines to your **composer.json** file and run `composer.phar update`:

```json
{
   "require": {
        "bpa/api-sandbox-bundle": "dev-master"
    }
}
```

## Configuration

Load the bundle in your `AppKernel.php`:

```php
class AppKernel extends Kernel {
    public function registerBundles() {
        // ...
        $bundles = [
            // ...
            new Bpa\ApiSandboxBundle\ApiSandboxBundle(),
            // ...
        ];
        // ...
    }
}
```

I would recommend to create a new environment for your sandbox by copying the `app.php` front controller
to something like `app_sandbox.php`. In your new front controller you have to change the following line
to the new environment:

```php
$kernel = new AppKernel('sandbox', false);
```

Create a new `config_sandbox.yml` in your `app/config` directory with the following contents:

```yaml
imports:
    - { resource: config_prod.yml }

api_sandbox:
    enabled: true
    force_response: true
```

This takes all settings from your `prod` environment and enables the sandbox for your new `sandbox`
environment.

## Usage

### A basic Controller

When using the `FOSRestBundle` and `NelmioApiDocBundle` for your API an integration within your
application could look something like this:

```php
<?php

namespace AppBundle\Controller;

use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Bpa\ApiSandboxBundle\Annotation as Bpa;
use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;

/**
 * Controller for books
 */
class BookController extends FOSRestController
{
    /**
     * Get book informations
     *
     * Retrieve informations about a specific book
     *
     * @ApiDoc(
     *     section="Books",
     *     resource=true,
     *     statusCodes={
     *         200="Ok",
     *     }
     * )
     *
     * @Bpa\SandboxRequest(
     *     responses={
     *         @Bpa\SandboxResponse(
     *             statusCode=200,
     *<EMAIL_ADDRESS>     *         )
     *     }
     * )
     *
     * @param Request $request
     *
     * @return JsonResponse
     */
    public function getAction(Request $request)
    {
        return new JsonResponse([
            'books' => [ 'id' => 1, 'title' => 'A Brief History of Time' ],
        ]);
    }
}
```

### Using parameters

It's possible to define multiple responses for a single Controller action and distinguish between
them by using the `SandboxRequest\Parameter` Annotation like this:

```php
<?php

class BookController extends FOSRestController
{
    /**
     * ...
     *
     * @Bpa\SandboxRequest(
     *    responses={
     *        @Bpa\SandboxResponse(
     *            statusCode=200,
     *<EMAIL_ADDRESS>     *            parameters={
     *                @Bpa\SandboxRequest\Parameter(name="id", value="1"),
     *            }
     *        ),
     *        @Bpa\SandboxResponse(
     *            statusCode=200,
     *<EMAIL_ADDRESS>     *            parameters={
     *                @Bpa\SandboxRequest\Parameter(name="id", value="2"),
     *            }
     *        ),
     *        @Bpa\SandboxResponse(
     *            statusCode=200,
     *<EMAIL_ADDRESS>     *        )
     *    }
     * )
     *
     * ...
     */
    public function getAction(Request $request) { /* ... */ }
}
```

If you now provide the parameter `id = 1` the first response will be returned. With `id = 2` the second
one is returned and for all other requests the third response will be returned.

## Automatic generation of documentation

With all this set up you will see automatically generated examples API documentation with
the `NelmioApiDocBundle`. If you designed your own theme for your documentation you are able
to provide your own `ExampleGenerator` which only should extend the provided `ExampleGenerator`
and override the `buildExample` method:

```php
<?php

namespace DocBundle\Service\ApiDoc\Extractor;

use Bpa\ApiSandboxBundle\Annotation\SandboxResponse;
use Bpa\ApiSandboxBundle\Service\ApiDoc\Extractor\ExampleGenerator as BaseGenerator;
use Symfony\Component\Routing\Route;

class ExampleGenerator extends BaseGenerator
{
    /**
     * @param Route           $route
     * @param SandboxResponse $response
     *
     * @return mixed|string
     */
    protected function buildExample(Route $route, SandboxResponse $response)
    {
        return 'Your custom example markdown';
    }
}
```

## Contributing

Please feel free to contribute to this bundle. Any contribution is highly appreciated and
will be reviewed.

repository: BenjaminPaap/ApiSandboxBundle

repo_name: BenjaminPaap/ApiSandboxBundle