text:
---
title: Avi Vantage Prometheus Exporter
layout: layout172
---
# Overview

Prometheus is an open-source systems monitoring and alerting toolkit that joined the Cloud Native Computing Foundation (CNCF) in 2016.  Unlike other common monitoring solutions, Prometheus metrics collection happens via a pull model utilizing HTTP.

Although Avi Vantage provides a rich user interface for viewing performance metrics, a lot of enterprises desire to centralize their data into as few tools as possible, Prometheus commonly being one of these.

Avi Networks provides a container based exporter that Prometheus will scrape (pull) for retrieving desired metrics for the specified entity types.  With close to 800 unique metrics available from the Avi Controller, the Avi exporter enables an enterprise to centralize their metrics data without sacrificing the immense visibiltiy into how their applications are performing.

This article will discuss how the exporter works and provide example prometheus.yml job configuration examples for capturing the metrics for the different entity types.

More info on Prometheus

## Traffic Flow

The Avi exporter pulls the desired metrics from the Avi Controller and serves as the scrape target for Prometheus.  The exporter returns metric data once an HTTP request from Prometheus has been received.  The exporter returns metric data results as 5 min averages from the controller.

<figcapture>
Figure 1.

</figcapture>

## How the Exporter Works

The Avi exporter provides a single endpoint supporting multiple entity types; dependent upon configurable HTTP parameters specific metrics for specific entities will be returned.  The available entity types are virtualservice, serviceengine, pool and controller.  More specific information on how these can be used and what data is returned will be covered below in the subsequent sections.  The Avi exporter caches the metrics for a configurable time period.  During this period any request received by the exporter will return values from the cache.  The exporter will not proactively refresh the metrics cache, metrics cache updates are triggered by Prometheus requests.  The intent for the exporter caching the metrics is to rate limit API calls to the Avi controller and in some scenarios eliminate Prometheus scrape timeouts while awaiting for the metrics queries to be returned from the Avi Controller.

Here are a few common scenarios and what behavior can be expected:

### Prometheus request with empty cache in exporter
When a request is received by the exporter, if there are no cached metrics the exporter will return an empty repsonse and update the metrics cache in the background.  This situation is usual when the exporter is initially created.

### Prometheus request with populated cache in exporter
When a request is received by the exporter and there are cached metrics the exporter will return the requested metrics from the cache.

### Prometheus request with an expired populated cache in exporter
When a request is received and there are cached metrics in the exporter that are older then the retention period, the requested metrics will be immediately returned from the current cache and in the background the cache will be upgraded.

## How to Use the Exporter

The exporter is provided as a container located at https://cloud.docker.com/u/avinetworks/repository/docker/avinetworks/avi_exporter.  In the following section the required variable values will be desribed and then two examples for running the exporter are provided; on a stand alone Docker host, and deploying within Kubernetes/Openshift.

- URL path:  /metrics
- Listening Port: 8080
- Protocol:  HTTP

### Running the Exporter
The exporter requires passing values via environment variables to specify the Avi Controller to pull metrics from and credentials that will be used for authentication.  Below is a list of what variables are available and which ones are required.

 ENVIRONMENT VARIABLE

 DESCRIPTION

  REQUIRED

 AVICONTROLLER
 FQDN or IP address of the Avi Controller that the exporter will be pulling metrics from
 YES

 AVIUSER
 Username that will be used to authenticate to the Avi Controller
 YES

 AVIPASSWORD
 Password for the username that will be used for authentication
 YES

 EN_METRIC_REFRESH_INTERVAL
 Time in seconds that metrics will be cached on the exporter before being refreshed
 NO, default value is 300, minimum value is 60

#### User Role Permissions
The user being utilized for retrieving metrics will require READ priviliges on numerous objects dependent upon which entity types values are being pulled for.  The table below specifies the minimum required objects for which READ privileges must be enabled.

Note: If creating the role from the UI, notifications will be raised for additional objects that will require READ privileges prior to allowing for enabling Virtual Service or Pool permissions.

Avi Vantage User Roles

 ENTITY TYPE
 TENANT
 OBJECTS

 virtualservice
 variable, role must be applied to tenants for which virtualservice metrics will be retrieved from
 Cloud, VRF Context, Virtual Service

 serviceengine
 variable, role  must be applied to tenants for which serviceengine metrics will be retrieved from
 Service Engine

 pool
 variable, role must be applied to tenants for which pool metrics will be retrieved from
 Cloud, VRF Context, Virtual Service, Pool

 controller
 Admin
 Controller

#### Example 1. Running on standalone host

> docker run -d -e "AVICONTROLLER=<IP_ADDRESS>" -e "AVIUSER=admin" -e "AVIPASSWORD=password" -p 80:8080/tcp --name avi_exporter avinetworks/avi_exporter:latest

#### Example 2. Deploying in Kubernetes/Openshift

While deploying the exporter within Kubernetes/Openshift it is recommended to deploy the exporter as a replicationcontroller and provide the Controller and login credentials utilizing secrets.  Below are yml examples for the secrets and replicationcontroller with service.  For further information please see the following links.

https://kubernetes.io/docs/concepts/configuration/secret/

https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/

SECRET

apiVersion: v1
kind: Secret
metadata:
  name: avicredentials
type: Opaque
data:
  controller: MTY5LjI1NC4wLjE=
  user: YWRtaW4=
  password: cGFzc3dvcmQ=

REPLICATION CONTROLLER

apiVersion: v1
kind: ReplicationController
metadata:
  name: avi_exporter
spec:
  replicas: 1
  selector:
    name: avi_exporter
  template:
    metadata:
      name: avi_exporter
      labels:
        name: avi_exporter
    spec:
      containers:
      - name: avi_exporter
        image: avinetworks/avi_exporter:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
          protocol: TCP
        env:
          - name: AVICONTROLLER
            valueFrom:
              secretKeyRef:
                name: avicredentials
                key: controller
          - name: AVIUSER
            valueFrom:
              secretKeyRef:
                name: avicredentials
                key: user
          - name: AVIPASSWORD
            valueFrom:
              secretKeyRef:
                name: avicredentials
                key: password
          - name: EN_METRIC_REFRESH_INTERVAL
            value: '300'

---
apiVersion: v1
kind: Service
metadata:
  labels:
    svc: avi_exporter
  name: avi_exporter
  namespace: demo
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    name: avi_exporter
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

### Labels Returned per Entity Type

For each different entity type there will be a specific set of labels being returned.  In the tables below, a listing of what labels are returned and brief description about what the value is.

#### VIRTUALSERVICE

Example:

l4_client_avg_bandwidth{cloud="Default-Cloud",entity_type="virtualservice",name="demo-vs",tenant="demo",uuid="virtualservice-b7affd78-0bb2-45a8-993a-11ba70fc774c"}

 LABEL

 DESCRIPTION

 cloud
 Name of the Cloud the virtualservice is a member of

 entity_type
 Type of entity the metric is for, in this case the value would be virtualservice

 name
 Name of the virtualservice

 tenant
 Name of the tenant the virtualservice is a member of

 uuid
 UUID of the virtualservice

 #### SERVICEENGINE

Example:

se_if_avg_bandwidth{cloud="Default-Cloud",entity_type="serviceengine",name="AviDemo-se-dcsob",tenant="admin",uuid="se-00505682a54f"}

 LABEL

 DESCRIPTION

 entity_type
 Type of entity the metric is for, in this case the value would be serviceengine

 name
 Name of the serviceengine

 se_group
 Name of the se_group the serviceengine is a member of

 tenant
 Name of the tenant the serviceengine is a member of

 uuid
 UUID of the serviceengine

 #### CONTROLLER

 Example:

controller_stats_avg_cpu_usage{entity_type="controller",name="<IP_ADDRESS>",vm_uuid="005056b8e868"}

 LABEL

 DESCRIPTION

 entity_type
 Type of entity the metric is for, in this case the value would be controller

 name
 Name or IP of the specific controller

 vm_uuid
 UUID of the controller

#### POOL

Example:

l4_server_avg_rx_pkts{cloud="Default-cloud",entity_type="pool",name="temp-pool-9090-tcp",server="<IP_ADDRESS>:9090",tenant="default",uuid="pool-6373446c-2cbb-4554-a580-78593870391c"}

 LABEL

 DESCRIPTION

 cloud
 Name of the Cloud the pool is a member of

 entity_type
 Type of entity the metric is for, in this case the value would be pool

 name
 Name of the pool

 server
 The specific pool server the metric values is for

 tenant
 Name of the tenant the pool is a member of

 uuid
 UUID of the pool

 ### Prometheus Job Configurations

 The Avi exporter uses HTTP parameters within the Prometheus request to provide the desired data.  Below is a list of job options that can be configured within Prometheus for pulling metrics.

 - virtualservice
 - virtualservice Service Discovery (Kubernetes/Openshift)
    - Prometheus Service Discovery
 - serviceengine
 - pool
 - controller

