text:
# Boomtown Product Support Platform SDK for iOS

#### Minimum Requirements
- Xcode 11
- iOS 11.0

#### Dependencies
-	AFNetworking 4.0
-	XMPPFramework 4.0
-	SVProgressHUD
- TwilioVideo 4.4.0
- MTBBarcodeScanner

A Podfile is included in case you want to use CocoaPods. If so, Support SDK will include these dependencies. The Support SDK CocoaPod can be found at https://cocoapods.org/pods/SupportSDK.

## Overview
**SupportSDK** contains `SupportSDK`, an iOS framework for Boomtown partners. It allows partners to integrate issue creation, notification, and chat in a single `SupportButton` button.

## Getting Started

1. Clone this repository
2. Drag `SupportSDK.framework` from the SDK folder into the `Embedded Binaries` section in `Targets->General`
3. In the "Choose options for adding these files" dialog, ensure "Copy items if needed" is checked and "Create Groups" is selected next to "Added folders"

## Obtaining Configuration Information
For chat to work, **SupportSDK** requires you specify the obtain the configuration JSON file provided by the mobile configurator within Relay. The downloaded configuration file will look like this:

```
{
  "apiHost": "https://api.goboomtown.com",
  "integrationId": "xxxxxxx",
  "apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
  "buttonURL":"https://api.goboomtown.com/resources/images/sdk_button.png",
  "partnerToken": "xxxxxxxxxxxxx",
  "privateKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

```
The downloaded configuration file may be renamed if desired and should be dragged into your Xcode project. The loadConfigurationFile() method will load this file by name.

## Usage

_Note:_ Objective-C and Swift examples may be found in the `SupportSDK/Examples` folder of this repository

### Objective-C
```Objective-C

@import SupportSDK;

//	Create BTConnectHelp button and add it to view
SupportButton *supportButton = [[SupportButton alloc] initWithFrame:self.view.frame];
supportButton.delegate = self;
if ( ![supportButton<EMAIL_ADDRESS>customerId:nil] ) {
		NSLog(@"Unable to load configuration file");
}
[self.view addSubview:supportButton];

```

### Swift
```Swift

import SupportSDK

let button = SupportButton(frame: self.subview.frame)
button.delegate = self;
if button.loadConfigurationFile("support_sdk.json", customerId:nil) == false  {
		NSLog("Unable to load configuration file")
}
self.view.addSubview(button)

```

## Server Configuration

**SupportSDK** requires you specify the obtain the server configuration JSON file provided by the mobile configurator. The downloaded configuration file will look like this:

```
{
  "apiHost": "https://api.goboomtown.com",
  "integrationId": "xxxxxx",
  "apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "buttonURL":"https://api.goboomtown.com/resources/images/sdk_button.png",
  "partnerToken": "xxxxxxxx",
  "privateKey": "xxxxxxxxxxxxxxxxxxxxx"
}
```

This file enables communication with the server and configures the available features.

## Menu Style

The menu style is configured in the menuAppearance section of the appearance JSON like this:

```
"menuAppearance":
{
  "style": "iconlist",
...
}

```
The style value may be one of the following:

```
"nomenu"
"menu"
"button"
"iconlist"
"iconlistexit"
```

If no value is set the default is iconlist.

## Customer Configuration

If desired, the customer may be identified by providing values for any of the following keys"

```
CustomerId : "members_id",
CustomerExternalId: "members_external_id",
CustomerLocationId: "members_locations_id",
CustomerLocationExternalId: "members_locations_external_id",
CustomerLocationMid: "members_locations_mid",
UserId: "members_users_id",
UserExternalId: "members_users_external_id",
UserEmail: "members_users_email",
UserPhone: "members_users_phone",
```

like this:

```
var customerJSON = {
  "members_users_email"<EMAIL_ADDRESS>};
```

## Appearance Configuration

Much of the application (menus, icons, and colors currently) can be configured using a JSON file as follows:

This is the default JSON.

```
{
  "navigationBarAppearance":
  {
    "textColor": "#000000",
    "backgroundColor": "#ffffff",
    "iconColor": "#000000"
  },
  "menuAppearance":
  {
    "style": "iconlist",
    "heading": "Support",
    "textSize": "20",
    "textStyle": "bold",
    "borderWidth": "1",
    "padding": "10",
    "spacing": "20",
    "textColor": "#000000",
    "iconColor": "#EF5E0D",
    "borderColor": "#E0E0E0",
    "textColorDark": "#ffffff",
    "iconColorDark": "#EF5E0D",
    "borderColorDark": "#E0E0E0"
  },
  "menu":
  {
    "chat": {
      "text": "Chat with Us",
      "icon": "a_chat"
    },
    "callme":
    {
      "text": "Call Me",
      "icon": "phone_call"
    },
    "knowledge":
    {
      "text": "Search Knowledge",
      "icon": "book_bookmark"
    },
    "web":
    {
      "text": "Web Support",
      "icon": "globe"
    },
    "email":
    {
      "text": "Email Support",
      "icon": "letter"
    },
    "phone":
    {
      "text": "Phone Support",
      "icon": "phone"
    },
    "forms":
    {
      "text": "Forms",
      "icon": "form"
    },
    "history":
    {
      "text": "History",
      "icon": "customer_alt"
    },
    "exit":
    {
      "text": "Exit"
    }
  },
  "icons":
  {
    "kbFolderIcon": "book-bookmark",
    "chatAttachmentButtonImage": "paperclip.png",
    "chatSendButtonImage": "send.png"
  },
  "colors":
  {
    "navigationBarColor": "#f2f2f2",
    "iconColor": "#EF5E0D",
    "buttonColor": "#EF5E0D",
    "lineColor": "#E0E0E0",
    "textColor": "#4F4F4F",
    "textColorDark": "#ffffff",
    "homeIconColor": "#EF5E0D",
    "homeLineColor": "#E0E0E0",
    "homeTextColor": "#007AFF",
    "homeSelectedColor": "#EBEBEB",
    "callMeHeaderTextColor": "#4F4F4F",
    "callMeLabelTextColor": "#626363",
    "callMeHintTextColor": "#ACACAC",
    "callMeButtonTextColor": "#ACACAC",
    "callMeButtonBackgroundColor": "#1AA8A8",
    "ratingHeaderTextColor": "#4F4F4F",
    "ratingLabelTextColor": "#626363",
    "ratingHintTextColor": "#ACACAC",
    "ratingButtonTextColor": "#ACACAC",
    "ratingButtonBackgroundColor": "#1AA8A8",
    "chatRefidTextColor": "#4f4f4f",
    "chatNavBarColor": "#f2f2f2",
    "chatSendButtonEnabledColor": "#626363",
    "chatSendButtonDisabledColor": "#ACACAC",
    "chatTimeStampColor": "#ACACAC",
    "chatActionButtonTextColor": "#838383",
    "chatActionButtonSelectedTextColor": "#ffffff",
    "chatActionButtonBorderColor": "#E0E0E0",
    "chatIconColor": "#838383",
    "kbFolderNameTextColor": "#303030",
    "kbFolderL0BackgroundColor": "#F3F8F8",
    "kbTextColor": "#303030",
    "menuBorderColor": "#E0E0E0"
  },
  "formAppearance":
  {
    "cancelButtonText": "Cancel",
    "saveButtonText": "Save",
    "label":
    {
      "textStyle": "bold",
      "textSize": "20",
      "textColor": "#000000",
      "textColorDark": "#ffffff",
      "requiredTextColor": "#000000",
      "requiredTextColorDark": "#ffffff",
      "requiredIndicatorColor": "#cc0000",
      "requiredIndicatorColorDark": "#cc0000"
    },
    "entry":
    {
      "textStyle": "bold",
      "textSize": "20",
      "textColor": "#000000",
      "textColorDark": "#ffffff",
      "borderColor": "#000000",
      "borderColorDark": "#ffffff",
      "borderWidth": "1"
    }
  }
}
```

If you only want to configure a general color scheme you need only set the following colors:

```
iconColor
buttonColor
lineColor
textColor
textColorDark
```

## Acknowledgements

**SupportSDK** makes use of various open source libraries, and we are grateful for the contributions of the open source community.

To help you acknowledge the open source libraries we have used, we have included two files in the root of the repository:

- `Acknowledgements.md` is a Markdown file for you to use however makes sense for you.
- `Acknowledgements.plist` is an Apple PLIST file designed for use in a Settings bundle.

repository: goboomtown/support-sdk-ios

repo_name: goboomtown/support-sdk-ios


text:
# ✏ Writing Prompts Quick Access

MacOS MenuBar App for quick access of online writing prompts.

