text:
# FileCache
I had to do with a hosting company that just refused to enable memcache/memcached/redis because it wasn't a one-click install option in CPanel. So that's why I wrote this class as the storage drives are fast SSDs.

I'm including both a procedural version and a class version.

## Tested on:
PHP 7.3
PHP 7.4
PHP 8.0
PHP 8.1
PHP 8.2

## How is this different from memcache/memcached/redis
The main difference is that this stores the data in json files on the harddrive and when you fetch the data you specify how old the data is that you load rather than how old the data is until it expires when you save it as you do in a memory cache server as this doesn't contain a server software.

## Procedural usage
Include the cache.php for the Procedural version such as:
```php
<?php
require 'cache.php';
```

### fileCacheGet($key, $ttl)
$key: String value for your cache key\
$ttl: How old cache you can load specified as seconds, default 120 seconds

### fileCacheSet($key, $data)
$key: String value for your cache key\
$data: The data to store

### fileCacheDelete($key)
$key: Deletes the cache file for this cache

## Class usage
Install using composer
```sh
composer require palma/file-cache
```

Include the class_filecache.php for the Class version
```php
<?php
require './vendor/autoload.php';
$cache = new FileCache();
```

### $cache::get($key, $ttl)
$key: String value for your cache key\
$ttl: How old cache you can load specified as seconds, default 120 seconds

### $cache::set($key, $data)
$key: String value for your cache key\
$data: The data to store

### $cache::delete($key)
$key: Deletes the cache file for this cache

## Author
Peter Palma