For each job configuration parameters will need to be provided within the prometheus config.  Below is a table of the available parameters.

 JOB TYPE
 PARAMETER
 DESCRIPTION
 REQUIRED

 virtualservice
 entity_type
 Type of entity that metrics are desired for, in this case it would be virtualservice
 YES

 entity_uuid
 UUID(s) for which virtualservice(s) metrics are desired for
 NO, defaults to ALL

 metric_id
 Which specific metric(s) to be retrieved
 NO, if no metrics defined defaults to predefined list. See end of article for default metric lists

 tenant
 Which tenant(s) to pull metrics for
 NO, defaults to ALL

 cloud
 Which cloud(s) to pull metrics for
 NO, defaults to ALL

 Service Discovery (Kubernetes/Openshift)
 entity_type
 Type of entity that metrics are desired for, in this case it would be virtualservice
 YES

 metric_id
Which specific metric(s) to be retrieved
 NO, if no metrics defined defaults to predefined list. See end of article for default metric lists

 serviceengine
 entity_type
 Type of entity that metrics are desired for, in this case it would be serviceengine
 YES

 entity_uuid
 UUID(s) for which serviceengine(s) metrics are desired for
 NO, defaults to ALL

 metric_id
Which specific metric(s) to be retrieved
 NO, if no metrics defined defaults to predefined list. See end of article for default metric lists

 tenant
 Which tenant(s) to pull metrics for
 NO, defaults to ALL

 cloud
 Which cloud(s) to pull metrics for
 NO, defaults to ALL

 pool
 entity_type
 Type of entity that metrics are desired for, in this case it would be pool
 YES

 entity_uuid
 UUID(s) for which pool(s) metrics are desired for
 NO, defaults to ALL

 metric_id
Which specific metric(s) to be retrieved
 NO, if no metrics defined defaults to predefined list. See end of article for default metric lists

 tenant
 Which tenant(s) to pull metrics for
 NO, defaults to ALL

 cloud
 Which cloud(s) to pull metrics for
 NO, defaults to ALL

 controller
 entity_type
 Type of entity that metrics are desired for, in this case it would be controller
 YES

 metric_id
Which specific metric(s) to be retrieved
 NO, if no metrics defined defaults to predefined list. See end of article for default metric lists

### Prometheus Configuration Examples
Below are Prometheus job configuration examples for the different job types.  The target for all the job configurations needs to be the Avi exporter itself.

NOTE:When providing a list, it must be formatted as comma separated with the entire string enclosed in a single set of quotes.
* * *

#### Virtualservice
```
- job_name: 'avi_virtualservice'
  scrape_interval: 60s
  scrape_timeout: 30s
  metrics_path: /metrics
  params:
      tenant: []
      entity_uuid: ['virtualservice-c312818c-8d71-49f2-8320-9027f6884ed5,
                    virtualservice-62aee690-dcd3-4c0a-b724-1e36d2666bc6,
                    virtualservice-985b3f40-5b17-4f12-bb0c-c6ededdda35a,
                    virtualservice-26df98b9-a82e-4ed4-9e73-b48c6df11b9f']
      metric_id: ['l4_client.avg_bandwidth,
                  l4_client.avg_complete_conns,
                  l4_client.avg_new_established_conns,
                  l4_client.avg_rx_pkts,
                  l4_client.avg_tx_pkts,
                  l4_client.avg_rx_bytes,
                  l4_client.avg_tx_bytes,
                  l7_client.avg_resp_2xx,
                  l7_client.avg_resp_4xx,
                  l7_client.avg_resp_5xx,
                  l4_client.avg_total_rtt']
      entity_type: ['virtualservice']
      cloud: []
  scheme: http
  static_configs:
  - targets: ['avi-prometheus.default.svc:80']
```

* * *

#### Virtualservice Service Discovery

As an alternative to the previous example, Prometheus can integrate with Kuberenets to dynamically discover when new services/ingress are deployed.  If using service discovery is desired it is important to be able to differentiate services/ingresses that are deployed as Avi Virtual Services and services/ingresses that are not.  Job configurations for East/West (service) vs North/South (ingress, Kubernetes ONLY) will differ.  Service discovery for North South is not supported for Openstack deployments, North South virtual services user Routes and Prometheus does not support discoverying Routes.

Using Prometheus' Service Discovery mechanism allows for the administrators ability to enable/disable metrics collection for a virtualservice by using Kubernetes annotations.

The metric_id parameter applies for all services that are discovered.  If it's desired to retrieve additional metrics for specific services an optional annotation is available.  This annotation is "avimetrics".  The value will be a list of metrics in the same format as the metric_id parameter.

East West Service

In example provided the very first entry within relabel_configs looks for services with two annotations with specific values:
- avi_prometheus equals "true"
- avi_proxy contains: "east_west_placement\": true,

Any service that has annotations that match will have their metrics retrieved from the exporter.

The last line of the configuration defines that target to be the exporter.

```
- job_name: 'avi_virtualservice_sd'
  scrape_interval: 60s
  scrape_timeout: 30s
  metrics_path: /metrics
  params:
      metric_id: ['l4_client.avg_bandwidth,l4_client.avg_complete_conns']
      entity_type: ['virtualservice']
  scheme: http
  kubernetes_sd_configs:
  - role: service
  relabel_configs:
    - source_labels: [__meta_kubernetes_service_annotation_avi_prometheus,__meta_kubernetes_service_annotation_avi_proxy]
      action: keep
      regex: 'true;.*\"east_west_placement\":\s?true,.*'
    - source_labels: [__meta_kubernetes_namespace]
      target_label: __param_kubernetes_namespace
    - source_labels: [__meta_kubernetes_service_name]
      target_label: __param_virtualservice
    - source_labels: [__meta_kubernetes_service_annotation_avimetrics]
      target_label: __param_extra_metrics
    - source_labels: [__address__]
      target_label: instance
    - source_labels: [__address__]
      regex: (.+):(\d+)
      target_label: __address__
      replacement: avi-prometheus.default.svc:80
```

North South Ingress

In this next example provided the very first entry within relabel_configs looks for ingress with a specific annotation with a specific value:
- avi_prometheus equals "true"

Based upon Avi ingress virtualservice naming conventions, it is required to define the north south domain name being used for the __subdomain label.  In the example below the domain being used is ns.avi

Any ingress that has an annotation that matches will have their metrics retrieved from the exporter.

The last line of the configuration defines that target to be the exporter.

```
- job_name: 'avi_ingress'
  scrape_interval: 60s
  scrape_timeout: 30s
  metrics_path: /metrics
  params:
      metric_id: ['l4_client.avg_bandwidth,l4_client.avg_complete_conns']
      entity_type: ['virtualservice']
  scheme: http
  kubernetes_sd_configs:
  - role: ingress
  relabel_configs:
    - source_labels: [__meta_kubernetes_ingress_annotation_avi_prometheus]
      action: keep
      regex: true
    - target_label: __subdomain
      replacement: ns.avi
    - source_labels: [__meta_kubernetes_namespace]
      target_label: __param_kubernetes_namespace
    - source_labels: [__meta_kubernetes_ingress_name,__meta_kubernetes_namespace,__subdomain]
      regex: (.+);(.+);(.+)
      replacement: $1.$2.$3
      target_label: __param_virtualservice
    - source_labels: [__meta_kubernetes_ingress_annotation_avimetrics]
      target_label: __param_extra_metrics
    - source_labels: [__meta_kubernetes_ingress_name]
      target_label: instance
    - source_labels: [__address__]
      regex: (.+)
      target_label: __address__
      replacement: avi-prometheus.default.svc:80
```

* * *

#### Serviceengine
```
- job_name: 'avi_serviceengine'
  scrape_interval: 60s
  metrics_path: /metrics
  params:
      tenant: ['demo,admin']
      entity_uuid: []
      metric_id: ['se_if.avg_bandwidth,se_stats.avg_cpu_usage']
      entity_type: ['serviceengine']
      cloud: []
  scheme: http
  static_configs:
  - targets: ['avi-prometheus.default.svc:80']
```

* * *

#### Pool
```
- job_name: 'avi_pool'
  scrape_interval: 60s
  scrape_timeout: 30s
  metrics_path: /metrics
  params:
      tenant: []
      entity_uuid: []
      metric_id: []
      entity_type: ['pool']
      cloud: ['Default-cloud,AWS-cloud']
  scheme: http
  static_configs:
  - targets: ['avi-prometheus.default.svc:80']
```

## DEFAULT METRICS LIST