Thanks for helpful guidelines from [this article](https://camillovisini.com/create-macos-menu-bar-app-pomodoro/) as well as [an additional fix necessary](https://github.com/ronaldoussoren/py2app/issues/284#issuecomment-612095033) to launch the app normally.

license: MIT

repository: martin-martin/menu-bar-writing-prompts

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: martin-martin/menu-bar-writing-prompts


text:
In this lesson, we will learn the basics of navigating your computer's file system through the command-line interface and introduce the python terminal.

This is intended to take < 30min since this class will also involve course introductions, introducing python as a programming language, and helping anyone install things.

Over the weekend, I'll try to put together another notebook that could be used to showcase python.

repository: How-to-Learn-to-Code/python-class

gha_language: Jupyter Notebook

gha_license_id: MIT

repo_name: How-to-Learn-to-Code/python-class


text:
# dianping-spider

Get some reviews of some members of dianping and sort by the mentioned times of the shop.

## Requirement

* `python3`, which should be found by `/usr/bin/env`.
* bs4, the html-parser of python3.
* urllib, to get something via the net.

## Notes

* Now the version can only work on a UNIX/UNIX-like OS, because it requires a '/' spiliter in path (maybe solved in the future).
* It seems like that [dianping](http://www.dianping.com/) is against spider, so the `dump.py` may block sometime. But it doesn't matter, just kill and restart it (after rest for a while), it will continue to work.

## Usage

Simply use:

```sh
./dump.py
./sort.py
./conv.py > res_table.txt
```

And it will download some reviews of 300 members in Shanghai of [dianping](http://www.dianping.com), 300 reviews per member at most and 90,000 in total by default.

repository: FreeBirdLjj/dianping-spider

repo_name: FreeBirdLjj/dianping-spider


text:
---
#cspell:ignore runstrategy
uid: BenchmarkDotNet.Samples.IntroMonitoring
---

## Sample: IntroMonitoring

If a benchmark method takes at least 100ms, you can also use the `Monitoring` strategy.
In this case, the pilot stage will be omitted, by default you get 1 iteration = 1 operation
  (or you can manually set amount of operation in an iteration).
Also you can use `[IterationSetup]` and `[IterationCleanup]` in this case: it shouldn't affect time measurements
  (but it can affect results of MemoryDiagnoser).
It's a perfect mode for benchmarks which doesn't have a steady state and the performance distribution is tricky:
  `Monitoring` will help you to collect a set of measurements and get statistics.

### Usage

```cs
[SimpleJob(RunStrategy.Monitoring, launchCount: 10, warmupCount: 0, iterationCount: 100)]
public class MyBenchmarkClass
```

### Source code

[!code-csharp[IntroMonitoring.cs](../../../samples/BenchmarkDotNet.Samples/IntroMonitoring.cs)]

### Output

```markdown
Result       1: 1 op, 61552600.00 ns, 61.5526 ms/op
Result       2: 1 op, 10141700.00 ns, 10.1417 ms/op
Result       3: 1 op, 10482900.00 ns, 10.4829 ms/op
Result       4: 1 op, 50410900.00 ns, 50.4109 ms/op
Result       5: 1 op, 10421400.00 ns, 10.4214 ms/op
Result       6: 1 op, 20556100.00 ns, 20.5561 ms/op
Result       7: 1 op, 70473200.00 ns, 70.4732 ms/op
Result       8: 1 op, 50581700.00 ns, 50.5817 ms/op
Result       9: 1 op, 10559000.00 ns, 10.5590 ms/op
Result      10: 1 op, 70496300.00 ns, 70.4963 ms/op
```

| Method |     Mean |    Error |   StdDev |      Min |       Q1 |       Q3 |      Max |
|------- |---------:|---------:|---------:|---------:|---------:|---------:|---------:|
|    Foo | 36.57 ms | 40.03 ms | 26.47 ms | 10.14 ms | 10.48 ms | 61.55 ms | 70.50 ms |

### Links

* @docs.runstrategy
* The permanent link to this sample: @BenchmarkDotNet.Samples.IntroMonitoring

---

repository: dotnet/BenchmarkDotNet

gha_language: C#

repo_name: dotnet/BenchmarkDotNet


text:
# Bare minimum Node.js Alexa Skill Boiler Plate

This is a bare minimum boiler plate for Alexa Skill created by Pradipta Shrestha of Cowtown Software LLC. Feel free to fork it and add anything to it and start working on your very own Alexa Skill.

To start, clone this repository to appropriate folder of your choice on your computer. Make sure node.js is installed. Then, on your terminal navigate to folder "src" then enter the following command:
```bash
npm install --save alexa-sdk
```
Learn more about the Alexa Skills Kit SDK for Node.js at [alexa-sdk](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs)

repository: CowtownSoftware/AlexaSkillBoilerplate

repo_name: CowtownSoftware/AlexaSkillBoilerplate


text:
---
id: e5-6
title: "Modernize a decade old pipeline with Airflow 2.0"
url: /sessions/2021/modernize-a-decade-old-pipeline-with-airflow-2.0
speakers:
 - QP Hou
 - Kuntal Basu
 - Stas Bytsko
 - Dmitry Suvorov
time_start: 2021-07-15T06:00:00.000Z
time_end: 2021-07-15T06:50:00.000Z
block: e
slot: 5
format: adoption
crowdcast_id: 36
slides: 2021/e5_6-ModernizeAirflow-Scribd.pdf
video: https://youtu.be/3qCunfl3jvo
---

As a follow up for https://airflowsummit.org/sessions/teaching-old-dag-new-tricks/, in this talk, we would like to share a happy ending story on how Scribd fully migrated its data platform to the cloud and Airflow 2.0.

 We will talk about data validation tools and task trigger customizations the team built to smooth out the transition. We will share how we completed the Airflow 2.0 migration started with an unsupported MySQL version and metrics to prove why everyone should perform the upgrade. Lastly, we will discuss how large scale backfills (10 years worth of run) are managed and automated at Scribd.

repository: softwareguru/airflowsummit-website

gha_language: HTML

gha_license_id: NOASSERTION

repo_name: softwareguru/airflowsummit-website


text:
# A Leaf In Space
A Leaf In Space is a tribute game to Faster Than Light made in two weeks in Gamemaker for the OperaGX Gamejam.

It can be played for free, directly in your browser at [A Leaf In Space](https://gamejolt.com/games/alip/637520) and a run only takes a few minutes so nothing's stopping you from giving it a try!

https://user-images.githubusercontent.com/10576004/129777040-5b232d54-d921-441c-8bce-330670fd760c.mp4

A small difference with FTL is that between each encounter you choose a reward between 3 different items, à la Slay The Spire.

![shop-menu](assets/Screenshot_5.png)

## About the OperaGX gamejam
The theme of the game jam was "UFO" and the goal was for the game to be run when you don't have internet on Opera GX browser.
A requirement was for the game to be under 5 Mb (A Leaf In Space's build is just below at 4.75 Mb uncompressed).

## Credit

- Programing and Art - [Simon Andersen](https://twitter.com/SimAndersenDev)
- Music and Sound Design - [Zenibuka](https://soundcloud.com/zenibuka)

We also used the font [m5x7](https://managore.itch.io/m5x7) made by Daniel Linssen.

![thumbnail](assets/thumbnail_3.png)

repository: Garfounkel/A-Leaf-In-Space

branch_name: refs/heads/main

repo_name: Garfounkel/A-Leaf-In-Space


text:
# spring-auth-programmatically
An example for a programmatically user authentication with spring.

## Spring-Boot-Security. Authenticate programmatically

Demo Project for the blog-entry: http://chclaus.de/2016/02/09/spring-boot-security-authenticate-programmatically/

repository: chclaus/spring-auth-programmatically

repo_name: chclaus/spring-auth-programmatically


text:
# D-Claw Tips for Making Source Files

Katy Barnhart

Some tidbits from Dave

1. Sometimes very very thin layers of h can exist if you init by setting
   b (with settopo) and h (with setqinit, h = q1). This might happen when
   you think it shouldn't because of interpolation to the clawpack grids.

   A better practice is to set b and eta (with setqinit eta = q_last).
   In the places where h = 0 set eta to eta << b. The initialization routines
   will set b and eta to the value of b where eta << b.

2. When setting up a run where you want m to have one value in one place
   and another value (e.g., clearwater of m=0) in another, use a
   setqinit file for m over the entire domain. Set digdata.m0 to the
   sediment flow value. And add a couple of grid cells of the higher
   sediment concentration around the landslide source. This ensures
   that interpolation in m doesn't create a spurious ring of water
   around the sediment domain.

   It also appears that it is important to require a minimum grid level
   surrounding the region with buffered m0 values that resolves the
   buffered grid cells. This is important to prevent spurious boundary water.

   Note, setqinit for m takes m not hm.

3. Can use a value of h or eta at a landslide source that doesn't include
   clearwater/ocean, and then also set sea level with that geodata input.

repository: geoflows/D-Claw

gha_language: Fortran

repo_name: geoflows/D-Claw


text:
# CS236G-project

### Training
Run the following commands for different models as described below:
#### Baseline BiGAN

##### Without Extra Image Discriminator
```bash
python main.py --use_image_discriminator False --batch_size 100 --num_epochs 100  --use_cuda --cuda_device 0
  --dataset DATASET                 # one of cifar10, svhn, cifar_mnist, timagenet
  --dataroot DATAROOT               # root path of the datasets
  --save_model_dir SAVE_MODEL_DIR   # path to directory to save model checkpoints
  --save_image_dir SAVE_IMAGE_DIR   # path to directory to save generated images
```

##### With Extra Image Discriminator
```bash
python main.py --use_image_discriminator True --batch_size 100 --num_epochs 100  --use_cuda --cuda_device 0
  --dataset DATASET                 # one of cifar10, svhn, cifar_mnist, timagenet
  --dataroot DATAROOT               # root path of the datasets
  --save_model_dir SAVE_MODEL_DIR   # path to directory to save model checkpoints
  --save_image_dir SAVE_IMAGE_DIR   # path to directory to save generated images
```

#### Extension of BiGAN with positive pair discrimination

```bash
python main_pos.py --use_cuda
  --dataset DATASET                 # one of cifar10, svhn, cifar_mnist, timagenet
  --alpha ALPHA                     # Weightage of the extra reals` loss
  --dataroot DATAROOT               # root path of the datasets
  --save_model_dir SAVE_MODEL_DIR   # path to directory to save model checkpoints
  --save_image_dir SAVE_IMAGE_DIR   # path to directory to save generated images
```

#### Extension of BiGAN with negative pair discrimination

```bash
python main_neg.py --use_cuda
  --dataset DATASET                 # one of cifar10, svhn, cifar_mnist, timagenet
  --alpha ALPHA                     # Weightage of the extra fakes` loss
  --dataroot DATAROOT               # root path of the datasets
  --save_model_dir SAVE_MODEL_DIR   # path to directory to save model checkpoints
  --save_image_dir SAVE_IMAGE_DIR   # path to directory to save generated images
```

#### Extension of BiGAN with both positive and negative pair discrimination

```bash
python main_combined.py --batch_size 100 --num_epochs 100 --use_cuda --cuda_device 0
  --dataset DATASET                 # one of cifar10, svhn, cifar_mnist, timagenet
  --alpha ALPHA                     # Weightage of the extra reals` loss
  --beta BETA                       # Weightage of the extra fakes` loss
  --dataroot DATAROOT               # root path of the datasets
  --save_model_dir SAVE_MODEL_DIR   # path to directory to save model checkpoints
  --save_image_dir SAVE_IMAGE_DIR   # path to directory to save generated images
```

### Evaluation

#### To save the features, run -
Generate and save the features of test dataset using a trained model for evaluation.
Run the following script with the parameters as specified below:
```bash
python save_features.py
    --dataset DATASET           # one of cifar10, svhn, cifar_mnist_mnist, cifar_mnist_cifar, timagenet
    --feat_dir FEAT_DIR         # path to root directory to save the features
    --model_path MODEL_PATH     # path of the checkpoint for the trained model
    --dataroot DATAROOT         # root path of the datasets
```

After generating the features, run KNN or logistic classifier evaluation as specified below:
#### KNN classification:

```bash
python nearest_neighbour_acc_1.py
    --dataset DATASET           # one of cifar10, svhn,cifar_mnist_mnist, cifar_mnist_cifar, timagenet
    --feat_dir FEAT_DIR         # path to root directory to save the features
```

#### Logistic Regression
```bash
python classify_linear.py --model_type logistic
    --dataset DATASET           # one of cifar10, svhn, cifar_mnist_mnist, cifar_mnist_cifar, timagenet
    --feat_dir FEAT_DIR         # path to root directory to save the features

```

### Visualization

To visualize the representation learned by the models, run the notebook Visualizations.ipynb in notebooks folder


text:
# Servo Driver
micro:bit custom pxt package for Adafruit I2C servo board (https://www.adafruit.com/product/815)

# Servo Driver package

A simple set of control functions for the AdaFruit PCA9615 16 channel Servo board
using I2C. This board will allow up to 16 servos to be controlled, just using the 2 I2C pins on the micro_bit (pins 19 and 20)

The code is extremely simple to use. Simply initialize the board using its I2C address at the start of your code. You also need to set the PWM frequency, and a value of 60Hz usually is about right

Then, any servo can be moved using the setPin command. Servos are numbered 0 to 15, and need to be sent a value between 0 and 4096.

Note: the extreme values of 0 and 4096 will probably be out of range for the servos, so you should calibrate their extreme values by trial and error.

## Sample code

```javascript
servodriver.init(boardId.id0x40)
servodriver.setPWMFreq(60)
basic.pause(1000)
servodriver.moveTo(0, 400, servoDirection.normal)
servodriver.moveTo(0, 1000, servoDirection.normal)
```

## Supported targets

* for PXT/microbit

## License

MIT

repository: CoderDojoOlney/pxt-servo

repo_name: CoderDojoOlney/pxt-servo


text:
# Advertising and Social Influence project

## Assignment

Note: for more details on the assignment see the Advertising and Social Influence chapter in [project-proposals.pdf](https://github.com/Desno365/Data-Intelligence-Applications-Project/raw/main/project-proposals.pdf)

#### Description of the project

Consider the scenario in which an advertiser tries to activate a cascade in a social network by using sponsored ads. On the other side, the social network platform works as an ad publisher. The nodes of social networks can be of different categories and the activation probabilities depend on the categories of the nodes. [...]

## Usage

The runnable scripts used to run analyses and create plots are `step1.py`, `step3.py` and `step4_5_6.py`. Each script comes with a first section called "Constants" that includes variables which are used as settings for that particular analysis.

There are also global settings that are stored in the variables contained in `constants.py`, for example there are stored the number of nodes in the network, the number of categories, the number of slots and many others global variables.

Also, there are runnable scripts in the `tests` folder that are used internally to check the correctness of the algorithms. For example the script `test_vcg_auction.py` contains some unit tests to check the correctness of the VCG Auction.

## Grade

This project was made for the course: "Data Intelligence Applications" (subsequently renamed "Online Learning Applications") at "Politecnico di Milano", Academic Year 2020/2021.

Grade: 30/34.

## Developers

[Innocente Federico](https://github.com/InnocenteFederico)

[Marchisciana Matteo](https://github.com/Marchingegno)

[Motta Dennis](https://github.com/Desno365)

[Ostrovan Eugenio](https://github.com/lleugen)


text:
# stalld

The stalld program (which stands for 'stall daemon') is a
mechanism to prevent the *starvation* of operating system threads in a
Linux system. The premise is to start up on a *housekeeping* cpu (one
that is not used for real-application purposes) and to periodically
monitor the state of each thread in the system, looking for a thread
that has been on a run queue (i.e. ready to run) for a specifed length
of time without being run. This condition is usually hit when the
thread is on the same cpu as a high-priority cpu-intensive task and
therefore is being given no opportunity to run.

When a thread is judged to be starving, stalld changes
that thread to use the SCHED_DEADLINE policy and gives the thread a
small slice of time for that cpu (specified on the command line). The
thread then runs and when that timeslice is used, the thread is then
returned to its original scheduling policy and stalld then
continues to monitor thread states.

There is now an experimental option to boost using SCHED_FIFO. This
logic is used if the running kernel does not support the
SCHED_DEADLINE policy and may be forced by using the -F/--force_fifo
option.

## Command Line Options

`Usage: stalld [-l] [-v] [-k] [-s] [-f] [-h] [-F]
          [-c cpu-list]
          [-p time in ns] [-r time in ns]
          [-d time in seconds] [-t time in seconds]`

### Logging options
- -l/--log_only: only log information (do not boost) [false]
- -v/--verbose: print info to the std output [false]
- -k/--log_kmsg: print log to the kernel buffer [false]
- -s/--log_syslog: print log to syslog [true]

### Startup options
- -c/--cpu: list of cpus to monitor for stalled threads [all cpus]
- -f/--foreground: run in foreground [false but true when -v]
- -P/--pidfile: write daemon pid to specified file [no pidfile]

### Boosting options
- -p/--boost_period: SCHED_DEADLINE period [ns] that the starving task will receive [1000000000]
- -r/--boost_runtime: SCHED_DEADLINE runtime [ns] that the starving task will receive [20000]
- -d/--boost_duration: how long [s] the starving task will run with SCHED_DEADLINE [3]
- -F/--force_fifo: force using SCHED_FIFO for boosting

### Monitoring options
- -t/--starving_threshold: how long [s] the starving task will wait before being boosted [60]
- -A/--aggressive_mode: dispatch one thread per run queue, even when there is no starving
                          threads on all CPU (uses more CPU/power). [false]
### Miscellaneous
- -h/--help: print this menu

## Repositories
The repository at https://gitlab.com/rt-linux-tools/stalld is the main
repository, where the development takes place.

The repository at https://git.kernel.org/pub/scm/utils/stalld/stalld.git is the
distribution repository, where distros can pick the latest released version.


text:
---
title: Photoshop touch and the magic torch
date: 2011-11-22 13:49:46 Z
permalink: "/2011/11/22/photoshop-touch-and-the-magic-torch/"
categories:
- android
- photography
layout: single
author_profile: true
type: pages
---

John Nack posted about this amazing tutorial by Russell Brown.

I’ve got to be honest, when watching it I was somewhat sceptical, and wondered if the US has another April Fools day in Mid-November.

However, using Photoshop Touch on my Tablet (Asus Transformer) and the torch light on my HTC Desire I was able to recreate the same effect. While the output is quite impressive, there is something about being hands-on with a torch, and illuminating my photograph in real time that just feel ludicrous (in a good way)

Photoshop Touch is available for both iOS tablets and Android Tablets, and it really is surprisingly powerful

Below is a simple example using a photo I took inside the Oxford Pitt Rivers museum (which is mostly poorly lit, and the kids go exploring by torch light – great fun):

Before and then After are below – click for larger images:


text:
# Text processor package
A simple package for analyzing a text and provide tiny details about word frequencies inside any text

# Usage
```
word = 'The'
text = 'The sun shines over The lake'
frequency = 3
analyzer = WordFrequencyAnalyzer(WordFrequency)
print(analyzer.calculateHighestFrequency(text))
print(analyzer.calculateFrequencyForWord(text, word))
print(analyzer.calculateMostFrequentNWords(text, frequency))
```

# Testing
You could run this command to run the tests
```
pytest
```


text:
# Deploy `json-server` to `{{ free hosting site }}`

> Instructions how to deploy the full fake REST API [json-server](https://github.com/typicode/json-server) to various free hosting sites. Should only be used in development purpose but can act as a simpler database for smaller applications.

* [**Create your database**](#create-your-database)
* [Deploy to **Heroku**](#deploy-to-heroku)
* [Deploy to **Azure**](#deploy-to-azure)

## Create your database

1. Press the green `Use this template`-button in the right corner
2. Give your new repo a name and press the green `Create repository from template`-button
3. Clone your newly created repository to your computer

4 . Change the contents of `db.json` to **your own content** according to the [`json-server example`](https://github.com/typicode/json-server#example) and then `commit` your changes to git locally.

_this example will create `/posts` route , each resource will have `id`, `title` and `content`. `id` will auto increment!_
```json
{
  "posts":[
    {
      "id" : 0,
      "title": "First post!",
      "content" : "My first content!"
    }
  ]
}
```

---

## Deploy to **Heroku**

Heroku is a free hosting service for hosting small projects. Easy setup and deploy from the command line via _git_.

###### Pros

* Easy setup
* Free

###### Cons

* App has to sleep a couple of hours every day.
* "Powers down" after 30 mins of inactivity. Starts back up when you visit the site but it takes a few extra seconds. Can maybe be solved with [**Kaffeine**](http://kaffeine.herokuapp.com/)

---

### Install Heroku

1 . [Create your database](#create-your-database)

2 . Create an account on
[https://heroku.com](https://heroku.com)

3 . Install the Heroku CLI on your computer:
[https://devcenter.heroku.com/articles/heroku-cli](https://devcenter.heroku.com/articles/heroku-cli)

4 . Connect the Heroku CLI to your account by writing the following command in your terminal and follow the instructions on the command line:
```bash
heroku login
```

5 . Then create a remote heroku project, kinda like creating a git repository on GitHub. This will create a project on Heroku with a random name. If you want to name your app you have to supply your own name like `heroku create project-name`:
```bash
heroku create my-cool-project
```

6 . Push your app to __Heroku__ (you will see a wall of code)
```bash
git push heroku master
```

7 . Visit your newly create app by opening it via heroku:
```bash
heroku open
```

8 . For debugging if something went wrong:
```bash
heroku logs --tail
```

---

#### How it works

Heroku will look for a startup-script, this is by default `npm start` so make sure you have that in your `package.json` (assuming your script is called `server.js`):
```json
 "scripts": {
    "start" : "node server.js"
 }
```

You also have to make changes to the port, you can't hardcode a dev-port. But you can reference herokus port. So the code will have the following:
```js
const port = process.env.PORT || 4000;
```

## Deploy to **Azure**

You can also use _Microsoft Azure_ to deploy a smaller app for free to the Azure platform. The service is not as easy as _Heroku_ and you might go insane because the documentation is really really bad at some times and it's hard to troubleshoot.

The **pros** are that on _Azure_ the app **will not be forced to sleep**. It will sleep automatically on inactivity but you can just visit it and it will start up.

## Installation

1 . Create a Microsoft Account that you can use on Azure:

https://azure.microsoft.com/

2 . Install the `azure-cli`:

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
_This might cause some trouble, you will see. Remember to restart your terminal or maybe your computer if the commands after this does not work_

3 . Login to the service via the command line and follow the instructions:

```bash
az login
```
_You will be prompted to visit a website and paste a confirmation code_

## Create the project

1 . [Create your database](#create-your-database)

2 . Create a resource group for your projects, replace the name to whatever you want just be sure to use the same group name in all commands to come. You only have to create the resource group and service plan once, then you can use the same group and plan for all other apps you create if you like.

```bash
az group create -n NameOfResourceGroup -l northeurope
```

3 . Create a service plan:

```
az appservice plan create -n NameOfServicePlan -g NameOfResourceGroup
```

4 . Create the actual app and supply the service plan and resource group
```bash
az webapp create -n NameOfApp -g NameOfResourceGroup --plan NameOfServicePlan
```

5 . Create deployment details. A git-repo is not created automatically so we have to create it with a command:

```bash
az webapp deployment source config-local-git -n NameOfApp -g NameOfResourceGroup
```

6 . From the command in step 5 you should get a **url** in return. Copy this url and add it as a remote to your local git project, for example:

```bash
git remote add azure<EMAIL_ADDRESS>```

7 . Now you should be able to push your app:
```bash
git push azure master
```

You should be prompted to supply a password, this should be the pass to your account. If not, you can choose a different password at your Dashboard for Azure: **[https://portal.azure.com/](https://portal.azure.com/)**

Choose **App Services** in the sidebar to the left and the choose your app in the list that appears then go to **Deployment Credentials** to change your password for deployment:

https://docs.microsoft.com/en-us/azure/app-service/app-service-deployment-credentials

## CREDITS
https://github.com/jesperorb

repository: edsonstudio/json-server-angular

repo_name: edsonstudio/json-server-angular


text:
SonataExtraAdminBundle
======================

Provides some extra features to Sonata Admin.

## Installation

### Download SonataExtraAdminBundle using Composer

Add on composer.json (see http://getcomposer.org/)

``` js
"require" :  {
    // ...
    "picoss/sonata-extra-admin-bundle": "dev-master",
}
```

Now tell composer to download the bundle by running the command:

``` bash
$ php composer.phar update picoss/sonata-extra-admin-bundle
```

Composer will install the bundle to your project's `vendor/picoss` directory.

### Register the bundle

To start using this bundle, register it in the Kernel:

``` php
<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Picoss\SonataExtraAdminBundle\PicossSonataExtraAdminBundle(),
    );
    // ...
}
```

### Configure the bundle (optional)

This bundle comes with a default configuration.

See [Configuration reference](http://github.com/picoss/SonataExtraAdminBundle/blob/master/Resources/doc/configuration_reference.md) to override default configuration

### Next Step

Now that you have completed the basic installation and configuration of the
PicossSonataExtraAdmin, you are ready to learn about more advanced features and usages
of the bundle.

The following documents are available:

- [List View Types](list_view_types.md)
- [Show View Types](show_view_types.md)
- [List View Sortable Behavior](list_view_sortable.md)
- [Audit Manager](audit_manager.md)
- [Trash Manager](trash_manager.md)

repository: Tecnocreaciones/SonataExtraAdminBundle

repo_name: Tecnocreaciones/SonataExtraAdminBundle


text:
NITRO API Wrapper
=================
This project is a minimalist wrapper around the NetScaler NITRO API.  Its purpose
is to expedite the process of testing the API and building scripts to do useful tasks.

It is expected that you refer to the NITRO documentation while using this lib.
The NITRO REST API documentation can be downloaded from your NetScaler by
navigating to: `Downloads > NITRO API Documentation`

There are two ways in which this lib can be consumed:

1. The `API` class can be instantiated from any code.  It has a single `request`
 method, which is used to make API calls against NITRO.

2. The `CLI` class is a subclass of `API` and is designed to be a convenience
 class for working with stand alone scripts that populate the `API` constructor
 using command line arguments parsed by `docopt`.  The command line arguments can be
 passed in directly or they can be added to a JSON file and the `--json` flag can
 be used to reference the JSON file path. A `cli_example.py` file is included in
 the package to give a working example of how to use this use case.

The `request` method takes a NITRO API call and returns a python dictionary with
the result.

``` python
api.request(self, path, payload=None, method=None)
```

``` sphinx
Builds the request and returns a json object of the result or None.
If 'payload' is specified, the request will be a POST, otherwise it will be a GET.

:param path: a path appended to 'self.base_path' (default of '/nitro/v1'),
             eg: path='/config' => '/nitro/v1/config'
:type path: str or unicode

:param payload: the object to be passed to the server
:type payload: dict or None

:param method: the request method [ GET | POST | PUT | DELETE ]
:type method: str or unicode

:returns: the result of the request as a dictionary;
    if result is json: return json as a dict
    if result == '': return {'headers': <headers dict>}
    if result != json and result != '': return {'result': '<text returned>'}
:rtype: dict or None
```

**Examples using the parent `API` class:**

``` python
from nitroapi import API

# Recommended usage using WITH (to automatically login and logout):
with API(username="your user", password="your pass", endpoint="ns url") as api:
    system_stats = api.request('/stat/system')

# Manual setup and tear down example (requires explicit logout):
api = API(username="your user", password="your pass", endpoint="ns url")
api.request('/config/login', {
    'login': {
        'username':api.username,
        'password':api.password
    }
})
system_stats = api.request('/stat/system')
api.request('/config/logout', {'logout': {}})
```

**Examples using the `CLI` sub-class:**

Duplicate the `./cli_example.py` to get started.

``` python
from nitroapi import CLI

# Recommended usage using WITH (to automatically login and logout):
with CLI(__doc__) as api:
    pprint.pprint(api.request('/stat/system'))

# Manual setup and tear down example (requires explicit logout):
api = CLI(__doc__)
api.request('/config/login', {
    'login': {
        'username':api.username,
        'password':api.password
    }
})
system_stats = api.request('/stat/system')
api.request('/config/logout', {'logout': {}})
```

INSTALL
=======
The easiest way to install this library is through `pip`.

``` bash
$ pip install nitroapi
```

Alternatively, you can pull down the source code directly and install manually.

``` bash
$ git clone https://github.com/swill/nitroapi.git
$ cd nitroapi
$ python setup.py install
```

USAGE
=====
The core functionality is documented above, but it is worth spending a minute
to better describe the `CLI` use case.

``` bash
$ ./cli_example.py --help

Usage:
  cli_example.py [--json=<arg>] [--endpoint=<arg> --username=<arg> --password=<arg>] [options]
  cli_example.py (-h | --help)

Options:
  -h --help             Show this screen.
  --json=<arg>          Path to a JSON config file with the same names as the options (without the '--' prefix).
  --endpoint=<arg>      NetScaler URL.
  --username=<arg>      NetScaler username.
  --password=<arg>      NetScaler password.
  --base_path=<arg>     Base NetScaler API path [default: /nitro/v1].
  --logging=<arg>       Boolean to turn on or off logging [default: True].
  --log_level=<arg>     The logging verbosity. [default: DEBUG].
                        Valid entries are: CRITICAL | ERROR | WARNING | INFO | DEBUG | NOTSET
  --log=<arg>           The log file to be used [default: logs/nitroapi.log].
  --clear_log=<arg>     Removes the log each time the API object is created [default: True].
  --verify_ssl=<arg>    Verify the SSL Certificate for a target HTTPS endpoint [default: True].
```

repository: bdelcamp/nitroapi

repo_name: bdelcamp/nitroapi


text:
# bf-bench-rs — Benchmarks for (Rust) Brainfuck Implementations

Currently benchmarked implementations include:

 - bf: https://crates.io/crates/bf

 - brainfuck: https://crates.io/crates/brainfuck

repository: tov/bf-bench-rs

gha_language: Brainfuck

repo_name: tov/bf-bench-rs


text:
# GEO-REST-API

Geo-REST-API provides the REST service to maintain restaurant details along with its location using MongoDB. It also helps to list down restaurants within certain range.

## Goal / Assumption

- REST API to add, modify, delete, update restaurant info ('location' to be precise)
- Use NodeJS, KoaJS, MongoDB, Docker container
- Provide API to search restaurants within certain range (user provided)

## How to run the App?

With Docker container

```
$ docker run -p 4000:3000 sanjivkrishnasamy/geo-api
```

To test the deployed service

```
https://geo-rest-apis.herokuapp.com/
```

To setup a development environment, please use NodeJS v8

```
$ git clone https://github.com/sanjivkrish/Geo-rest-API.git
$ cd Geo-rest-API
$ npm install
$ npm start
```

## Project Structure

* `app.js` Kick starts server and DB initialization.
* `routes.js` Combines various routes. ('restaurant' is the only available route at present)
* `API` package to hold all routes.
  * `root.js` Handles calls for '/'
  * `restaurant.js` Handles calls for '/restaurant'
* `dbs` package to manage MongoDB

## JSON structure

Name, latitude and longitude are required fields and rest are optional (Since our concern here is location API).
ID is auto-generated timestamp created during the time of addition.

```js
RestaurantInfo:
    type: object
    required:
      - name
      - lat
      - long
    properties:
      id:
        type: integer
        format: auto-generated
      name:
        type: string
        example: 'ABC Restaurant'
      lat:
        type: number
        format: float
      long:
        type: number
        format: float
```

## API Documentation

**Request**
```
Get /
```
**Response :**
Returns body with status message 'Home Page'

**Request**
```
Get /restaurant
```

**Response :**
Returns list of all restaurants.

**Request**
```
POST /restaurant
```

Example : Request-Body
```
{
  name : 'Sample Restaurant',
  lat : 14.2,
  long : 12
  others : {}
}
```

**Response :**
Add new restaurant info.
```
201 CREATED     - In case of Success
400 BAD_REQUEST - Invalid input
```

**Request**
```
PUT /restaurant/:id
```

Example : PUT /restaurant/1367667
```
{
  id : 1367667,
  name : 'Sample Restaurant',
  lat : 14.2,
  long : 12
  others : {}
}
```

**Response :**
Update a restaurant info
```
204 UPDATE      - In case of Success
400 BAD_REQUEST - Restaurant not found
404 BAD_REQUEST - Invalid input
```

**Request**
```
DELETE /restaurant/:id
```

Example : DELETE /restaurant/1367667

**Response :**
Remove a restaurant info
```
204 UPDATE      - In case of Success
404 BAD_REQUEST - Invalid input
```

**Request**
```
GET /restaurant/search?query
```

Example : GET /restaurant/search?lat=5&long=7&radius=1

**Response :**
Returns list of restaurant that satisfies the query
```
204 UPDATE      - In case of Success
404 BAD_REQUEST - Invalid input
```

## License

Geo-REST-API is released under the MIT License.

Contributions are welcome, and bug reports or pull requests are always helpful.

repository: sanjivkrish/Geo-rest-API

repo_name: sanjivkrish/Geo-rest-API


text:
# Command-line interface

## Common CLI options

### For all commands
`--help, -h`

Displays help for the specified command.

### Root level options
`--version`

Displays the version of the tool.

### Repo options
Commands that operate on the repos of an existing project.

`--only-me`

Includes only the repo under the currentr diretory. If the current directory is not part of a repo, an error is displayed.

`--tags <tag1> <tag2> ...`

Includes only repos that have all the specified tags.

`--exclude-tags <tag1> <tag2> ...`

Excludes repos that have any of the specified tags.

## Initialize a multi-repo
This command initializes a new multi-repo. A multi-repo needs a JSON manifest definition file stored in either a separate repository or in an existing repository at a specific folder.

```sh
mr init <project-root-dir> <manifest dir> [--discover] [--branch <branch name>]
```

`<project-root-dir>` [Required]

The directory to setup the new multi-repo project in. This becomes the root directory of the project.

`<manifest dir>` [Required]

The relative directory from the project root directory to contain the manifest.

`--discover` [Optional]

If specified, attempts to locate repositories under the `<project-root-dir>` and add them to the project.

`--branch` [Optional]

The branch of the repository to checkout for the manifest details.

## Clone an existing multi-repo
Clones an existing multi-repository project to the local machine.

```sh
mr clone <manifest repo url> [<manifest repo dir>] [--project-root-dir <dir>] [--]
```

`<manifest repo url>` [Required]

The URL to the repository that contains the JSON manifest file. This could be a separate repository just to hold the manifest file and related files, or an existing repository where the manifest is stored under some directory. In the latter case, use the `<manifest dir>` argument to specify the directory location.

`<manifest dir>` [Optional]

The relative directory in the repository where the JSON manifest file is located.

**Default**: The root directory in the repo.

`--project-root-dir, -r` [Optional]

The directory on the local system to setup the multi-repo project. This directory becomes the root directory for the project.

**Default**: The current directory.

## Get latest from repositories
Gets the latest from the selected repositories.

```sh
mr pull [repo options]
```

repository: JeevanJames/MultiRepo

repo_name: JeevanJames/MultiRepo


text:
# golang

[![dockeri.co](https://dockeri.co/image/snowdreamtech/golang)](https://hub.docker.com/r/snowdreamtech/golang)

[![GitHub issues](https://img.shields.io/github/issues/snowdreamtech/dockerfiles.svg "GitHub issues")](https://github.com/snowdreamtech/dockerfiles) [![GitHub stars](https://img.shields.io/github/stars/snowdreamtech/dockerfiles.svg "GitHub stars")](https://github.com/snowdreamtech/dockerfiles)

## Tags

* latest, alpine, 1, 1.16, 1.16.3, 1.16.3-alpine3.13

##  How to use this image

Note: `/go` is world-writable to allow flexibility in the user which runs the container (for example, in a container started with `--user 1000:1000`, running `go get github.com/example/...` will succeed). While the `777` directory would be insecure on a regular host setup, there are not typically other processes or users inside the container, so this is equivilant to `700` for Docker usage, but allowing for `--user` flexibility.

### Start a Go instance in your app

The most straightforward way to use this image is to use a Go container as both the build and runtime environment. In your Dockerfile, writing something along the lines of the following will compile and run your project:

```bash
FROM golang:1.14

WORKDIR /go/src/app
COPY . .

RUN go get -d -v ./...
RUN go install -v ./...

CMD ["app"]
```

You can then build and run the Docker image:

```bash
$ docker build -t my-golang-app .
$ docker run -it --rm --name my-running-app my-golang-app
```

### Compile your app inside the Docker container

There may be occasions where it is not appropriate to run your app inside a container. To compile, but not run your app inside the Docker instance, you can write something like:

```bash
$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:1.14 go build -v
```

This will add your current directory as a volume to the container, set the working directory to the volume, and run the command go build which will tell go to compile the project in the working directory and output the executable to myapp. Alternatively, if you have a Makefile, you can run the make command inside your container.

```bash
$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:1.14 make
```

### Cross-compile your app inside the Docker container

If you need to compile your application for a platform other than linux/amd64 (such as windows/386):

```bash
$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp -e GOOS=windows -e GOARCH=386 golang:1.14 go build -v
```

Alternatively, you can build for multiple platforms at once:

```bash
$ docker run --rm -it -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:1.14 bash
$ for GOOS in darwin linux; do
>   for GOARCH in 386 amd64; do
>     export GOOS GOARCH
>     go build -v -o myapp-$GOOS-$GOARCH
>   done
> done
```

repository: snowdreamtech/dockerfiles

repo_name: snowdreamtech/dockerfiles


text:
An example Google AppEngine project using Cloud Endpoints and custom authentication.

The supported workflow:
 - A mobile client authenticates via a third-party provider using a native SDK flow, in this case with Facebook.
 - The Facebook access token is sent to the AppEngine app, who verifies and returns its own access token in response, creating a new User entity if necessary.
 - The client includes that token in each endpoints service request using in the `Authorization` header.
 - The endpoints method uses the access token to retrieve the authenticated user.

This is intentionally a narrow use case, but should help inspire ideas on different approaches as well.

## Dependencies
1. [webapp2](http://webapp-improved.appspot.com/index.html) is used for the access token exchange handler
2. [webapp2_extras.appengine](http://webapp-improved.appspot.com/api/webapp2_extras/appengine/auth/models.html) provides a custom User model
3. [simpleauth](https://github.com/crhym3/simpleauth) is included a submodule and is used to verify provider access tokens

## Usage

1. Check out the project and submodules
  ```bash
  git clone git@github.com:loudnate/appengine-endpoints-auth-example.git
  git submodule update
  ```

2. [Generate a client application](https://developers.google.com/appengine/docs/python/endpoints/gen_clients) for your endpoints
3. Include the [Facebook SDK](https://developers.facebook.com/docs/facebook-login) and implement a login flow
4. Exchange the Facebook access token for one provided by your app
  ```bash
  POST /oauth2/access_token HTTP/1.1
  Host: https://your-app-id.appspot.com
  Cache-Control: no-cache
  Content-Type: application/x-www-form-urlencoded

  x_access_token=facebook-access-token&x_provider=facebook
  ```
  ```json
  {
    "token_type": "Bearer",
    "refresh_token": "6oqmYZSaQ72nZfEYlD5PZF",
    "access_token": "nc7Omfm4vgP0swqodJyDeN",
    "expires_in": 31536000
  }
  ```
  ```obj-c
  AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
  NSDictionary *parameters = @{@"x_access_token": @"facebook-access-token", @"x_provider": @"facebook"};

  manager.responseSerializer = [AFJSONResponseSerializer serializer];
  [manager POST:@"https://your-app-id.appspot.com/oauth2/access_token"
     parameters:parameters
        success:^(AFHTTPRequestOperation *operation, id responseObject) {
    // ...
  } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    // ...
  }];
  ```
5. Store the credentials [somewhere appropriate](https://developer.apple.com/library/ios/documentation/security/conceptual/keychainServConcepts/02concepts/concepts.html) and send them with each endpoints service request
  ```obj-c
  GTLServiceHelloworld *service = [[GTLServiceHelloworld alloc] init];
  NSString *authHeaderValue = [NSString stringWithFormat:@"%@ %@", responseObject[@"token_type"], responseObject[@"access_token"]];

  service.additionalHTTPHeaders = @{@"Authorization": authHeaderValue};
  ```

repository: mez/appengine-endpoints-auth-example

repo_name: mez/appengine-endpoints-auth-example


text:
spike-less-modules
==================

This project demonstrates how to use modularized LESS files with reusable modules, using RequireJS

We have four modules:
* base - contains basic LESS configuration (variables, mixins)
* feed - a component that can be used in apps
* app - an entire app

Note: we are not actually registering and releasing to bower, just simulating using the postinstall grunt task

Note: this only works as long as we enforce clear constraints on directory structure so ../../../bower_components works
 inside .less files no matter whether they are located inside src or inside bower_components.

To build
--------

    (cd base && npm install)
    (cd feed && npm install)
    (cd app && npm install && grunt)
    open http://localhost:8765/index.html

repository: larsthorup/spike-less-modules

repo_name: larsthorup/spike-less-modules


text:
---
layout: page
tags: [Jekyll, HADDOCK, Bonvin, Docking, Simulation, Molecular Dynamics, Structural Biology, Computational Biology, Modelling, Protein Structure]
modified: 2014-08-08T20:53:07.573882-04:00
comments: false
title: "Coarse grained docking"
image:
  feature: pages/banner_software.jpg
---
[_Back to main best practice page_](/software/bpg)

 Best practice guide

To be able to perform docking of large biological complexes in a reasonable timescale HADDOCK offers an option to coarse grain molecules. By downscaling the level of resolution of biomolecules to coarser representations HADDOCK can study protein interactions that are hardly accessible by classical atomistic approaches. Currently coarse-graining of proteins and nucleic acids  with [Martini](http://cgmartini.nl) is supported.
Preparation of coarse-grained pdb files is described in the HADDOCK [manual here](/software/haddock2.4/pdb-cg/) and  coarse grained topology is described  in *run.cns* format in the [manual here](/software/haddock2.4/run/#coarse-grained-topology-and-parameters-files). All available documentation about coarse-graining is summed up in these sections:

* table of contents
{:toc}

## [Tutorials](/education/)

* [**Integrative modelling of the RNA polymerase III apo complex**](/education/HADDOCK24/RNA-Pol-III): A combination of our DISVIS, POWERFIT and HADDOCK2.4 portals using cross-links and cryo-EM data to model a large macromolecular assembly.

## [Publications](/publications/)

* J. Roel-Touris and **A.M.J.J. Bonvin**. [Coarse-Grained (Hybrid) Integrative Modeling of Biomolecular Interactions](https://doi.org/10.1016/j.csbj.2020.05.002). _Comp. Struct. Biotech. J._, *18*, 1182-1190 (2020).

* R.V. Honorato, J. Roel-Touris and **A.M.J.J. Bonvin**. [MARTINI-based protein-DNA coarse-grained HADDOCKing](https://doi.org/10.3389/fmolb.2019.00102). _Frontiers in Molecular Biosciences_, *6*, 102 (2019).

* J. Roel-Touris, C.G. Don, R.V. Honorato, J.P.G.L.M Rodrigues and **A.M.J.J. Bonvin**. [Less is more: Coarse-grained integrative modeling of large biomolecular assemblies with HADDOCK](https://doi.org/10.1021/acs.jctc.9b00310). _J. Chem. Theo. and Comp._, *15*, 6358-6367 (2019).

## [Optimal settings of docking of coarse grained molecules](https://wenmr.science.uu.nl/haddock2.4/settings#cg)

|Parameter|run.cns name| default value|optimal value |
|-|:-:|:-:|:-:|
|**Dieletric constant for it0** |  dielec_0 | rdie | **cdie** |
|**Dieletric constant for it1** |  dielec_1 | rdie | **cdie**  |

More about optimal settings for different docking scenarios can be found [here](https://wenmr.science.uu.nl/haddock2.4/settings#optimal).

## [FAQ](/software/haddock2.4/faq/)

Any more questions about coarse-grained docking with HADDOCK? Have a look at our **[HADDOCK bioexcel forum](https://ask.bioexcel.eu/search?q=coarse%20category%3A6)**  hosted by [](https://bioexcel.eu). There is a very high chance that your problem has already been addressed.


text:
# Install
--------------------------

execute:

	gradle uploadArchives

put lib directory into your project directory,add configuration to your build.gradle

	buildscript {
	    repositories {
	        maven {
	            url 'file:lib'
	        }
	    }
	    dependencies {
	        classpath 'io.buhe.gradle:gatling:0.0.1'
	    }
	}

# Configuration
--------------------------

	apply plugin: 'gatling'
	gatling {
	    exclude = '.*'
	    include = '^io.test.simulations.*'
	    breakOnFailure = false
            ignoreFailures = false
	}

exclude is black list, include is white list, regular expressions are supported
both exclude and include may contain a multiple comma separated regexps

breakOnFailures specifies if test execution should be interrupted after first
failure

ignoreFailures specifies if failed test results should still let the task pass

# Tasks
--------------------------

	:gatling     execute all match gatling script
	:gatling -Dgatling.include=io.test.simulations.TestSimulation execute a particular simulations

repository: buhe/gradle-gatling-plugin

gha_language: Groovy

repo_name: buhe/gradle-gatling-plugin


text:
{
  "date" : "2019-10-11",
  "keywords" : [ "ascx","ascx file", "ascx file format", "ascx file type", "file", "type", "what is an ascx file" ],
  "author" : {
    "display_name" : "Kashif Iqbal"
  },
  "draft" : "false",
  "toc" : true,
  "title" : "ASCX File Format",
  "description" : "Learn about what is an ASCX file and APIs that can create and open ASCX files.",
  "linktitle" : "ASCX",
  "menu" : {
    "docs" : {
      "parent" : "web"
    }
  },
  "lastmod" : "2020-09-10"
}

## What is an ASCX file?

A file with .ascx extension is a user control that is used as a reusable component in webpages. It is referenced in any ASP website by dragging it from the control box to the page. ASCX users controls are added to the project as a central source, resulting in any change in the user control to be reflected across the whole website. Unlike ASMX files which define a mechanism to communicate within 2 objects over the internet, ASCX files are user controls for embedding in pages or website.

## ASCX File Format

ASCX files are writting in plain text format and can use code behind feature like web pages which ends with .ascx.cs. Markup code of user controls starts with @Control directive as shown in the following example.

```
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="WebUserControl.ascx.vb" Inherits="WebUserControl" %>
<p>A simple web user control with static HTML only.</p>
```

This web user control can be reused on many pages such as page footer, header or some kind of site navigation. Web user controls have properties, methods and events like any other contorl which make them useful in setting their visual behaviour.

### Example of Registering user controls in web.config

In order to use a single user control on many pages, the web control can be registered in web.config. This allows to use the control over all the website instead of registering on each page individually. The following sample code defines how to register a web control in web.config to be displayed as footer on entire website.

```
<configuration>
  <system.web>
    <pages>
      <controls>
        <add src="Footer.ascx" tagPrefix="bs" tagName="footer" />
      </controls >
    </pages >
  </system.web>
</configuration>
```
## References

 * [ASCX vs ASMX](https://forums.asp.net/t/1838934.aspx?How+to+work+with+ascx+files+)
 * [ASCX User Control](http://www.beansoftware.com/ASP.NET-Tutorials/User-Control.aspx)

gha_language: Mathematica


text:
# Injecting Files into your Image using ADD

It is the usual requirement of a developer to copy a few files into the docker image so that every container spawned from this image has the required files.

Docker allows us to do this using two instructions in a Dockerfile:

- ADD
- COPY

## ADD instruction

This lets us copy our files/directories from a source (lying on the local filesystem of base system or at a remote site) to the destination filesystem of the image.
For copying files present at some remote site, provide URL in source field. Multiple sources can be specified.

ADD instruction takes the following format:

      ADD [--chown=user:group] (source1) (source2) ... (destination)
OR

      ADD [--chown=user:group] ("source"), ("source2"), ... ("destination")

The second form is preferred when paths contain whitespaces.

The option 'chown' lets us control the user and group for the destination filesystem. This option is applicable only to Linux containers.

If the destination path doesn't exist on the base image, it is created along with all parent directories.

Usage:

```
ADD hello.py /root/home/hello.py
```

#### Pattern Matching in Source Names

Wildcards are used for creating patterns in source names.

Examples:

```
ADD myfile* /home/       #This would add all files starting with "myfile" - like myfile1.txt, myfile.py, myfilefinal.sh, etc.
```

```
ADD myfile?.txt /home/      #This would match only a single character after "myfile" - like myfile1.txt
```

Wildcard matching rules are in accordance with Go language, the one in which Docker tool was built.

#### Destination paths

Destination can be an absolute path or a path relative to WORKDIR.
 ```
 Note: We can specify a working directory for the image using WORKDIR.
 This working directory corresponds to instructions like RUN, CMD, ENTRYPOINT, ADD and COPY.
 ```

Example:

Let the WORKDIR be /home

 ```
 ADD test user/   # The file test will be added to /home/user/

 ADD test /user/  # The file test will be added to /user/
 ```

#### chown flag

This is optional and applies only to Linux containers. In case this flag is not encountered, files/directories added to the image have UID and GID set to 0, that is their owner and group is set to 'root'.

This option can take usernames or groupnames as strings or can even take their respective numeric values as UID or GID.

If groupname is skipped, GID is set same as UID, that is default group of the user specifies is used.

The usernames and the groupnames provided are matched against /etc/passwd and /etc/group files of the container filesystem. So, make sure that you add the necessary users using RUN instruction if they don't exist by default.

If source is some remote URL, default permissions for it are 600.

#### Rule for ADD

1) Source files must be inside the context of the build. This is because the command 'docker build' first provides the context directory to the docker daemon and then initiates the build process.

2) If source is a directory, all its files and metadata is copied to destination, but not the directory itself.

3) If the destination has a trailing slash, it is considered a directory.

4) If the destination does not has a trailing slash, it is considered a file and the source's contents are written on it.

5) In case of multiple sources, provide a directory as a destination (with a trailing slash)

6) In case the source is a local tar archive, it is decompressed and files are copied into the destination directory.

7) Tar archives at remote URL are not decompressed.

8) A source URL must be a non trivial reference to a file. Example: http://www.abc.com/hello.txt is allowed, but http://www.abc.com/ won't work.

9) If STDIN method is used to pass a Dockerfile, there is no build context for this. So, we need to provide a remote URL as a source for this case.

## ADD vs COPY

COPY is another method for performing similar work as ADD and obeys the same rules.

The difference between these two instructions lies as follows:

1) COPY can't take remote URLs as source, whereas ADD can.

2) COPY can't extract a tar file directly into the destination.

Best practice is to use COPY for copying local filesystem's files, an operation which doesn't require the extra magic of ADD.
Also, when you need to keep the tar archive intact, use COPY instead of ADD.

Remote file downloading via ADD is also discouraged in best practices. It is recommended to use curl or wget commands using RUN instruction.

So, preferably, ADD should be used only for auto-tar extraction capabilities.

### Contributor

Prashansa Kulshrestha (https://github.com/Prashansa-K/)

repository: collabnix/dockerlabs

gha_language: PHP

repo_name: collabnix/dockerlabs


text:
[![Discord Bots](https://discordbots.org/api/widget/status/311810096336470017.png)](https://discordbots.org/bot/311810096336470017)[![Discord Bots](https://discordbots.org/api/widget/servers/311810096336470017.png?noavatar=true)](https://discordbots.org/bot/311810096336470017)[![Discord Bots](https://discordbots.org/api/widget/owner/311810096336470017.png?noavatar=true)](https://discordbots.org/bot/311810096336470017)
![](https://i.pinimg.com/originals/b8/ed/c9/b8edc912a7f63d819899bbfcdcaea79c.png)
# Godavaru
This is the official repository for the Godavaru Discord bot. The main developer is
[@Desiiii](https://github.com/Desiiii) (Desiree 🌺#0611). Below you will find a list of features that come with
this bot. As this was last updated (03/03/2018), Godavaru is in version **2.1.2**. Note that if the version
number is followed by **ALPHA** or **BETA**, it is only available via the Development instance, not on the public
instance.
```
Action Commands
  -> hug, kiss, even some lewd ones! (usable only in NSFW channels of course)
Moderation Commands
  -> Ban, kick, prune, and more!
Utility Commands
  -> Urban dictionary search, dictionary search, complex mathematics, and much more!
Fun Commands
  -> Slots, trivia, bowling, and other miscellaneous features to keep you occupied!
Informational Commands
  -> User ID lookup, discriminator lookup, role information, and more!
```
For a full list of all commands, use `g_help` in any guild that the bot is in.

# Avatar
For anyone who may be curious, Godavaru is not an actual character in any anime. The avatar is actually Yayoi from KanColle, in case you were curious as of who the character is.

Why use a different name? Why not make my own avatar? Quite simply, I like the images of Yayoi and I am a terrible artist. :\<

# Developers
The following is a list of developers of the Godavaru bot.

[@Desiiii](https://github.com/Desiiii) (Desiree 🌺#0611) - Main Developer and Owner

[@attributeerror](https://github.com/attributeerror) (AttributeError#2513) - Secondary developer

[@MrLar](https://github.com/MrLar) (MrLar 🌺#0611) - Web Developer

# Running the bot
Running the bot is not recommended and while it may be quite simple to do, you will not receive support on
obtaining API keys, filling in config files, or anything else. This bot is mostly here as a reference to see how
I do things, which even so is not the most effective way of doing things.

# Inqueries
If you'd like to contact me about working together on the bot or some other inquery, contact me via my business
email at<EMAIL_ADDRESS>Alternatively, you may message me on Discord. My tag is Desiree 🌺#0611 and my ID
is<PHONE_NUMBER>65281792. I may not respond at first, but I will almost always see it. 👍

# Thanks ya!
Thanks for using the Godavaru bot! It means a lot to see my own personal creation being used in over **400**
servers!

# License
This repository is protected under the MIT license. You can read it
[here](https://github.com/Godavaru/Godavaru/blob/master/LICENSE.md).

# Links
[DBL](https://discordbots.org/bot/311810096336470017)

[DBots](https://bots.discord.pw/bots/311810096336470017)

[Python 3.6](https://www.python.org/downloads/release/python-360/)

[discord.py](https://github.com/Rapptz/discord.py)

repository: PyrokinesisStudio/Godavaru

repo_name: PyrokinesisStudio/Godavaru


text:
Project: /_project.yaml
Book: /_book.yaml

# Debugging Remote Cache Hits for Remote Execution

{% include "_buttons.html" %}

This page describes how to check your cache hit rate and how to investigate
cache misses in the context of remote execution.

This page assumes that you have a build and/or test that successfully
utilizes remote execution, and you want to ensure that you are effectively
utilizing remote cache.

## Checking your cache hit rate {:#check-cache-hits}

In the standard output of your Bazel run, look at the `INFO` line that lists
processes, which roughly correspond to Bazel actions. That line details
where the action was run. Look for the `remote` label, which indicates an action
executed remotely, `linux-sandbox` for actions executed in a local sandbox,
and other values for other execution strategies. An action whose result came
from a remote cache is displayed as `remote cache hit`.

For example:

```none {:.devsite-disable-click-to-copy}
INFO: 11 processes: 6 remote cache hit, 3 internal, 2 remote.
```

In this example there were 6 remote cache hits, and 2 actions did not have
cache hits and were executed remotely. The 3 internal part can be ignored.
It is typically tiny internal actions, such as creating symbolic links. Local
cache hits are not included in this summary. If you are getting 0 processes
(or a number lower than expected), run `bazel clean` followed by your build/test
command.

## Troubleshooting cache hits {:#troubleshooting-cache-hits}

If you are not getting the cache hit rate you are expecting, do the following:

### Ensure re-running the same build/test command produces cache hits {:#rerun-cache-hits}

1. Run the build(s) and/or test(s) that you expect to populate the cache. The
   first time a new build is run on a particular stack, you can expect no remote
   cache hits. As part of remote execution, action results are stored in the
   cache and a subsequent run should pick them up.

2. Run `bazel clean`. This command cleans your local cache, which allows
   you to investigate remote cache hits without the results being masked by
   local cache hits.

3. Run the build(s) and test(s) that you are investigating again (on the same
   machine).

4. Check the `INFO` line for cache hit rate.  In that case, skip to the next section.

5. A likely source of discrepancy is something non-hermetic in the build causing
   the actions to receive different action keys across the two runs. To find
   those actions, do the following:

   a. Re-run the build(s) or test(s) in question to obtain execution logs:

      ```posix-terminal
      bazel clean

      bazel {{ '<var>' }}--optional-flags{{ '</var>' }} build //{{ '<var>' }}your:target{{ '</var>' }} --execution_log_binary_file=/tmp/exec1.log
      ```

   b. [Compare the execution logs](#compare-logs-the-execution-logs) between the
      two runs. Ensure that the actions are identical across the two log files.
      Discrepancies provide a clue about the changes that occurred between the
      runs. Update your build to eliminate those discrepancies.

   If you are able to resolve the caching problems and now the repeated run
   produces all cache hits, skip to the next section.

   If your action IDs are identical but there are no cache hits, then something
   in your configuration is preventing caching. Continue with this section to
   check for common problems.

   If you do not need to diff execution logs, you can use the
   human-readable `--execution_log_json_file` flag instead. It cannot be
   used for stable diffing since it contains execution time and doesn't
   guarantee ordering.

5. Check that all actions in the execution log have `cacheable` set to true. If
   `cacheable` does not appear in the execution log for a give action, that
   means that the corresponding rule may have a `no-cache` tag in its
   definition in the `BUILD` file. Look at the human-readable `progress_message`
   field in the execution log to help determine where the action is coming from.

6. If the actions are identical and `cacheable` but there are no cache hits, it
   is possible that your command line includes `--noremote_accept_cached` which
   would disable cache lookups for a build.

   If figuring out the actual command line is difficult, use the canonical
   command line from the
   [Build Event Protocol](/remote/bep)
   as follows:

   a. Add `--build_event_text_file=/tmp/bep.txt` to your Bazel command to get
    the text version of the log.

   b. Open the text version of the log and search for the
    `structured_command_line` message with `command_line_label: "canonical"`.
    It will list all the options after expansion.

   c. Search for `remote_accept_cached` and check whether it's set to `false`.

   d. If `remote_accept_cached` is `false`, determine where it is being
      set to `false`: either at the command line or in a
      [bazelrc](/run/bazelrc#bazelrc-file-locations) file.

### Ensure caching across machines {:#caching-across-machines}

After cache hits are happening as expected on the same machine, run the
same build(s)/test(s) on a different machine. If you suspect that caching is
not happening across machines, do the following:

1. Make a small modification to your build to avoid hitting existing caches.

2. Run the build on the first machine:

   ```posix-terminal
    bazel clean

    bazel ... build ... --execution_log_binary_file=/tmp/exec1.log
   ```

3. Run the build on the second machine, ensuring the modification from step 1
   is included:

   ```posix-terminal
    bazel clean

    bazel ... build ... --execution_log_binary_file=/tmp/exec2.log
   ```

4. [Compare the execution logs](#compare-logs-the-execution-logs) for the two
    runs. If the logs are not identical, investigate your build configurations
    for discrepancies as well as properties from the host environment leaking
    into either of the builds.

## Comparing the execution logs {:#compare-logs}

Execution logs contain records of all actions executed during the build. For
each action there is a
[SpawnExec](https://github.com/bazelbuild/bazel/blob/42389d9468a954f3793a19f8e026b022b39aefca/src/main/protobuf/spawn.proto#L67){: .external}
element containing all of the information from the action key, Thus, if the
logs are identical then so are the action cache keys.

To compare logs for two builds that are not sharing cache hits as expected,
do the following:

1. Get the execution logs from each build and store them as `/tmp/exec1.log` and
   `/tmp/exec2.log`.

2. Download the Bazel source code and navigate to the Bazel folder by using
    the command below. You need the source code to parse the
    execution logs with the
    [execlog parser](https://source.bazel.build/bazel/+/master:src/tools/execlog/).

        git clone https://github.com/bazelbuild/bazel.git
        cd bazel

3. Use the execution log parser to convert the logs to text. The following
   invocation also sorts the actions in the second log to match the action order
   in the first log for ease of comparison.

        bazel build src/tools/execlog:parser
        bazel-bin/src/tools/execlog/parser \
          --log_path=/tmp/exec1.log \
          --log_path=/tmp/exec2.log \
          --output_path=/tmp/exec1.log.txt \
          --output_path=/tmp/exec2.log.txt

4. Use your favourite text differ to diff `/tmp/exec1.log.txt` and
   `/tmp/exec2.log.txt`.

repository: bazelbuild/bazel

gha_language: Java

repo_name: bazelbuild/bazel


text:
# Configuring Graphs

Graphs can be specified using the [Configuration Vocabulary](http://www.dotnetrdf.org/configuration#) in a variety of ways. Graphs can be specified as empty or they can be specified as the merge of multiple data sources.

Graphs are loaded from Configuration in the following way:

1. Instantiate a Graph of the correct type as specified by the `dnr:type` property
1. Fill Graph with data from specified sources in the following order:
    1. Other Graphs
    1. Files
    1. Strings (RDF Fragments encoded as Literal Nodes)
    1. Datasets
    1. 3rd Party Triple Stores
    1. URIs
1. Assign a specific URI as the Base URI of the Graph
1.# Apply any specified reasoners

> [!NOTE]
> If any of the data sources fails to load then the loading of the Graph will fail.

# Basic Configuration

At it's most basic a Graph is specified as follows:

```turtle

@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" .
```

With the built in loader you can specify any type which implements the `IGraph` interface and has a public unparameterized constructor.

## Data Source Configuration

As already detailed there are multiple types of data source which you can fill a Graph with data from. Any combination of these may be used for a Graph and the resulting Graph will be the merge of all the data sources with the sources being loaded in the order specified earlier.

### Other Graphs

Loading data from other graphs is specified as follows using the `dnr:fromGraph` property:

```turtle

@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" ;
  dnr:fromGraph _:otherGraph .

_:otherGraph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" .
```

> [!NOTE]
> While it is possible to potentially introduce circular references by this mechanism the [`ConfigurationLoader`](xref:VDS.RDF.Configuration.ConfigurationLoader) is designed such that these references are detected during the loading process and an error will be thrown.

### Files

Loading data from files is specified as shown below using the `dnr:fromFile` property. File paths can either be absolute or may be relative. In the case of relative paths the resolution of the path can be controlled by introducing an [`IPathResolver`](xref:VDS.RDF.Configuration.IPathResolver) implementation by setting the `PathResolver` property of the `ConfigurationLoader`. Files are expected to be RDF graphs in formats which dotNetRDF understands.

```turtle

@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" ;
  dnr:fromFile "example.rdf" .
```

### Strings (RDF Fragments)

You can encode the source of data for your Graph directly as a string using the `dnr:fromString` property like so:

```turtle

@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" ;
  dnr:fromString """@prefix : <http://example.org/> .
                    :this :is "RDF data encoded in a Literal" . """ .
```

### Datasets

Graphs can be filled with data from named graphs held in a SPARQL dataset specified using a combination of the `dnr:fromDataset` and `dnr:withUri` properties. The `dnr:fromDataset` property is used to point to a SPARQL Dataset (see [Configuration API - SPARQL Datasets](sparql_datasets.md)) from which data should be loaded and the `dnr:withUri` property is used to specify the URI of the Graph from the dataset which should be loaded. Multiple `dnr:withUri` properties may be specified to load multiple graphs from the dataset.

If you specify multiple `dnr:fromDataset` properties then every URI specified with the `dnr:withUri` property will be loaded from every dataset. To load different graphs from different datasets use the `dnr:fromGraph` property to point to other graphs and setup those graphs to load the specific graphs from the specific databases you need.

### 3rd Party Triple Stores

Graphs can be filled with data from named graphs held in 3rd party triple stores using a combination of the `dnr:fromStore` property and the `dnr:withUri` property in an identical manner to that described above for Databases. Example configuration is as follows:

```turtle

@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" ;
  # Get the Graph with URI http://nasa.dataincubator.org/spacecraft/SHUTTLE from the store _:store
  dnr:fromStore _:store ;
  dnr:withUri <http://example.org/graph> .

# Specifies a connection to a Fuseki store
_:store a dnr:StorageProvider ;
  dnr:type "VDS.RDF.Storage.FusekiConnector" ;
  dnr:server <http://localhost:3030/dataset> .
```

### URIs

Graphs can be loaded from URIs using the `dnr:fromUri` property:

```turtle

@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" ;
  # Gets the Graph of DBPedia's description of Southampton
  dnr:fromUri <http://dbpedia.org/resource/Southampton> .
```

## Assigning a Base URI

Since Graphs loaded in this way will either have no Base URI or have a Base URI of one of their data sources it is often useful to assign a property URI to this Graph. This URI is the URI used if the Graph is subsequently saved/loaded or otherwise manipulated. A Base URI can be assigned using the `dnr:assignUri` property like so:

```turtle
@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" ;
  dnr:assignUri <http://example.org/assignedUri> .
```

## Applying Reasoners

You can also apply reasoners to Graphs loaded in this way with the triples that the reasoner produces being materialised in the Graph. To learn how to configure a reasoner see [Configuration API - Reasoners](reasoners.md).

Linking a reasoner to a Graph is as easy as using the `dnr:reasoner` property as the following example in which an RDF Schema reasoner is applied to the Graph.

```turtle

@prefix dnr: <http://www.dotnetrdf.org/configuration#> .

_:graph a dnr:Graph ;
  dnr:type "VDS.RDF.Graph" ;
  dnr:reasoner _:rdfs .

_:rdfs a dnr:Reasoner ;
  dnr:type "VDS.RDF.Query.Inference.RdfsReasoner" .
```

repository: dotnetrdf/dotnetrdf

repo_name: dotnetrdf/dotnetrdf


text:
# Getting Started

blaqkube MySQL operator provides a set of extensions for Kubernetes to manage
community-based MySQL instances. Built with the
[Operator Framework](https://github.com/operator-framework), it can be managed
by the Operator Lifecycle Manager (OLM).

Once installed, you should be able, from a simple manifest, to:

- Create a MySQL instance 👌
- Add databases to the newly created instance 🏋
- Add new users 🎅 to a MySQL instance
- Grant access 🕳 to databases for a user
- Create a backup store 💯 in S3 and GCP storage
- Generate a backup in the store 💥
- Create a new instance from a backup ❤, i.e. clone an instance
- Plug Prometheus and 🧐 Grafana
- Send events to 🤖 Slack

To use the MySQL operator, check the [Installation](users/installation.md)
section as well as the [Resources](users/resources.md). After that, you are
ready 🚀

repository: blaqkube/mysql-operator

gha_language: Go

repo_name: blaqkube/mysql-operator


text:
# C++ For Java Programmers

C++ for Java Programmers was a subject that was pretty much self-explanatory.
Most subjects in the LMIF used Java as the base programming language, so this
subject introduced some variety of the Clang kind.

## Content Omissions

### Practicals

There were practicals that contained code, but going back and trying to get them
to compile and run ended up sending me down more rabbit holes than I care to
delve deeper into. Too much [code rot][Software Rot].

### Assignments

I did have a second assignment that used [OpenGL][] to draw geometric shapes,
rotate them, and apply things like shading to them. Unfortunately, it was very
heavily tied to Windows platform libraries, and I am unable to run it on my
local machine and hence cannot confirm that the code still works.

repository: paulfioravanti/lmif

repo_name: paulfioravanti/lmif


text:
# PSFinder
Pings Amazon, Target, PlayStation Direct, and BestBuy every 20 seconds to see if PS5 Digital Edition is available.

### Initial Setup
```yarn install```
&
Create a `.env` file with the following key value pairs:

```
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
FROM_PHONE_NUMBER=
TO_PHONE_NUMBER=
BEST_BUY_API_KEY=
```

- BestBuy API Key can be generated [here](https://developer.bestbuy.com/).
- [Twilio](https://www.twilio.com/) account required to receive text messages and phone calls.
- Requires [Node](https://nodejs.org/en/download/) and [Yarn](https://classic.yarnpkg.com/en/docs/install/) to be globally installed.

### How to Run
```yarn start```

### Notes
[This](https://www.zoolert.com/videogames/consoles/playstation5/) also exists.

repository: bewallyt/PSFinder

repo_name: bewallyt/PSFinder


text:
# watchrun

A simple bash event loop for triggering anything after saves.

Just give it a path to watch followed by a hyphen, followed by a hyphen-delimited list of commands to run. It'll run them sequentially, and then set up to detect new changes in the path. Loops until you kill it.

Obligatory sketchy one-liner installation. Give me your sudos.
```
curl -s https://raw.githubusercontent.com/gepoch/watchrun/master/watchrun | sudo tee /usr/local/bin/watchrun >/dev/null && sudo chmod +x /usr/local/bin/watchrun
```

## Examples!

Make your source code with every tweak!
```
$ watchrun . - make
```

Build and rsync your grunt project with each save!
```
$ watchrun . - grunt build - rsync -ravP ./ gmarchin@some.server.com:./
```

Keep TPS reports from falling through the cracks! (Requires https://github.com/EvanHahn/pushbullet-cli)
```
$ watchrun ~/Documents - pb -a "Quit putting stuff in Documents!
 (PROBABLY DON'T ACTUALLY DO THIS!  - git push --all
```

repository: gepoch/watchrun

repo_name: gepoch/watchrun


text:
Note About main/sass
====================

This folder isn't imported by Grunt.js by default. Instead, import files in individual builds; e.g., `import '../../main/sass/options.scss';`. Changes to files here still trigger rebuilds of all stylesheets though.

repository: anugrahbsoe/OMG-Chrome-Extensions

repo_name: anugrahbsoe/OMG-Chrome-Extensions


text:
# Dashboard Tutorial
_The goal of this tutorial is to demonstrate how to create a data driven interactive dashboard._

##  Step 1 - Generate Sample Data

* [Step01.ecl](./Step01.ecl) - Generates some sample data.  Original code is taken from Programmers Guide.
* [Step01b.ecl](./Step01b.ecl) - Create Roxie Query.

##  Step 2 - Visualize Gender Distribution

[Step02.ecl](./Step02.ecl) -
* Create grouped aggregate of "Gender" + "Row Count".
* Output data to a named result "gender_rowcount".
* Visualize data in a bubble chart.

##  Step 3 - Visualize US State Distribution

[Step03.ecl](./Step03.ecl) -
* Create grouped aggregate of "State" + "Row Count".
* Output data to a named result "state_rowcount".
* Visualize data in a US State Choropleth.

##  Step 4 - Visualize Logical File Raw Data

[Step04.ecl](./Step04.ecl) -
* Visualize logical file data in a Grid with some column mappings.

##  Step 5 - Combine Steps 2 -> 4 into a Dashboard

[Step05.ecl](./Step05.ecl) -
* Combine steps 02, 03, 04 into single file
* Filter logical file based on selection of "Gender" and "State" visualizations.

##  Step 6 - Add roxie driven visualization

[Step06.ecl](./Step06.ecl) -
* Add Roxie based Visualization
* Roxie inputs are based on Grid selection.

##  Bonus Step - AutoDash POC

[Step07.ecl](./Step07.ecl) -
* Auto Generated Dashboard POC

repository: hpcc-systems/Visualizer

branch_name: refs/heads/trunk

gha_language: ECL

repo_name: hpcc-systems/Visualizer


text:
# Jukebot
Generating artificial music using Recurrent Neural Networks.
#### [Hand-picked output samples](https://soundcloud.com/user-693671739/sets/jukebot-hand-picked-output)

**Dependencies:**
 - `pip install keras`
 - `pip install python-midi`

**Usage:**
 - Execute `./main.py`

**To-Do:**
 - Increase the volume of all the notes in the post-processing stage.
 - Optimize the matrix operations using Numpy.

repository: Anmol-Singh-Jaggi/Jukebot

gha_language: Python

repo_name: Anmol-Singh-Jaggi/Jukebot


text:
# Foundation Model Training/Serving System

## Training

- TorchScale - A Library for Transformers at (Any) Scale [[GitHub]](https://github.com/microsoft/torchscale)

## Serving


text:
# tlbot

tlbot is a Go package to help writing [Telegram bots](https://core.telegram.org/bots)

## installation

```sh
go get github.com/igungor/tlbot
```

## usage

[Documentation](http://godoc.org/github.com/igungor/tlbot)

Also look at [echobot](https://github.com/igungor/tlbot/tree/master/cmd/echobot)

## license

MIT. See LICENSE.

repository: redite/tlbot

repo_name: redite/tlbot


text:
# python-selenium

This project serves as an example for writing Automation using [Gauge](https://github.com/getgauge/gauge)

This project uses

- [Selenium](http://selenium-python.readthedocs.org/)

# Concepts covered

- Use [Webdriver](http://docs.seleniumhq.org/projects/webdriver/) as base of implementation
- [Concepts](https://docs.gauge.org/latest/writing-specifications.html#concept)
- [Specification](https://docs.gauge.org/latest/writing-specifications.html#specifications-spec), [Scenario](https://docs.gauge.org/latest/writing-specifications.html#longstart-scenarios) & [Step](https://docs.gauge.org/latest/writing-specifications.html#longstart-steps) usage
- [Table driven execution](https://docs.gauge.org/latest/execution.html#data-driven-execution)
- [External datasource (special param)](https://docs.gauge.org/latest/execution.html#external-csv-for-data-table)

# Prerequisites
- Python 3
- [Java 1.7](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). [Required to bring up the [SUT](#setting-up-the-system-under-test-sut)
- [Install Gauge](https://docs.gauge.org/latest/installation.html)

- [Install Gauge-Python plugin](https://gauge-python.readthedocs.io/en/latest/installation.html) by running<br>
```
gauge install python
[pip / pip3] install getgauge
```
- Google Chrome

## Setting up the System Under Test (SUT)

* Download [activeadmin-demo.war](https://github.com/getgauge-examples/activeadmin-demo/releases/tag/untagged-f0befd5494efa4baabd2)
* Bring up the SUT by executing the below command
```
java -jar activeadmin-demo.war
```
* The SUT should now be available at [http://localhost:8080/](http://localhost:8080)

# Executing specs

### Set up
This project requires pip to install dependencies. To install dependencies run :
````
pip install -r requirements.txt
````

Run the following command to install chromedriver, if it fails then download it from [here](http://chromedriver.storage.googleapis.com/index.html) and add it to the `PATH` variable.

```
[pip / pip3] install chromedriver_installer
```

### All specs
````
gauge run specs
````
This will also compile all the supporting code implementations.

branch_name: refs/heads/dev


text:
---
title: Breast Milk Is Teeming With Bacteria - That’s Good for the Baby
author: PipisCrew
date: 2019-06-20
categories: [health]
toc: true
---

Breast milk seems to be rich in beneficial bacteria only when it comes directly from the mother’s breast — not even when the same milk is pumped and delivered later by bottle. Pumped milk still carries most other riches of breast milk. Nevertheless, this news about the microbiome, emerging from studies done in the past few years, taps into a fraught issue for many women: medical recommendations and societal pressure to breast-feed, combined with policies, or physical problems, that often make it all but impossible to do so.

[https://www.nytimes.com/2019/06/12/health/breastmilk-microbiome-parenting.html](https://www.nytimes.com/2019/06/12/health/breastmilk-microbiome-parenting.html)

[Is breast really best? I looked at all the data to find out](https://www.theguardian.com/lifeandstyle/2019/jun/20/is-breast-really-best-i-looked-at-all-the-data-to-find-out)

origin - https://www.pipiscrew.com/?p=15005 breast-milk-is-teeming-with-bacteria-thats-good-for-the-baby


text:
# Math expression parser and evaluator

Fast and small (less than 2KB minified and gzipped) zero-dependency math expression parser and evaluator.

```js
import evaluate from '@emmetio/math-expression';

console.log(evaluate('2 * (-3 + 5)')); // 4
```

## Motivation

In JavaScript, you can use built-in `eval()` function to evaluate expressions:

```js
console.log(eval('2 * (-3 + 5)')); // 4
```

But in most modern JavaScript environments `eval()` function is considered harmful since it can evaluate _any_ arbitrary JS code. And in some cases (like in [Atom](https://atom.io) editor) it’s disabled by default due to security reasons.

With `@emmetio/math-expression` module you can safely parse & evaluate basic math expressions in any JS environment.

## Extract expression from text

This module is used by [Emmet](https://emmet.io) project to evaluate math expression in-place in code source. A default user workflow is to enter math expression somewhere in source code and run action to evaluate it. You can use `extract` function to extract math expression from given source code, starting at specified position:

```js
import evaluate, { extract } from '@emmetio/math-expression';

const code = 'Here goes math: 2 + 3 foo bar';
const [start, end] = extract(code, 21); // 16, 21
const expr = code.substring(start, end); // 2 + 3
console.log(evaluate(expr)); // 5
```

repository: emmetio/math-expression

gha_language: TypeScript

repo_name: emmetio/math-expression


text:
# Gherkinize

A command line tool that will help us to write better Gherkin scenarios.

## Purpose

The purpose of this project is mainly helping people to write **Gherkin scenarios** correctly.

## Getting Started

### Installing with Brew

```
brew tap wesovilabs/gherkinize
brew install gherkinize
```

Once the software is installed we can make use of it.

**gherkinize --help / gherkinize -h**

It displays the menu.

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/helpmenu.png "Gherkinize help")

**gherkinize --version / gherkinize -v**

It displays the current software version.

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/versionmenu.png "Gherkinize version")

**gherkinize --input [scenarios_dir] --config [gherkin-rules.toml] validate**

It validates our scenarios. Both arguments **input** and **config** are required.

- input: it must point to a directory that contains the scenarios to be validated. (So far it only supports directories path)
- config:  it is a **toml** configuration file path that must look like below. You can download [this](https://github.com/wesovilabs/gherkinize/blob/master/config/gherkin-rules.toml) and
modify the values at your convenience.

### Running as a Docker container

In case of you prefer run **gherkinize** with a Docker container you can do it by running the below command
```
    docker run \
    -v <PATH_TO_SCENARIOS_DIR>:/var/gherkinize/scenarios \
    -v <PATH_TO_DIRECTORY_WITH_RULES_CONFIGURATION_FILE_TOML>:/var/gherkinize/config \
    -it wesovilabs/gherkinize \
    /app/dist/gherkinize -i /var/gherkinize/scenarios  -c /var/gherkinize/config/<RULES_CONFIGURATION_FILE_TOML> validate
```

For example:
```
    docker run \
    -v /Users/Ivan/Sandbox/WesoviLabs/GO_WORKSPACE/src/github.com/wesovilabs/gherkinize/testdata/scenarios/:/var/gherkinize/scenarios \
    -v /Users/Ivan/Sandbox/WesoviLabs/GO_WORKSPACE/src/github.com/wesovilabs/gherkinize/config/:/var/gherkinize/config \
    -it wesovilabs/gherkinize \
    /app/dist/gherkinize -i /var/gherkinize/scenarios  -c /var/gherkinize/config/gherkin-rules.toml validate
```

## Gherkin rules configuration file

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/config.png "Gherkin Rules Validator")

**max_steps_per_scenario**: It determines the maximum number of steps per scenario. Many steps could make our scenarios not easy-to-read

**max_len_step**: Max len for steps. Steps with long text are usually hard to understand.

**empty_feature**: Set false if you don't want to allow empty features without scenarios.

**empty_scenario**: Set false if you don't want to allow empty scenarios without steps.

**strict**: This checks the below conditions:

* The first step must be GIVEN

* The keyword GIVEN can be only used once.

* WHEN can only be used after GIVEN statements

* THEN statement can only be used after WHEN statements

## Samples

Assuming you make use of default configuration file and have a directory with somce sceanarios.

For example, if you checkout this repository and run the below command:

    gherkinize -i testdata/scenarios/ -c config/gherkin-rules.toml  validate

the output will be the following:

### scenarioA.feature
![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioa.png "Scenario A")

The output will be:

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioA_result.png "Scenario A Result")

### scenarioB.feature
![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioB.png "Scenario B")

The output will be:

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioB_result.png "Scenario B Result")

### scenarioC.feature
![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioC.png "Scenario B")

The output will be:

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioC_result.png "Scenario B Result")

### scenarioD.feature
![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioD.png "Scenario B")

The output will be:

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioD_result.png "Scenario B Result")

### scenarioE.feature
![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioE.png "Scenario B")

The output will be:

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioE_result.png "Scenario B Result")

### scenarioF.feature
![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioF.png "Scenario B")

The output will be:

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioF_result.png "Scenario B Result")

## scenarioG.feature
![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioG.png "Scenario B")

The output will be:

![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioG_result.png "Scenario B Result")

## The code

This project is completely developed in **Go**. Please don't hate me so much if the code contains bad practices since I am just learning about Go coding **;-)**

### Understanding the project

If you wanna run the project locally I invite you to **[fork this repository](https://github.com/wesovilabs/gherkinize)** and check it out.

#### Makefile

You will find a **Makefile** in the project root.

* **make clean**: Remove compiled files.

* **make test**: Run the tests  (there's no tests yet... so Sorry!!!)

* **make gherkinize**: Build the runnable file.

* **make install**: Install locally.

## Built With

* [Go](https://golang.org/) - The go programming language

## Contributing

Please read [CONTRIBUTING.md](https://github.com/wesovilabs/gherkinize/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/wesovilabs/gherkinize/tags).

## Authors

* **Iván Corrales Solera** - [Wesovilabs](http://www.wesovilabs.com)

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

## License

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

repository: HarooTat/gherkinize

repo_name: HarooTat/gherkinize


text:
* package declaration at top of every source file
* executables are in package `main`
* convention: package name == last name of import path (import path `math/rand` => package `rand`)
* upper case identifier: exported (visible from other packages)
* Lower case identifier: private (not visible from other packages)

repository: kan-codes/cheatsheet

repo_name: kan-codes/cheatsheet