text:
---
path: "/apps/gift-cards"
updated: "2019-06-20"
title: "Gift cards"
description: "Sell vouchers and gift cards on your site."
author: "Sowbagya lakshmi"
category: "apps"
---

# Gift Cards

Offer Gift Card purchase to your customers. Providing Gift cards widens your window of sales. With this plugin, Store Owners will be able to create and sell Gift cards. A gift card or cash card is automatically generated and sent as email.

Gift Card app generates PDF and attached to the order email notification. This app requires DOMPDF library to generate and send PDF. You can download the DOMPDF library plugin and install it from here: [https://bitbucket.org/j2store/plg\_lib\_dompdf/downloads/plg\_library\_dompdf.zip](<https://bitbucket.org/j2store/plg_lib_dompdf/downloads/plg_library_dompdf.zip>)

**NOTE: The gift card app works only with the PRO version of J2Store since the vouchers are a PRO feature.**

## Requirements

- PHP 5.4 or higher
- Joomla 3.3 or above
- J2Store 3.2.x or above

## Installation Instructions

1\. Use the Joomla installer to install the app.

2\. In the backend, go to J2Store Dashboard -> Apps as shown in the image below.

![Dashboard-enabling the app](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/app_giftcertificate_dashboard.png)

3\. Click Enable in the Gift certificate app.

4\. Once the app is enabled, click on Open to set the configuration for the app.

## Parameters

**BASIC SETTINGS:**

**Enable Validity date for Gift Card:**

Setting this option to yes will allow you to have a validity date for the Gift Card.

**No of days Gift card will valid :**

Enter the validity time of gift card in terms of days.

**No of months Gift card will valid :**

Enter the validity time of gift card in terms of months.

**No of year Gift card will valid:**

Enter the validity time of gift card in terms of years.

**Pdf Library Check?**

For PDF generation and attachment this app uses a third party pdf library known as DOM pdf. This setting will show if Dompdf library is installed or not. If it shows "Installed" then everything is alright. If no, then please install the dom pdf library and check the plugin again.

**Allow purchasing multiple gift certificates with different receivers**

If wants to allow customers to purchase multiple gift certificates, set this option to YES. Setting YES will allow customers to due multiple gift cards with different receivers.

**Send Gift Card/Voucher if order status is**:

Filter the order statuses for which a gift voucher should be selected. PDF will be attached and sent only when the status of the order is among the chosen values here. Recommended setting: Confirmed status. When a payment is successful the order is changed to Confirmed status, so choosing confirmed status here will make sure that the voucher is generated only if the payment is successful.

![basic settings](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-card-basic.png)

**Gift card / voucher code prefix:**

A prefix can be added to the voucher code or gift card to make it more relevant. A voucher code or gift card might be a random code of numbers and alphabets that is generated by the system and cannot be predicted manually.

**Round gift card / voucher value by**
**
Would you like to round the voucher value ? Then, enter the value by which the voucher value should be rounded.For example, if point is in decimal(0.60), it will change the decimal to whole number.

**Can the gift voucher / code can be applied to the shipping cost as well?**

This setting is used to allow voucher for including shipping cost

**Should voucher value include the tax as well?**

This helps for those merchants who have gift voucher prices including tax. If set to NO, it would create a gift voucher with a value minus tax. NOTE: This might cause confusion to your customers. They would see the price of the voucher as 500. If you send a voucher with a value minus tax (example: 500 - 10% tax), he might come back to you and question.

**Multiple voucher (Product Quantity Based):**

Allows the customer to have multiple voucher based on the product quantity.

**Send a copy of the gift voucher to the store administrators?**

As a store admin, if you would like to receive a copy of gift certificate email, set this option to YES.

**Store administrator emails**

If you have enabled above option, you will have to give the administrator email here. You could also enter multiple emails separated with comma (,).

![Basic setting second part](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-cad-basic-sec.png)

**Date format:**

Set the date format for the Expire/purchase date.

**Enable Attachment of Gift Card / Voucher as a PDF**

If set to YES it generates a PDF of the below voucher Body and sends an email to the customer.

**The file prefix for PDF**

Name of the file that is attached with the email.

**Would you like to set a background image to the PDF? (optional)**

Choose YES to this option, if you would like to add background image to the PDF voucher.

**Choose a background image (optional)**

If you set YES to above parameter, choose the background image here. Make sure the image you have uploaded is optimized and small.

**Custom CSS **

Add CSS class name. If not sure about it, please leave it blank.
![Custom css](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-card-store-admin.png)
## Gift Form settings:

**Show confirm gift receiver email**

If you would like to validate the receiver email address, set this option to YES to show confirm email address field.

**Show receiver email**

If you would like to display the receiver email address, set this option to YES to show receiver email address field.

**Show receiver note**

If you would like to display a receiver note, set this option to YES to show a receiver note.

**Make receiver email mandatory**

**If you want your customers to enter the receiver email always, set this option to YES to make this field as required field.

**Make receiver note mandatory**

Setting this option to YES will make the receiver note field as required field.

**Show receiver first name ?**

If you want to display the receiver first name ,set this option to yes.

**Make first name mandatory ?**

Setting this option to YES will make the first name field as required field.

**Show Receiver last name?**

If you want to display the receiver last name ,set this option to yes.

**Make last name mandatory?**

Setting this option to YES will make the last name field as required field.
![Form settings](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-card-form-settings.png)
## How to add subject and body of the email ?

The subject and body of the email could be added by navigating to the tab next to basic settings tab. If you are having multiple languages in your site, you could also add different content for different languages.

![Email](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-card-lang-sett.png)
![Email settings](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-card-email.png)

**Subject and Body**: This is the Email Subject and Body which is sent to the cusomer upon. The voucher code and voucher value is dynamically generated by the system, therefore to use the voucher code and voucher value you may use the below tags

**Tags:**

1. [VOUCHER\_CODE] - used to display voucher code.
2. [VOUCHER\_VALUE] - used to display voucher price.
3. [EMAIL] - used to display user email.
4. [SITENAME] - used to display site name.
5. [VOUCHER\_PURCHASE\_DATE] - used to display voucher created date.
6. [GIFT\_NOTE] - used to display gift note.
7. [GIFT\_SENDER\_FULL\_NAME] used to display gift sender name (Billing address first name and last name)
8.  [GIFT\_RECEIVER\_FIRST\_NAME] used to display gift receiver first name.
9.  [GIFT\_RECEIVER\_LAST\_NAME] used to display gift receiver last name.
10. [GIFT\_RECEIVER\_FULL\_NAME] used to display gift receiver full name.
11.  [EXPIRATION\_DATE] used to display expiration date.
12.  [GIFT\_CONTENT] used to display gift content from article.
13.  [PRODUCT\_NAME] used to display product title.
14.  [VOUCHER\_CODES] used to display list of voucher code(Only Quantity based multiple voucher), can use invoice template also.
15.  [VOUCHER\_QUANTITY] used to display number of voucher code available for multiple voucher(Only Quantity based multiple voucher).
16. [GIFT\_PRODUCT\_QUANTITY] used to display product quantity of single voucher.

Note: If you want to send test email, Please enter email address in Store administrator emails (Basic Setting Tab)

**Send Test Email :**

If you wish to see a sample of the mail and how it looks then click on the SEND TEST EMAIL BUTTON after completion of body and subject set up.

![Gift card email settings](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-card-email-config.png)

#### How to sell gift card or cash card in my online shop ?

Most of the online shops / ecommerce stores have the option to buy a <link-text url="https://en.wikipedia.org/wiki/Gift_card" target="_blank" rel="noopener">Gift card</link-text>. It is one of the opputunities for store owners to widen their chance of sales.

- Create a cash card product and start selling <link-text url="http://j2store.org/support/user-guide/simple-product.html" target="_blank" rel="noopener">Create a J2Store product</link-text> with product type as "Simple product". Configure all basic options such as price and navigate to the apps tab.

You could find an option that says "Treat this product as Gift card and Send a Gift Card on purchase"Tick the checkbox as shown in below screenshot.
![Creating a gift card](https://raw.githubusercontent.com/j2store/doc-images/master/apps/gift-cards/gift-card-pro.png)

If you wanted to provide a gift card or cash card in different rates, you can create an option add it in the options section. Click this link to<link-text url="http://j2store.org/support/user-guide/options.html" target="_blank" rel="noopener">Check how to create and add options to a product<link-text>

**How the customer can use this Gift card ?**

A Customer purchases this gift card. A voucher is created for this order placed with the value of the product. For example if the gift card product price is $100, then a voucher of value $100 is generated and an email is sent to the customer. That email subject and body could be configured in above section.

The Store admin should Enable Gift Vouchers under J2Store Setup > Configurations > Discount tab > Enable Gift Vouchers, set this to Yes. Save the configurations. Store starts accepting vouchers in the cart section. The customer can enter the voucher code in the cart section to redeem the gift card value.

## Video Tutorial

    [![Gift card](https://img.youtube.com/vi/51J1UkeRu3Y/0.jpg)](    https://youtu.be/g7epaBKOOuE "Gift card")


text:
### This code is for annotating the de novo assembly using IPRscan.The following code was submitted as a SLURM script to the cluster.
```bash
#Move into the appropriate folder
cd /dscrhome/les84/IPR_XML

#Setup array job
e=$(( $SLURM_ARRAY_TASK_ID * 500 ))
s=$(( $e - 499 ))

#Begin iprscan of sequences
for ((f=$s;f<=$e;f++))
do
echo "IPRscanning sequence $f" >&2
mkdir temp_${f}
   /work/frr6/IPRSCAN/interproscan-5.22-61.0interproscan.sh \
   -o Combined_out_trinity.Trinity.part-${f}.xml \
   -f XML \
   -goterms \
   -i ../SINGLE_SEQS/Combined_out_trinity.Trinity.part-${f}.fasta \
   -T temp_${f} \
   -t nrm -rf temp_${f}echo "IPRscan of $f finished" >&2
done
```
Description of the parameters:
- -o Combined_out_trinity.Trinity.part-${f}.xml :: specified output file to put results
- -f XML :: files to index
- -goterms :: switch on look up of corresponding Gene Ontology annotation
- -i  :: input sequence file
- -T temp_${f} :: new destination for temporary files (larger than computer default)
- -t n :: data type, nucleotide

IPRscan and Blastx results were uploaded into Blast2Go 4.1.9. Using a Pro-license, the Blast2GO mapping step was completed. Then I merged the GOs and completed the annotation step. Statistics of the annotated transcriptome were then made avaiable.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
+++
title = "Dependency Injection"
weight = 10
lastModifierDisplayName =<EMAIL_ADDRESS>date = 2018-03-29
+++

## Introduction

Blazor has dependency injection built in. Take a look at the following simplified code sample. It defines a repository (e.g. a database) from which we can get customer data asynchronously. In order to decouple the user of the repository (e.g. Blazor component) from the implementation (`Repository` class shown below), we introduce an interface (`IRepository`). The decoupling enables us to use different repository implementations e.g. for unit tests.

```cs
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;

namespace Architecture.Services
{
    public class Customer
    {
        public string FirstName { get; set; }

        public string LastName { get; set; }
    }

    public interface IRepository
    {
        Task<IReadOnlyList<Customer>> GetAllCustomersAsync();
    }

    public class Repository : IRepository
    {
        private static Customer[] Customers { get; set; } = new[]
        {
            new Customer { FirstName = "Foo", LastName = "Bar" },
            new Customer { FirstName = "John", LastName = "Doe" }
        };

        // Note that the constructor gets an HttpClient via dependency
        // injection. HttpClient is a default service offered by Blazor.
        public Repository(HttpClient client)
        {
            // In practice, we would store the HttpClient and use it
            // to get customers via e.g. a RESTful Web API
        }

        public async Task<IReadOnlyList<Customer>> GetAllCustomersAsync()
        {
            // Simulate some long running, async work (e.g. web request)
            await Task.Delay(100);

            return Repository.Customers;
        }
    }
}
```

## Setting up the Service Provider

We have to add the available application-level services in the program's `Main` method. When we create the `BrowserRenderer` ([more about *renderers*](/getting-started/what-is-blazor/#renderer)) to bootstrap our Blazor app, it expects a *service provider* (`System.IServiceProvider`). Blazor comes with a service provider specifically for the browser (`Microsoft.AspNetCore.Blazor.Browser.Services.BrowserServiceProvider`, see [source on GitHub](https://github.com/aspnet/Blazor/blob/release/0.1.0/src/Microsoft.AspNetCore.Blazor/Services/BrowserServiceProvider.cs)). It accepts a configuration functions in which we have to add services to Blazor's dependency injection system. If you are familiar with ASP.NET Core, the API should feel quite natural for

```cs
using Architecture.Services;
using Microsoft.AspNetCore.Blazor.Browser.Rendering;
using Microsoft.AspNetCore.Blazor.Browser.Services;
using Microsoft.Extensions.DependencyInjection;

namespace Architecture
{
    class Program
    {
        static void Main(string[] args)
        {
            var serviceProvider = new BrowserServiceProvider(configure =>
            {
                configure.Add(ServiceDescriptor.Singleton<IRepository, Repository>());
            });

            new BrowserRenderer(serviceProvider).AddComponent<App>("app");
        }
    }
}
```

## Injecting Services

To inject a service in a component, use the `@inject` keyword as shown in the following sample. Technically, this generates a property with the given name and type. The property is decorated with the attribute `Microsoft.AspNetCore.Blazor.Components.InjectAttribute` so that Blazor's component factory (`Microsoft.AspNetCore.Blazor.Components.ComponentFactory`, see [source on GitHub](https://github.com/aspnet/Blazor/blob/release/0.1.0/src/Microsoft.AspNetCore.Blazor/Components/ComponentFactory.cs)) knows that it has to fill it when creating the component. The `InjectAttribute` should not be used outside of Blazor components. If you need dependency injection e.g. in services, use constructor injection as shown above in the constructor of the `Repository` class.

```cs
@page "/"
@using DependencyInjection.Services
@inject IRepository Repository

<ul>
    @if (Customers != null)
    {
        @foreach (var customer in Customers)
        {
<EMAIL_ADDRESS>@customer.LastName</li>
        }
    }
</ul>

@functions {
    private IReadOnlyList<Customer> Customers;

    protected override async Task OnInitAsync()
    {
        Customers = await Repository.GetAllCustomersAsync();
    }
}
```

## Default Services

At the time of writing, Blazor offers two default services that you can request via dependency injection:

* `System.Net.Http.HttpClient` - HTTP client that you can use to access local web APIs. Note that the `BaseAddress` is already set on this HTTP client. [Read more about consuming Web APIs in Blazor...](/architecture/rest-api/)

* `Microsoft.AspNetCore.Blazor.Services.IUriHelper` (see [source on GitHub](https://github.com/aspnet/Blazor/blob/release/0.1.0/src/Microsoft.AspNetCore.Blazor/Services/IUriHelper.cs) - helpers for working with URIs and navigation state

repository: daveaglick/learn-blazor

repo_name: daveaglick/learn-blazor


text:
# ipfs-cohost 🌐✨🤝

A CLI to co-host websites published to [IPFS].

If your domain has a [DNSlink] to a CID, then `ipfs-cohost` will let others pin it to their IPFS node.

## Usage

Pass it the list of domains you want to cohost. It finds the CID from the [DNSLink] for that domain and starts cohosting the domains. By default, we use a [full cohosting]. You can force the domains to be lazily cohosted by using the flag `--lazy`.

```console
$ ipfs-cohost add ipfs.io docs.ipfs.io awesome.ipfs.io
🔌 Using local ipfs daemon via http api
📍 docs.ipfs.io    QmNrbogjGZWgUSrbmHXydwc5b51oJQsBfHA2RkNRVf2ikc 6.86 MB
📍 awesome.ipfs.io QmPHrA6RT2j7bEcBrdeV2z6ZWrchDguw9wBchHPr6VZcFS 7.6 MB
📍 ipfs.io         QmYb3dbymigAPcaiQUgnPxbwgMKjvxVBrrxSvFHwbZLVkq 10 MB
📦 Total size 24.5 MB for 3 domains
🤝 Co-hosting 3 domains via IPFS.
```

Passing the `--silent` options will prevent any logging.

```console
$ ipfs-cohost add ipfs.io --silent
```

### Remove cohosted website

You can remove one or more websites at once:

```console
$ ipfs-cohost rm ipfs.io docs.ipfs.io awesome.ipfs.io
🔌 Using local ipfs daemon via http api
✔  ipfs.io no longer cohosted.
✔  docs.ipfs.io no longer cohosted.
✔  awesome.ipfs.io no longer cohosted.
```

You can also remove every website you have cohosted:

```console
$ ipfs-cohost rm --all
🔌 Using local ipfs daemon via http api
✔ All cohosted websites removed.
```

### List cohosted websites and snapshots

Use `ls` with no arguments to list the cohosted domains:

```console
$ ipfs-cohost ls
🔌 Using local ipfs daemon via http api
📍 Lazily cohosted domains:
      docs.ipfs.io
      ipfs.io
📍 Fully cohosted domains:
      arewedistributedyet.com
      awesome.ipfs.io
      ipfs.io
```

Use `ls` with domains as arguments to list the snapshots for each domain:

```console
$ ipfs-cohost awesome.ipfs.io
🔌 Using local ipfs daemon via http api
⏱ Full snapshots for ipfs.io:
      2019-10-06_095057
      2019-10-05_135342
```

### Sync the current domains

Check if you have the most up to date version of each website and updates the snapshots.

```console
$ ipfs-cohost sync
🔌 Using local ipfs daemon via http api
✔  Snapshots synced!
```

### Prune

Delete all snapshots but the last `n`. If `n` is not provided, all snapshots but the last one will be deleted.

```console
$ ipfs-cohost prune [n]
🔌 Using local ipfs daemon via http api
✔  Cohosted websites cleaned!
```

### Only add latest copies

In some situations, you might want to be able to provide a strict list of domains you want to have one and only snapshot per domain. You can use `ipfs-cohost latest <domain>...` as a short hand for `ipfs-cohost rm --all && ipfs-cohost add <domain>...`. All flags apply.

### Could you do these with a few lines of bash?

Yes. All of this commands can be reproducible via bash commands. Please take a look at the [cohosting SPEC](https://github.com/ipfs-shipyard/cohosting/blob/master/SPEC.md) to know which `ipfs` commands are equivalent to these ones.

## Install

With `node` >= 10.15 and `npm` > 6.9 installed , you can install `ipfs-cohost` via `npm`

```console
# install it
$ npm i -g ipfs-cohost

# run it
$ ipfs-cohost add docs.ipfs.io blog.ipfs.io ipfs.io
```

You can run the latest version of `ipfs-cohost` without explicitly installing it via `npx`

```console
$ npx ipfs-cohost add docs.ipfs.io blog.ipfs.io ipfs.io
```

[IPFS]: https://ipfs.io
[DNSLink]: https://dnslink.io
[full cohosting]: https://github.com/ipfs-shipyard/cohosting/blob/master/SPEC.md#lazy-and-full-cohosting


text:
+++
project = "Mechanics/Burgers/cube_1e3.prj"
author = "Dmitri Naumov"
date = "2017-02-15T12:58:36+01:00"
title = "Lubby2; Creep example"
weight = 112

[menu]
  [menu.benchmarks]
    parent = "small-deformations"

+++

{{< project-link >}}

## Problem description

We solve a non-linear small deformation problem on a cube with shear traction on the top boundary face. The 3D problem is setup identical to the corresponding 2D problem.

See [this PDF](../lubby2.pdf) for detailed problem description.

## Results and evaluation

Result showing the displacement field and distortion relative to the initial configuration:

{{< img src="../lubby2.png" >}}

Displacement of the top surface in the direction of the shear traction over time showing the elastic and viscous deformations (creep):

{{< img src="../lubby2_creep_over_time.png" >}}

repository: MengbinZhu/ogs

repo_name: MengbinZhu/ogs


text:
---DEPRICATED WARNING---

The files below will no longer be updated. With the release of the new data structure, we are updating our time series tables to reflect these changes. Please reference time_series_covid19_confirmed_global.csv and time_series_covid19_deaths_global.csv for the latest time series data.

time_series_19-covid-Confirmed.csv

time_series_19-covid-Deaths.csv

time_series_19-covid-Recovered.csv

gha_language: Jupyter Notebook


text:
Adware/PuP
drive by downloads
commodity malware
phishing
HoK (hands on keyboard)

Valek is phishing
- weakest link
- wide variety of attacks
	- steals creds
	- malicious attachments
	- social engineering

Its a modular, multi-stage malware discovered in December 2019
- evolved from loader into an info
- ~30 different variants over 6 months
- Microsoft word docs embedded with malicious macro code
- Mainly english and german

Two Stage
- loader
	- sets itself up
- installtion
	- persistence

Uses ADSs (alternate data streams) for storage and scheduled tasks for persistence
- Attribute of NTFS
- Can be used to hide the presenece of a secret or malicious fil einside the file record of an innocent file
- Ex. Zone.identifier
	- helps pinpoint where a file was downloaded from
-
Network communications are conducted using HTTP to contract hard-coded, C2

Stages:
- Loader
	- Embedded word doc
		- enables malicious dll
			- dll ran via regsvr32.exe
				- drops js & downloads js payloads
					- stores C2 info in registry
					- creates schedule task

==If the C2 info is hardcoded, do you simply blacklist the C2 for outbound/inbound to isolate it?==

Scheduled task for persistence
- c2 info in register and ads js in ran

Analysis Demo
- FlareVM
- Download file
- Unzip
- Open process monitor
- Execute word doc
- what what it does

olevba -  python script that analyzes word docs with embedded macros

Malware traffic analysis.net

repository: semi-Colin/CyberSecVault

branch_name: refs/heads/main

repo_name: semi-Colin/CyberSecVault


text:
# Velocity
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Velocity-brightgreen.svg?style=flat-square)](https://android-arsenal.com/details/1/6055)

An easy to use networking library for Android

# Features
- Simplified networking
- Supports GET/POST/PUT/DELETE (for now)
- Supports file downloads and uploads (with progress callbacks)
- Supports http post data (json, multipart, url-encoded, plain text, xml)
- Simple OAuth logins using password resource flow
- Queued requests
- Global and per request mocking
- Built in deserialization for JSON (using gson)
- Handles redirects
- Adjustable settings : read/request timeout, mock delay, global simulated delay, max redirects, user agent, multipart boundary

1) Installation
Add the following to your project's main gradle file:
```gradle
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
```
Add the following to your app.gradle file
```gradle
    implementation 'com.github.ravindu1024:velocity:<latest-version>'
```

# Usage

Velocity uses a background threadpool to execute network requests and it needs to initialized at app launch:
```java
    Velocity.initialize(3);     //initialize the threadpool with background threads (eg: 3 or 6 or whatever you feel like). All threads will be waiting on a queue.
```

Simple GET request:
```java
Velocity.get("http://www.google.com")
		.connect(new Velocity.ResponseListener()
        {
            @Override
            public void onVelocityResponse(Velocity.Response response)
            {
            	if(response.isSuccess)
            	{
            		//...
            	}
            }
        });
```

GET request with headers and path parameters:
```java
Velocity.get(url)
                .withHeader("header1", "value1")
                .withHeader("header2", "value2")
                .withPathParam("path1", "value1")
                .withPathParam("path2", "value2")
                .connect(new Velocity.ResponseListener()
                {
                    @Override
		            public void onVelocityResponse(Velocity.Response response)
		            {
		            	if(response.isSuccess)
		            	{
		            		//...
		            	}
		            }
                });
```

POST with form data:
```java
Velocity.post(url)
                .withFormData("key1", "value1")
                .withFormData("key2", "value2")
                .connect(new Velocity.ResponseListener()
                {
                    @Override
		            public void onVelocityResponse(Velocity.Response response)
		            {
		            	if(response.isSuccess)
		            	{
		            		//...
		            	}
		            }
                });
```

Queuing multiple requests:
When multiple requests are queued and executed all replies are provided in a single callback. If one or more requests fail, the whole queued request is considered failed. The multi-response queue is threadsafe and is global to the application process.
```java
        Velocity.get(url).queue(0);
        Velocity.download(file).setDownloadFile(filepath).queue(1);
        Velocity.get(randomImage).queue(2);

        Velocity.executeQueue(new Velocity.MultiResponseListener()
        {
            @Override
            public void onVelocityMultiResponse(HashMap<Integer, Velocity.Response> responseMap)
            {
            	if(responseMap.get(0).isSucess)
            	{
            		//.....
            	}
            	//.....
            }
        });
```

Deserialization:
```java
MyWrapperClass data = serverResponse.deserialize(MyWrapperClass.class);
```

repository: androidGeniusCode/velocity

repo_name: androidGeniusCode/velocity


text:
---
id: components/Picker
title: Picker
---

`Picker` has been deprecated and will be removed from React Native in the
future.

Please refer to [bindings](https://github.com/reason-react-native/picker) for
the replacement
[community package](https://github.com/react-native-community/react-native-picker).

repository: celsobonutti/reason-react-native

gha_license_id: MIT

repo_name: celsobonutti/reason-react-native


text:
---
layout: post
title: "Bridging the Gap between Training and Inference for Neural Machine Translation"
date: 2019-06-06 07:15:52
categories: arXiv_CL
tags: arXiv_CL NMT Inference
author: Wen Zhang, Yang Feng, Fandong Meng, Di You, Qun Liu
mathjax: true
---

* content
{:toc}

##### Abstract
Neural Machine Translation (NMT) generates target words sequentially in the way of predicting the next word conditioned on the context words. At training time, it predicts with the ground truth words as context while at inference it has to generate the entire sequence from scratch. This discrepancy of the fed context leads to error accumulation among the way. Furthermore, word-level training requires strict matching between the generated sequence and the ground truth sequence which leads to overcorrection over different but reasonable translations. In this paper, we address these issues by sampling context words not only from the ground truth sequence but also from the predicted sequence by the model during training, where the predicted sequence is selected with a sentence-level optimum. Experiment results on Chinese->English and WMT'14 English->German translation tasks demonstrate that our approach can achieve significant improvements on multiple datasets.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1906.02448](http://arxiv.org/abs/1906.02448)

##### PDF
[http://arxiv.org/pdf/1906.02448](http://arxiv.org/pdf/1906.02448)


text:
This method returns a table of all presently connected `Player`. It functions the same way [Instance.GetChildren](https://developer.roblox.com/api-reference/function/Instance/GetChildren) would except that it only returns Player objects. It functions similarly to [Instance.GetChildren](https://developer.roblox.com/api-reference/function/Instance/GetChildren) when called on `Players`. 0 When used in conjunction with a for-loop, it is useful for iterating over all players in a game.

```lua
Players = game:GetService("Players")
for i, player in pairs(Players:GetPlayers()) do
	print(player.Name)
end
```

Scripts that connect to [Players.PlayerAdded](https://developer.roblox.com/api-reference/event/Players/PlayerAdded) are often trying to process every Player that connects to the game. This method is useful for iterating over already-connected players that wouldn't fire [PlayerAdded](https://developer.roblox.com/api-reference/event/Players/PlayerAdded). Using this method ensures that no player is missed!

```lua
local Players = game:GetService("Players")

local onPlayerAdded(player)
	print("Player: " .. player.Name)
end

for _, player in pairs(Players:GetPlayers()) do
	onPlayerAdded(player)
end
Players.PlayerAdded:Connect(onPlayerAdded)
```

@returns A table containing all the players in the server.

repository: noahwillcrow/types

gha_language: TypeScript

repo_name: noahwillcrow/types


text:
# Functional Typescript
  15.04.2021

## Functional roots of JavaScript

## Functional roots of JavaScript
  ### History and influences

* [The World's Most Misunderstood Programming Language](https://www.crockford.com/javascript/javascript.html) - "Lisp in C's Clothing" (Douglas Crockford)
* [Brendan Eich on Creating JavaScript in 10 days](https://thenewstack.io/brendan-eich-on-creating-javascript-in-10-days-and-what-hed-do-differently-today/)
  > “I was lured with this idea of doing a very-popular-with-academics language called Scheme… The idea was ‘Come and do Scheme in Netscape. Put this programming language into the browser.'”

## Functional roots of JavaScript
  ### History and influences

* [The Nature of JavaScript](http://speakingjs.com/es5/ch03.html), from "Speaking JavaScript: An In-Depth Guide for Programmers" (Dr. Axel Rauschmayer)

## Functional roots of JavaScript
  ### Similarities with Scheme

* Functions are "first-class citizens", can be passed as parameters
* Arrays are similar to Lists in Scheme
* Language core conceptually simple and small, using simplistic C-like syntax ("fashionable" in the 1990s, Java hype)
* Comparison of [Scheme code](https://github.com/antivanov/functional-typescript/blob/main/src/functional-roots/ntuples.scm) vs [JavaScript code](https://github.com/antivanov/functional-typescript/blob/main/src/functional-roots/ntuples.js)
* However also differences, for example:
  - [no tail call optimization](https://github.com/antivanov/functional-typescript/blob/main/src/functional-roots/tail.call.optimization.js)
  - JavaScript encourages and supports more imperative style

## Here comes Typescript (2012)
  ### Reinvigorating functional roots of JavaScript

No single definition of what "functional programming" is, but at different times different languages promoting different philoshopies tended to be
more popular.

* <= 1990s - functional programming is mostly about functions
* 2010s - functional programming is mostly about functions, types, immutability
  - Larger more complex projects require static typing (for example, SPAs)
  - Advances in the type theory and more languages with more advanced type systems
  - Combining OOP and functional programming, OOP != "shared mutable state" (Scala)

## Here comes Typescript (2012)
  ### Reinvigorating functional roots of JavaScript

* Keep the core JavaScript philosophy and ideas intact rather than try to invent a new Java-like language (sorry [Dart](https://dart.dev/guides/language), you might had gotten this wrong)
* A number of JavaScript alternatives in 2013 ["JavaScript and Friends: CoffeeScript, Dart and TypeScript"](https://smthngsmwhr.wordpress.com/2013/02/25/javascript-and-friends-coffeescript-dart-and-typescript/)
* Typescript influenced JavaScript, both embraced OOP and introduced features improving some of earlier quirks and boiler-plate (i.e. modules, classes, etc.)
* Add modern type system on top of JavaScript, structural typing
* Enables larger projects and better code organization
* Enables building more functional-like utilities and libraries

## Typeclasses
  ### Monoid typeclass as an example

* Way to extend the functionality of an existing class without altering its code, implemented as interfaces
* Typeclass example in Typescript: [Monoid](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/src/typeclasses/monoid.ts#L3-L5)
* Monoid [laws](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/spec/typeclasses/monoid.spec.ts#L43-L79)
* More real-life [example](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/spec/typeclasses/monoid.spec.ts#L17-L40) of a custom monoid to aggregate test run statistics and using `combineAll`

## Higher-Kinded Types
  ### Required to define advanced type classes

What if we want to define a *single* typeclass instance which is parameterizable by a type parameter which itself might accept a type parameter,
but we do not want for this typeclass instance to care for that particular last type parameter before the actual methods of the typeclass are called?
* Typescript does not support them yet ["Allow classes to be parametric in other parametric classes"](https://github.com/microsoft/TypeScript/issues/1213)
* Example: `Promise<T>` is a generic type, but `Promise` (or `Promise<~>` as per the proposal) is not a valid type in Typescript, in Scala it would
be called a "type constructor", `Promise` in this case is the missing higher-kinded type which does not exist in Typescript

## Higher-Kinded Types
  ### Emulating in Typescript
  * One possible way (similar to the [idea](https://gcanti.github.io/fp-ts/#higher-kinded-types) from [fp-ts](https://github.com/gcanti/fp-ts)) to emulate a higher-kinded type accepting one type parameter: [HKT](https://github.com/antivanov/functional-typescript/blob/main/src/typeclasses/hkt.ts), [usage](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/src/typeclasses/types/option.ts#L1-L14)
  * `fp-ts` emulates also higher-kinded types accepting more parameters and provides more utilities for working with them

## Monad
  ### Most important and frequently used abstraction

* Can be implemented as a typeclass or might be "implicit"
* A [type](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/src/typeclasses/monad.ts#L8-L14) which wraps a value and has operations `pure`, `flatMap` which satisfy certain [laws](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/spec/typeclasses/monad.spec.ts#L14-46)
* Given `pure` and `flatMap` it is possible to also implement `map` (which means that every "Monad" is also a "Functor")

## Monad
  * [Example](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/src/typeclasses/monad.ts#L16-L31): defining a typeclass instance for a new type, [Option](https://github.com/antivanov/functional-typescript/blob/main/src/typeclasses/types/option.ts)

## Monad
  * [Example](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/src/typeclasses/monad.ts#L34-L43): defining a typeclass instance for an existing type, [Promise](https://github.com/antivanov/functional-typescript/blob/main/src/typeclasses/types/promise.ts)
  * No implicit type conversions in Typescript => [typecasting](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/spec/typeclasses/monad.spec.ts#L72) when trying to tell Typescript to treat an existing type as an instance of a "higher-kinded type" we emulate

## Monad
  * More advanced Monad: [Reader](https://github.com/antivanov/functional-typescript/blob/4e2618d1c2a8e59a2b76166ca769f58d1d2de0bc/src/typeclasses/monad.ts#L58-L82), practical [example](https://github.com/antivanov/functional-typescript/blob/4fb0de20998ad49d966b77f2e5bff1a825a03e45/spec/typeclasses/monad.spec.ts#L85-L131) of injecting a database connection and chaining database operations

## Practical Monads
  * Not necessary to use a special library or define typeclasses in order to benefit from using monads, examples from [gen.js](https://github.com/antivanov/gen.js)
    - [Maybe](https://github.com/antivanov/gen.js/blob/master/src/maybe.ts) monad
    - [Generator](https://github.com/antivanov/gen.js/blob/master/src/generator.ts) monad:
      defining an ["identifier"](https://github.com/antivanov/gen.js/blob/aeeaabb79f5548509bd254b2cfcfe2a737e8e74c/src/generators/string.ts#L68-L76)
      or ["uuid"](https://github.com/antivanov/gen.js/blob/aeeaabb79f5548509bd254b2cfcfe2a737e8e74c/src/generators/string.ts#L81-L93)

## [fp-ts](https://github.com/gcanti/fp-ts): Functional Programming Library for Typescript
  * Inspired (like the code in this presentation) by Scala and [Cats](https://typelevel.org/cats/)
  * Both theoretically rigorous and practical library
  * Useful types and typeclasses are defined
  * [`io-ts`](https://github.com/gcanti/io-ts) and [`io-ts-promise`](https://github.com/aeirola/io-ts-promise) built on top of [fp-ts](https://github.com/gcanti/fp-ts)

   "While io-ts is a great library, it can be a bit alienating unless you are familiar with functional programming. So if you just want to ensure the runtime types for the data fetched from your API, you might be looking for something simpler. This is where io-ts-promise tries to help out."

## [fp-ts](https://github.com/gcanti/fp-ts): Functional Programming Library for Typescript
  ### Examples
  * `chain` instead of `flatMap`; [`pipe`](https://github.com/gcanti/fp-ts/blob/cf7eae308ef41b6cd95dc03b7576a1132fda6e5f/src/function.ts#L444)/[`chain`](https://github.com/gcanti/fp-ts/blob/cf7eae308ef41b6cd95dc03b7576a1132fda6e5f/src/Either.ts#L597) calls is a very typical pattern in `fp-ts`
  * example of [`Either`](https://github.com/antivanov/functional-typescript/blob/main/src/fp-ts/either.example.ts), and chaining Monad calls
  * example of [form validation](https://github.com/antivanov/functional-typescript/blob/main/src/fp-ts/form.validation.example.ts)

## Typescript: not quite a functional language
  * Not the main goal of Typescript
  * Again no tail call optimization, although some [pleas](https://github.com/microsoft/TypeScript/issues/32743) to add it
  * No immutability, additional libraries are required, such as [Immutable.js](https://immutable-js.github.io/immutable-js/)
  * Coming more from the practical perspective: "how to add types to JavaScript in a backward-compatible manner"
  * However, still includes many useful features and can be used in a functional manner
  * But expands on the JavaScript's functional legacy and updates it

## Typescript: not quite a functional language
  ### Boiler-plate code when doing functional programming
  * Withot "return" statement function returns "undefined", more emphasis on being an imperative language :(
  * Lots of braces and syntactic noise (C legacy from the old compiler days)
  * Missing higher-kinded types: i.e. "Promise" is not considered to be a separate type ("type constructor") in addition to "Promise<T>": need
    to cast types sometimes

## Typescript: not quite a functional language
  ### Boiler-plate code when doing functional programming
  * No way to define useful automatic conversions between types and related syntactic sugar: more boiler-plate
  * No way to define implicit values (like in Scala, finally done right in Scala 3)
  * Some advanced type constructs, such as union types, but no type lambdas, for example
  * No pattern matching => type tag field in the Option implementation

## Q & A
  ### Thank you

repository: amoilanen/functional-typescript

repo_name: amoilanen/functional-typescript


text:
Queries
=======

## Getting Started

```javascript
// Create queries using a query builder syntax.

var queryA = model.query('users').where('name').equals('Brian');
var queryB = model.query('users').byKey('some-uuid');
var queryC = model.query('blogs').where('authorId').equals(userId);
var queryD = model.query('items').where('tags').in(['derby', 'racer']);

// The code above only builds queries but does not run them. To run them,
// we pass the queries to `store.subscribe` and `store.fetch`

// This will subscribe a model to any results that match queryA, queryB,
// or queryC even if those result sets dynamically change over time. The
// developer need not worry about figuring out which documents to add or
// remove from the model. Racer will automatically figure this out and
// automatically add this to the model, updating any bindings in realtime.

model.subscribe(queryA, queryB, queryC, function (err, resA, resB, resC) {
  // Declare a ref, so we can bind results via private path '_resultsA'
  model.ref('_resultsA', resA); // `resA` is a model alias

  model.ref('_resultsB', resB); // `resB` is a model alias

  model.ref('_resultsC', resC); // `resC` is a model alias
});

// The following will fetch the results of queryD from the store but will
// not automatically keep those results dynamically up-to-date.

model.fetch(queryD, function (err, resD) {

  console.log(resD.get()); // log the results

});

// You can also query data already loaded into the browser, by invoking `find`
// on your query. Notice how the function signature has no asynchronous
// callback, but instead returns the results synchronously.

var resE = model.query('users').where('age').gte(25).find();

// resE will be a model alias.

console.log(resE.get());

// TODO This feature is desired but not yet implemented
  // In addition to returning a model alias of a result set, you can also have
  // the query subscribe to results of data that is not already loaded into the
  // page. This is useful when you can get immediate results to display based on
  // data already loaded into your model, instead of waiting for a subscribe
  // callback which is only invoked after a round trip to the server.

  var resE = model.query('users').where('age').gte(25).find();
  model.subscribe(resE);

// You can also scope your queries to results of another query
var queryF = model.query('users').where('age').gte(22);
model.subscribe(queryF, function (err, results) {
  var importantRacerItems = model.query(results).where('tags').contain(['priority', 'racer']);
});

// Queries can also work on arrays of documents that are pointed to by private
// or public paths.

```

## Architecture

- ModelQueryBuilder and QueryBuilder: A fluent interface to build query json objects.
- filter: Can test that a document satisfies a filter function generated by a
  query json object.
- MemoryQuery:
- QueryCoordinator:
- QueryHub
- QueryNode
- PaginatedQueryNode

## Query Security

repository: kevinelong/racer

repo_name: kevinelong/racer


text:
---
title: "Maxi, Lil' Sorcerer"
subheadline: A Sample Character for Little Wizards
language: en
layout: personagens
categories:
  - personagens
tags:
 - Little Wizards
header: no
---

Maxi came from Shivers island on Tails to learn more about Coinworld.

His family send him around the world to learn about everything he could before goes back to help them on their potion-making business. As he had grown up somewhat away from society, in the dark Spooky Forest in Shivers, he is a little rude, and his clothes are normally torn, although clean, which is good: his family is intimately connected with skunks, as they live in a Shivers place called The Skunk Haven.

He looks a lot like a skunk-kid, even with a big skunk tail, interrogation point shaped, black with white-stripes. He likes to go into the wilds and be in contact with nature, and dislike somewhat the sunlight. He likes to tell some spooky stories from his home, and sometimes he grows homesick, and this explains why he like to go near anyone who accept him and is extremely loyal to his friends, which he makes a lot.

---

## Appeareance

| Face | Whiskers (like a Skunk) |
| Eyes | Narrow |
| Hair | Shows it's emotions |
| Ears | Pointy, like a cat |
| Body |  Unusually Small |
| Clothes | always torn |
| Features |  long skunk like tail |

## Personality :

| Best Quality | Patient |
| General Nature | Curious and Loyal |
| Worst Flaw | clumsy and rude |

## Tastes:

| Likes | Animals |
| Enjoys | Camping |
| Fears | being alone |
| Dislikes | too much sun or heat |

## Motivations

| Dreams | make family proud |
| Seeks | Understanding new things |

## Background

| Archipelago | Shivers (Tails) |
| Family | Skunk sorcerers that lives in the forest and well-known potion-makers. Everyone is a Sorcerer and has skunk like traits, as they are intimately connected with skunks. |

## Traits

| Body | good (+0) |
| Heart | best (+2) |
| Brain | better (+1) |

## Powers

| Broom riding | good (+0) |
| Spellcasting | good (+0) |
| Alchemy | better (+1) |

## Wizard Gear

| Broom | Very gentle, but sometimes clumsy as himself |
| Hat | An oversized casket-like hat, black with two white stripes, with something like a skunk tail on the back, full of badges and strange pins |
| Wand | Made of holly, big and old-looking (although not really old) |
| Familiar | Puffer, a big black skunk with wise eyes |

## Other Belongings:

+ Diary with all things he already done and learned;
+ Photo from his family;
+ Shivering Flute;


text:
---
layout: page
title: AWS Notes
permalink: /aws_notes
---

## Amazon Web Services

### AWS Certi. Solution Architect

Most popular. Needed for speciality exams. Prereq for professional. To do well,
familiar with core services and how best to use them to follow best practices.

Multiple choice. No penalty for guessing.

130 minutes to complete the exam. Mark for future consideration. 65 questions.

#### Domain 1: Design Resilient Architecture
Design Resilient Architectures

##### 1.1: Choose Reliable Resilient Storage

Even in disaster, you don't lose data or state.

##### 1.2: Decoupling mechanisms using AWS Services

Made easy with AWS

##### 1.3: How to Design a Multi-Tier Architecture Solution

Naturally decoupled.

##### 1.4: How to Design High Availability and/or Fault Tolerant Solutions

Operating at scale, failure should be treated as a normal operation which is handled.

#### Domain 2: Define Performant Solutions
Design Performant Architectures

#### Domain 3: Specify Secure Applications and Architectures
26% of exam

#### Domain 4: Design Cost-Optimized Architectures
10% of exam

#### Domain 5: Define Operationally Excellent Architectures
6% of exam

gha_language: CSS


text:
# Minter Explorer Website

This repository contain the code for the official Minter Explorer website [explorer.minter.network](https://explorer.minter.network)

## Deployment

Build in Nuxt SPA mode
```
npm ci && npm run production
```
Root folder: `./dist/`

### Nuxt build cheatsheet

``` bash
# install dependencies
$ npm install # Or yarn install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm start

# generate static project
$ npm run generate
```

For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).

## Docker

Set env variables for `docker-compose.yml` and run
```bash
docker-compose up
```

repository: MinterTeam/minter-explorer-web

gha_language: Vue

repo_name: MinterTeam/minter-explorer-web


text:
# BIKAYA - OS Project 2019/2020 @ UniBo
BiKaya is an educational operative system based upon a 6 layer abstraction architecture, initially proposed by Dijkstra. This work is part of the operative system course held at Alma Mater Studiorum, Bologna.

## The project
The final purpose of the project is to present a simple yet fully working kernel, which should be designed to be executed on two different architectures: MIPS and ARM.
The work is split in 3 phases:
- Phase 0: in order to learn some know-how of the emulators used, a simple program that writes the input of a terminal to a file (using a printer) has been written.
- Phase 1: realization of a "queue management" system, which provides support for multiple data structures, which will be used in phase 2. This takes place in the second layer in the BiKaya stack.
- Phase 1.5: using the interface to data structures implemented in the previous level, write the scheduler, interrupt handler and part of the syscall handler.
- Phase 2: Complete the previous phase with full syscall support, TLB and trap managers. This takes place in the third layer in the BiKaya stack.

## Requirements
In order to ease the developement and testing, those system will be virtualized using dedicated emulators:
- uMPS, for the MPIS architecture: https://github.com/tjonjic/umps
- uARM, for the ARM architecture: https://github.com/mellotanica/uARM

## Contributors:
- Lorenzo Liso
- Gianluca Galletti


text:
# CPNest
### Parallel nested sampling in python
---
© 2015-2017 Walter Del Pozzo, John Veitch

<EMAIL_ADDRESS><EMAIL_ADDRESS>
This package provides a nested sampling algorithm for performing Bayesian Inference.

[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)]
(https://github.com/johnveitch/cpnest/blob/master/README.md)

repository: wdpozzo/cpnest

repo_name: wdpozzo/cpnest


text:
---
title: "Release notes: November 20, 2017"
date: "2017-11-20"
tags:
    - "release notes"
---

#### Portal
+ Fixed an issue where editing virtual dedicated instance orders would display an error message.
+ Reworded the error message when trying to un-suspend an autoscaling group.

#### API
+ Added more validation to ordering Direct Link products through the SLAPI to mirror validation done by the portal
+ Adds functionality to allow upgrade for Fortigate firewall appliances

#### Backend
+ Fixed an issue where disk groups would be improperly partitioned when a HOT_SPARE volume was present
+ Allowed various unicode hyphens through account validation.

gha_language: HTML

gha_license_id: NOASSERTION


text:
caproto-image-viewer
====================

**DEPRECATED** and unsupported. OpenGL support is broken on the latest numpy,
and the basic image viewer does not have many features.

caproto/PyQt5-based EPICS AreaDetector image viewer with OpenGL/GLSL color
mapping

Provides two widgets with varying support for image types (see next section):

    1. ImageViewerWidgetGL
        a. Requires OpenGL 4.1-compatible hardware
        b. Optional color-mapping (using look-up tables from matplotlib)
        c. Bayer demosaic is done fully on the GPU
    2. ImageViewerWidget
        a. Raw image display - OpenGL not required
        b. No color mapping yet
        c. Limited image format support (on the TODO list)

Supported Image Formats
=======================

| Format        | ImageViewerWidget  | ImageViewerWidgetGL |
|:-------------:|:------------------:|:-------------------:|
| Monochrome    |       Yes          |         Yes         |
| RGB1          |       Yes          |         Yes         |
| RGB2          |       Yes          |         Yes         |
| RGB3          |       Yes          |         Yes         |
| Bayer - RGGB  |                    |         Yes         |
| Bayer - GBRG  |                    |         Yes         |
| Bayer - GRBG  |                    |         Yes         |
| Bayer - BGGR  |                    |         Yes         |
| YUV444        |                    |                     |
| YUV422        |                    |                     |
| YUV421        |                    |                     |

Notes:
* RGB2 is much slower than RGB1, RGB3. This can be improved at some point.

Requirements
============

* Python 3.6+
* caproto or pyepics
* PyQt5
* numpy

Optional
========

* Matplotlib (only for additional color maps)

Installation
============

```bash
$ pip install -e .
```

Usage
=====

If you have the ADSimDetector example IOC running, run the following for the
OpenGL viewer:
```bash
$ caproto-image-viewer 13SIM1: --acquire --gl
```

Note that the `--acquire` part starts acquisition of the detector, and this may
not be necessary or desirable if you use it with an existing camera/detector.

![Screenshot](screenshots/basic-gl.png)

Then press the `spacebar` to enable color-mapping:

![Screenshot](screenshots/viridis-gl.png)

Cycle through the colormaps by pressing either `[` or `]`. Or, press `p` to
preview other colormaps in realtime - while still acquiring:

![Screenshot](screenshots/realtime-colormap-preview.png)

You can cycle through this list similarly with `[` and `]`, and exit the
preview with `p`.

Alternatively, use the basic non-OpenGL version:
```bash
$ caproto-image-viewer 13SIM1: --acquire
```

Speed
=====

The OpenGL display widget is very fast. Basic testing has shown:

* Minimal IOC-to-screen latency
* Displays 200Hz, 1MP 8-bit images with real-time color-mapping
* Utilizes ~40% of one core in a 4-core system

Though the viewer is capable of doing this with ease, you probably shouldn't
saturate your network viewing things at such a high frame rate unnecessarily.
That's up to you, of course!

![Screenshot](screenshots/display_statistics.svg)

repository: klauer/caproto-image-viewer

gha_language: Python

repo_name: klauer/caproto-image-viewer


text:
---
layout : post
title : Passive Walking
categories : news
author: Shai Revzen
date: 2014-11-10
tags: BIRDS
images:
  - images/old/passive_poster.png
excerpt:
  When legged robots are required to perform tasks like running, the compliance of the legs becomes important. We have designed and constructed a passive compliant leg for a hexapod robot.
---

[![Link to poster](/images/old/passive_poster.png)](/publications/pdfs/passive_poster.pdf)

###Design of a passive compliant leg for a Hexapod robot

<b>Mohammad Khodabakhsh, Jong Min Park, Joseph Jang, Shai Revzen </b>

When legged robots are required to perform tasks like running, the compliance of the legs becomes important. We have designed and constructed a passive compliant leg for a hexapod robot. Recent research shows that the performance of this robot design can be influenced significantly by leg compliance. Our design is such that we can independently study the effects of leg compliance in the vertical direction and in the fore-aft direction. By attaching a sufficient number of motion tracking markers to the leg structures, we gain the ability to study the complete kinematics of the legs. Our design prioritizes manufacturability, as the majority of leg components were fabricated from materials commonly available in hardware stores, without specialized machining tools.


text:
---
name: Pull request
about: Submit this before working on a pull request

---

**Use Case**
- Describe the motivation to add this new feature and which problems it will tackle.

> It would be nice to have a helper method in the adapter to notify that the visibility of the header of a section was changed.
> It's known that this can be done with the native notifyItemInserted and notifyItemRemoved methods but it would be nice to have the logic to calculate the header position wrapped in a method of the adapter.

**Design**
- Which methods will be created/modified/deleted in the existing classes.
- Which classes will be created/deleted.
- Explanation for each of the changes listed above.

> Create methods:
>
> - notifyHeaderInsertedInSection
>
> Get position with getHeaderPositionInAdapter and call callSuperNotifyItemInserted
>
> - notifyHeaderRemovedInSection
>
> Get position with getSectionPosition and call callSuperNotifyItemInserted

**How to use**
How the developers will use the new methods/classes introduced by these changes.
> Simply call:
>
> adapter.notifyHeaderInsertedInSection(section);

repository: luizgrp/SectionedRecyclerViewAdapter

gha_language: Java

repo_name: luizgrp/SectionedRecyclerViewAdapter


text:
---
title: "What I talk when I talk about Tensorflow"
header:
  teaser: projects/tensorflow-install/tensorflow_logo.png
categories:
  - Tutorial
tags:
  - machine-learning
  - deep-learning
  - keras
  - tensorflow
  - tutorials
  - gpu
  - note
---

Some of my collegues, as well as many of my readers told me that they had problems using Tensorflow for their projects. Something like this:

> Hey Trung, what is the difference between tf.contrib.layers and tf.layers? Oh, and what is the TF-Slim thing? And now we have the godd*** tf.estimator. What are all these for? What are we supposed to use?

To be honest, when I started using Tensorflow, I was in that situation too. Tensorflow was already pretty bulky back then, and to make things even worse, it just kept getting bigger and bigger. If you don't believe me, just look at the size of the current installation package and compare it to previous versions.

But wait! I just got an idea. Why not create a series of blog posts about Tensorflow ;)

### Objectives
***
Let's talk about what we're gonna focus on in this post. I learned this thing the hardest way, guys. I think I will make a post about what I learned from writing technical blog posts, and one of them is: do talk about the objectives first!

Okay, let's tackle them one by one!

## Common Problems
Before diving in the details, I think I should list out the most common problems that we might face when using Tensorflow:
### Don't know how to start

Whether it comes to importing data, creating the model or visualizing the results, we usually get confused. Technically, there are so many ways to do the exact same thing in Tensorflow. And it's the urge of doing things in the most proper way that drives us crazy.

### Don't know what to do when things go wrong

I think this is the problem that a lot of you guys can relate to. In Tensorflow, we must first define the computation graph. Not only doing this way prevents us from modifying the graph when it's running (sometimes we just want it to be dynamic), but it also does a good job at hiding things from us, which we can't know what the hell under the hood is causing the trouble. We are the Python guys, we want things to be Pythonic!

## Tensorflow's Vocabulary
As I said above, one problem with Tensorflow is that there are a lot of ways to do the exact same thing. Even experienced users find it confusing sometimes.

Below, I'm gonna list out some "concepts" that are mostly confusing to beginners:

### Low-level API

It used to be how we did everything in Tensorflow when it first came out. Want to create a fully connected layer? Create some weights, some biases and roll them in!

```
with tf.variable_scopes('fc_layer'):
  weights = tf.get_variables('weights', [5, 5, 3, 64],
                             initializer=tf.initializers.truncated_normal(stddev=5e-2))
  biases = tf.get_variables('biases', [64],
                            initializer=tf.zeros_initializer)
  output = tf.nn.conv2d(inputs, weights, [1, 1, 1, 1], padding='SAME')
  output = tf.nn.bias_add(conv, biases)
  output = tf.nn.relu(output)
```

### tf.contrib

You are likely to come across tf.contrib.layers a lot. Basically, it's backed by the large community of Tensorflow (contrib stands for contribution) and it contains experimental implementation, such as a newly introduced layer, a new optimization method, or just wrappers for low-level API, etc. Although they are technically just experimental codes, they actually work very well and will be merged to Tensorflow's core code in the future.

### tf.layers

As its name is self explained, this is the package for defining layers. We can think of it as an official version of tf.contrib.layers. They basically do the same job: to make defining layers less tiresome. Using tf.contrib.layers or tf.layers to create a conv2d layer like we did above, we now need only one line:

```
output = tf.contrib.layers.conv2d(inputs, 64, [5, 5],
                                  weights_initializer=tf.initializers.truncated_normal(stddev=5e-2))
```

Or with tf.layers:

```
output = tf.layers.conv2d(inputs, 64, [5, 5],
                          padding='same',
                          kernel_initializer=tf.initializers.truncated_normal(stddev=5e-2))
```

I bet you wouldn't create any layers by hand from now on!

### tf.contrib.slim (or TF-Slim)

Okay, this may be the most confusing one. At first, I thought that was the light-weight version of Tensorflow but soon enough, I realized I was wrong. **slim** only stands for fewer lines to do the same thing (comparing with low-level API). For example, to create not only one, but three conv2d layers, we only need to write one line:

```
slim = tf.contrib.slim
output = slim.repeat(inputs, 3, slim.conv2d, 64, [5, 5])
```

Other than that though, tf.slim can help you build an entire pipeline for training the network, which means they have some functions to help you get the losses, train or evaluate the model, etc.

Overall, TF-Slim may be a good option for fast experimenting new idea (Tensorflow's research uses TF-Slim for building the networks). What you need to take into account is, TF-Slim's codes actually came from tf.contrib (e.g. slim.conv2d is just an alias for tf.contrib.layers.conv2d), so there's no magic here.

### tf.keras

This is legend! Keras came out when we had to write everything using low-level API. So technically it was used as the high-level API for Tensorflow. In my opinion, it did help make the community (especially researchers) adopt Tensorflow. And since Keras is officially a module of Tensorflow (from version 1.0 I think), you don't have to worry about version compatibility any more.

The great thing about Keras is, it does all the hard tasks for you. So going from idea to result is just a piece of cake. Want to create a network? Just stack up the layers! Want to train it? Just compile and call fit!

```
model = Sequential()
model.add(Dense(out_size, activation='relu', input_shape=(in_size,)))
# Add more here
model.add(...)

# Compile
model.compile(loss='categorical_crossentropy', optimizer=SGD())

# Train
model.fit(x=inputs, y=labels)
```

Although Keras is super convenient, especially for those who don't like to write code, it abstracts so many things from us. François Chollet, the author of Keras, claimed that Keras will act like an interface only, but it does have some constraints which may confuse you sometimes (Want model.fit to compute validation loss after a specific number of batches? It can't!). You may also have hard time implementing newly introduced deep-learning papers entirely by Keras since they require some minor tweaks within some layer.

### Eager Execution

As I mentioned earlier, when implementing in Tensorflow, you must first define all the operations to form a graph. It's not until the graph is finalized (it's locked, no more in, no more out, no more update) that you can run it to see the results. Because of this, Tensorflow is hard to debug and incapable of creating dynamic graph.

So Eager Execution came out to help deal with these problems. The name is kind of weird though. I interprete it as "can't wait to execute". With the additional 2 new lines, you can now do something like: evaluate the new created variable (which seems trivial but used to be impossible in Tensorflow):

```
tf.enable_eager_execution()
tf.executing_eagerly()
import tensorflow.contrib.eager as tfe

weights = tfe.Variable(tf.truncated_normal(shape=[2, 3], stddev=5e-2), name='weights')
weights
<tf.Variable 'weights:0' shape=(2, 3) dtype=float32, numpy=
array([[ 0.06691323, -0.01890625, -0.00283119],
       [-0.0536754 ,  0.00109388, -0.04310168]], dtype=float32)>
```

Rumor has it Eager Execution is gonna be set to default from Tensorflow 2.0. I think this move will please a lot of Tensorflow fans out there. But please bear in mind that at the moment, not everything is gonna work in Eager Execution mode (yet). So while we're waiting for Tensorflow 2.0 to be released, it's a good idea to stay updated to the latest news from Tensorflow's team and Google.

## (Optional) Let's play with Tensors!
Okay guys, this is an optional section. We're gonna see if different approaches produce exactly the same results. We're gonna create a "real" convolution2d layer, including activation functions and regularization terms, by using tf.contrib.layers and tf.layers. We will check the similarity among their results by checking the variables and operations that they created.

Oh hold on! There's one more thing I want you to pay attention to. I will write out all the arguments whether some of them have default values. The reason is, the two modules' conv2d functions set the default values differently for the same terms! For example, padding is set to 'SAME' by default in tf.contrib.layers.conv2d, but 'valid' in case of tf.layers.conv2d.

Now we're ready to move on.

### tf.contrib.layers

Let's start with tf.contrib.layers (tf.contrib is technically big and capable of a lot of things, so by saying tf.contrib.layers here seems more appropriate).

I don't want to think of the amount of work to achieve the same result by using low-level API. That's why having any kinds of high-level API will save us a ton of time and effort. Not only researchers, developers do love high-level APIs!

```
# The inputs we use is one image of shape (224, 224, 3)
inputs = tf.placeholder(tf.float32, [1, 224, 224, 3])

conv2d = tf.contrib.layers.conv2d(inputs=inputs,
                                  num_outputs=64,
                                  kernel_size=3,
                                  stride=1,
                                  padding='SAME',
                                  activation_fn=tf.nn.relu,
                                  weights_initializer=tf.initializers.truncated_normal(stddev=0.01),
                                  weights_regularizer=tf.contrib.layers.l2_regularizer(0.005),
                                  biases_initializer=tf.zeros_initializer())
```
### tf.layers

Next, let's see how we can create a convolution2d layer with tf.layers, an official modules by the core team of Tensorflow ;) Obviously we expect that it can produce the same result, with less or (at least) similar effort.

```
conv2d = tf.layers.conv2d(inputs=inputs,
                          filters=64,
                          kernel_size=3,
                          strides=1,
                          padding='same',
                          activation=tf.nn.relu,
                          kernel_initializer=tf.initializers.truncated_normal(stddev=0.01),
                          kernel_regularizer=tf.contrib.layers.l2_regularizer(0.005),
                          bias_initializer=tf.zeros_initializer())
```

It's time to compare the results. Did both of tf.contrib and tf.layers produce the layers with similar functionality? Did one of them do more than the other?

First, let's consider the variables created by above commands. You can use the method `tf.global_variables()` to get all variables in the current graph.

```
# Variables created by tf.contrib.layers.conv2d
[<tf.Variable 'Conv/weights:0' shape=(3, 3, 3, 64) dtype=float32_ref>, <tf.Variable 'Conv/biases:0' shape=(64,) dtype=float32_ref>]

# Variables created by tf.contrib.layers.conv2d
[<tf.Variable 'conv2d/kernel:0' shape=(3, 3, 3, 64) dtype=float32_ref>, <tf.Variable 'conv2d/bias:0' shape=(64,) dtype=float32_ref>]
```
Phew, the variable sets are similar. They both created a weights Tensor, and a biases Tensor with the same shape. Notice that their names are slightly different, though.

Next, let's check if the two functions generated different sets of operations. The command we can use is
`tf.get_default_graph().get_operations()`.

```
# Operations created by tf.contrib.layers.conv2d
<tf.Operation 'Placeholder' type=Placeholder>,
<tf.Operation 'Conv/weights/Initializer/truncated_normal/shape' type=Const>,
<tf.Operation 'Conv/weights/Initializer/truncated_normal/mean' type=Const>,
<tf.Operation 'Conv/weights/Initializer/truncated_normal/stddev' type=Const>,
<tf.Operation 'Conv/weights/Initializer/truncated_normal/TruncatedNormal' type=TruncatedNormal>,
<tf.Operation 'Conv/weights/Initializer/truncated_normal/mul' type=Mul>,
<tf.Operation 'Conv/weights/Initializer/truncated_normal' type=Add>,
<tf.Operation 'Conv/weights' type=VariableV2>,
<tf.Operation 'Conv/weights/Assign' type=Assign>,
<tf.Operation 'Conv/weights/read' type=Identity>,
<tf.Operation 'Conv/kernel/Regularizer/l2_regularizer/scale' type=Const>,
<tf.Operation 'Conv/kernel/Regularizer/l2_regularizer/L2Loss' type=L2Loss>,
<tf.Operation 'Conv/kernel/Regularizer/l2_regularizer' type=Mul>,
<tf.Operation 'Conv/biases/Initializer/zeros' type=Const>,
<tf.Operation 'Conv/biases' type=VariableV2>,
<tf.Operation 'Conv/biases/Assign' type=Assign>,
<tf.Operation 'Conv/biases/read' type=Identity>,
<tf.Operation 'Conv/dilation_rate' type=Const>,
<tf.Operation 'Conv/Conv2D' type=Conv2D>,
<tf.Operation 'Conv/BiasAdd' type=BiasAdd>,
<tf.Operation 'Conv/Relu' type=Relu>

# Operations created by tf.layers.conv2d
<tf.Operation 'Placeholder' type=Placeholder>,
<tf.Operation 'conv2d/kernel/Initializer/truncated_normal/shape' type=Const>,
<tf.Operation 'conv2d/kernel/Initializer/truncated_normal/mean' type=Const>,
<tf.Operation 'conv2d/kernel/Initializer/truncated_normal/stddev' type=Const>,
<tf.Operation 'conv2d/kernel/Initializer/truncated_normal/TruncatedNormal' type=TruncatedNormal>,
<tf.Operation 'conv2d/kernel/Initializer/truncated_normal/mul' type=Mul>,
<tf.Operation 'conv2d/kernel/Initializer/truncated_normal' type=Add>,
<tf.Operation 'conv2d/kernel' type=VariableV2>,
<tf.Operation 'conv2d/kernel/Assign' type=Assign>,
<tf.Operation 'conv2d/kernel/read' type=Identity>,
<tf.Operation 'conv2d/kernel/Regularizer/l2_regularizer/scale' type=Const>,
<tf.Operation 'conv2d/kernel/Regularizer/l2_regularizer/L2Loss' type=L2Loss>,
<tf.Operation 'conv2d/kernel/Regularizer/l2_regularizer' type=Mul>,
<tf.Operation 'conv2d/bias/Initializer/zeros' type=Const>,
<tf.Operation 'conv2d/bias' type=VariableV2>,
<tf.Operation 'conv2d/bias/Assign' type=Assign>,
<tf.Operation 'conv2d/bias/read' type=Identity>,
<tf.Operation 'conv2d/dilation_rate' type=Const>,
<tf.Operation 'conv2d/Conv2D' type=Conv2D>,
<tf.Operation 'conv2d/BiasAdd' type=BiasAdd>,
<tf.Operation 'conv2d/Relu' type=Relu>
```

Now, what is the verdict? As we can observe above. Using tf.contrib or tf.layers will save us a lot of time and prevent us from headache later on. Moreover, they create absolutely similar things. What does that mean to us? It means that it doesn't matter what your preferred module is, you can create/re-create any networks or you can even use the weights trained by the code written on the other module.

But hey, you can't see that the names are obviously different, can you? You might ask. As long as the shapes and types of variables are the same, mapping the names between the two variable sets is not that painful task. In fact, it's just no more than 5 lines of code and yeah, you only need to know how to do it. As we addressed the problems earlier in this post, Tensorflow is not hard, it is just kind of confusing.

## Conclusion
Oh, that was so long. Thank you guys for reading. Before we say goodbye, let's take a look at what we did in this post:
- We discussed why Tensorflow may seem confusing
- We talked about heavily in-use Tensorflow module
- We checked if different modules produce different results on the same task

This post is no more than an entry point, some kind of what-I-would-talk-about-when-I-talk-about-Tensorflow (I borrowed that title from Haruki Murakami, check it [here](https://www.amazon.com/What-About-Running-Vintage-International-ebook/dp/B0015DWJ8W)).

Personally, I am a big fan of learning-by-doing style. Even in the deep-learning field which seems way too deeply academic, it can work out well. In the future posts, I will guide you through how we can accomplish the most common tasks with Tensorflow. Those won't make you a deep learning guru, but with a solid understanding about how to use the proper tool, and with some practice from your own, what can stop you from building amazing things?

Okay, I might have exaggerated a little bit, but honestly I hope that I can make something that you guys can benefit from. So, I'm gonna see you soon, in the next blog post of this Tensorflow series.


text:
# delay [![Build Status](https://travis-ci.org/sindresorhus/delay.svg?branch=master)](https://travis-ci.org/sindresorhus/delay)

> Delay a promise a specified amount of time

## Install

```
$ npm install --save delay
```

## Usage

```js
const delay = require('delay');

delay(200)
	.then(() => {
		// executed after 200 milliseconds
	});

somePromise()
	.then(delay(100))
	.then(result => {
		// executed 100 milliseconds after somePromise resolves
		// the result from somePromise is passed through
	});

// and with Babel and async functions
async () => {
	bar();

	await delay(100);

	// executed 100 milliseconds later
	baz();
}();

// there's also delay.reject() that takes the value, and rejects it `ms` later
Promise.resolve('foo')
	.then(delay.reject(100))
	.then(x => blah()) // never executed
	.catch(err => {
		// executed 100 milliseconds later
		// err === 'foo'
	});

// you can also specify the rejection value
Promise.resolve('foo')
	.then(delay.reject(100, 'bar'))
	.then(x => blah()) // never executed
	.catch(err => {
		// executed 100 milliseconds later
		// err === 'bar'
	});
```

## Related

- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay a promise a minimum amount of time
- [p-immediate](https://github.com/sindresorhus/p-immediate) - Returns a promise resolved in the next event loop - think `setImmediate()`
- [p-timeout](https://github.com/sindresorhus/p-timeout) - Timeout a promise after a specified amount of time
- [More…](https://github.com/sindresorhus/promise-fun)

## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

repository: krasevych/delay

repo_name: krasevych/delay


text:
[<img src="icon.svg" width="9%" align="right">][bitrise]

_[Franz] [recipe]_ for _[Bitrise]_
==================================
Requires [Franz] version `5.X`.

[Install]
---------
1. Clone this repository to the `Franz/recipes` folder:
~~~ sh
mkdir -p "$HOME/Library/Application Support/Franz/recipes/dev" &&
git clone https://github.com/danielbayley/franz-recipe-bitrise "$_/bitrise"
~~~
**NOTE** that this will be in a different location on other platforms; `%appdata%/Franz/recipes/dev` on Windows, and `~/.config/Franz/recipes/dev` on Linux.

2. Reload Franz

License
-------
[MIT] © [Daniel Bayley]

[MIT]:              LICENSE.md
[Daniel Bayley]:    https://github.com/danielbayley

[franz]:            https://meetfranz.com
[recipe]:           https://github.com/meetfranz/plugins#readme
[install]:          https://github.com/meetfranz/plugins/blob/master/docs/integration.md#installation

[bitrise]:          https://bitrise.io

repository: danielbayley/franz-recipe-bitrise

repo_name: danielbayley/franz-recipe-bitrise


text:
---
layout: post
title: Hack Chat Games Mod
categories:
- javascript
---

# Hack Chat Games mod

_Switching back and forth between two tabs to play myself at tic-tac-toe using hack chat, an open-source chat application written in node.js._

<iframe width="560" height="315" src="https://www.youtube.com/embed/NwusOLDp60s" frameborder="0" allowfullscreen></iframe>

---

[Github code](https://github.com/kirkins/hack.chat.games) | [Diff Summary](https://github.com/AndrewBelt/hack.chat/compare/master...kirkins:master)

This is a modification I made to an existing node.js app called hack chat. The mod allows people in the chat room to
challenge each other to tic-tac-toe. All users in room can watch the game live. Multiple games can be played in single
room at the same time.


text:
# News API Application
## Description
Welcome to this news application. Using the options provided one can access news from various sources or even search news using domain name or the source platform.This application uses [New API](https://newsapi.org/) to fetch and generate News
for you from various news sources.

## Author
- [Kenneth Thumi](https://github.com/KenThumi)

## Contact
<EMAIL_ADDRESS>
## Setup instructions
Below are steps to follow:
1. Open cli, navigate to your project folder and clone the project:

    `git clone https://github.com/KenThumi/NewsAPI.git`
2. Install python, preferably python3.
3. Create a virtual environment:

    `python3 -m venv virtual`
4. To activate the virtual environment run:

    `source virtual/bin/activate`
5. Now, in the virtual environment, install Flask to the project using the following command:

    `pip install flask`
6. Install flak bootstrap and flask script respectively:

        `pip install flask-bootstrap`

        `pip install flask_script`
7. Head over to [New API](https://newsapi.org/) and generate API key. To generate SECRET KEY
    , open REPL by typing command `python3`. Enter these commands:

            `import secrets`

            `secrets.token_hex(16)`

    Where 16 is key length. Copy the keys to somewhere.
8. To register the API KEY and SECRET KEY to OS for use, enter these command. Enter the respective key where necessary

    `export MOVIE_API_KEY='api key generated'`

    `export SECRET_KEY='secret key generated'`

9. Inside the same folder,  type following commands to start the application:

    `python3 manage.py server`
10. Open browser and input `http://<IP_ADDRESS>:5000`
11. To edit, use IDE of your choice to work with the project, e.g VsCode, Sublime text ,etc.

## Technologies Used
In this project, below is a list of technologies used:
- [Python version 3](https://www.python.org/)

## Dependencies
Use command `pip freeze` to check if all these dependecies are present.
1. click==7.1.2
2. dominate==2.6.0
3. Flask==1.1.2
4. Flask-Bootstrap==<IP_ADDRESS>
5. Flask-Script==2.0.6
6. itsdangerous==1.1.0
7. Jinja2==2.11.3
8. MarkupSafe==1.1.1
9. visitor==0.1.3
10. Werkzeug==1.0.1

## License info
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

- **[MIT license](http://opensource.org/licenses/mit-license.php)**
- Copyright 2021 © News API Application

repository: KenThumi/NewsAPI

repo_name: KenThumi/NewsAPI


text:
http://amoffat.github.io/sh/

## python setup.py uninstall

You need to remove all files manually, and also undo any other stuff that installation did manually.

If you don't know the list of all files, you can reinstall it with the --record option, and take a look at the list this produces.

To record list of installed files, you can use:

python setup.py install --record files.txt
Once you want to uninstall you can use xargs to do the removal:

cat files.txt | xargs rm -rf

repository: asakasinsky/Development-book

repo_name: asakasinsky/Development-book


text:
GDG DevFest The Netherlands 2016 has been announced! The fourth annual edition of the biggest conference about Google technologies in The Netherlands will take on **October 8th** in Amsterdam.

We've opened our [call for papers](https://docs.google.com/a/dutchaug.org/forms/d/e/1FAIpQLSd6VHHL9zP3OKaPRlc7Gey-QtLxHr9Q82LHujcYBkIIQhkXpg/viewform). If you are passionate about your work or hobby and want to share your experience with the biggest tech audience in Holland, don't hesitate to send an abstract of your session our way!

  <paper-button class="primary style-scope header-content x-scope paper-button-0" raised="" role="button" tabindex="0" animated="" aria-disabled="false" elevation="1">Submit a proposal</paper-button>

### Why is it cool to be a speaker?

Here are our top 4 reasons to [submit a proposal](https://docs.google.com/a/dutchaug.org/forms/d/e/1FAIpQLSd6VHHL9zP3OKaPRlc7Gey-QtLxHr9Q82LHujcYBkIIQhkXpg/viewform).

1. **It's a unique challenge.** Public speaking is a magnificent skill to master!
2. **It's good for your career.** Proving your level of expertise to a potential business partners or employers in invaluable to your professional experience.
3. **It's good for the company you’re working for.** Presentations delivered by an employee adds credibility to a company’s public image.
4. **Unique networking.** Being a speaker means you’ll have unique chance to network with other speakers, including leading experts in the industry.

### Themes and topics – what do we expect?

Our team prepared set of interesting topics in but if you have any cool idea you want to share not from this list, feel free to submit it as well.

#### Android
* New features in Nougat (multi-window, notifications, Java 8)
* Kotlin
* RxJava
* Data Binding
* Testing and architecture best practices (MVP, MVVM, Clean Architecture)

#### Web
* Progressive Web Apps
* Polymer
* Service Workers
* Physical Web
* RAIL

#### Cloud
* Machine Learning (TensorFlow, Vision API, Speech API, etc.)
* Big Data (PubSub, BigQuery, Dataflow)
* Firebase
* Kubernetes

### Deadline

**This call for papers will close on September 25th at 11:59 PM.**

  <paper-button class="primary style-scope header-content x-scope paper-button-0" raised="" role="button" tabindex="0" animated="" aria-disabled="false" elevation="1">Submit a proposal</paper-button>

Please note that there is no guarantee that a submission will be put onto the conference agenda. The program committee is responsible for picking proposals that they believe to best match the desired content for DevFest NL.

Any questions? Email organizers at [info<EMAIL_ADDRESS>

extension: markdown


text:
# Akamai EdgeWorkers Examples

Akamai EdgeWorkers helps deliver superior web experiences by enabling developers to run JavaScript at the Edge to customize web traffic, rather than using origin servers for these tasks. EdgeKV provides a global, low-latency key-value data store at the Edge to complement EdgeWorkers. The code snippets in this repository represent a starting point to help you build logic that will solve a range of use-cases via Akamai EdgeWorkers and EdgeKV.

These code samples are offered as-is, and are working code samples within the EdgeWorkers and EdgeKV products.  Feel free to use, modify and extend what you find here!

## Resources
For more information on EdgeWorkers and EdgeKV, refer to the following resources:
* [EdgeWorkers Developer Page](https://developer.akamai.com/edgeworkers)
* [EdgeWorkers User Guide](https://learn.akamai.com/en-us/webhelp/edgeworkers/edgeworkers-user-guide/GUID-4CC14D7E-D92D-4F2D-9292-17F8BE6E2DAE.html)
* [EdgeWorkers API Guide](https://developer.akamai.com/api/web_performance/edgeworkers/v1.html)
* [Akamai CLI for EdgeWorkers](https://developer.akamai.com/legacy/cli/packages/edgeworkers.html)
* [EdgeKV Getting Started Guide](https://learn.akamai.com/en-us/webhelp/edgeworkers/edgekv-getting-started-guide/)

## Reporting Issues
If you experience any issues with these code samples, please raise a [GitHub issue](https://github.com/akamai/edgeworkers-examples/issues). Or create a pull request with fixes, suggestions, or your own contributed example.

repository: sscian/edgeworkers-examples

gha_language: JavaScript

repo_name: sscian/edgeworkers-examples


text:
# generator-buildabanner

This is a [Yeoman](https://yeoman.io) generator to get a starter standard, AdWords, Sizmek or DoubleClick banner scaffolded out quickly.

## 2.1.0 and later adds Docker comptatibilty

The [2.1.0) version](https://www.npmjs.com/package/generator-buildabanner/v/2.1.0) of Build A Banner is nearly identical to version 2.0.15 except that has had modifications to make it work inside a Docker container. See [https://hub.docker.com/r/johnfmorton/yo-buildabanner](https://hub.docker.com/r/johnfmorton/yo-buildabanner) for more information about using _Build A Banner_ in Docker.

1. I've removed the "gulp-notify" plugin since when run within a Docker container, those messages were not reaching the host operating system. The messages that were generated in a notification now happen in the console.
2. Attempting to open the browser window when running the `gulp` command would cause an error when Build A Banner was running in a container so that has been removed. You now must open your browswer window manually.
3. Lastly, to allow the Docker container to expose the dev server's port, the host has changed from "localhost" to "<IP_ADDRESS>".

## Version 2

After 37 releases, Build A Banner has jumped to the 2.0 version. There was never a version 1 in all the previous 37 releases. It had always been version 0 although at some point it should have graduated to version 1. It just didn't happen.

In the Version 2, the Yeoman generator has been rewritten. It has moved to Gulp 4. How you use BAB should remain basically the same though. There have been a lot of updating of the tools behind the scenes to keep current.

## Let me show you how this works.

Click the image for a video walk through.

[![Video Walk Thru](https://cloud.githubusercontent.com/assets/119723/9295071/84157934-4415-11e5-907d-3fb40bceb977.jpg)](https://www.youtube.com/watch?v=_7dIIwlGdwUl)

## Notes

This is an evolving work in progress. I refine it as I discover better processes. It is an opinionated workflow to speed the production of building a banner. It includes options for HTML banners for standard, AdWords, or DoubleClick HTML banners.

## Basic usage

You may install this [Yeoman](http://yeoman.io/ "Yeoman homepage") workflow through _npm_.

`npm install -g generator-buildabanner`

You may also link this workflow locally into your own NPM installation using `npm link` when you are in the _generator-buildabanner_ directory from within your terminal.

To get started use `yo buildabanner` and answer the prompts.

### gulp commands

`gulp` : This is the most basic command. It will spin up a server in your 'dev' folder. It will compile your SCSS into CSS. It will also watch for changes in the index.html, scripts.js and style.scss files and reload Google Chrome.

`gulp check` : This command is useful to check for some basic consistency in your banner. It will confirm that the metadata ad.size matches the size of your backup image. It also checks to see if you have a single image in the backImage directory.

`gulp build` : This command will create a 'dist' folder and fill it with minified versions of your files. It will also compress these same files into a zip file in the 'delivery' folder. NOTE: If you've used files starting with "comp", like "comp1.png" or "comp2.jpg", which can be used for positioning elements in your banner, they will _not_ be included in your 'dist' folder. This is important to know if you happen to have a file called "competition.jpg" in your banner build because it will excluded.

`gulp archive` : This command will create an 'archive' folder and a single zip file that contains the contents of your _dev_, _dist_ and _delivery_ directories plus your _package.json_, _gulpfile.js_ and your Sublime Text project file. These are the necessary files to archive your banner once it is finished. (Your node_modules directory can be recreated later with `npm install`.)

`gulp ba` : This is a shortcut for running `check`, `build`, `archive` in sequence.

`gulp man` : Will provide info on the available comands.

### About offline usage

The workflow offers to download a copy of the Greensock library for off-line use. Since Greensock is offered via npm, it will be placed in the 'node_modules' folder.

Working on a DoubleClick banner requires that you have an Internet connection to load the Enabler.js. The workflow offers to download a copy of the Enabler.js. If you choose to do this, it places a copy of Enabler.js in a folder called "offline". (This option is only present if you choose to build a DoubleClick banner.)

Both of these prompts for offline use default to "yes". The downloaded code is _not_ referenced in the HTML though. You will need to **manually update** the HTML to load them. I've included the download of these files because I sometimes find that I need to work on these projects when having a stable Internet connection isn't possible. Having the files downloaded into my project is a failsafe for those situations.

### Roadmap

Below are some goal posts for the future of this workflow.

1. I plan on adding an option to inline the CSS and JS into the main `index.html` file.

### Tips

Be sure to check out the `gulp check` command. If you make resizes by duplicating a banner’s folder the metadata ad.size value is easy to overlook and this will help you catch that error. That's what prompted the creation of that command.

### But it doesn't work

Be sure you have the latest Gulp command line interface installed. See the [gulp-cli homepage](https://github.com/gulpjs/gulp-cli).

`npm install gulp-cli -g`

You may also need to update your Yeoman installation as well.

## License

MIT

repository: johnfmorton/generator-buildabanner

repo_name: johnfmorton/generator-buildabanner


text:
---
layout: "exoscale"
page_title: "Exoscale: exoscale_security_group"
sidebar_current: "docs-exoscale-security-group"
description: |-
  Manages a security group.
---

# exoscale_security_group

Security Groups allow you to define and compose firewall rules
making it easy to manage incoming and outgoing traffic. They
offer the best way to

## Example usage

```hcl
resource "exoscale_security_group" "http" {
  name = "HTTP"
  description = "Long text"

  tags {
    kind = "web"
  }
}
```

## Argument Reference

- `name` - (Required) name of the security group

- `description` - longer description

- `tags` - dictionary of tags (key / value)

## Import

Importing a Security Group resource imports it and the linked
[`exoscale_security_group_rule`](security_group_rule.html).

```shell
# by name
$ terraform import exoscale_security_group.http http

# by id
$ terraform import exoscale_security_group.http eb556678-ec59-4be6-8c54-0406ae0f6da6
```

repository: stffabi/terraform-provider-exoscale

repo_name: stffabi/terraform-provider-exoscale


text:
### HEAD - not yet released

----------

### version 0.3.6

#### other changes

 - fixed an issue that caused the border to not draw after a plugin unload and load operation (#569)

----------

### version 0.3.5

#### other changes

 - new cvar `focused_border_outline` to specify border position (#508)

----------

### version 0.3.4

#### other changes

 - fix border not drawing properly on Mojave (#439)

----------

### version 0.3.3

#### other changes

 - changing border color using runtime command should also update cvar `focused_border_color`

----------

### version 0.3.2

#### cvar changes

 - new cvar `focused_border_skip_monocle` to hide border when a monocle desktop is active (#405).

#### other changes

 - the cvar `focused_border_skip_floating` now also affects floating desktops as well (#276).

----------

### version 0.3.1

#### added runtime command

 - command to change border width during runtime: `chunkc border::width <number>`

----------

### version 0.3.0

#### other changes

 - border should not incorrectly pass through to other spaces for some people, causing "ghost" borders.

 - fixed a double-free issue caused by memory-ownership differences on El Capitan and new macOS versions.

 - border should be properly drawn immediately upon plugin-load.

----------

### version 0.2.10

changes from previous versions are unvailable..


text:
# esri-hyperapp-example

An example [Hyperapp](https://hyperapp.js.org/) application that shows how to use [esri-loader](https://github.com/Esri/esri-loader) to create a custom map view and component.

This approach demonstrates how to build a Hyperapp-focused application with the [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/). Using [esri-loader](https://github.com/Esri/esri-loader) makes the whole development process straightforward and enjoyable.

**PROOF:** [view demo](https://jwasilgeo.github.io/esri-hyperapp-example/)

**NOTE:** There's several code comments that will interest you about potential alternate approaches and caveats when managing both Hyperapp "state" and ArcGIS API "state". Go read about it in [`index.js`](https://github.com/jwasilgeo/esri-hyperapp-example/blob/master/index.js).

[Parcel](https://parceljs.org/) is also used here, and as it turns out, _Parcel is super awesome_. After you `npm install`, you can simply use `npm run start` and `npm run build`.

## Cobbled together with inspiration and guidance from

- [Hyperapp + Parcel = 😎](https://blog.daftcode.pl/hyperapp-parcel-71823bd93f1c), Adam Boro 2018
- [Hyperapp docs](https://github.com/hyperapp/hyperapp/blob/master/README.md)
- [Parcel docs](https://parceljs.org/)

[![screenshot](https://raw.githubusercontent.com/jwasilgeo/esri-hyperapp-example/master/screenshot.png)](https://jwasilgeo.github.io/esri-hyperapp-example/)

repository: ajzeigert/esri-hyperapp-example

repo_name: ajzeigert/esri-hyperapp-example