### Default Virtual Service Metrics
    - l4_client.apdexc
    - l4_client.avg_bandwidth
    - l4_client.avg_application_dos_attacks
    - l4_client.avg_complete_conns
    - l4_client.avg_connections_dropped
    - l4_client.avg_new_established_conns
    - l4_client.avg_policy_drops
    - l4_client.avg_rx_pkts
    - l4_client.avg_tx_pkts
    - l4_client.avg_rx_bytes
    - l4_client.avg_tx_bytes
    - l4_client.max_open_conns
    - l4_client.avg_lossy_connections
    - l7_client.avg_complete_responses
    - l7_client.avg_client_data_transfer_time
    - l7_client.avg_client_txn_latency
    - l7_client.sum_application_response_time
    - l7_client.avg_resp_4xx_avi_errors
    - l7_client.avg_resp_5xx_avi_errors
    - l7_client.avg_resp_2xx
    - l7_client.avg_resp_4xx
    - l7_client.avg_resp_5xx
    - l4_client.avg_total_rtt
    - l7_client.avg_page_load_time
    - l7_client.apdexr
    - l7_client.avg_ssl_handshakes_new
    - l7_client.avg_ssl_connections
    - l7_client.sum_get_reqs
    - l7_client.sum_post_reqs
    - l7_client.sum_other_reqs
    - l7_client.avg_frustrated_responses
    - l7_client.avg_waf_attacks
    - l7_client.pct_waf_attacks
    - l7_client.sum_total_responses
    - l7_client.avg_waf_rejected
    - l7_client.avg_waf_evaluated
    - l7_client.avg_waf_matched
    - l7_client.avg_waf_disabled
    - l7_client.pct_waf_disabled
    - l7_client.avg_http_headers_count
    - l7_client.avg_http_headers_bytes
    - l7_client.pct_get_reqs
    - l7_client.pct_post_reqs
    - l7_client.avg_http_params_count
    - l7_client.avg_uri_length
    - l7_client.avg_post_bytes
    - dns_client.avg_complete_queries
    - dns_client.avg_domain_lookup_failures
    - dns_client.avg_tcp_queries
    - dns_client.avg_udp_queries
    - dns_client.avg_udp_passthrough_resp_time
    - dns_client.avg_unsupported_queries
    - dns_client.pct_errored_queries
    - dns_client.avg_domain_lookup_failures
    - dns_client.avg_avi_errors
    - dns_server.avg_complete_queries
    - dns_server.avg_errored_queries
    - dns_server.avg_tcp_queries
    - dns_server.avg_udp_queries
    - l4_server.avg_rx_pkts
    - l4_server.avg_tx_pkts
    - l4_server.avg_rx_bytes
    - l4_server.avg_tx_bytes
    - l4_server.avg_bandwidth
    - l7_server.avg_complete_responses
    - l4_server.avg_new_established_conns
    - l4_server.avg_pool_open_conns
    - l4_server.avg_pool_complete_conns
    - l4_server.avg_open_conns
    - l4_server.max_open_conns
    - l4_server.avg_errored_connections
    - l4_server.apdexc
    - l4_server.avg_total_rtt
    - l7_server.avg_resp_latency
    - l7_server.apdexr
    - l7_server.avg_application_response_time
    - l7_server.pct_response_errors
    - l7_server.avg_frustrated_responses
    - l7_server.avg_total_requests
    - healthscore.health_score_value

* * *

### Default Service Engine Metrics
    - se_if.avg_bandwidth
    - se_stats.avg_connection_mem_usage
    - se_stats.avg_connections
    - se_stats.avg_connections_dropped
    - se_stats.avg_cpu_usage
    - se_stats.avg_disk1_usage
    - se_stats.avg_mem_usage
    - se_stats.avg_dynamic_mem_usage
    - se_stats.avg_persistent_table_usage
    - se_stats.avg_rx_bandwidth
    - se_if.avg_rx_bytes
    - se_if.avg_rx_pkts
    - se_if.avg_rx_pkts_dropped_non_vs
    - se_if.avg_tx_pkts
    - se_if.avg_tx_bytes
    - se_stats.avg_ssl_session_cache_usage
    - se_if.avg_connection_table_usage
    - se_stats.max_se_bandwidth
    - se_stats.avg_eth0_bandwidth
    - se_stats.pct_syn_cache_usage
    - se_stats.avg_packet_buffer_usage
    - se_stats.avg_packet_buffer_header_usage
    - se_stats.avg_packet_buffer_large_usage
    - se_stats.avg_packet_buffer_small_usage
    - healthscore.health_score_value

* * *

### Default Controller Metrics
    - controller_stats.avg_cpu_usage
    - controller_stats.avg_disk_usage
    - controller_stats.avg_mem_usage

* * *

### Default Pool Metrics
    - l4_server.avg_rx_pkts
    - l4_server.avg_tx_pkts
    - l4_server.avg_rx_bytes
    - l4_server.avg_tx_bytes
    - l4_server.avg_bandwidth
    - l7_server.avg_complete_responses
    - l4_server.avg_new_established_conns
    - l4_server.avg_pool_open_conns
    - l4_server.avg_pool_complete_conns
    - l4_server.avg_open_conns
    - l4_server.max_open_conns
    - l4_server.avg_errored_connections
    - l4_server.apdexc
    - l4_server.avg_total_rtt
    - l7_server.avg_resp_latency
    - l7_server.apdexr
    - l7_server.avg_application_response_time
    - l7_server.pct_response_errors
    - l7_server.avg_frustrated_responses
    - l7_server.avg_total_requests
    - healthscore.health_score_value


text:
---
layout: default
---

# 1994-09-23 - Fast Modular Factorial?

## Header Data

From<EMAIL_ADDRESS>(Mike Duvos)

To<EMAIL_ADDRESS>Message Hash: 63abd661b5de0738acec2c1420629de755f64894042ed736234ff888ab35b87b

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-09-23 16:37:02 UTC

Raw Date: Fri, 23 Sep 94 09:37:02 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Mike Duvos)
Date: Fri, 23 Sep 94 09:37:02 PDT
To<EMAIL_ADDRESS>Subject: Fast Modular Factorial?
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

A small question about large integer math...

We are all familar with the fact that x^(2^n) mod p may be
evaluated with only n modmults which accumulate geometrically
increasing powers of x.

Does a similar fast algorithm exist for computing (2^n)! mod p?

The only difference here is that one is accumulating a huge product
of consecutive integers instead of the same integer multiplied many
times.  I am interested in values of n around several hundred.

I have played with this quite a bit and am unable to see any easy
exploitable symmetry which would lead to an efficient algorithm.

Any ideas?

--
     Mike Duvos         $    PGP 2.6 Public Key available     $
<EMAIL_ADDRESS>   $    via Finger.                      $