### Donate to the project
[Buy me a Pizza](https://www.buymeacoffee.com/peterpalma)

## License
MIT License, see included LICENSE file.

repository: snooz/fileCache

repo_name: snooz/fileCache


text:
### [CVE-2021-22224](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22224)
![](https://img.shields.io/static/v1?label=Product&message=GitLab&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Cross-site%20request%20forgery%20(csrf)%20in%20GitLab&color=brighgreen)

### Description

A cross-site request forgery vulnerability in the GraphQL API in GitLab since version 13.12 and before versions 13.12.6 and 14.0.2 allowed an attacker to call mutations as the victim

### POC

#### Reference
- https://gitlab.com/gitlab-org/gitlab/-/issues/324397

#### Github
No PoCs found on GitHub currently.

license: MIT

repository: trickest/cve

branch_name: refs/heads/main

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive

repo_name: trickest/cve


text:
---
layout: post
title: "custom nuget feed configuration for Azure builds"
date: 2013-01-11 14:31
comments: true
published: true
categories: [Nuget, Azure]
---

When deploying to Azure with Nuget package restore enabled on a solution, you will run into difficulties if you have custom Nuget feeds.

By default, Nuget will look at the default feed which at the time of writing is "https://nuget.org/api/v2/".

The problem is that it won't look at your custom feed URL and the build will fail.

To add your custom feed URL open the NuGet.targets file found in the .nuget folder in the root of the solution.

Find the XML node named 'PackageSources' which will be empty. Simple add your custom Nuget feed URL there.

 It now won't look for the default feed and it's not clear what the format should be to add multiple feeds.

Firtly the simple answer to it not looking at the default Nuget feed is to just add it to the PackageSourcesl.

The format for adding multiple feeds is to have each feed in speech marks separated by a semi-colon.

Here is an example:
{% codeblock %}
<PackageSources>"https://nuget.org/api/v2/";"https://custom-nuget-feed.com/nuget"</PackageSources>
{% endcodeblock %}

Once pushed to Azure then it should find your package source along with the default and pull in all the required dependencies.

repository: jamiehinton/blog

branch_name: refs/heads/master

extension: markdown

repo_name: jamiehinton/blog


text:
docclean
========

[![Build Status](https://secure.travis-ci.org/StefanKjartansson/docclean.png)](http://travis-ci.org/StefanKjartansson/docclean)

Simple utility to strip out empty comments from python files.

### Before

```python
def foo():
    """
    """
    pass

def foo():
    '''
    '''
    pass

def foo():
    """
    Undocumented.
    """
    pass

def foo():
    """
    Undocumented. moar
    """
    pass
```

### After

```python
def foo():
    pass

def foo():
    pass

def foo():
    pass

def foo():
    """
    Undocumented. moar
    """
    pass
```

repository: StefanKjartansson/docclean

repo_name: StefanKjartansson/docclean


text:
# Detectron2 Google Cloud Platform integration

## Introduction
Detectron2 is a computer vision library made by Facebook. Running this library on a local computer is well supported, but there is no guidance for running it on GCP's AI Platform, which requires a Docker image, and some further integration to be able to interact with the model output. The code in this repository has been used to train and evaluate models on GCP, and might be helpful for someone who wants to do something similar.

## Installation
AdelaiDet, Detectron2 and D2Go are added as submodules to this repository. To download the files after cloning do:

```sh
git submodule init
git submodule update
```

If you want to run the project locally, those packages have to be built as well. This can eb done by creating an environment with the requirements.txt textfile. If pytorch does not install correctly, install the tensorflow nightly through conda (assuming CUDA 11.1):

```sh
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-nightly -c conda-forge
```

Then, build D2, Adet and D2Go according to their respective instructions:

```sh
cd project/folder/here
python -m pip install -e detectron2
cd AdelaiDet
python setup.py build develop
cd ..
cd d2go
python -m pip install .
```

Building the Docker container should be done from root to include the trainer folder in the docker build context.
So, from root, call:

```sh
sudo docker build -f docker/Dockerfile -t my/image/name ./
```

# Running the framework
The model can be ran in a number of ways. It supports training from an Imagenet pretrained weightsfile by default, but can also be trained by loading a checkpoint from a previous model run.

A training job takes a valid training and validation .json annotation file from the datafolder in the vehicle-damaage bucket, and reads the images from the .zip files in this datafolder. Running a training job is done by doing:
```sh
cd docker
bash train_push_run.sh
```
The script builds and pushes to GCP, all you need to do is enter a valid job name. By default, training is performed with a weights file which is loaded from the Detectron2 or AdelaiDet model zoo. To load weights from a previous run, the trainer.sh file has to be edited. The parser takes a number of extra arguments:

- --local: if set, argument setting behaviour is changed slightly to better work with non-dockered runs
- --config-file: (valid!!) path to a different config file
- --run-name: takes the GCP run name, or a manually set name, which becomes the output folder
- --local: if ran locally, set this to get a prompt for an output folder name
- --bucket: name of the bucket that is worked in
- --architechture: important parameter, "adet", "d2go" and default Detectron2
- --dataset: part of the dataset path. Datasets are expected to have a name_train.json and name_val.json, with their images in an name_images folder. This structure is expected for all datasets. Setting a dataset is done as --dataset /path-to-folder/name_
- --num-classes: the number of classes present in the annotation file
- --resume: set to 'True', this will resume training of a certain run, from a certain checkpoint, with a certain number of iterations
- --reuse-weights: set to 'True', this will start a new training job but with the weights from a certain run, from a certain checkpoint
- --eval-only: takes no arguments but if present only performs inference on the validation dataset
- --eval-name: used to specify the run for resuming, reusing weights and inference. Should match the folder of the run to be used.
- --checkpoint: used to specify the checkpoint for resuming, reusing weights and inference
- --iterations: used to specify the extra number of iterations that training should resume when resume is specified
- --opts: optional arguments, mainly used to set MODEL.DEVICE cpu for local training
- extra arguments can be added to accommodate Hypertune hyperparameter training

It is also possible to filter jsons on runtime. This is done through the "preprocess.py" file and can be enabled by passing --filter to the parser. This gives some more settings:

- --input: path to an input json. This is set automatically when not running locally
- --output: path to the output json. This is set automatically when not running locally
- --categories: list of names, seperated with a space (e.g. dogs chairs)
- --area: integer giving the max area of annotations. Smaller annotations are filtered out
- --merge: integer giving the max area of annotations. Smaller annotations will be merged with close annotations of the same category
- --combine: list of names, seperated with a space, that are combined into a single category
- --y: skips the overwrite warning. Set automatically when not running locally.

Inference is split from the training job already, with different scripts. This way, you do not need to change parameters every time you want to do something different. They are ran similarly to a training, but with the corresponding .sh file.

# Results
The results of all job types are saved to and loaded from the GCP bucket. Make sure the correct run and checkpoint is entered when loading from the bucket. By default, the output folder is equal to the config used, incremented by 1 for each new run. Test metrics can be read in
tensorboard, which can be called from the bucket directly if you are blessed enough to not have a Windows machine and have Tensorflow installed. It can be called with:

```sh
tensorboard --host <IP_ADDRESS> --logdir gs://vehicle-damage/model_output
```
where the host is <IP_ADDRESS> optional to allow connections with a VM if it is not ran locally.


text:
# Integrate With Different Providers
In this section we describe how to generate a working account configuration for
some of the supported OpenID Providers.

If you have to register a client manually check the [Client Configuration
Values](client-configuration-values.md) section.

repository: indigo-dc/oidc-agent

branch_name: refs/heads/prerel

gha_language: C

repo_name: indigo-dc/oidc-agent


text:
# Front Door

[![Travis Build Status](https://travis-ci.org/TimSimpson/frontdoor.svg?branch=master)](https://travis-ci.org/TimSimpson/frontdoor)
[![Build status](https://ci.appveyor.com/api/projects/status/vqcmfp6sflj902o7/branch/master?svg=true)](https://ci.appveyor.com/project/TimSimpson/frontdoor/branch/master)
[![PyPi](https://img.shields.io/pypi/v/frontdoor)](https://pypi.org/project/frontdoor)

[View change log](changelog.md)

This simple module aids in the creation of "front door" scripts, which
can help organize automated scripts and reduce the need for overly
verbose docs. The idea is you can copy `frontdoor/__init__.py` into your
repository as `frontdoor.py` to make it easy to bootstrap a front door script
of your own. The [example](example.py) files in this repo illustrate how
frontdoor.py is used).

A front door script is a command which accepts a series of options which
themselves may defer to other commands or processes which do work of
some kind.

So say you have a project that has unit tests, integration tests, and
deployment scripts. Typically you'd include a series of scripts, along
with documentation on what scripts do what and how. What makes a front
door script different is that you just document it's available and users
can find other options by jumping in and exploring it themselves. The
end result feels a little like playing an interactive fiction computer
game such as Zork.

This solves a different use case from argparse as argparse is more about
creating robust, single purpose tools that can be invoked in flexible
ways, where as Front Door is about creating scripts that more easily
accept positional arguments and can defer to other commands. It's also
extremely simple and designed to be copy and pasted.

## Example

Let's create a file named `ci.py` in the root of your repo:

```py3
import argparse
import pathlib
import shutil
import subprocess
import sys
import textwrap
# `frontdoor` supports both MyPy type annotations and Python 2
import typing as t

import frontdoor

REGISTRY = frontdoor.CommandRegistry('ci')
cmd = REGISTRY.decorate

# Creates a subcommand that can be invoked using either `c` or `clean`
# The second argument is the description which is shown when frontdoor lists
# all commands.

@cmd(['c', 'clean'], 'Destroys any build artifacts')
def clean() -> None:
    # `frontdoor` has it's own type annotations, but supports Python 2 as well
    shutil.rmtree('output')
    # If `None` is returned, then frontdoor returns zero, unless there's
    # an unhandled exception

# The third arg to `cmd` can be advanced help seen when the command is passed
# to frontdoor's built in `help` command.

@cmd('run', 'Runs a built program', 'Runs a program in the `output` directory')
def run(args: t.List[str]) -> int:
    # If args are passed, you need to parse them yourself
    if len(args) < 1:
        print("expected a program to run")
        return 1
    prog = pathlib.Path('output') / args[0]
    rest = args[1:]
    result = subprocess.run([str(prog)] + rest)
    return result.returncode

@cmd('build', 'Builds a target', 'Calls the compiler')
def build(args: t.List[str]) -> None:
    # Let's assume this subcommand is complex or becomes complex. In that case
    # busting out argparse is recommended.
    parser = argparse.ArgumentParser('Builder')
    # assume more work goes into building out "parser" here, then-
    p_args = parser.parse_args(args)  # just pass `args` into argparse  # NOQA
    # do whatever you need with p_args

# While frontdoor automatically adds a `help` command, you can override it
# if you want.
@cmd("help", desc="What's all this about?",
     help="Whoa. You want to see help about the help itself?\n"
          "... I don't know what to do. I feel so lost.")
def help(args: t.List[str]) -> None:
    print(
        textwrap.dedent(
            """
         Root CI script for project
        """
        )
    )
    # Then just use frontdoor's default help mechanism
    REGISTRY.help(args)

def main() -> None:
    # Fix goofy bug when using Windows command prompt to ssh into Vagrant box
    # that puts \r into the strings.
    args = [arg.strip() for arg in sys.argv[1:]]
    sys.exit(REGISTRY.dispatch(args))

if __name__ == "__main__":
    main()
```

Assuming `frontdoor` is available (either by vendoring it or installing it with pip) running `python ci.py` shows the following:

```bash
$ python ci.py
Expected argument.
Available options for ci:
    build           Builds a target
    c,clean         Destroys any build artifacts
    help            What's all this about?
    run             Runs a built program

```

repository: TimSimpson/frontdoor

gha_language: Python

gha_license_id: NOASSERTION

repo_name: TimSimpson/frontdoor


text:
# i3PosNet
Code for the i3PosNet framework

In case you use this code for any publications, please cite the following

@article{kugler2020i3posnet,
  title={i3PosNet: instrument pose estimation from X-ray in temporal bone surgery},
  author={K{\"u}gler, David and Sehring, Jannik and Stefanov, Andrei and Stenin, Igor and Kristin, Julia and Klenzner, Thomas and Schipper, J{\"o}rg and Mukhopadhyay, Anirban},
  journal={International Journal of Computer Assisted Radiology and Surgery},
  year={2020},
  publisher={Springer}
}


text:
# SemNExt-Visualizations

This is a visualization tool to create Suceptibility Windows Ontological
Transcriptome (SWOT) Clocks that illustrate the connections between transcriptomes for several thousand available resource sets or user-defined
lists of transcriptomes.

![Autism Example](http://i.imgur.com/jCgAYV6.png?1 "SWOT Clock generated for
Autism")

## Development Instructions

If you are interested in contributing to this project, do the following.

1. Clone this repository in the usual fashion.

    `git clone https://github.com/mpoegel/SemNExT-Visualizations.git`
2. Install the dependencies.

    `npm install`
3. In order to run the Fisher's exact test, you need to install R. You also need add Rscript to your
path if it's not added automatically. Lastly, you may need to set the `R_LIBS_USER` environment
variable to a writable directory to store R libraries.
3. Build and start the server.

    `npm start`

The server is now available at `localhost:8000`. Gulp will automatically recompile and re-bundle the
TypeScript when any .ts file is changed.

## Deployment Instructions

Build the docker image.
```sh
docker build -t semnext/swot .
```

Then start the container.
```sh
docker run -d -p 80:8000 semnext/swot
```

repository: mpoegel/SemNExT-Visualizations

gha_language: TypeScript

repo_name: mpoegel/SemNExT-Visualizations


text:
Bayesian Action Decoder for Deep Multi-Agent Reinforcement Learning
Jakob N. Foerster, Francis Song, Edward Hughes, Neil Burch, Iain Dunning, Shimon Whiteson, Matthew Botvinick, Michael Bowling

When observing the actions of others, humans carry out inferences about why the others acted as they did, and what this implies about their view of the world.

Humans also use the fact that their actions will be interpreted in this manner when observed by others, allowing them to act informatively and thereby communicate efficiently with others.

Although learning algorithms have recently achieved superhuman performance in a number of two-player, zero-sum games, scalable multi-agent reinforcement learning algorithms that can discover effective strategies and conventions in complex, partially observable settings have proven elusive.

We present the Bayesian action decoder (BAD), a new multi-agent learning method that uses an approximate Bayesian update to obtain a public belief that conditions on the actions taken by all agents in the environment.

Together with the public belief, this Bayesian update effectively defines a new Markov decision process, the public belief MDP, in which the action space consists of deterministic partial policies, parameterised by deep neural networks, that can be sampled for a given public state.

It exploits the fact that an agent acting only on this public belief state can still learn to use its private information if the action space is augmented to be over partial policies mapping private information into environment actions.

The Bayesian update is also closely related to the theory of mind reasoning that humans carry out when observing others' actions.

We first validate BAD on a proof-of-principle two-step matrix game, where it outperforms traditional policy gradient methods.

We then evaluate BAD on the challenging, cooperative partial-information card game Hanabi, where in the two-player setting the method surpasses all previously published learning and hand-coded approaches.

repository: tigerneil/awesome-deep-rl

repo_name: tigerneil/awesome-deep-rl


text:
# CSV Importer

Imports a CSV file as `List<T>` where `T` is a struct with fields corresponding to the CSV's column headers. The struct spec can also be set manually with the `-header` flag.

## Usage

```shell
$ cd csv-import
$ go build
$ ./csv-import <PATH> http://localhost:8000::foo
```

## Some places for CSV files

- https://data.cityofnewyork.us/api/views/kku6-nxdu/rows.csv?accessType=DOWNLOAD
- http://www.opendatacache.com/

# CSV Exporter

Export a dataset in CSV format to stdout with column headers.

## Usage

```shell
$ cd csv-export
$ go build
$ ./csv-export http://localhost:8000:foo
```

repository: julio-lopez/noms

gha_language: Go

repo_name: julio-lopez/noms


text:
# MT9V034 camera Driver

[Chinese](README_ZH.md) | English

## 1. Introduction

This software package is a driver for MT9V034 camera. This driver provide access through IO device model.

### 1.1 License

MT9V034 camera driver package is licensed with MIT license.

### 1.2 Dependency

- RT-Thread 4.0+
- I2C device driver or soft I2C device driver
- NXP CSI peripheral driver

## 2. How to use MT9V034 camera Driver

To use MT9V034 camera driver package, you need to select it in the package manager of RT-Thread. The specific path is as follows:

```
RT-Thread online packages
    peripheral libraries and drivers --->
        [*] MT9V034 camera driver package --->
            (200)   Frame Per Second
            [ ]     Enable auto explosure control
            [ ]     Enable auto gain control
                    HDR (No HDR) --->
            (752)   Width
            (480)   Height
            (i2c10) Camera configuration I2C/SCCB bus name
            [ ]     Assert the program when faced configuration failure
```

The detailed description of the package options is as follows:

| Option | Description |
|-|-|
| Frame Per Second | The camera's frame per second, max 200 |
| Enable auto explosure control | The camera will automatically adjust the explosure time if this is selected |
| Enable auto gain control | The camera will automatically adjust the gain of the images if this is selected |
| HDR | High-Dynamic Range, options are No HDR, 80dB and 100dB |
| Width | Width of the camera image, max 752 and it needs to be divisble by 8 |
| Height | Height of the camera image, max 480 and it needs to be divisble by 8 |
| Camera configuration I2C/SCCB bus name | The I2C/SCCB bus name which connected to the camera's SDA and SCL pins |
| Assert the program when faced configuration failure | |

After selecting the options you need, use RT-Thread's package manager to automatically update, or use the `pkgs --update` command to update the package to the BSP.

## 3. Use MT9V034 camera Driver

After opening the MT9V034 camera driver package and selecting the corresponding function option, it will be added to the BSP project for compilation when the BSP is compiled.
Burn the program to the target development board, and the user can use the following method to interact with the camera:

| Function | Parameter | Action |
|---|---|---|
| `rt_size_t rt_device_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size)` | `buffer`: pointer of a rt_uint8_t pointer | Request a camera frame and modifly `buffer` to point to the frame buffer, return the size of the frame buffer, return 0 if not frame buffer available yet |
| `rt_size_t rt_device_write(rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size)` | `buffer`: pointer of a rt_uint8_t pointer | return the previous requested frame buffer or add a new empty frame buffer into the queue, keep in mind that the buffer written need to be 64 byte aligned and non-cacheable |

## 4. Example
```
#include <rtdevice.h>

int main(void)
{
    /* Find the camera device */
    rt_device_t cam = rt_device_find("MT9V034");
    rt_device_open(cam, 0);

    rt_uint8_t* buffer;
    rt_size_t buffer_size;

    while (1)
    {
        /* request a frame buffer */
        buffer_size = rt_device_read(cam, 0, &buffer, 0);
        if (buffer_size != 0)
        {
            /* Loop through the camera image */
            for (rt_uint16_t i = 0; i < buffer_size; ++i)
            {
                /* Access one pixel in the frame */
                buffer[i];
            }
            /* return the frame buffer back to queue */
            rt_device_write(cam, 0, &buffer, 0);
        }
        else
        {
            rt_thread_mdelay(1);
        }
    }
}
```


text:
*A lightweight terminal sharing application.*

**Requirements:**
* Python3 has to be installed

**Guide:**
1. pip3 install -r requirements.txt
2. python3 main.py [command]

**Example:**
* Start Session: python3 main.py bash
* Stop Session: CTRL+D

repository: adrianmxb/mqpty

repo_name: adrianmxb/mqpty


text:
# Project EatExpress

My project using Technical FullStack developer creating project using Backend in Java and framework springboot database Postgree frontend using Reactjs and mobile reactNative.

## Installation

My project is a associate the three cornerstone the development techinical. Install Java 8, Install Nodejs 10, Install Expo for Mobile in reactNative

```bash
Install Node
Install Java 8
Install Expo
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: rafadastan/EatExpress

gha_language: Java

repo_name: rafadastan/EatExpress


text:
# Eiffel
The Eiffel framework enables technology agnostic enterprise scale continuous integration and delivery with maintained scalability, flexibility and traceability. Eiffel is based on the concept of decentralized real time messaging, both to drive the continuous integration and delivery system and to document it.

This repository contains the Eiffel framework vocabulary, descriptions, guides and schemas along with links to relevant implementation repositories.

Eiffel is licensed under the [Apache License 2.0](./LICENSE).

__IMPORTANT NOTICE:__ The contents of this repository currectly reflect a __DRAFT__. The Eiffel framework has been used in production within Ericsson for several years to great effect; what is presented here is a revision and evolution of that framework - an evolution that is currently ongoing. In other words, anything in this repository should be regarded as tentative and subject to change. It is published here to allow early access and trial and to solicit early feedback.

## Contents
1. Introduction
   1. Why Eiffel?
   1. What is Eiffel?
   1. Who Developed Eiffel?
   1. Who Should use Eiffel?
   1. How do I Get Started?
   1. How is Eiffel Technology Agnostic?
   1. How does Eiffel Achieve Scalability?
   1. How does Eiffel Achieve Flexibility?
   1. How does Eiffel Achieve Traceability?
   1. How do I Make Sense of Events?
1. Eiffel Syntax and Usage
   1. Eiffel Event Design Guidelines
   1. Notes on Custom Events
   1. [Event Structure](./eiffel-syntax-and-usage/event-structure.md)
   1. [The Meta Object](./eiffel-syntax-and-usage/the-meta-object.md)
   1. [The Links Object](./eiffel-syntax-and-usage/the-links-object.md)
   1. User Examples
1. The Eiffel Vocabulary
   1. [EiffelActivityQueuedEvent](./eiffel-vocabulary/EiffelActivityQueuedEvent.md)
   1. [EiffelActivityDequeuedEvent](./eiffel-vocabulary/EiffelActivityDequeuedEvent.md)
   1. EiffelActivityStartedEvent
   1. EiffelActivityFinished
   1. EiffelArtifactCreatedEvent
   1. EiffelConfidenceLevelModifiedEvent
   1. EiffelArtifactPublishedEvent
   1. EiffelDocumentationCreatedEvent
   1. EiffelEnvironmentDefinedEvent
   1. EiffelCompositionDefinedEvent
   1. EiffelSourceChangeCreatedEvent
   1. EiffelSourceChangeSubmittedEvent
   1. EiffelFlowContextDefinedEvent
   1. EiffelTestCaseStartedEvent
   1. EiffelTestCaseFinishedEvent
   1. EiffelTestSuiteStartedEvent
   1. EiffelTestSuiteFinishedEvent
   1. EiffelTestExecutionRecipeCollectionCreated
   1. EiffelAnnouncementEvent
   1. EiffelConfigurationChangedEvent
1. Implementations
   1. Event Persistence
   1. Event Aggregation and Analysis
   1. Activity Orchestration
   1. Event Transport and Routing
   1. Event Dispatch
   1. Visualization

repository: p-backman-ericsson/eiffel

repo_name: p-backman-ericsson/eiffel


text:
# evaluation

Used to evaluate trainings with mir_eval, save the information and print it. `evaluation_calculator` runs evaluations
and prints the results for any given run folder, and `evaluation_printer` can be used when information about a previous
evaluation needs to be displayed. `evaluation_calculator` additionally plots the training losses and instrument, mix and
predicted instrument stems. All are saved to the `plots` folder of each training folder. If a `target-folder` is
specified, all relevant evaluation data including plots are copied there for easy access.

## evaluation-calculator arguments

| Option              | Description                                                                | Required | Default | Example                                                                                |
|---------------------|----------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------|
| --training-folders  | paths to training runs                                                     | X        | -       | --training-folders D:\development\bachelorarbeit\network\runs\stereo_22050hz_1536fft_guitar |
| --validation-folder | path to the validation data set                                            | X        |         | --validation-folder Z:\ba2\validation_set\guitar                                            |
| --remove-panning    | whether to remove panning from validation tracks                           |          | False   | --remove-panning true                                                                       |
| --target-folder     | where to move all evaluation data, stays in training folder if not defined |          |         | --validation-folder Z:\ba2\evaluation                                                       |

## evaluation-printer arguments

| Option              | Description                                      | Required | Default | Example                                                                                |
|---------------------|--------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------|
| --training-folders  | paths to training runs                           | X        | -       | --training-folders D:\development\bachelorarbeit\network\runs\stereo_22050hz_1536fft_guitar |

## training_plotter

Used to plot the losses from trainings. Works on the run folders as generated by this network. Plots are either shown
directly or saved as an image.

### Parameters

| Option             | Description                                                | Required | Default | Example                                           |
|--------------------|------------------------------------------------------------|----------|---------|---------------------------------------------------|
| --training-folders | paths to folders to plot data for, uses all run folders    |          | []      | --training-folders D:\network\runs\guitar-2048fft |
| --save-figure      | whether to save the plots as image instead of showing them |          | True    | --save-figure false                               |

repository: splitstrument/training

repo_name: splitstrument/training


text:
# This fork is for use with FreePBX (Tested on the freepbx Distro)

# CDR web interface for Asterisk

![](https://cloud.githubusercontent.com/assets/1784421/17270493/24dda150-5664-11e6-8e4e-a8479fdf6307.png)

- View CDRs, filter by date and time, telephone number, direction and status
- Export to xlsx
- Listen to call recordings with built-in HTML5 audio player (mp3, ogg, wav) /flash fallback (mp3)
- Download call recordings by one or in bulk (zip)
- Create users with access limited to specific phone numbers
- Authenticate users against Active Directory

## Requirements

- node.js 4 or later
- MySQL 5.1+ (SQLite, Postgres, MSSQL might also work, but require manual tuning)

## Installation

Follow instructions in [INSTALL.md](INSTALL.md).

## License

[MIT](LICENSE)

repository: fokenhelpmy/webcdr

repo_name: fokenhelpmy/webcdr


text:
# Research Methodologies in Software Engineering

> A curated collection of literature for philosophy of science and research methodologies with a focus on software engineering that is hosted via GitHub Pages: https://xjreb.github.io/swe-research-methods

There is also a `.bib` file with all references (see [here](public/bibs/all-refs.bib)) to make citation easier.
Literature suggestions per subsection are in alphabetical order.
The website relies on the IEEE reference format.
Pull requests or issues are welcome!

[![Screenshot](./public/img/screenshot.png "Screenshot")](https://xjreb.github.io/swe-research-methods/)

repository: xJREB/swe-research-methods

gha_language: TeX

repo_name: xJREB/swe-research-methods


text:
# OmsDev

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.3.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

# Maven Release
To release artifacts call below API URL
curl -X POST -H "Content-Type: application/json" -d @body.json "https://circleci.com/api/v1.1/project/github/scoperetail/oms-webapp?circle-token={TOKEN}"

{TOKEN} = CircleCi API Token which has build invocation permission

Contents of body.json
```
{
   "build_parameters": {
                         "RELEASE": "Yes",
                         "GIT_USER_EMAIL": "",
                         "GIT_USER_NAME": ""
                       }
}
```

Note:
 Update username and email in body.json


text:
Video hosting service behavior for Yii2 Framework
=================================================
Simple behavior which lets you embed the video from popular video sharing sites on your website. It also allows you to get a thumbnail and other information about the video.
Currently the behavior supports following video sharing sites: YouTube, Vimeo, Dailymotion, Rutube, video from Facebook.

Installation
------------
Install with composer:
```bash
composer require orionmax/yii2-video-hosting-service-behavior
```
or add
```bash
"orionmax/yii2-video-hosting-service-behavior": "*"
```
to the require section of your composer.json file.

Usage
-----
Attach the behavior in your model:
```php
use orionmax\yii\videohosting\VideoHostingBehavior

class Article extends ActiveRecord
{
    public function behaviors()
    {
        return [
            [
                'class' => VideoHostingBehavior::className(),
                'attribute' => 'video'
            ],
        ];
    }
}
```
You can also declare validation rule for the attribute:
```php
use orionmax\yii\videohosting\VideoHostingValidator

class ArticleForm extends Model
{
    public function rules()
    {
        return [
            ['video', VideoHostingValidator::className()],
        ];
    }
}
```
Example view file:
```php
<?php if($model->video): ?>
    <div>
      <h2><?= Html::encode($model->videoTitle) ?></h1>
      <p>Video Hosting Service: <?= $model->videoHostingName ?></p>
      <iframe class="embed-responsive-iframe" src="<?= $model->videoIframe ?>" frameborder="0" allowfullscreen></iframe>
      <img src="<?= $model->videoPreview ?>">
      <p>Author: <?= Html::encode($model->videoAuthor) ?></p>
      <h3>Description</h2>
      <p><?= HtmlPurifier::process($model->videoDescription) ?></p>
    </div>
<?php endif; ?>
```

Behavior Options
----------------
* attribute - The attribute which holds the attachment


text:
# PriceEvents
PriceEvents for EPiServer Commerce, subscribe to an event when a price changes

See http://www.david-tec.com/2015/02/Enabling-events-for-price-changes-in-EPiServer-Commerce/ for details

# Please note

As of EPiServer Commerce 8.15 Price events are now available in the core product. More information: http://world.episerver.com/blogs/Quan-Mai/Dates/2015/7/new-events-for-price-and-inventory-updates/

repository: davidknipe/PriceEvents

repo_name: davidknipe/PriceEvents


text:
# Ring

Ring is... well, a ring. A UIView subclass that tries to mimic a single activity ring in the Health app or a progress indicator, or whatever you want it to be.

![animation](animation-small.gif)

# Integrating Ring in your project

As far as I know, the Swift Package Manager can not manage UIKit dependencies.

Ring can be integrated using Carthage:

````
github "ctarda/Ring"
````

The project contains a sample app to showcase how to use Ring

repository: ctarda/Ring

gha_language: Swift

repo_name: ctarda/Ring


text:
Description
------------
Library to represent binary data as ASCII characters.
Base64-encoded data takes about 33% more space than the original data.
Allows encoding and decoding.
Supports English and Russian strings for decoding/encoding,
other languages can simply be added by editing base64_binarydatamap.xml

Requirements
-------------
any lib that can do XSLT 1.0 transformation such as libxml, xsltproc, xerces, saxon, Microsoft msxml etc

Example
--------
```xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:b64="https://github.com/ilyakharlamov/xslt_base64"
    version="1.0">
    <xsl:output method="text"/>
    <xsl:include href="base64.xsl"/>
    <xsl:template match="/">
        <xsl:text>encoded Man is </xsl:text>
        <xsl:call-template name="b64:encode">
            <xsl:with-param name="asciiString" select="'Man'"/>
        </xsl:call-template>
	<xsl:text>
encoded unicode Человек is </xsl:text>
        <xsl:call-template name="b64:encode">
            <xsl:with-param name="asciiString" select="'Человек'"/>
        </xsl:call-template>
        <xsl:text>
encoded 1 with padding is </xsl:text>
        <xsl:call-template name="b64:encode">
            <xsl:with-param name="asciiString" select="'1'"/>
        </xsl:call-template>
        <xsl:text>
encoded 1 without padding is </xsl:text>
        <xsl:call-template name="b64:encode">
            <xsl:with-param name="asciiString" select="'1'"/>
            <xsl:with-param name="padding" select="false()"/>
        </xsl:call-template>
        <xsl:text>
decoded MQ== is </xsl:text>
        <xsl:call-template name="b64:decode">
             <xsl:with-param name="base64String" select="'MQ=='"/>
        </xsl:call-template>
    </xsl:template>
</xsl:stylesheet>
```

Output:

encoded Man is TWFu
encoded unicode Человек is 0KfQtdC70L7QstC10Lo=
encoded 1 with padding is MQ==
encoded 1 without padding is MQ
decoded MQ== is 1

Also supports 'url safe' and 'no padding' syntax via params to b64:encode template

Contact
--------
<EMAIL_ADDRESS>
License
-------
The MIT License (MIT)

Copyright (c) 2012,2013

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

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

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

repository: tillgrallert/lossless-sente-export

repo_name: tillgrallert/lossless-sente-export


text:
# AvES

[![GoVer](https://img.shields.io/github/go-mod/go-version/maarek/aves.svg)](https://github.com/maarek/aves/blob/master/go.mod)
[![GoDoc](https://godoc.org/github.com/maarek/aves?status.svg)](https://godoc.org/github.com/maarek/aves)
[![CircleCI](https://circleci.com/gh/maarek/aves/tree/master.svg?style=svg)](https://circleci.com/gh/maarek/aves/tree/master)
[![Release](https://github.com/maarek/aves/workflows/release/badge.svg)](https://github.com/maarek/aves/releases/latest)
[![Go Report Card](https://goreportcard.com/badge/github.com/maarek/aves)](https://goreportcard.com/report/github.com/maarek/aves)
[![Test Coverage](https://api.codeclimate.com/v1/badges/7cea74edf35eb31b5427/test_coverage)](https://codeclimate.com/github/maarek/aves/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/7cea74edf35eb31b5427/maintainability)](https://codeclimate.com/github/maarek/aves/maintainability)

## Introduction

AvES is an that is tailored towards storing Events for _Event Sourcing_.

It uses the _RESP_ (REdis Serialization Protocol) to communicate.
This way it is possible to create clients by reusing the already available protocol. For example, it is possible to use [the official Redis command line interface](https://redis.io/topics/rediscli) program to communicate with aves.

An event store is a datastore that stores events on disk indefinitely. An initial event sent for an aggregate stream creates the store of all events for that stream.

## Features

- Event publication
- Event stream subscription
- Event stream fetch over range
- Redis based protocol

## Building aves

```bash
git clone https://github.com/maarek/aves.git
cd aves
make build
```

## Basic Event Store Usage

Once AvES is installed and available in your `PATH`, you can run it by executing the following command.

```bash
aves --out mydb.aves
```

There is now a aves server running on your machine and listening on `<IP_ADDRESS>:6480`.
In another terminal window, you can specify to a client to listen to only new events.

```bash
avcli "SUBSCRIBE" 'my-stream'
```

And in another one again you can send new events.
All clients which are subscribed to that same stream will see the events.

```bash
avcli publish 'my-stream' '1' 'Hello World!'
avcli publish 'my-stream' '2' 'Hello America!'
avcli publish 'my-stream' '3' 'Hello Africa!'
avcli publish 'my-stream' '4' 'Hello Japan!'
```

repository: maarek/aves

repo_name: maarek/aves


text:
---
layout: post
title: The different shades of Progressive Web Apps
date: 2018-11-02 15:44:00+02:00
description: Taking advantage of PWA functionality on your site is easy. You don't need to go all-in using all the features. Just take what is needed for your use case.
image:
  url: /assets/images/posts/shades-of-pwa/header.jpg
  width: 1024
  height: 683
permalink: shades-of-pwa
tags:
  - pwa
---

Implementing a PWA or adapting an existing site to “become a PWA” can be daunting. There are many new technologies to learn about, but you don’t need to use all of them to improve your website performance and user experience greatly.

<img
    loading="lazy"
    style="max-width:100%; border: 0;position:absolute;top:0;left:0"
    sizes="(max-width: 768px) 100vw, 684px"
    srcset="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:400,f_auto/v1541172389/shades-of-pwa/header.jpg 400w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:800,f_auto/v1541172389/shades-of-pwa/header.jpg 800w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1200,f_auto/v1541172389/shades-of-pwa/header.jpg 1200w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1400,f_auto/v1541172389/shades-of-pwa/header.jpg 1400w"
    src="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:684,f_auto/v1541172389/shades-of-pwa/header.jpg"
    alt="" />

On this post I will describe several use cases where Progressive Web Apps (PWA) can be useful to make your website achieve better performance and be more reliable.

## What are Progressive Web Apps

If you are a web developer you have probably heard about Progressive Web Apps (PWA). Web sites that load quick, are reliable, feel smooth and take advantage of modern APIs.

There is a lot of buzz about them, partly because Google coined the term and has been leading the implementation of the bits and pieces that composed it.

Implementing a PWA or adapting an existing site to “become a PWA” looks like a big endeavor. The same powerful marketing that has made PWA known in the developer community can be a blessing and a curse. Developers might get the wrong idea that either they use everything and make installable offline-capable push notifications-enabled websites, or they bail out. After all, **PWA is just a way to coin a set of recent browser APIs and techniques, not all or nothing**.

Every website’s use case is different and that is alright. If installing your website as an app is not something a user would do for your site, you don’t need to build that capability. **You can still take advantage of some of the technologies powering PWAs**. The main requirement is that your site runs on HTTPS and, in most cases, creating a ServiceWorker, which is not more than a Javascript file.

I want to describe some of the typical scenarios where you can applied elements from PWAs.

## Common Use Cases to Apply Service Workers and other PWA-related functionality

### Offline mode and pre-caching

To get your site to load without a connection, the user needs to visit it and the site needs to run a Service Worker (SW)that will make content available offline. The SW can follow different strategies (eg serving cache first, making a network request first, etc). You can find strategies on [Jake Archibald’s Offline Cookbook](https://jakearchibald.com/2014/offline-cookbook/) and [serviceworke.rs](https://serviceworke.rs/).

<img
    style="max-width:100%; border: 0; position: absolute; top: 0; left: 0"
    sizes="(max-width: 768px) 100vw, 684px"
    srcset="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:400,f_auto/v1541172749/shades-of-pwa/stale-while-revalidate-sw.png 400w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:800,f_auto/v1541172749/shades-of-pwa/stale-while-revalidate-sw.png 800w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1200,f_auto/v1541172749/shades-of-pwa/stale-while-revalidate-sw.png 1200w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1400,f_auto/v1541172749/shades-of-pwa/stale-while-revalidate-sw.png 1400w"
    src="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:684,f_auto/v1541172749/shades-of-pwa/stale-while-revalidate-sw.png"
    alt="Stale-while-revalidate” strategy, of the many explained on Jake Archibald’s Offline Cookbook" />

“Stale-while-revalidate” strategy, of the many explained on [Jake Archibald’s Offline Cookbook](https://jakearchibald.com/2014/offline-cookbook/). If there’s a cached version available, use it, but fetch an update for next time.

The strategies that check the cache first can be used to fetch and pre-cache top-level navigation routes and other critical resources. Thus, the user gets a faster loading and rendering experience as they click around the PWA.

Offline support is something that can be added pretty much to any site, big or small. I run [a simple SW](https://jmperezperez.com/sw.js) [on my blog](https://jmperezperez.com) to download the main sections and the posts that the user reads.

```js
// the cache version gets updated every time there is a new deployment
const CACHE_VERSION = 10;
const CURRENT_CACHE = `main-${CACHE_VERSION}`;

// these are the routes we are going to cache for offline support
const cacheFiles = ['/', '/about-me/', '/projects/', '/offline/'];

// on activation we clean up the previously registered service workers
self.addEventListener('activate', evt =>
  evt.waitUntil(
    caches.keys().then(cacheNames => {
      return Promise.all(
        cacheNames.map(cacheName => {
          if (cacheName !== CURRENT_CACHE) {
            return caches.delete(cacheName);
          }
        })
      );
    })
  )
);

// on install we download the routes we want to cache for offline
self.addEventListener('install', evt =>
  evt.waitUntil(
    caches.open(CURRENT_CACHE).then(cache => {
      return cache.addAll(cacheFiles);
    })
  )
);

// fetch the resource from the network
const fromNetwork = (request, timeout) =>
  new Promise((fulfill, reject) => {
    const timeoutId = setTimeout(reject, timeout);
    fetch(request).then(response => {
      clearTimeout(timeoutId);
      fulfill(response);
      update(request);
    }, reject);
  });

// fetch the resource from the browser cache
const fromCache = request =>
  caches
    .open(CURRENT_CACHE)
    .then(cache =>
      cache
        .match(request)
        .then(matching => matching || cache.match('/offline/'))
    );

// cache the current page to make it available for offline
const update = request =>
  caches
    .open(CURRENT_CACHE)
    .then(cache =>
      fetch(request).then(response => cache.put(request, response))
    );

// general strategy when making a request (eg if online try to fetch it
// from the network with a timeout, if something fails serve from cache)
self.addEventListener('fetch', evt => {
  evt.respondWith(
    fromNetwork(evt.request, 10000).catch(() => fromCache(evt.request))
  );
  evt.waitUntil(update(evt.request));
});
```

With great power comes great responsibility. Do not use SWs to abuse the user’s data connection, downloading content they will never need, just in case.

### Service Workers for Multi-page Applications

In a multi-page app (MPA), every route that a user navigates to triggers a full request of the page, along with associated scripts and styles needed, to the server.

A good example is [ele.me](https://ele.me), the biggest food ordering and delivery company in mainland China. They used a SW to precache the main routes from their site, and implemented skeleton screens that are immediately shown while loading routes that aren’t cached.

You can read more about their approach on [Google Developers site](https://developers.google.com/web/showcase/2017/eleme) and [this in-depth post](https://medium.com/elemefe/upgrading-ele-me-to-progressive-web-app-2a446832e509).

### Bridging the gap between SPAs and server-side rendered sites

Web development has gone through different stages

1.  Old sites used to be server-side rendered. Only minor interactions used Javascript in the client. Every page navigation meant a full page load.
2.  Then we started creating more complex web experiences and moved all the logic (and templates) to client-side land. Everything was amazing as long as you waited a bit while staring at a blank page whose main purpose was to load a large JS bundle.
3.  We realized that maybe we needed a hybrid solution. First request server-side rendered, then the rest happening client-side.

**Reaching the third step involves doing server-side rendering.** If you don’t want to duplicate templates and logic, the usual solution is to use NodeJS on the server. This is fun for web developers because we get to use the same language both on server and browser. In medium and large web projects it means rewriting existing working code from python/java/PHP/others to Javascript, and the typical nuances of adopting something different from the existing solution.

Server-side rendered sites have also a largely underestimated drawback. **Putting content early on the screen is one thing. Making the content interactive is another.** A page that renders quickly but then doesn’t respond to click/touch for seconds, while loads and executes the JS behemoth, results in frustration.

In web dev terms we are improving the [First Meaningful Paint](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint) (‘FMP’), but we aren’t making any improvement in the [Time to Interactive](https://developers.google.com/web/tools/lighthouse/audits/time-to-interactive) (‘TTI’).

This short version of Addy Osmani’s “The cost of JavaScript“ explains it very well:

“The cost of JavaScript” by Addy Osmani. If you like it, there is also a longer version of the talk.

Paul Lewis also described the situation in his post “[When everything is important nothing is](https://aerotwist.com/blog/when-everything-is-important-nothing-is/)”, and describes it as the _Uncanny Valley._

<img
    style="max-width:100%; border: 0"
    sizes="(max-width: 768px) 100vw, 684px"
    srcset="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:400,f_auto/v1541171412/shades-of-pwa/uncanny-valley.jpg 400w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:800,f_auto/v1541171412/shades-of-pwa/uncanny-valley.jpg 800w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1200,f_auto/v1541171412/shades-of-pwa/uncanny-valley.jpg 1200w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1400,f_auto/v1541171412/shades-of-pwa/uncanny-valley.jpg 1400w"
    src="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:684,f_auto/v1541171412/shades-of-pwa/uncanny-valley.jpg"
    alt="Spotify web player shows an offline page when there is no internet connection" />
Rendering your app server-side. An image from “[When everything is important nothing is](https://aerotwist.com/blog/when-everything-is-important-nothing-is/)”.

I have seen many cases when server-side rendering was proposed as the first step to improve the performance in a SPA. This left off the table ideas like bundle-splitting, which would have likely reduced both FMP and TTI.

> […] **you should avoid SSR if you don’t need it.** Most modern web apps require sophisticated interaction with the UI that has to be driven by non-trivial amounts of JavaScript. If you need to write all of that JS anyway, and you _don’t_ need the first page load benefits that SSR gives you, you’ll be better off just building a [static app shell](https://developers.google.com/web/fundamentals/architecture/app-shell) and avoiding the headaches of client-server code reuse, data re-hydration, and dynamic content cache invalidation. — [When should I Server-Side Render?](https://blog.usejournal.com/when-should-i-server-side-render-c2a383ff2d0f) by [Michael Bleigh](https://blog.usejournal.com/@mbleigh)

Single Page Applications that are not server-side rendered can take great advantage from using Service Workers. In most cases the browser requests some data and injects it in a JS template or component. This means that the browser can cache the JS code and the data independently.

The site can then follow different strategies. For instance, it can load immediately with stale data, similar to what usually happens with native apps. It can also decide to render a skeleton while the data is fetched. In any case, it makes an approach like [PRPL](https://developers.google.com/web/fundamentals/performance/prpl-pattern/), easy to implement.

### Installable Website

You might want to make your website installable, close to what everyone knows as an “app”. For this you don’t need many to use many capabilities from the web. As long as your site runs on HTTPS you just need a web manifest, an icon and a ServiceWorker. You can find documentation on [Google’s Developer site](https://developers.google.com/web/fundamentals/app-install-banners/) and [MDN](https://developer.mozilla.org/en-US/docs/Web/Apps/Progressive/Installable_PWAs).

Your site doesn’t need to be fully functional offline to make it installable. Take for instance Spotify’s Progressive Web App.

Spotify's Web Player works as an installable PWA.

As you see, the PWA is installable, yet it doesn’t have support for offline navigation nor playback. When there is no connection, the PWA shows this custom page:

<img
    style="max-width:100%; border: 0"
    sizes="(max-width: 768px) 100vw, 684px"
    srcset="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:400,f_auto/v1541171689/shades-of-pwa/spotify-offline.png 400w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:800,f_auto/v1541171689/shades-of-pwa/spotify-offline.png 800w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1200,f_auto/v1541171689/shades-of-pwa/spotify-offline.png 1200w, https://res.cloudinary.com/jmperez/image/upload/w_auto:100:1400,f_auto/v1541171689/shades-of-pwa/spotify-offline.png 1400w"
    src="https://res.cloudinary.com/jmperez/image/upload/w_auto:100:684,f_auto/v1541171689/shades-of-pwa/spotify-offline.png"
    alt="Spotify web player shows an offline page when there is no internet connection" />

Installable PWAs are not limited to mobile. They are already supported on [ChromeOS, Windows and Linux](https://developers.google.com/web/progressive-web-apps/desktop), and pretty soon on Mac too (Chrome 72+).

#### More features enabled by Service Workers

I have only talked about some use cases for ServiceWorkers and other elements of PWAs, but there are more. Browsers can show [push notifications](https://developers.google.com/web/fundamentals/push-notifications/) after the user has enabled it for a certain site, and the push notifications are delivered even when the site is not opened. This makes it ideal for reengage with users without having to wait for them to visit your site again.

You can also use [background sync](https://developers.google.com/web/updates/2015/12/background-sync), ideally for schedule data sending beyond the life of the page. Think of uploading pictures or sending chat messages even after the user leaves the page.

### More Resources

I love reading about real sites that have adopted PWAs and have shared their findings. I particularly like [Addy Osmani’s talk “Production Progressive Web Apps With JavaScript Frameworks”](https://www.youtube.com/watch?v=aCMbSyngXB4), showcasing some case studies from large web sites that have been integrating these technologies to improve their key metrics.

They are good examples to demonstrate that you don’t need to re-architecture an existing site to use PWA goodness, and that you can apply some of these concepts and see improvements in perceived performance very quickly.

branch_name: refs/heads/hexo

gha_language: CSS


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

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

## 6.10.0 - 2019-04-03

Starting from 6.10.0, all of these Kurento Media Server sub-projects

- kurento-module-creator
- kms-cmake-utils
- kms-core
- kms-elements
- kms-filters
- kms-jsonrpc
- kurento-media-server

have their ChangeLogs unified in [kurento-media-server/CHANGELOG](https://github.com/Kurento/kurento-media-server/blob/master/CHANGELOG.md).

## [6.8.0] - 2018-09-26

### Changed
- CMake/CommonBuildFlags: Use -Werror only for development (DEBUG builds)
- CMake/CommonBuildFlags: Add new function common_buildflags_print()

### Removed
- CMake/DpkgBuildFlags: Remove get_dpkg_buildflags_c(), get_dpkg_buildflags_cxx()

### Fixed
- TestHelpers: Always generate Valgrind target

## [6.7.0] - 2018-01-24

### Added
- New CMake module "CommonBuildFlags", which allows to easily set the same compilation flags to all KMS modules.

### Changed
- Debian: Align all version numbers of KMS-related modules.
- Debian: Remove version numbers from package names.

## [1.4.0] - 2017-07-24

### Added
- New CMake module "DpkgBuildFlags", which allows to query the `dpkg-buildflags` command and retrieve the compilation flags that will be used to generate Debian packages. All projects now compile with these compilation flags.

### Changed
- Old ChangeLog.md moved to the new format in this CHANGELOG.md file.
- Full review of all CMake files to tidy up and homogenize code style.

## [1.3.2] - 2016-09-30

## [1.3.1] - 2016-05-27

## [1.3.0] - 2016-02-24

## 1.2.2 - 2015-11-25

[6.8.0]: https://github.com/Kurento/kms-cmake-utils/compare/6.7.0...6.8.0
[6.7.0]: https://github.com/Kurento/kms-cmake-utils/compare/1.4.0...6.7.0
[1.4.0]: https://github.com/Kurento/kms-cmake-utils/compare/1.3.2...1.4.0
[1.3.2]: https://github.com/Kurento/kms-cmake-utils/compare/1.3.1...1.3.2
[1.3.1]: https://github.com/Kurento/kms-cmake-utils/compare/1.3.0...1.3.1
[1.3.0]: https://github.com/Kurento/kms-cmake-utils/compare/1.2.2...1.3.0

repository: Kurento/kms-cmake-utils

gha_language: CMake

repo_name: Kurento/kms-cmake-utils


text:
---

title: Screenshots
id: screenshots

---

To give you and idea of the options this library offers, here are some end results.

![Chart example](/img/screenshots/example1.png)
![Chart example](/img/screenshots/example2.png)
![Scrolling example](/img/Scrollable.gif)
![Tooltip example](/img/Tooltip.gif)
![Chart example](/img/screenshots/example3.png)
![Chart example](/img/screenshots/example4.png)

![Smoothing 1](/img/smooth.png)
![Smoothing 2](/img/smoothing.png)
![Chart example](/img/screenshots/example5.png)


text:
# linear_search

**Description :** Linear search is used for looking term from left to right of the array and try to find the element if present
return it's index. But It is rarely used practically because other search algorithms such as the
[binary search](https://github.com/Bhupesh-V/30-seconds-of-cpp/blob/master/algorithm/binary_search.md)
algorithm and hash tables allow significantly faster searching comparison to Linear search.

**Example**
```cpp
int linear_search(int arr[], int n, int x)
{
    int i;
    for (i = 0; i < n; i++)
        if (arr[i] == x)
            return i;
    return -1;
}

int main(void)
{
    int arr[] = { 2, 3, 4, 10, 40 };
    int x = 10;
    int n = sizeof(arr) / sizeof(arr[0]);
    int result = linear_search(arr, n, x);
    if (result == -1){
        std::cout<<"Element is not present in array";
    }
    else{
        std::cout<<"Element is present at index " <<result;
    }
   return 0;
}
```
**[Run Code](https://rextester.com/RJXW10522)**


text:
# cassandra-apscheduler

This is a fork of the awesome Python library APScheduler. Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically. You
can add new jobs or remove old ones on the fly as you please. This version has capabilities to use a
Datastax Cassandra cluster as a backend for storing jobs. The scheduler can use cassandra as a backend
job store using 'cassandra' as an argument. An example implementation can be found in the examples/jobstores
directory.

## Source
The source can be browsed at [Github](https://github.com/ZyncUp/cassandra-apscheduler)

## Reporting bugs
[bug tracker](https://github.com/ZyncUp/cassandra-apscheduler/issues) is provided by Github.


text:
---
layout: page
title: About
tags: [about]
date: 2021-03-09
comments: false
---

Hi, I’m Daniel.

I love poetry, prose, and all the genres in between. My work often focuses on monstrosities and the subconscious. Currently, I'm an M.F.A. student at the University of South Florida.

I also have experience with technical documentation, publishing tools, and interactive digital media. I formerly worked as an Associate Tools and Operations Specialist for Pegasystems. I have a Bachelor of Arts in Computer Science and Creative Writing from New College of Florida.

I've fallen in love with two cities: St. Petersburg FL, where I currently live, and Boston MA, near where I grew up. I also have an interest in Tarot, symbols, and the subconscoius.

Lately, I've been thinking about: labyrinths & repetition, crabs & other ocean insects, writing as play

Miscellaneous

Book Recommendations
Reach Out
Credits


text:
# PaddleFlow Cloud Runner

## High Level Overview

After debugging PaddlePaddle code on your local machine, you can easily run same code on BaiduCloud by using paddleflow cloud.

```
import paddleflow_cloud as pfc
pfc.run(entry_point='paddle_train_example.py')

```

repository: PaddleFlow/cloud

repo_name: PaddleFlow/cloud


text:
@typedef {String} steal.moduleIdReference moduleIdReference
@parent steal.types

A moduleIdReference is a string value that is used to
look up a [steal.moduleId moduleId] and its associated module value. For exaxmple:

    steal("jquery","./foo","./bar.js","app")

Typically, a moduleIdReference closely reflects
a path to a module. For example: `steal("myapp/component.js")` will likely
reference the `myapp/component.js` __moduleId__ which will represent
the code at the file or url `STEALROOT/myapp/component.js`.

But, the __moduleId__ referenced by a moduleIdReference depends on several
factors.

 - The syntax (steal, AMD, etc) being used
 - The moduleId of the module depending on the moduleIdReference
 - [steal.config]'s [steal.config.map map] and [steal.config.root root] configuration options

This provides a lot of flexibility for things like:

 - Using two different versions of a library (ex: jquery) in one application.

## Steal: reference -> id

Steal performs the following steps to convert a moduleIdReference to a
moduleId.

1. If the moduleIdReference starts with `"./"`
   join it to the current moduleId.

        moduleIdReference     "./food.js"
        current moduleId      "app/component.js"
        new moduleIdReference "app/food.js"

2. If the moduleIdReference ends with a "/" or without a file extension, take the
   everything after the last "/", add it to the end of the moduleIdReference and
   add ".js".

        moduleIdReference     "can/control"
        new moduleIdReference "can/control/control.js"

3. If the current moduleId matches a property in [steal.config]'s [steal.config.map map]
   option, use the rule to convert the moduleIdReference.

        moduleIdReference       "jquery/jquery.js"
        current moduleId        "app/component.js"
        steal.config("map",{
          "app/" : {
             "jquery/jquery.js" : "jquery-1.5.js"
          }
        })
        new moduleIdReference    "jquery-1.5.js"

repository: mooveprince/hmjmvcpractice

repo_name: mooveprince/hmjmvcpractice


text:
---
layout: post
title: Week 12 Post
---

**What did you do this past week?**

This past week was another change of language and focus in Glenn Downing's software engineering course. Over the course of the week we discussed a piece of software that was responsible for renting movies. It was written in java and its purpose was to help us understand how software is refactored. One part which I found to be interesting is that iterators were not used when this book was written(from where the java code came) and enumeration was used instead. When you wanted to check if there was another object to enumerate you would call "rentals.hasMoreElements()".

**What's in your way?**

With the second exam coming soon, a focus on reviewing material will be essential. There have been many topics in many languages and I'm assuming it is all fair game for the exam. Although the project has been the main focus, the exam is really the big item which is in the way.

**What will you do next week?**

As many others have already mentioned the coming week will bring a focus on finalizing the group project. Over the weekend I met with my team with the goal of wrapping up loose ends and assigning some final parts. On thursday and into next weekend we will also surely focus on finalizing the API calls to another group's API.

***

The final project has been a good experience in teamwork, scheduling and use of tools for me. Thus far, I think it's fair to say that only operating systems had a more intense project with SWE coming in second over my time at UT. Having said this, I feel the SWE project has a larger breadth of current technologies over operating systems. Most other classes I've taken at UT only had projects with several hundred lines of code to complete. I feel as though there should be an increased effort to create large projects with multiple phases. These phases should build on earlier versions, since this helps students understand how real software is built. In addition, it helps students reflect on earlier design decisions.

***

**Tip of the week:**
I highly recommend leaving the computer off for a 24 hour period at least once a month. Getting outside and not "connecting" is a good way to relax and refresh the mind.


text:
# NugetVisualizer
Tool intended to help visualize all of the nuget packages and their corresponding versions for a set of given repositories

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

### Process

Initially, the data must be harvested. This can be done via the file system or by using the github API.
A console app is provided for testing purposes (and can be used as code examples on how to use)
The data can be harvested from the Harvest menu on the web.
Once the data is harvested, it can be visualized
All data is stored in a Sqlite database

The harvesting process looks for .sln files in the hierarchy, and creates a Project for each solution. Then it looks for packages.config files in all children directories and associates those packages with the project, creating new Packages each time a new one (package name + version) is found.
.net core 2.0+ projects are also supported, a different parser looks into csproj files

#### Github API caveats

The Github API has several limitations. For example, it only allows 30 code search requests per minute, and it also limits the number of requests per IP address. This means that some throttling needs to be done to avoid the Github API from bouncing off requests when reading large repositories.
In order to minimize this effect, consider using filters when harvesting to reduce the returned results.

### Requirements

The solution is built and requires [.net Core 2.0](https://www.microsoft.com/net/download/core) to run

### Configuration

A configuration.json file must be created to run the tests and the application.
The following variables are supported:

 - GithubOrganization : The name of the Github organization to read repositories from
 - GithubToken: OAuth token needed to connect to Github's API. You need to create a token and give it repo access. For more information, read more about [personal access tokens](https://github.com/blog/1509-personal-api-tokens)
 - Dbpath: This is the path where your Sqlite database will be created and the data stored. Do not include this variable in the UnitTests, as the DB is autogenerated.

### Initial setup

##### Database

The database is initially created when the console app or website runs, it is created under the path defined by the *Dbpath* variable

##### Configuration

Create a file named configuration.json in the root of ConsoleVisualizer folder, and also for the WebVisualizer.
This can be used as a template:

    {  "GithubOrganization": "YOUR ORGANIZATION HERE",
       "GithubToken": "YOUR GITHUB TOKEN HERE",
       "Dbpath" : "C:\\FullPathToSqlLiteDatabase\\myDatabase.db"
    }

##### Running Tests Locally

Just run them normally. At the moment of writing, Resharper's test runner doesn't work on .net core, so use the visual studio test runner.
The Integration Tests that connect to github cannot be run locally, because a token is needed for a dummy organization i've created. Github doesn't let me check in tokens into source control for security reasons, so these tests run only on the travis build.

##### Running Website locally

Go into /NugetVisualizer an run the following commands

- dotnet restore
- dotnet build NugetVisualizer.sln
- dotnet test UnitTests
- cd WebVisualizer
- dotnet run --project WebVisualizer.csproj --configuration Debug

##### Sample Screenshots

![Create Snapshot](create-snapshot.PNG?raw=true "Create Snapshot")

Snapshot creation (data harvest) page

![Append Snapshot](append-snapshot.PNG?raw=true "Append Snapshot")

Once a Snapshot is created, data can be appended to it (make sure you're not adding the same repositories twice though)

![Dashboard Example](dashboard.PNG?raw=true "Dashboard Example")

Example dashboard with widgets (more to come in future versions)

![Package List With Versions](packageList.PNG?raw=true "Package List With Versions")

Main page where the packages are ordered by distinct versions count and we can see which repository uses which version

##### Useful Tools

https://github.com/sqlitebrowser/sqlitebrowser/

repository: sepharg/NugetVisualizer

gha_language: JavaScript

repo_name: sepharg/NugetVisualizer


text:
# Installation
By running the following line of code you can install this repo:
```Bash
pip install git+https://github.com/erfanMhi/gym-recording-modified.git
```

# gym-recording

A Python package to capture the sequences of actions and observations on a [Gym](https://github.com/openai/gym) environment
by wrapping it in a `TraceRecordingWrapper`, like this:

```Python
import gym
from gym_recording_modified.wrappers import TraceRecordingWrapper

def main():
    env = gym.make('CartPole-v0')
    env = TraceRecordingWrapper(env)
    # ... exercise the environment
```

It will save recorded traces in a directory, which it will print with `logging`.
You can get the directory name from your code as `env.directory`.

Later you can play back the recording with code like the following, which runs a callback for every episode.

```Python
from gym_recording_modified import playback

def handle_ep(observations, actions, rewards):
  # ... learn a model

playback.scan_recorded_traces(directory, handle_ep)
```

repository: erfanMhi/gym-recording-modified

repo_name: erfanMhi/gym-recording-modified


text:
# dotfiles
kotaro.t@k4h4shi's configuration for vim, zsh, tmux and more.
## Usage

### Git clone
You should first clone the repo and move into the derectroy.
```
git clone https://github.com/k4h4shi/dotfiles.git
cd dotfiles
```

### Make
You can deploy, install, clean, or destroy with make commands.

You can use `make help` to show the help same as down below.

```
init    => Initialize enviroment settings.
deploy  => Create symlinks to home directory.
update  => Fetch all changes from remote repo.
install => Run update, deploy, init.
clean   => remove the dotfiles.
destroy => remove the dotfiles and this repo.
```

### zsh

```
# commands
. : cd dotfiles
.. : cd ../../
... : cd ../../../

c: clear
ggl: googler
```

### Move Around Tmux Pane and Vim Window
You can move around pane and window.

```
C-h select left pane
C-j select down pane
C-k select up pane
C-l select right pane
```

### tmux
- change prefix to C-Space
- set default-shell as zsh
- set vim like key-bind
- set escape-time to 1
- set [base|pane-base] index to 1
- status bar

Tmux key bindings:

```
| vertical split
- horizontal split

H resize pane plus 5 to left
J resize pane plus 5 to down
K resize pane plus 5 to up
L resize pane plus 5 to right

c create window
x close current window

C-h select previous window
C-l select next window

r reload .tmux.conf
```

Installed Plugins:
- tpm
- tmux-yank
- tmux-open
- tmux-battery
- tmux-sensible
- tmux-colors-solarized

### vim

#### Vim key bindings

Normal mode:
```
# Save and Quit
\w: write
\q: quit
\wq: write and quit
\z: write and quit all
\e: edit
\h: help

# Tab and Files
C-n: next tab
C-p: prevoius tab
gf: open a file under the cursor

# Plugin
\r: QuickRun
\n: NERDTree
\nf: NERDTreeFind
\t: TagBar
\y: emmet-vim
\p: Previm open
\f: CtrlP

\pi: PlugInstall
\pu: PlugUpdate
\pc: PlugClean
\pg: PlugUpgrade

# Dotfiles
\.: open dotfiles with NERDTree
\ev: edit .vimrc
\et: edit .tmux.conf
\ez: edit .zshrc
\er: edit README.md
```

Insert mode:
```
C-[ : escape
Enter(after search): remove highlight

C-n: next suggest
C-p: previosu suggest
C-k: apply snipet
```

Command mode:
```
:QuickRun => quick run
:PrevimOpen => Previm open
```

#### Plugins:
Plugin Manager:
- [junegunn/vim-plug](https://github.com/junegunn/vim-plug)

Extensional Pane:
- [scrooloose/nerdtree](https://github.com/scrooloose/nerdtree)
- [jistr/vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs)
- [majutsushi/tagbar](https://github.com/majutsushi/tagbar)
- [szw/vim-tags](https://github.com/szw/vim-tags)

Code Runner & Previewer
- [Shougo/vimproc.vim](https://github.com/Shougo/vimproc.vim)
- [thinca/vim-quickrun](https://github.com/thinca/vim-quickrun)
- [kannokanno/previm](https://github.com/kannokanno/previm)
- [tyru/open-browser.vim](https://github.com/tyru/open-browser.vim)

Auto completion:
- [Shougo/neocomplete](https://github.com/Shougo/neocomplete)
- [Shougo/neocomplcache](https://github.com/Shougo/neocomplcache)
- [Shougo/neosnippet](https://github.com/Shougo/neosnippet)
- [Shougo/neosnippet-snippets](https://github.com/Shougo/neosnippet-snippets)
- [honza/vim-snippets](https://github.com/honza/vim-snippets)
- [alvan/vim-closetag](https://github.com/alvan/vim-closetag)
- [mattn/emmet-vim](https://github.com/mattn/emmet-vim)
- [tpope/vim-surround](https://github.com/tpope/vim-surround)
-
Syntax checker & highlighter:
- [scrooloose/syntastic](https://github.com/scrooloose/syntastic)
- [pmsorhaindo/syntastic-local-eslint.vim](https://github.com/pmsorhaindo/syntastic-local-eslint.vim)
- [plasticboy/vim-markdown](https://github.com/plasticboy/vim-markdown)
- [Yggdroot/indentLine](https://github.com/Yggdroot/indentLine)
- [hail2u/vim-css3-syntax](https://github.com/hail2u/vim-css3-syntax)
- [ryym/vim-riot](https://github.com/ryym/vim-riot)
- [posva/vim-vue](https://github.com/posva/vim-vue)
- [elzr/vim-json](https://github.com/elzr/vim-json)
- [jason0x43/vim-js-indent](https://github.com/jason0x43/vim-js-indent)

gha_language: Vim script


text:
Here you can find Jupyter Notebooks which serve as guides for using BuildingSync. Currently there are several notebooks for prototype small office and primary school buildings with ASHRAE Level 1 and 2 energy audit.

# Setup

- `pip install poetry`
- `poetry install`
- `poetry run jupyter lab`

Navigate to the notebook examples (e.g., `bsync_examples/Small-Office-Level-1.md`), right click on the file and select `Open With -> Jupytext Notebook`, then walk through the example.

repository: BuildingSync/schema

gha_language: Ruby

repo_name: BuildingSync/schema


text:
rvagaming-flask
===============

A work-in-progress from-scratch rewrite of github.com/mosbasik/rvagaming using the Flask Python web framework.

# To use this project:

* Make sure you have at least Python 2.7 installed.

* Make sure you have the Python module `virtualenv` installed (You will need to download and install this for any version of Python older than 3.4).

  * You might be able to get it using a package from your distribution.  For instance, on Ubuntu:

  ```
  sudo apt-get install python-virtualenv
  ```

  * Otherwise, the easiest way is to install `pip` and use that to get `virtualenv`:

  ```
  pip install virtualenv
  ```

* Navigate to the directory you want the app to be in and copy/clone/whatever the `rvagaming-flask` repository into it.

* Within the `rvagaming-flask/` directory, create a virtual Python environment:

  * In versions of Python older than 3.4, use

  ```
  python virtualenv.py flask
  ```

  * in versions of Python 3.4 or newer, use (untested):

  ```
  python -m venv flask
  ```

* You now have a contained Python environment in `rvagaming-flask/flask/`.

* Next we install the necessary modules in this environment:

```
flask/bin/pip install flask
flask/bin/pip install flask-login
flask/bin/pip install flask-openid
flask/bin/pip install flask-mail
flask/bin/pip install flask-sqlalchemy
flask/bin/pip install sqlalchemy-migrate
flask/bin/pip install flask-whooshalchemy
flask/bin/pip install flask-wtf
flask/bin/pip install flask-babel
flask/bin/pip install guess_language
flask/bin/pip install flipflop
flask/bin/pip install coverage
```

* You should now be able to run the application by executing `run.py`

  * If you make `run.py` executable with

  ```
  chmod a+x run.py
  ```

  You can execute it with

  ```
  ./run.py
  ```

  * Otherwise, you can execute it with

  ```
  flask/bin/python run.py
  ```

repository: mosbasik/rvagaming-flask

repo_name: mosbasik/rvagaming-flask