{% endraw %}
```

## Thread

+ Return to [September 1994](/archive/1994/09)

+ Return to "[Jim choate <ravage@bga.com>](/authors/jim_choate_ravage_at_bga_com_)"
+ Return to "[Matthew J Ghio <mg5n+@andrew.cmu.edu>](/authors/matthew_j_ghio_mg5n_at_andrew_cmu_edu_)"
+ Return to<EMAIL_ADDRESS>(Mike Duvos)](/authors/mpd_at_netcom_com_mike_duvos_)"
+ Return to<EMAIL_ADDRESS>(Paul J. Ste. Marie)](/authors/pstemari_at_bismark_cbis_com_paul_j_ste_marie_)"

+ 1994-09-23 (Fri, 23 Sep 94 09:37:02 PDT) - Fast Modular Factorial? -<EMAIL_ADDRESS>(Mike Duvos)_
  + 1994-09-23 (Fri, 23 Sep 94 10:18:30 PDT) - [Re: Fast Modular Factorial?](/archive/1994/09/f3e5b8ce80885efbbf65f76dee61ccef8a10ed9eb450c0d2f4aa7af074e7c270) - _Matthew J Ghio<EMAIL_ADDRESS>    + 1994-09-23 (Fri, 23 Sep 94 10:56:02 PDT) - [Re: Fast Modular Factorial?](/archive/1994/09/5a9678842911d82e8f1b3a7b4d1467f14e58030b0b39dc64bbf2ecaba007ef2d) - _Jim choate<EMAIL_ADDRESS>      + 1994-09-23 (Fri, 23 Sep 94 12:14:12 PDT) - [Re: Fast Modular Factorial?](/archive/1994/09/79a4d0c21d5c1a7a73588c33900403562eaf6b4484127274bb3e9f0478d17e91) - _Matthew J Ghio<EMAIL_ADDRESS>      + 1994-09-26 (Mon, 26 Sep 94 10:25:39 PDT) - [Fast Modular Factorial?](/archive/1994/09/248959edb7fe1a10acef63adbc52ca2734114dce53c2f85756b3f1d9737443e6) -<EMAIL_ADDRESS>(Paul J. Ste. Marie)_
    + 1994-09-23 (Fri, 23 Sep 94 12:25:56 PDT) - [Re: Fast Modular Factorial?](/archive/1994/09/56bada817daa023330709142ffdd0467e7ac28e1d24ce3e19ba3470e066e0434) -<EMAIL_ADDRESS>(Mike Duvos)_

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
# Spring Boot Web application with enterprise Camunda Webapps

This example demonstrates how you can build a Spring Boot application with the embedded Camunda enterprise version.

* Embedded Camunda Engine
* Camunda Enterprise web applications automatically deployed
* Process application and one BPMN process deployed
* Admin user configured with login and password configured in `application.yaml`
* "All" filter automatically created in task-list
* automatic use of a `camunda-license.txt`

You will need:

* credentials to access the enterprise repo in your Maven `settings.xml`
* a valid camunda-license key file in your classpath in the file `camunda-license.txt`

## Prerequisites
* Java 17

## How is it done

1. To embed the Camunda Engine with Enterprise webapps you must add the following maven coordinates to your `pom.xml`:

```xml
...
  <properties>
    <camunda.version>7.19.0-ee</camunda.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      ...
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bom</artifactId>
        <version>${camunda.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm.springboot</groupId>
      <artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
    </dependency>
    ...
  </dependencies>
...
```

2. With Spring Boot you usually create an "application" class annotated with `@SpringBootApplication`. In order to have the Camunda process application
registered, you can simply add the annotation `@EnableProcessApplication` to the same class and also include a `processes.xml` file to your `META-INF` folder:

```java
@SpringBootApplication
@EnableProcessApplication
public class EnterpriseWebappExampleApplication {

  public static void main(String... args) {
    SpringApplication.run(EnterpriseWebappExampleApplication.class, args);
  }

}
```

3. You can also put BPMN, CMMN and DMN files in your classpath, they will be automatically deployed and registered within the process application.

4. If you want your Camunda license automatically used on Engine startup, just put the file with the name `camunda-license.txt` on your classpath.

## Run the application and use Camunda Webapps

You can build the application with `mvn clean install` and then run it with the `java -jar` command.

Then you can access the Camunda Webapps in your browser: `http://localhost:8080` (provide login/password from `application.yaml`, default: demo/demo)

repository: camunda/camunda-bpm-examples

gha_language: Java

repo_name: camunda/camunda-bpm-examples


text:
# Lambda - A Scheme Implementation

This is my toy interpreter. Do not expect a complete implementation at this time.

# Installation

	git clone https://github.com/macoun/lambda.git
	cd lambda/src
	make

The executable `lambda` will be created in the _src_ directory.

# Run

To interpret a source file

	./lambda ../examples/sandbox.scm

To land in the REPL console. Yes, you guessed it.

	./lambda

# License

It will probably be MIT licensed. At this level feel free to do what you want with the code unless you recently killed a kitten.

repository: macoun/lambda

repo_name: macoun/lambda


text:
# R-Share
#####This is a Django based file uploader with following features :

##Version 1 :-

  - Share via link

  - Share to public repository

  - Sharing with existing user

  - File expiry

  - Option to set password on file

  - Download file from link / public repository

##Version 2 :-

  - Completely new look

  - Password is hashed and saved for the new upload files

  - Captcha validation while uploading the files

### Setting up

1. Your machine needs to have django installed. (taken care by install.sh)

2. Clone the repository, unzip and go to the main directory of the repo .

        wget https://github.com/roopansh/rshare/archive/master.zip
        unzip master.zip
        cd rshare-master

3. Run the 'install.sh'

        bash install.sh

   Fill all the settings required.

4. In the ``rshare/settings.py`` file, edit the ``ALLOWED_HOSTS`` to the host address you want to host from.

**NOTE : Currently every host is allowed**

5. Create the server

        python manage.py runserver <IP_ADDRESS>:8000

6. Everything is done. Visit the following link in your browser

        localhost:8000/share

**NOTE : Replace localhost with the host address of the pc hosting the site.**

## About the project author
#### Roopansh Bansal
B.Tech undergraduate (Computer Science & Engineering)
IIT Guwahati
India

<EMAIL_ADDRESS>
www.linkedin.com/in/roopansh-bansal

# ScreenShots

##Version 2 :-

![Home Page](/screenshots/v2/home.png "Main Page")

![Public Repo](/screenshots/v2/public.png "Password")

![Sign In](/screenshots/v2/signin.png "Download")

##Version 1 :-

![Home Page](/screenshots/v1/Home.png "Main Page")

![Upload](/screenshots/v1/Upload.png "Upload")

![Password Protected](/screenshots/v1/Password.png "Password")

![Download](/screenshots/v1/Download.png "Download")

repository: roopansh/rshare

repo_name: roopansh/rshare


text:
# VUE Materialize-css Typescript Boilerplate
## Getting started

```bash
# 1. Clone the repository.
git clone https://github.com/Vue-Boilerplates/vue-typescript-boilerplate.git my-new-project

# 2. Enter your newly-cloned folder.
cd my-new-project

```

```bash
## proceed with yarn

# 3. Install dependencies. Make sure yarn is installed: https://yarnpkg.com/lang/en/docs/install
yarn

# 4. Serve with hot reload at localhost:8080
yarn serve

# 5. Build for production with minification
yarn build
```

```bash
## proceed with npm

# 3. Install dependencies. Make sure npm is installed: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
npm install

# 4. Serve with hot reload at localhost:8080
npm run serve

# 5. Build for production with minification
npm run build
```
# License
Released under the MIT [License](./LICENSE)


text:
---
layout: post
title: 'covid-19 sci-fi: they took their $1200 and left'
date: '2020-05-27T08:31:00-04:00'
tags:
- covid-19
- alternative futures

---

my granddaddy told me it was better than he could have imagined. he said it was violent and hard, of course, but the process was much much better than he would have ever dreamed.

he told me the collapse of the united states was triggered by something called the coronavirus.

he told me that the united states had been doomed from the start. it was doomed not in the way that all natural things are doomed to return to the circle of life; it was doomed because the bones were bad and the roots were rotten. it couldn't have had an easy, gradual death and re-entry as natural things do. it was founded on death and theft and so the ending had to be hard.

but it was still better than he could have imagined.

he told me that all of the people who already knew amerikkka was rotten got up and left. they went to what used to be called barbados and canada and cuba and nigeria. they went everywhere, actually; everywhere that wasn't the ticking-time-bomb of america. but when they arrived, they realized that all those names were just names americans used. the people there didn't think of borders and so they didn't think of nations. he wondered how long america had been brainwashing its people to still think in borders?

he said he sad for the people who got left behind. the people who wanted to stay to make it a better place. the people who wanted to stay to keep it as it was. they fought each other. it was bloody.

bloody.

you would think with all the video technology we'd developed, they would have avoided civil war. but the civil war had been going on. just framed as single incidents of police brutality and one-off mass shooter events.

but many fewer people died than he could have imagined. many fewer people had to stay for the mess than he thought possible. the money just appeared in people's accounts (he said it was something like $1200) and then as many that could leave, left.

i'm telling all of you this, my grandbaby, because it is our job to remember. when we forget, our hard-won lessons evaporate. when we forget, other people "help" us remember with their memories. but their memories are not our memories; their experience was not our experience. promise me you'll remember?

---
question for readers of this story: if you knew america was about to implode, would you gtfo or stay? why?

<!-- hyperlink bank -->

<!-- * = asterisk -->
<!-- ' = single quote '-->

**words / writing / post-processing**
400w / 11min / 4min


text:
## Overview of the model
The image below shows a schematic overview of how the model is built up.
![Overview model](overview_model.png)

## Output of the model
The model outputs the following data:
1. Vector of the time: all moments in time at which the signal is calculated in s.
2. Matrix of the power: matrix of all the power values of the signal in W. It has dimensions [5, #filters, #timesamples]. The first dimension equals 5, as 5 pwv values are taken in each timesample.
3. Matrix of the sky temperature: matrix of the power converted to sky temperature (has the same dimensions as the matrix of the power) in K.
4. Center frequencies of the filters: The center frequencies of the filters in the filterbank in the MKID chip in Hz.

The pwv values are taken in the following order:
![pwv values](skychopping_5chops.png)

## Using the model
The model is operated from *main.py*. In this file, there are different variables that can be set:

### Atmosphere
**pwv_0** (*float*): The value of the precipitable water vapor that is added to the dpwv from ARIS in mm.
**windspeed** (*float*): The windspeed of the atmosphere in m/s.
**prefix_atm_data** (*string*): The beginning of the name with which the atmosphere data is saved in *./Data/output_ARIS*. For example, if the files are called
*sample-00.dat-000*, *sample-00.dat-001* etc, then Prefix_atm_data must be 'sample-00.dat-'
**grid** (*float*): The width of a grid square in the atmosphere map in m
**max_num_strips** (*integer*): The number of atmosphere strips that is saved in *./Data/output_ARIS*
**x_length_strips** (*float*): The length of one atmosphere strip in the x direction. This is the number of gridpoints, *not* the distance in meters. Thus, this is an integer number, taken as a float to make sure calculations with this number result in a float.

### Galaxy
**luminosity** (*float*): Luminosity of the galaxy, in Log(L_fir [L_sol])
**redshift** (*float*): The redshift of the galaxy
**linewidth** (*float*): The linewidth, in km/s

### Observation
**EL** (*float*): The elevation of the telescope, in degrees
**obs_time** (*float*): The observation time. This parameter has to be smaller than **max_obs_time**, which is calculated using the windspeed and the total length of the strips of atmosphere data, in s.
**draw_filters** (*list*): List of the filters that need to be plotted in the final plot (starts counting at 1, NOT 0). For example, if draw_filters = [1, 2], the first and the second filter are plotted, and if draw_filters = [1, 347], the first and the last filter are plotted.
**save_name_plot** (*string*): The name with which the produced plot is saved.
**save_name_data** (*string*): The name with which the produced data is saved to *.Data/output_DESHIMA_model/*. The center frequencies of the filters are saved as *save_name_data_F.npy* and the sky temperature matrix is saved as *save_name_data_T.npy*

### Important
1. All atmosphere strips must have the same length in the x direction and a length in the y direction of at least 30 gridpoints. ('length' means number of gridpoints, *not* distance in meters)
2. If **pwv_0** is changed, signal_transmitter.save_filtered_pwv_map() needs to run again to save the right pwv map (See section 'Changing the atmosphere data' to see how').

## Changing the atmosphere data
1. Save the new atmosphere data in *./Data/output_ARIS/*
2. Change **prefix_atm_data**, **grid**, **max_num_strips**  and **x_length_strips** in *main.py* and the **x_length_strips** property of *use_aris.py* to the right values.
3. From *main.py* run signal_transmitter.save_filtered_pwv_map() with the signal_transmitter instance in *main.py*. This function loads in and filters the complete atmosphere map (consisting of all atmosphere strips). This will save computation time when simulations with a large observing time are done.

Now *main.py* can be used like always again.

## Changing the number of filters or the distribution of the center frequencies of the filters
For each filter, an interpolation between the power and the sky temperature is made. This means that these interpolations need to be made and saved again if the center frequencies of the filters are changed. This is done as follows:

1. Go to *./DESHIMA/MKID/filterbank.py*
2. Change **num_filters** for a different number of filters, **F_min** for a different lowest center frequency or **R** for a different spectral resolution. For a different distribution of the center frequencies, edit *self.filters* in the init function of the filterbank class.
3. Run *filterbank.py*

Now the new interpolation curves should be saved in *./Data/splines_Tb_sky*. Now make sure *self.filters* in *signal_transmitter.py* is the same vector as *self.filters* in *filterbank.py* and the model can be used again.

repository: EsmeeHuijten/DESHIMAmodel

gha_language: Jupyter Notebook

repo_name: EsmeeHuijten/DESHIMAmodel


text:
---
id: 1
path: '/how-to-show-or-hide-content-without-any-js-library-or-code/'
title: 'How to show or hide content without any JS library or code'
date: 2016-06-18
author: Yaser Adel Mehraban
popular: false
categories: [css, Html, JQuery, JS]
tags: [css, html, javascript, Jquery]
---

Mentioning this is trivial as no one seems to notice this while using default JQuery show and hide methods to show or hide an element on a page. As you might have noticed this before when you use `hide()`, the element gets a  `display:none;` style. The problem is when you use `show()` to show the element again and here is when you see`display:block;` is added to element styles.

<!--more-->

The problem compounds when animations get added into the mix (tons of inline CSS). I’m not saying don’t use them, but there are better ways and you can clean up after yourself in the DOM. Here’s an example for a simple hide/show.

## HTML

```html
<a href="#target1" class="trigger">Toggle Content area 1</a>
<div id="target1" class="content">the content you want to hide/show</div>
```

## CSS

```css
// with this method I get to choose how I want to hide the content
.is-hidden {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

// and I can easily make it work w/o JS
.content:target {
  position: static;
}
```

## JavaScript

```javascript
$('.trigger').on('click', function(e) {
  e.preventDefault();

  var target = $(this).attr('href'); // returns #target1

  // see if the target area is hidden
  if( $(target).hasClass('is-hidden') ) {

    // if it's hidden, remove the class, but hide it so we can softly fade it in
    $(target).removeClass('is-hidden').hide().fadeIn(250, function(){

      // because fadeIn() adds some inline CSS, let's remove it to clean up the DOM
      $(target).removeAttr('style');
    });
  } else {

    // fade out the content
    $(target)fadeOut(250, function(){

     // once it's faded out, add the class and clean up the DOM
     $(this).addClass('is-hidden').removeAttr('style');
    });
  }
});
```

## Why should you be concerned?

I’ve been using this method for a very long time. I prefer it because it’s a cleaner separation between CSS and JavaScript and I’m not forced to use jQuery’s hide/show method of `display:none` (which really isn’t good for accessibility).

Of course, the `fadeIn()` method could also be moved into a CSS animation at this point to clean this up even further.

branch_name: refs/heads/main

gha_language: JavaScript


text:
# Learning Blazor: Build Single-Page Apps with WebAssembly and C#

[![build](https://github.com/IEvangelist/learning-blazor/actions/workflows/build-validation.yml/badge.svg)](https://github.com/IEvangelist/learning-blazor/actions/workflows/build-validation.yml) [![CodeQL](https://github.com/IEvangelist/learning-blazor/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/IEvangelist/learning-blazor/actions/workflows/codeql-analysis.yml) [![Azure Translation](https://github.com/IEvangelist/learning-blazor/actions/workflows/machine-translation.yml/badge.svg)](https://github.com/IEvangelist/learning-blazor/actions/workflows/machine-translation.yml)

[![Deploy Static Web App](https://github.com/IEvangelist/learning-blazor/actions/workflows/deploy-az-static-webapp.yml/badge.svg)](https://github.com/IEvangelist/learning-blazor/actions/workflows/deploy-az-static-webapp.yml)
[![Deploy Weather Function](https://github.com/IEvangelist/learning-blazor/actions/workflows/deploy-az-func.yml/badge.svg)](https://github.com/IEvangelist/learning-blazor/actions/workflows/deploy-az-func.yml) [![Deploy Web API](https://github.com/IEvangelist/learning-blazor/actions/workflows/deploy-az-webapi.yml/badge.svg)](https://github.com/IEvangelist/learning-blazor/actions/workflows/deploy-az-webapi.yml)

This repository is the application detailed in the "Learning Blazor: Build Single-Page Apps with WebAssembly and C#" O'Reilly Media book by David Pine.

Featuring:

- C# 10
- .NET 6
- Blazor WebAssembly
- Azure Functions — .NET
- ASP.NET Core Web API
- SignalR Core
- Polly
- Swagger / OpenAPI
- Twitter API
- OpenWeatherMap API

> [💡 Ideas](https://gist.github.com/IEvangelist/d43abafb64d207bff25e60769e986bbd) for the application to include.

repository: stvansolano/learning-blazor

repo_name: stvansolano/learning-blazor


text:
# Create Storage Bucket

## Open Cloud Storage Interface
* Go to [Google Cloud Storage](https://cloud.google.com//storage)
* Confirm that a default bucket has been created.

## Create Default Bucket (Optional)
If no default bucket exists, create one:

| Item        | Value        |
| ------------- |-------------|
| **Name:**         | <your project id>.appspot.com    |
| **Storage Class:**         | Standard    |
| **Location:**         | Asia, European Union, or United States    |

## Set permissions
* Select Context menu on right hand side (3 vertical dots)
* Choose *edit object default permissions*
* Set the default object permissions to:

| Entity        | Name        | Access  |
| ------------- |-------------| -----|
| Group         | allUsers    | Read |

*Why are we doing this?*
Becuase we want to serve up these images from our
    application, but by default our files are not shared.
    This step ensures that the iamges we upload are world
    readable by default.

repository: murremway/phpworkshop

path: /App Engine/Exercises/exercise1.md

repo_name: murremway/phpworkshop


text:
# Tokens

Displays the list of tokens and enables their management.

![Tokens](/images/ui/widgets/tokens.png)

### Tokens list

The widget displays the following information regarding each of the tokens:

- **Token** - Value of the token, masked with asterisks.
- **Description** - More details about the token.
- **Username** - Username of the user who created the token (only visible for admin users).
- **Expiration date** - Date of the token expiration.
- **Last used** - Date of last token usage.

#### Creating a token

1. Click **Create** in the Tokens widget.
2. (Optional) Provide a description for the token.
3. (Optional) Provide an expiration date for the token.
4. Click **Create** button.
5. (Optional) Show or copy the token value
   Bear in mind that after closing the `Create token` modal you won't be able to show or copy the token value.
6. Click **Close**.

#### Deleting a token

1. Click the Delete icon ![Delete icon](/images/ui/icons/delete-icon.png) on the far right.
2. Click **Yes**.

## Settings

- `Refresh time interval` - Time interval in which the widget’s data will be refreshed, in seconds. Default: 10 seconds.
- `Show expired tokens` - Defines if expired tokens should be listed.

repository: cloudify-cosmo/cloudify-stage

gha_language: TypeScript

repo_name: cloudify-cosmo/cloudify-stage


text:
# Scrollio: PHP 7 Framework

PHP 7 Application Framework utilizing Geppetto Database Object Relational Mapper.

## Notice

Scrollio is currently deployed in my production applications, so I can attest to its stability and utility. However, this repository is a work-in-progress, as I'm working to refactor the entire project and add a suite of unit tests for reliability, security and backward compatibility. **I do not recommend using this project until it reaches a stable state.**

# Running Tests with Docker

To simplify the testing process across multiple processes and system configurations, all of the tests can be run within Docker containers. You'll need to install the latest versions of Docker and Docker Compose first: [Docker website](https://www.docker.com).

To build and run, make the docker containers using the build script, and then use docker-compose to bring up the containers.

```bash
./build.sh
docker-compose up -d
```

Enter the container and run the tests using:

```bash
docker exec -it scrollio-tests /bin/bash
phpunit ./tests/
```

And when you're finished, bring down the docker containers.

```bash
docker-compose down
```

repository: Cybourgeoisie/Scrollio

repo_name: Cybourgeoisie/Scrollio


text:
blazer
=======

blazer is a node js library for BackBlaze B2. Note that this is currently a work
in progress and not all api is implemented yet.

Status:

0.0.3
 - implemented list_file_names, list_file_versions, get_file_info, hide_file,
   delete_file_version,
0.0.2
 - added b2session - helper to do automatic retries
 - added store management to help in persisting/reusing tokens
0.0.1
 - upload_file
 - create_bucket
 - list_bucket
 - authorize_account

# Installation

```console
    npm install --save blazer
```

# Usage
```javascript

const { authorize_account, createB2 } = require('blazer-b2');

/**
 * authorize_account is used to retrieve a b2 token which you can use
 * to create a b2Api via the b2 function. You can try to store this token once
 * retrieved an you can pass it to the b2 function to return an api
 */

//sample initialize to create a b2 Token

authorize_account(accountId, applicationKey).then ( token => {
    const b2 = createB2(token);

    //you can now use b2Api
    b2.upload_file(...);
    b2.create_bucket(...);

    //etc
});

```

## Buckets

### b2.create_bucket

    Create a B2 Bucket. The required argument is bucketName and bucketType.

```javascript
const bucketName = "myBucket";
const bucketType = "allPublic";

b2.create_bucket({bucketName, bucketType}).then( res => {
    console.log("bucket created ", res);
}).catch ( err => {
    console.log("error creating bucket");
});

````
    You can also use it directly, without passing from the b2 instance.

```javascript

const { buckets } = require('blazer-b2/buckets');
const { create_bucket } = buckets;

create_bucket(token)({bucketName, bucketType}).then( res => {
    console.log('bucket created ', res);
}).catch ( err => {
    console.log('error creating bucket');
});

```

### b2.list_bucket

## Upload

### b2.get_upload_url

### b2.upload

# B2 Session

You can use the createB2 function to manually call a b2 api but if you use blazer
from some sort of a server app, then it would be convenient to have some facility to help you
do automatic retries and token keys management. The createB2Session calls does that
exactly.

## createB2Session

To create a b2Session object, call createB2Session passing in your accountId and applicationKey

```javascript
    const { createB2Session } = require('blazer-b2');

    const b2Session = createB2Session( { accountId, applicationKey} );

    //use the api normally, b2session will automatically create token and
    //retry if needed
    b2Session.create_bucket(..)
```

## configuration

The second argument to createB2Session is a config file with the following attribute

### debug

if set to true, then more verbose log is outputted.

### maxRetry

the maximum number of calls when there is a failure before giving up.

### store

The store instance to use. By default it uses a memory store. You can pass your own
store object which is required to have the following attributes.

#### token

A function that returns the current token object.

#### persistToken

A function that accepts the newToken object and returns a promise which gets
resolved once the token has been persisted by the store.

#### invalidate

Invalidate the current active token. You need to set it to undefined such
that calls to token() will return falsy.

A sample implementation below

```javascript
const createMemoryStore = () => {
    var token;

    return {
        token() {
            return token;
        },
        persistToken(newToken) {
            token = newToken;
            return Promise.resolve(newToken);
        },
        invalidate() {
            token = undefined;
        }
    };
};

```

# Status

| Api Call        | Status        |
| --------------- |:-------------:|
| create_bucket   | done          |
| list_buckets    | done          |
| upload_file     | done          |
| authorized_account     | done          |
| get_upload_url     | done          |
| cancel_large_file     | pending          |
| delete_bucket     | done          |
| delete_file_version     | done          |
| download_file_by_id     | pending          |
| download_file_by_name     | pending          |
| finish_large_file     | pending          |
| get_file_info     | done          |
| get_upload_part_url     | pending          |
| hide_file     | done          |
| list_file_names     | done          |
| list_file_versions     | done          |
| list_parts     | pending          |
| list_unfinished_large_files     | pending          |
| start_large_file     | pending          |
| update_bucket     | done          |
| upload_part     | pending          |

# Requirements

Node 5+ is required at the moment.

# Testing

npm run test

# FAQ

## If I need to pass the b2 functions, do I need to bind them to b2?

No. Functions on the B2 object are not dependent on the this context. You will
be able to pass the member around without worrying on binding b2

```javascript
someHandler( b2.create_bucket.bind(b2) ) //<--- you don't need to do this
someHandler( b2.create_bucket ); //<-- works fine
```

repository: Cloudxtreme/blazer

repo_name: Cloudxtreme/blazer


text:
# bgfx-qt5-win
Bugy (!) Skeleton program to integrate Qt5 + bgfx on Windows platform
Note: it does not work as desired.

## How to build

### Build BGFX
You should clone bgfx git repository and its dependencies.
In some folder with writting permissions please run:
```
git clone https://github.com/bkaradzic/bgfx
git clone https://github.com/bkaradzic/bimg
git clone https://github.com/bkaradzic/bx
cd bgfx
..\bx\tools\bin\windows\genie --with-tools --with-dynamic-runtime --with-examples vs2019
```

If you have MSVC 2017 then use 'vs2017' keyword instead. It seems that genie supports other MSVC versions, but I did not try.
Open the generated bgfx\\.build\projects\bgfx.sln in Visual Studio IDE and switch build type to 'Release', switch architecture to 'x64'.
Build it (F7 key usually).

### Build or download QT5 for your compiler and platform
You should obtain QT5 library which is built for your MSVC compiler and platform.

### Build BGFX_QT project
You must have CMake installed (https://cmake.org/).

Clone this repo (type in the previous cmd console):
```
cd ..
git clone https://github.com/PetrPPetrov/bgfx-qt5-win
cd bgfx-qt5-win
mkdir build
cd build
cmake-gui ..
```

Press 'Configure' button. CMake GUI will shows error that QT_ROOT is not specified:
```
Need to specify QT_ROOT
```

Using CMake GUI UI elements you need to specify path to your QT5 library. When press 'Configure' button again.
Then you need to specify BGFX_ROOT, BIMG_ROOT and BX_ROOT (where you cloned them previously).
Press 'Configure' button again. When 'Configuring done' you need to press 'Generate' button, then 'Open Project'.
The BGFX_QT project will be opened in VS IDE.
Please select Release (or RelWithDebInfo) configuration and build it (F7 key usually).
Select active project 'bgfx_qt' and start it (Ctrl-F5 key usually).
Enjoy cube from BGFX framework in QT5 window!


text:
# Traffic-sign-recognition

## Overview

Traffic Sign Recognition can be staged into two sections: Traffic Sign Detection and Traffic Sign Classification. In the Detection stage we aim to extract possible candidates (or regions) which contain a traffic sign (in this part, we do not care what the sign might be). In the Classification stage, we go over each Region of Interest (RoI) extracted previously and try to identify a traffic sign (which might not be in that RoI at all). The dataset.

For the dataset, images from a driving car, training and testing images for a set of signs can be found [here](https://drive.google.com/drive/u/0/folders/0B8DbLKogb5ktTW5UeWd1ZUxibDA).

The repository contains following files and folders:

- traffic_sign_recognition.pdf - Project report with detials.
- Final_TSR_detect.py - python code for running the traffic sign recognition algorithm
- dataset.pkl - pickle file containing the trained model using SVM
- templates - consists of different signs as templates, to be used for classification.

## Output Video:

The google drive link for sample output video is provided here:

[Video](https://drive.google.com/open?id=1EfDC4rpTF3HhwQKok_FVIE2kgiWOaShD)

## Note:

Kindly change line number 44, according to the location of the downloaded dataset from link provided in overview.


text:
mkmetadata can read information from three optional config files when autofilling metadata file. Currently only mandatory fields in metadata (see FAQ) is supported.
The basic format for each config file is:
```
ATTRIBUTE="value"
```
For example, a sample user_info.config file may look like this:
```
LAST_NAME="Franklin"
FIRST_NAME="Rosalind"
TELEPHONE="1234567890"
<EMAIL_ADDRESS>LABORATORY="Franklin Lab"
CENTER="King's College London"
ADDRESS="London WC2R 2LS, UK"
```

mkmetadata looks for ```analysis_info.config``` and ```project_info.config``` under each analysis and project folder when scanning files.
Thus, if you wish to use config files to fill out metadata rather than mannually input them afterwards, you can simply make a config file and put it under corresponding project/analysis folder.

A sample project_info.config may look like this:
```
TITLE="Unveiling DNA structure"
ALIAS="dsDNA"
DESCRIPTION="Unprecedented discovery of code of life"
CENTER="King's College London"
TAXID="9606"
```

A sample analysis_info.config may look like this:
```
TITLE="X Ray Crystallography of Deoxyribonucleic acid"
DESCRIPTION="Using X Ray Crystallography reveals structure of Deoxyribonucleic acid"
ALIAS="CrystalDNA"
EXPERIMENT_TYPE=""
REFERENCE=""
REFMD5=""
```
Below is a list of analysis attributes currently allowed in metadata file:
```
(Required)
TITLE=""
ALIAS=""
DESCRIPTION=""
EXPERIMENT_TYPE=""
REFERENCE=""
REFMD5=""
(Optional)
PLATFORM=""
SOFTWARE=""
PIPELINE=""
IMPUTATION=""
PHASING=""
CENTER=""
DATE=""
ANAL_LINK=""
RUN=""
```

And here is a list of project attributes currently allowed in metadata file:
```
(required)
TITLE=""
ALIAS=""
DESCRIPTION=""
CENTER=""
TAXID=""
(Optional)
PUBLICATION=""
PARENT=""
CHILD=""
PEER=""
PRJ_LINK=""
HOLD_DATE=""
COLLABORATORS=""
STRAIN=""
BREED=""
BROKER=""
```

gha_language: Python


text:
The first time, you can run `google-drive-ocamlfuse` without parameters:

    google-drive-ocamlfuse

This command will create the default application directory (`~/.gdfuse/default`), containing the configuration file `config` (see the [[Configuration]] page) for more details about configuration). And it will start a web browser to obtain authorization to access your Google Drive. This will let you modify default configuration before mounting the filesystem.

Then you can choose a local directory to mount your Google Drive (e.g.: `~/GoogleDrive`).

Create the mount point, if it doesn't exists:

    mkdir ~/GoogleDrive

Then you can mount the filesystem:

    google-drive-ocamlfuse ~/GoogleDrive

If you have more than one account, you can run:

    google-drive-ocamlfuse -label label [mountpoint]

Using `label` to distinguish between different accounts. The program will use the directory `~/.gdfuse/label` to host configuration, application state, and file cache. No file is shared among different accounts, so you can have a different configuration for each one.

To unmount the filesystem, issue this command:

    fusermount -u ~/GoogleDrive

Options
-------

Run `google-drive-ocamlfuse -help` to get all the command options available. To find more details about `-o` mount options, you can refer to this [page](http://manpages.ubuntu.com/manpages/zesty/man8/mount.fuse.8.html). Non-standard mount option `gdfroot` can be used to specify a custom path to the configuration directory (default is `$HOME/.gdfuse`).

#### Since 0.7.5
`-docsmode`: This option can be used to quickly set Google Docs config options. Supported values are:
* `libreoffice`: sets
  * `download_docs=true`
  * `document_format=odt`
  * `drawing_format=png`
  * `form_format=zip`
  * `presentation_format=odp`
  * `spreadsheet_format=ods`
  * `apps_script_format=json`
* `msoffice`: sets
  * `download_docs=true`
  * `document_format=docx`
  * `drawing_format=png`
  * `form_format=zip`
  * `presentation_format=pptx`
  * `spreadsheet_format=xlsx`
  * `apps_script_format=json`
* `desktop`: sets
  * `download_docs=true`
  * `document_format=desktop`
  * `drawing_format=desktop`
  * `form_format=desktop`
  * `presentation_format=desktop`
  * `spreadsheet_format=desktop`
  * `apps_script_format=desktop`
* `off`: sets
  * `download_docs=false`

#### Since 0.7.11
* `-serviceaccountpath`: This option can be used to specify the path of the JSON file containing the credentials of a service account
* `-serviceaccountuser`: This option can be used to specify the email of a G Suite user to impersonate (with the service account specified by the `-serviceaccountpath` option)

#### Since 0.7.12
* `-log_to`: Specifies where the logs are going to be written. It can be `stdout`, `stderr`, or an absolute path
* `-scope`: Specifies a custom Drive API [scope](https://developers.google.com/drive/api/v3/about-auth#OAuth2Authorizing)
* `-redirect_uri`: Specifies a custom `redirect_uri` for the OAuth2 [flow](https://developers.google.com/identity/protocols/OAuth2InstalledApp#step-2-send-a-request-to-googles-oauth-20-server)

#### Since 0.7.13
* `-device`: Use [OAuth2 for Devices](https://github.com/astrada/google-drive-ocamlfuse/wiki/OAuth2-for-Devices) authorization flow

repository: pianomanx/google-drive-ocamlfuse

branch_name: refs/heads/beta

gha_language: OCaml

repo_name: pianomanx/google-drive-ocamlfuse


text:
## CHANGELOG

All notable changes to this project will be documented in this file.

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

## [Unreleased]

- Validating enode on REGULAR_DIRECTORY.md
- Validating enode on online hosts

## [2020.06.02]

### Added

- Dockerfile build with tags in Dockerhub
- First version of the validator, public IP, node in Europe, valid json on files

repository: javaguirre/node-t-checker

repo_name: javaguirre/node-t-checker


text:
# 📖 Week 4 Resources

## Gluon Fundamentals

- Ndarray Documentation NumPy: https://numpy.org/doc/stable/reference/arrays.ndarray.html
- Ndarray Apache MXNet Documentation: https://mxnet.apache.org/versions/1.7.0/api/python/docs/tutorials/packages/ndarray/02-ndarray-operations.html
- How To Train Neural Networks For Image Classification: https://medium.com/@sandy_lee/how-to-train-neural-networks-for-image-classification-part-1-21327fe1cc1
- Kaggle Fasion MNIST Dataset: https://medium.com/@sandy_lee/how-to-train-neural-networks-for-image-classification-part-1-21327fe1cc1
- Zalando Research Fashion MNIST: https://research.zalando.com/welcome/mission/research-projects/fashion-mnist/

path: /Week 4/README.md


text:
# MS Acces + Spring Boot + Hibernate

A sample project which utilizes MS Access with Hibernate 5 and Spring Boot.

Please see [this Medium<EMAIL_ADDRESS>for explanation of _why_ anyone would do this.

This is only a bare-mininum implementation, and includes a sample database. Use `gradlew bootRun` to run the application.

**To run this example, please insert the _absolute_ paths (e.g. "C:/git/msaccess__hibernate_spring/test.accdb") to the included test.accdb in this file:**

`src\main\java\comp\project\backend\jpa\config\DataSourceConfig.java`

This project includes both examples of standard Spring queries (PartController) but also features examples of how (not) to do SQL queries (ParameterController).


text:
# Module 2: Genome Assembly Submissions

## Introduction

Genome assemblies including metagenomes can be submitted to the European Nucleotide Archive (ENA)
using the [Webin command line submission interface](cli_01.html) with `-context genome` option.

A genome assembly consists of:
- General assembly information
   - Study accession or unique name (alias)
   - Sample accession or unique name (alias)
   - Assembly program
   - Sequencing platform
   - Minimum gap length
   - Molecule type (genomic DNA, genomic RNA or viral cRNA)
   - Coverage
- Contig sequences (if any)
- Scaffold sequences (if any)
- Chromosome sequences (if any)
- Unlocalised sequences (if any)
- Functional annotation (optional)

Chromosomes include organelles (e.g. mitochondrion and chloroplast), plasmids and viral segments.

The following picture illustrates the stages of the genome assembly submission process:

![Submission process](images/webin-cli_01.png)

## Stage 1: Pre-register study and sample

Each submission must be associated with a pre-registered study and a sample.

Genome assemblies except metagenomes are uniquely identified by a study and a sample. When assemblies
are updated they must be re-submitted with the same study and sample as in the original submission.

Instructions for interactive submitters:
- [Register a Study](mod_02.html)
- [Register a Sample](mod_03.html)

Instructions for programmatic submitters:
- [Register a Study](prog_02.html)
- [Register a Sample](prog_03.html)

## Stage 2: Prepare the files

The set of files that are part of the submission are specified using a manifest file.
The manifest file is specified using the `-manifest <filename>` option.

A genome assembly submission consists of the following files:

- 1 manifest file
- 0-1 fasta files
- 0-1 AGP files
- 0-1 flat files
- 0-1 chromosome list file
- 0-1 unlocalised list file

The following files are mandatory:

- 1 manifest file must be provided.
- 1 fasta or 1 flat file must be provided.
- If there are AGP sequences then 1 AGP file must be provided.
- If there are chromosomes then 1 chromosome list file must be provided.
- If there are unlocalised sequences then 1 unlocalised list file must be provided.

### Sequence names

Sequences must have a unique name within the submission that is provided in the fasta, AGP or flat files.
It is essential that the sequence names are unique and used consistently between files.

For example, the chromosome list file must refer to the chromosome sequences using the unique sequence names.
Similarly, an AGP file must refer to scaffolds or contigs using the unique sequence names.

### Manifest file

The manifest file has two columns separated by a tab (or any whitespace characters):
- Field name (first column): case insensitive field name
- Field value (second column): field value

The following metadata fields are supported in the manifest file:

- STUDY: Study accession or unique name (alias)
- SAMPLE: Sample accession or unique name (alias)
- ASSEMBLYNAME: Unique assembly name
- COVERAGE: The estimated depth of sequencing coverage
- PROGRAM: The assembly program
- PLATFORM: The sequencing platform
- MINGAPLENGTH: Minimum length of consecutive Ns to be considered a gap (optional)
- MOLECULETYPE: 'genomic DNA', 'genomic RNA' or 'viral cRNA' (optional)

Please see further below for validation rules affecting some of these fields.

The following file name fields are supported in the manifest file:

- FASTA: sequences in fasta format
- FLATFILE: sequences in EMBL-Bank flat file format
- AGP: Sequences in [AGP format](https://www.ncbi.nlm.nih.gov/assembly/agp/AGP_Specification/)
- CHROMOSOME_LIST: list of chromosomes
- UNLOCALISED_LIST: list of unlocalised sequences

For example, the following manifest file represents a genome assembly consisting of contigs
provided in one fasta file:

```
STUDY   TODO
SAMPLE   TODO
ASSEMBLYNAME   TODO
COVERAGE   TODO
PROGRAM   TODO
PLATFORM   TODO
MINGAPLENGTH   TODO
MOLECULETYPE   genomic DNA
FASTA   genome.fasta.gz
```

### Other files

Other genome assembly data files are described in [Genome Assembly Data Formats](format_02.html).

## Stage 3: Validate and submit the files

Files are validated, uploaded and submitted using the [Webin command line submission interface](cli_01.html).
Please refer to the [Webin command line submission interface](cli_01.html) documentation for more information
about the submission process.

## Assigned accession numbers

Once the genome assembly has been submitted a analysis (ERZ) accession number is immediately assigned and returned to the
submitter by the Webin command line submission interface.

The purpose of the ERZ accession number is for the submitter to be able to refer to their submission within the
Webin submission service. For example, the submitter can retrieve the assigned genome assembly and sequence accessions
from the [Webin submissions portal](prog_11.html) or from the [Webin reports service](prog_10.html) using
the ERZ accession number.

For genome assemblies, long term stable accession numbers that can be used in publications are:

- Study accession (PRJ) assigned at time of study registration.
- Sample accession (SAM) assigned at time of study registration.
- Sequence accession(s) assigned once the genome assembly submission has been fully processed by ENA.
- Genome assembly accession (GCA) assigned once the genome assembly has been fully processed by ENA.

Submitters can retrieve the genome and sequence accession numbers from the [Webin submissions portal](prog_11.html)
or from the [Webin reports service](prog_10.html). These accession numbers are also send to the submitters by
e-mail.

## Validation rules

### Sample and study validation

- Sample and study (BioProject) pair must be unique for an assembly (except metagenomes).
- Sample taxonomic classification must be species level or below (or equivalent) within the NCBI taxonomy.

### Assembly name validation

Assembly names must:
- match the pattern: ^[A-Za-z0-9][A-Za-z0-9 _#\-\.]*$
- be shorter than 100 characters

### Chromosome name validation

Chromosome names must:
- match the pattern: ^\[A-Za-z0-9\]\[A-Za-z0-9_#\-\.]*$
- be shorter than 33 characters
- not contain any of the following as part of their name (case insensitive):
    - 'chr'
    - 'chrm'
    - 'chrom'
    - 'chromosome'
    - 'linkage group'
    - 'linkage-group'
    - 'linkage_group'
    - 'plasmid'
- be unique within an assembly

### Sequence validation rules

Sequences must:
- have unique names within an assembly
- be at least 20bp long
- not have terminal Ns
- consist of bases: 'a','c','g','t','u','b','d','h','k','m','n','r','s','v','w','y'

### Assembly updates

Assembly updates must:
- use the same sample and study pair as was used in the initial assembly submission
- not remove any chromosomes

## Automatic fixes

### CDS feature

- Feature location is made 5' partial if the /codon_start is 2 or 3.
- Feature location is made 5' partial if the /translation does not start with a start codon.
- Feature location is made 3' partial if the /translation does not end with a stop codon.
- Feature location is made 3' and 5' partial if the location span is not a multiple of three.
- Feature location has 3' partiality removed if the /translation ends with a stop codon.
- Feature is made /pseudo and the /translation is removed if the /translation contains internal stop codons.


text:
---
title: "Algorithm"
date: 2018-01-27T15:42:17+01:00
weight: 20
---

### Mandrake

Mandrake combines the fast pairwise genetic distance methods used in **[pairsnp](https://github.com/gtonkinhill/pairsnp-cpp)** and **[poppunk](https://github.com/johnlees/pp-sketchlib)** with the Stochastic Cluster Embedding algorithm to provide fast and informative dimension reduction plots of genetic population structure.

#### Stochastic Cluster Embedding

Neighbor Embedding (NE) that aims to preserve pairwise similarities between data items has been shown to yield an effective principle for data visualization. However, even the currently best NE methods such as Stochastic Neighbor Embedding (SNE) may leave large-scale patterns such as clusters hidden despite strong signals being present in the data. Stochastic Cluster Embedding (SCE) generalizes SNE by using non-normalized Kullback-Leibler divergence with a scale parameter. In this family, much better cluster visualizations often appear with a scale parameter value different from the one corresponding to SNE. Experimental results have demonstrated that this method consistently improves the visualization of data clusters compared with the state-of-the-art NE approaches. The original code for the SCE algorithm can be found at https://github.com/rozyangno/sce.

repository: gtonkinhill/mandrake-web

repo_name: gtonkinhill/mandrake-web


text:
Timoun
======

Tests: [![Circle CI](https://circleci.com/gh/andygimma/timoun.svg?style=svg)](https://circleci.com/gh/andygimma/timoun)

## Open Source Resource Map for Children's Services in Haiti

A partnership between Catholic Relief Services (CRS), Institut du Bien-Être Social et de Recherches (IBESR), the Government University Department of Social Work, VisionLink and CrisisCleanup.org to map projects and services, with a focus on mental health for vulnerable children and their families in Haiti. "Timoun" is Haitian Creole for "children."

### Set up your environment
1. Download Google App Engine for Python. https://cloud.google.com/appengine/downloads

    We are using Python 2.7 and Google App Engine version 1.9.17

2. Clone this repository

    $ cd google_appengine && git clone https://github.com/andygimma/timoun.git

3. Set up virtualenv

    $ pip install virtualenv

    $ virtualenv timoun

    $ source timoun/bin/activate

    To deactivate virtualenv

    $ deactivate

4. Install dependencies from requirements.txt

    $ pip install -r requirements.txt

5. Run the application

    $ python dev_appserver.py timoun

6. Run tests

    $ lettuce /tests/features

### Testing
Timoun employs behavioral testing, and uses [lettuce_webdriver](https://pypi.python.org/pypi/lettuce_webdriver). Docs for terrain.py setup can be found [here](http://lettuce.it/reference/terrain.html).

To test the application

    $ lettuce /tests/features

## Contribute

### Developers

Check out our issues list. If you see something you think you can solve, create a branch in the format Issue-<issue-#>/<description>. When you feel the code is well-written and well-tested, send a pull request.

### Testing

Are you good at making Lettuce tests and want to add more coverage? Create a branch in the format tests/<description>. When you feel the code is well-written, send a pull request.

### Style Guidelines

Follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) guidelines.

repository: StraubCreative/timoun

repo_name: StraubCreative/timoun


text:
# vim-cmake-syntax

Vim syntax highlighting rules for modern CMakeLists.txt.

Original code from KitWare.
First hosted on Github by Nicholas Hutchinson.
Extended and modified by Patrick Boettcher and contributors

Keywords updated with 3.9.20170830-ge0713

The code of this repository is integrated in and released with CMake and is pulled
into the official cmake-distribution "from time to time".

## Installation

With Pathogen

    cd ~/.vim/bundle
    git clone git://github.com/pboettch/vim-cmake-syntax.git

With Vundle

    " inside .vimrc
    Plugin 'pboettch/vim-cmake-syntax'

## Test

There is a ever growing test-suite based on ctest located in test/

    cd <build-dir-where-ever-located>
    cmake path/to/this/repo/test
    ctest

repository: dmerejkowsky/vim-cmake-syntax

repo_name: dmerejkowsky/vim-cmake-syntax