text:
name: inverse
layout: true
class: center, middle, inverse
---
name: cover
#An Improved Acquaintance Immunization Strategy for Complex Network
##Li Chen, Dongyi Wang
[Journal of Theoretical Biology(SCI,IF:2.116),Volume 385, 21 November 2015, Pages 58-65]
.footnote[ Go to [Download](http://dx.doi.org/10.1016/j.jtbi.2015.07.037) Use Up/Down Key to turn page.]
---
name: Background
layout: false
# Classic immunization strategies

## Random immunization strategy immunizes a node randomly
- High immunization threshold

## Target immunization strategy immunizes a node with most neighbor nodes
- Based on global information

## Acquaintance immunization strategy randomly chooses a node and randomly immunizes one of its neighbor nodes
- Blindness

---
name: Task
layout: false
# Problem

##Existing improvements:

a) existing improvements to acquaintance immunization(common neighbor, threaded-tree, double immunization)
- static and whole scale

b) determine local or time-varying importance ranking
- fail to deploy the benefits of acquaintance immunization strategy

##Need an improved strategy which is more adaptive to most network topology and achieve a better balance between cost and effectiveness.

---
name: Our_method
layout: false

  # Our method

##Combining these two benefits
- acquaintance immunization (strong adaptability using little information)
- local and time-varying information (accuracy during immunization)

##Using NSI (Network structure index )

---
name: NSI
layout: false
#NSI
.div6[
##Procedure
- Mark layer number
- Find value and connectivity
- Calculate NSI to reflect  value of  nodes

![img1](/thinkcmfx/tpl/simplebootx/Public/simpleboot/remark/acquaintance/nsieq.jpg "NSI equation")
- e is the emphasis parameter, L is the possible damage through connections, T is layers

]
.div6[
![img1](/thinkcmfx/tpl/simplebootx/Public/simpleboot/remark/acquaintance/nsi.jpg "NSI")
]

---
name:simulation
#Simulation result
.div4[
##Effect
- protecting 14.895 more nodes
- Rising slope decreased
]
.div8[
![img1](/thinkcmfx/tpl/simplebootx/Public/simpleboot/remark/acquaintance/simu.jpg "Application circumstance")
]
.clearfix[
.center[ ]
]
.center[The average number of 200 times simulations of infected node number during 100 immunization steps using In-depth Acquaintance Immunization strategy and Original one.]

---
name: more
layout: false
#More simulations
- GDTANG network with various connection possibilities

- Random graph with various scale

- Random graph with various wiring probabilities

- WS-Small World Model with various replacement probability

- Scale free model with various exponent of the degree distribution

---
name: conclusion
layout: false
#Conclusion

- In GDTang and Scale-free network models, its performance is only second to target immunization

- In most random graph, it is even the best strategy

- In WS-Small World Model, it is not effective when network is highly regular

- in general, it has obvious advantage over the original acquaintance strategy (protects more nodes and control spread rate)

---
class: center, middle, inverse
#End

repository: clatfd/thinkcmf

repo_name: clatfd/thinkcmf


text:
---
title: Node Condition Teardown Pressure & Teardown Priority
authors:
  - "@poelzi"
owning-sig: sig-scheduling
participating-sigs:
reviewers:
  - TBD
  - "@alicedoe"
approvers:
  - TBD
  - "@oscardoe"
editor: TBD
creation-date: 2019-07-15
last-updated: 2019-07-24
status: provisional
---

# Node Condition: Teardown Pressure & Teardown Priority

Make the kubernetes-scheduler aware of teardown costs of containers and prevent overload of nodes.

## Table of Contents

<!-- toc -->
- [Release Signoff Checklist](#release-signoff-checklist)
- [Summary](#summary)
- [Motivation](#motivation)
  - [Goals](#goals)
  - [Non-Goals](#non-goals)
- [Proposal](#proposal)
  - [User Stories [optional]](#user-stories-optional)
    - [Story 1](#story-1)
    - [Story 2](#story-2)
  - [Implementation Details/Notes/Constraints [optional]](#implementation-detailsnotesconstraints-optional)
  - [Risks and Mitigations](#risks-and-mitigations)
- [Design Details](#design-details)
  - [Test Plan](#test-plan)
  - [Graduation Criteria](#graduation-criteria)
    - [Examples](#examples)
      - [Alpha -> Beta Graduation](#alpha---beta-graduation)
      - [Beta -> GA Graduation](#beta---ga-graduation)
      - [Removing a deprecated flag](#removing-a-deprecated-flag)
  - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
  - [Version Skew Strategy](#version-skew-strategy)
- [Implementation History](#implementation-history)
- [Drawbacks [optional]](#drawbacks-optional)
- [Alternatives [optional]](#alternatives-optional)
- [Infrastructure Needed [optional]](#infrastructure-needed-optional)
<!-- /toc -->

## Release Signoff Checklist

**ACTION REQUIRED:** In order to merge code into a release, there must be an issue in [kubernetes/enhancements] referencing this KEP and targeting a release milestone **before [Enhancement Freeze](https://github.com/kubernetes/sig-release/tree/master/releases)
of the targeted release**.

For enhancements that make changes to code or processes/procedures in core Kubernetes i.e., [kubernetes/kubernetes], we require the following Release Signoff checklist to be completed.

Check these off as they are completed for the Release Team to track. These checklist items _must_ be updated for the enhancement to be released.

- [ ] kubernetes/enhancements issue in release milestone, which links to KEP (this should be a link to the KEP location in kubernetes/enhancements, not the initial KEP PR)
- [ ] KEP approvers have set the KEP status to `implementable`
- [ ] Design details are appropriately documented
- [ ] Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
- [ ] Graduation criteria is in place
- [ ] "Implementation History" section is up-to-date for milestone
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
- [ ] Supporting documentation e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes

**Note:** Any PRs to move a KEP to `implementable` or significant changes once it is marked `implementable` should be approved by each of the KEP approvers. If any of those approvers is no longer appropriate than changes to that list should be approved by the remaining approvers and/or the owning SIG (or SIG-arch for cross cutting KEPs).

**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.

[kubernetes.io]: https://kubernetes.io/
[kubernetes/enhancements]: https://github.com/kubernetes/enhancements/issues
[kubernetes/kubernetes]: https://github.com/kubernetes/kubernetes
[kubernetes/website]: https://github.com/kubernetes/website

## Summary

For the current implementation of the kubernetes scheduler the teardown phase of the container, which may consist of removing a large amount of files, is considered free. This may result in a buildup of containers in termination phase which will render a node unusable due to io congestion.

This KEP proposes a teardown pressure condition that is triggered when the termination load reaches a critical threshold signaling the scheduler to spare the node any additional workload until the backlog is resolved.

Additionally, to help distribute load better, a TeardownPriority classifier is suggested, that negatively weighs the number of
containers under removal into the node weight.

## Motivation

While trying to stabilize a very particular workload, we where able to find a corner case in the kubernetes scheduler that can cause runaway overload of one or more nodes, seriously impacting the cluster performance.
The corner case very much depends on the specific hardware setup and is not always easy triggerable, but in general results in a buildup of containers in termination state on one or multiple nodes until they become unresponsive.

  1. After starting of the container, download a very large archive with 10ks of files.
  2. Do something very minor, short lived
  3. Exit

The container then enters the termination phase in which docker removes the files from the overlay filesystem. If the removal process is to slow to finish before next container enters the termination phase, a buildup of those containers can occure.
We found while stressing a [elasticio] workload, that some nodes accumulated 70 containers in termination state, rendering them unusable. Kubernetes-scheduler still scheduled the pods on this node while other nodes had very little load.

This condition happens more often if the filesystem docker is running on is network based.

[elasticio]: https://elastic.io

### Goals

Prevent buildup of containers in termination process and more equally distribution of load in corner cases.

## Proposal

We propose the "Teardown Pressure" condition as a node state that can be set by the kubelet when a threshold of containers in termination state is reached. Unlike other conditions, this will not cause the eviction manager to trigger
pod removal, this condition only notifies the scheduler that the node should no receive any additional workload until the backlog is resolved. Additionally the kubelet should report the number of containers under removal in the RuntimeStats so the scheduler can make a more informed decision.

* The RuntimeStatus message between container-manager and kublet gets enhanced by a ContainersUnderRemoval integer.
* Kubelet gets enhanced by MaxTeardown config variable which will trigger the `NodeConditionType "TeardownPressure"` if the runtime state exceeds the threshold.
* Kubernetes-Scheduler respects the `TeardownPressure` condition in the sense that no new work is scheduled on the node until the flag condition is `false` again.
* Kubernetes-Scheduler gets a teardown priority which negatively weighs the node depending on the number of containers under removal.

### User Stories

### Implementation Details/Notes/Constraints [optional]

We implemented the proposed KEP in this [pull request].
We iterated to this relatively slim design to prevent this runaway condition from occuring. Implementing `MaxTeardown` as config variable allows the user to adjust the value to its needs, or even disabling the mechanism by setting it to `0`.
The new teardown default priority class, the average user should see small speedup in certain batch job loads through better spreading. This phenomena is less frequent in clusters of 100+ nodes.

[pull request]: https://github.com/kubernetes/kubernetes/pull/80085

### Risks and Mitigations

If the MaxTeardown value is set to low, the node may flap it's state very often. The default value is set to a value that should not concern normal operation.

## Design Details

### Test Plan

**Note:** *Section not required until targeted at a release.*

Since runaway effects are highly dependant on the hardware setup, only unit tests seem feasible.

All code is expected to have adequate tests (eventually with coverage expectations).
Please adhere to the [Kubernetes testing guidelines][testing-guidelines] when drafting this test plan.

[testing-guidelines]: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md

### Upgrade / Downgrade Strategy

The `TeardownPressure` will only be considered if all components are updated. Any mixed combination will cause no usage of the condition or negative impact.

### Version Skew Strategy

If applicable, how will the component handle version skew with other components? What are the guarantees? Make sure
this is in the test plan.

Consider the following in developing a version skew strategy for this enhancement:
- Does this enhancement involve coordinating behavior in the control plane and in the kubelet? How does an n-2 kubelet without this feature available behave when this feature is used?
- Will any other components on the node change? For example, changes to CSI, CRI or CNI may require updating that component before the kubelet.

## Implementation History

Major milestones in the life cycle of a KEP should be tracked in `Implementation History`.
Major milestones might include

- the `Summary` and `Motivation` sections being merged signaling SIG acceptance
- the `Proposal` section being merged signaling agreement on a proposed design
- the date implementation started
- the first Kubernetes release where an initial version of the KEP was available
- the version of Kubernetes where the KEP graduated to general availability
- when the KEP was retired or superseded

## Alternatives

The kubelet could report back all containers together with the 'RemovalInProgress' flag set (currently it sends a filtered list). This information together with local limits could be taken into account. This approach was first tried, but the much leaner approach here was then developed.

repository: poelzi/enhancements

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: poelzi/enhancements


text:
# Jupyter Security Bi-weekly Meeting

## January 3, 2023

| Name               | affiliation| username         |
| -------------------| -----------| -----------------|
| Jason Weill        | AWS        | @JasonWeill      |
| Matthias Bussonnier| Quansight  | @carreau         |
| Rollin Thomas      | NERSC      | @rcthomas        |
| Sritej Attaluri    | Bloomberg  | @attaluris       |
| Rick Wagner        | UCSD       | @rpwagner        |
| Jason Grout        | Databricks | @jasongrout      |

Note: Jason still works at AWS, but per corporate social media policy, I changed my GitHub username to not have `aws` in it anymore

- Vulnerability reporting
	- We've turned on public reporting of vulnerabilities in IPython and [Jupyter Security](https://github.com/jupyter/security/security/advisories/new)
	- Workflow is: person submits a report, an admin accepts the report and creates a "draft"
	- Reports are per-repo. It doesn't seem like there is a way to consolidate at the org level
	- It appears that only admin permissions can see the draft vuln reports
	- How to track reports?
		- We can have a single place where reports are done, so the security team can track it and open appropriate reports in subprojects
		- We can have a per-repo or per-subproject place to report, with a reporting structure in place between projects to track vulnerabilities
		- This process decision should be made at the SSC level in cooperation with other subprojects
		- Even if we have per-subproject reporting, we can have a catch-all reporting place in jupyter/security
- SSC formation
	- SSC reps are known at this point, and needs to self-organize at this point
	- EC meetings are on Monday. Perhaps the SSC members can be invited so we can all discuss how to launch these councils
	- https://deploy-preview-712--jupyter-github-io.netlify.app/ - preview of website update listing the SSC in the About page
-

repository: jupyter/security

branch_name: refs/heads/main

repo_name: jupyter/security


text:
# Example dns-and-glb

This example is used to create DNS Records, GLB, Origin Pools, Monitors using existing Instance and Domain.

## Example Usage

```terraform
module "cis-domain" {
  source                = "../../modules/domain"
  is_cis_instance_exist = true
  service_name          = var.service_name
  is_cis_domain_exist   = true
  domain                = var.domain
  record_set            = local.record_set
}
module "cis-glb" {
  source             = "../../modules/glb"
  cis_id             = module.cis-domain.cis_id
  domain_id          = module.cis-domain.domain_id
  glb_name           = var.glb_name
  fallback_pool_name = var.fallback_pool_name
  region_pools       = local.region_pools
  origin_pools       = local.origin_pools
  monitors           = local.monitors
}

```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name                                    | Description                           | Type   | Default | Required |
|-----------------------------------------|---------------------------------------|--------|---------|----------|
| ibmcloud_api_key           | IBM-Cloud Api Key | string | n/a     | yes      |
| region           | IBM Cloud region | string | n/a     | yes      |
| service_name           | Name of the CIS instance | string | n/a     | yes      |
| domain           | Domain name of CIS Instance | string | n/a     | yes      |
| glb_name                          | The Name of GLB that has to be created.                                  | string   | n/a     |yes    |
| fallback_pool_name   | The Name of the fallback Pool. This name should be chosen from the origin pools that are been created in this module| string   | n/a     | yes     |

## Local Variables

| Name                                    | Description                           | Type   | Default | Required |
|-----------------------------------------|---------------------------------------|--------|---------|----------|
| record_set           | List of objects of DNS Records. If not provided, Records will not be created. | list(obj) | n/a     | no      |
| region_pools         | Region Pools of CIS Global Load Balancer            | list(obj) | []     | no       |
| origin_pools           | List of objects of origin pools. If not provided, pools will not be created. | list(obj) | n/a     | no      |
| monitors     | List of objects of health checkss. If not provided, healthchecks/monitors will not be created. | list(obj) | n/a | no  |

### record_set Object

| Name                                    | Description                           | Type   | Default | Required |
|-----------------------------------------|---------------------------------------|--------|---------|----------|
| name           | The name of a DNS record. | string | n/a     | yes      |
| type           | The type of the DNS record to be created.| string | n/a     | yes      |
| content           | The (string) value of the record, e.g. "<IP_ADDRESS>". Conflicts with `data` | string | n/a     | no      |
| data           | Map of attributes that constitute the record value. Only for LOC, CAA and SRV record types. Find the keys of map in below table. This attribute conflicts with `content`| map | n/a     | yes      |
| ttl           | TTL of the record. It should be automatic(i.e ttl=1) if the record is proxied. Terraform provider takes ttl in unit seconds. Therefore, it starts with value 120. | number | n/a     | no      |
| priority           | The priority of the record. Mandatory field for SRV record type. | number | n/a     | no      |
| proxied           | Whether the record gets CIS's origin protection | bool | n/a     | no      |

### data MAP

| Name                                    | Description                           | Type   | Default | Required |
|-----------------------------------------|---------------------------------------|--------|---------|----------|
| weight |  The weight of distributing queries among multiple target servers. Mandatory field for SRV record | number| n/a|no|
| port |  The port number of the target server. Mandatory field for SRV record.| number| n/a|no|
| service |  The symbolic name of the desired service, start with an underscore (\_). Mandatory field for SRV record.| number| n/a|no|
| protocol |  The symbolic name of the desired protocol. Madatory field for SRV record.| number| n/a|no|
| altitude |  The LOC altitude. Mondatory field for LOC record.| number| n/a|no|
| size |  The LOC altitude size. Mondatory field for LOC record.| number| n/a|no|
| lat_degrees |  The LOC latitude degrees. Mondatory field for LOC record.| number| n/a|no|
| lat_direction |  The LOC latitude direction ("N", "E", "S", "W"). Mondatory field for LOC record.| string | n/a|no|
| lat_minutes |  The LOC latitude minutes. Mondatory field for LOC record.| number| n/a|no|
| lat_seconds |  The LOC latitude seconds. Mondatory field for LOC record.| number| n/a|no|
| long_degrees |  The LOC Longitude degrees. Mondatory field for LOC record.| number| n/a|no|
| long_direction |  The LOC longitude direction ("N", "E", "S", "W"). Mondatory field for LOC record.| string| n/a|no|
| long_minutes |  The LOC longitude minutes. Mondatory field for LOC record.| number| n/a|no|
| long_seconds |  The LOC longitude seconds. Mondatory field for LOC record.| number| n/a|no|
| precision_horz |  The LOC horizontal precision. Mondatory field for LOC record.| number| n/a|no|
| precision_vert |  The LOC vertical precision. Mondatory field for LOC record.| number| n/a|no|
| priority |  The priority of the record| number| n/a|no|

### region_pools Object

| Name                                 | Description           | Type   | Default | Required |
|--------------------------------------|-----------------------|--------|---------|----------|
| region                                 | Region of the Pool | string | n/a     | no       |
| pool_names                             | List of the pool names to be attached to the specified region. These names should be chosen from the origin pools that are been created in this module | list(string) | n/a     | no       |
| pool_ids                             | Conflicts with `pool_names`. List of pool Id's | list(string) | n/a     | no       |

### origin_pools Object

| Name                                 | Description           | Type   | Default | Required |
|--------------------------------------|-----------------------|--------|---------|----------|
| name                                 | A short name for the pool | string | n/a     | yes       |
| origins                             | The list of origins within this pool. Find the origins object in below table. | list(obj) | n/a     | yes       |
| check_regions                       | A list of regions (specified by region code) from which to run health checks. Empty means every region (the default), but requires an Enterprise plan. Region codes can be found on our partner Cloudflare's website here. | list(string) | n/a     | yes       |
| description                                 | Free text description. | string | n/a     | no       |
| enabled                                 | Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).| string | n/a     | no       |
| minimum_origins        | The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool.   | string | n/a     | no       |
| notification_email     | The email address to send health status notifications to. | string | n/a     | no       |
| monitor_name   | The ID of the Monitor to use for health checking origins within this pool. Name should be chosen from the monitor that has been created in this module. | string | n/a     | no       |
| monitor_id    | Conflicts with `monitor_name`. The ID of the Monitor to use for health checking origins within this pool. | string | n/a     | no       |

### origins Object

| Name                                    | Description                           | Type   | Default | Required |
|-----------------------------------------|---------------------------------------|--------|---------|----------|
| name           | Name for the origin. | string | n/a     | yes      |
| address           | The IP address (IPv4 or IPv6) of the origin, or the publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by CIS. | string | n/a     | yes      |
| enabled           | Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool. | bool | n/a     | no      |
| weight           | The origin pool weight. | float | n/a     | no      |

### monitors Object

| Name                                 | Description           | Type   | Default | Required |
|--------------------------------------|-----------------------|--------|---------|----------|
| name         |  Name/Description of healthcheck. This name is used as name of resource in this module and hence avoid spaces | string | n/a     | yes   |
| path      | The endpoint path to health check against. | string | `/`     | no       |
| type   | The protocol to use for the healthcheck. | string | `HTTP`    | no       |
| port  | The TCP port to use for the health check.| number | n/a     | no       |
| expected_body       |   A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. A null value of "" is allowed to match on any content.| string | n/a     | no       |
| expected_codes   | The expected HTTP response code or code range of the health check | string | n/a     | no       |
| method     | The HTTP method to use for the health check. | string | `GET`    | no       |
| timeout      | The timeout (in seconds) before marking the health check as failed. | number | 5    | no   |
| follow_redirects         |  Follow redirects if returned by the origin. | bool | n/a     | no       |
| allow_insecure        | Do not validate the certificate when healthcheck use HTTPS. | bool | n/a     | no       |
| interval                |The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations | number | 60    | no       |
| retries        | The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. | number | 2    | no       |
| headers     | The health check headers. Find the headers object in below table. | list(obj) | []   | no   |

### NOTE: `expected_body`,`expected_codes` are required when the type is `HTTP` or `HTTPS`

### headers Object

| Name                                    | Description                           | Type   | Default | Required |
|-----------------------------------------|---------------------------------------|--------|---------|----------|
| header           | The value of header. | string | n/a     | yes      |
| values           | The List of values for header field. | list(string) | n/a     | yes      |

## Outputs

| Name                                    | Description                           |
|-----------------------------------------|---------------------------------------|
| dns_record_ids           | Ids CIS DNS Records |
| origin_pool_ids           | Ids of CIS origin Pools |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

### NOTE: To make use of a particular version of module, Set the `version` argument to respective module version

## Usage

Initialising Provider

Make sure you declare a required providers ibm block to make use of IBM-Cloud Terraform Provider

```terraform
terraform {
  required_providers {
    ibm = {
      source = "IBM-Cloud/ibm"
      version = "<version>"  // Specify the version
    }
  }
}
```

```terraform
terraform init
```

```terraform
terraform plan
```

```terraform
terraform apply
```


text:
# Fix files with .crypted on the end

I recently had a client become a victim of a cryptolocker scam. The catch, however, was that whoever built the software doesn't appear to know how to do the "crypto" part of cryptolocker. All the software did was add a .crypted extension to the end of the user's files. Mild inconvenience? Yes. Expensive catastrophe? Definitely not.

A post on a security forum called it "bluffware", which appears to be a speculative title rather than standard nomenclature but I quite like it so I'm running with it.

You should only run this **after you've removed the virus itself** using a malware removal tool or antivirus software (MalwareBytes is OK at this sort of thing).

## Will the fix work for you?

A good way to test this is to find an image (.jpg, or .png) that now has .crypted on the end and remove the .crypted part (right-click, rename). Then open the file. If the image displays normally then we're good to go.

_Note: Chrome may, somewhat ironically, flag this file as a virus so you may need to use a different browser to download it._

license: Unlicense

repository: shakyjake/Fix-Cryptolocker-Bluffware

repo_name: shakyjake/Fix-Cryptolocker-Bluffware


text:
# Caproventuria hanliniana (U. Braun & Feiler) U. Braun, 1998 SPECIES

#### Status
ACCEPTED

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

#### Published in
Monogr. Cercosporella, Ramularia Allied Genera (Phytopath. Hyphom. ) 2: 396 (1998)

#### Original name
null

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
---
layout: post
title:  "User Research for the United States"
categories: User Research
date: 2020-07-28
---

## User Research for the United States
Before you start any product, it is smart to take the time and to research and understanding the audience. When developing a software product typically specialists in User Research are called in. These are the people with curiosity and lots of empathy. They ask questions, they survey, and they build up an understanding of who a population of users are and what they need.

Interviews and questionnaires help build a __qualitative picture__ of the users. Data collected from the product builds a __quantitative picture__. They create a picture of the personalities and the journeys people take as they find and use the product.

To improve our government and to make it adaptable we need to start with listening. Fortunately we already have the Census Bureau.

## About the US Census department
__Our Mission:__ *The Census Bureau's mission is to serve as the nation’s leading provider of quality data about its people and economy.*

__Our Authority:__ *The Census Bureau operates under Title 13 and Title 26 of the U.S. Code.*

__Our Goal:__ *Our goal is to provide the best mix of timeliness, relevancy, quality and cost for the data we collect and services we provide.*

[Source: https://www.census.gov/about/what.html](https://www.census.gov/about/what.html)

## Where would this begin?
The first Objective I would assign to the US Census Bureau is *“To establish communications with the US citizens.”*

The communication would work like this.
1. Surveys would be sent out from the census department.
2. Data from those surveys would be published as a data source for all citizens to use.

As with most web applications I think we should start with a login. As of right now we have a system that involves our very insecure social security number for a unique key in many government systems. I would love for there to be a well thought out single sign on (SSO) for all US government functions but that will have to be a larger Objective for a Presidential Platform.

This login should be used to create a platform for the US Citizens so we have one login via mobile app and web app to a single platform for all of our federal capabilities.

## What happens next?
Looking back at the mission statement; “The Census Bureau's mission is to serve as the nation’s leading provider of quality data about its people and economy.” tells me that this should be a two way conversation between the citizens and the government. Essentially creating a portal so that questionnaires can be distributed and the data from these can be displayed.

If you look at what User Researchers do, these become the questions that need to be answered routinely.

1. Who your users are
2. What their needs are
3. What they want
4. How they currently do things
5. How they’d like to do them

Here is an idea, remember the Wii “Everybody Votes” Channel? It was this quirky experience where they would pose a question and you weigh in on it, after a set time period the answers for how people voted popped up. Sure it wasn’t the most scientific test but it was fun and it started to create a behavior that we would want which is that people actually participate. I’m sure there are other ways to get people to login and use a national service but this would be a pretty low cost way to create public data sets that could be more useful.

This brings me to the next OKR for the US Census department.
+ __Objective:__ “Increase the participation between the US Citizens and the Federal Government”.
  + __Key Result:__ Get 10% of the US Population to login to their accounts.
  + __Key Result:__  Create one survey a month and show an increase by 10% each time.

On the other side the US Census Bureau should be interested in the data sets being consumed. So I would expect a large data library to be established and released to the citizens. The Objective from their own mission statement would be “Provide quality data about its people and economy.” Is this Objective big enough?  Shouldn’t they also be making sure that the data is being used? I want a better outcome instead of just the output of providing data.

To this end I would argue that the Objective should be “To provide the most useful quality data about its people and economy". This could be measured with the Key Results of the following.

Every data set being collected is increasing its number of subscribers.

Time series datasets are being updated regularly.

## A larger vision
I believe that the government shouldn’t do the analysis of the data but instead use its position to help its citizens understand themselves. Let private citizens, educational institutes, and companies do the analysis for fame and fortune. Kaggle is a fantastic example. If the data sets generated by a national portal were then offered up as the data sets for larger questions, we could unleash some of our best minds to try to answer tricky questions.

In conclusion we have the first piece, the Census Bureau
Already a government agency exists and is funded and tasks with what we all desperately need, a way to figure out what to do next. Right now we are swimming in distrust and having shouting matches over subjective beliefs. Why can’t our government provide a decent source of data so we can start to answer some of the hardest questions?

license: MIT

repository: paulin/asacitizen

repo_name: paulin/asacitizen


text:
# Exec Plugin

The exec plugin can execute arbitrary commands which output JSON. Then it flattens JSON and finds
all numeric values, treating them as floats.

For example, if you have a json-returning command called mycollector, you could
setup the exec plugin with:

```
[[inputs.exec]]
  command = "/usr/bin/mycollector --output=json"
  name_suffix = "_mycollector"
  interval = "10s"
```

The name suffix is appended to exec as "exec_name_suffix" to identify the input stream.

The interval is used to determine how often a particular command should be run. Each
time the exec plugin runs, it will only run a particular command if it has been at least
`interval` seconds since the exec plugin last ran the command.

# Sample

Let's say that we have a command with the name_suffix "_mycollector", which gives the following output:
```json
{
    "a": 0.5,
    "b": {
        "c": 0.1,
        "d": 5
    }
}
```

The collected metrics will be stored as field values under the same measurement "exec_mycollector":
```
 exec_mycollector a=0.5,b_c=0.1,b_d=5<PHONE_NUMBER>357578567
```

Other options for modifying the measurement names are:
```
name_override = "newname"
name_prefix = "prefix_"
```

repository: atlassian/telegraf

gha_language: Go

gha_license_id: MIT

repo_name: atlassian/telegraf


text:
# [Kushy Cannabis Dataset](https://kushy.net/) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kushyapp/cannabis-dataset/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://kushy.net/)

The Kushy cannabis dataset is a collection of tabular data from different sectors of the industry, from strains to products to lab results.

## Uses for Dataset

* Import into your database or API
* Analyze data for research
* Provide accurate cannabis data
* Even profit!

## Documentation

The datasets are located in the **Dataset** folder, inside of their own subfolder for the category (*e.g. **Dataset/Strains/***). We currently have the following categories available:

* Strains
* Products
* Brands
* Shops

Keep watch for more categories (like lab results) and plenty more data.

### Branches

The master branch will always have the latest data. Download that if you want up to date information. Every other branch will be a repository of an old state of data (for archival purposes).

## Getting Started

### SQL

Run or import the SQL files into your SQL database. All the data will be imported into newly created tables.

### CSV

Open up the CSV in Excel, Google Sheets, or any sort of app that supports the file format. You can also import this into many different software setups, such as Wordpress, using 3rd party plugins.

## Contributing

The goal of this open dataset is to create an accessible channel for contribution, as well as providing a valuable resource to the community.

### Code of Conduct

### Contributing Guide

### License

This dataset is [MIT licensed](https://github.com/kushyapp/cannabis-dataset/blob/master/LICENSE). *Go crazy.*

repository: mjfrigaard/CanDash

repo_name: mjfrigaard/CanDash


text:
# Unofficial port of Azure Storage SDK, to support asyncio and aiohttp

This is an unofficial fork of the [Python Azure Storage SDK](https://github.com/Azure/azure-storage-python), edited to work with `asyncio` and `aiohttp`, to support asynchronous non blocking web requests to REST APIs.
Only the code to interact with Azure Table, Blob and Queue services has been ported, the File service wasn't ported. The code to work with Azure Storage Table Service should be compatible also for CosmosDB, but I didn't verify this, yet.

The work on this fork has been described in a blog post, refer to it to know how it was created: [https://robertoprevato.github.io/Upgrading-Azure-Storage-Python-SDK-to-support-asyncio/](https://robertoprevato.github.io/Upgrading-Azure-Storage-Python-SDK-to-support-asyncio/).

This work is done primarily for my private use, tests were run manually; I don't have time to write a proper test suite. The `tests` folder contains the code used for manual testing (they can be used removing the 'OFF_' prefix from function names).

## Getting started
As usual for Python projects:
```bash
# create virtual environment
python -m venv env

# activate virtual environment (Linux:)
source env/bin/activate

# activate virtual environment (Windows:)
env\Scripts\activate

# install dependencies
pip install -r requirements.txt

# enjoy
```

To verify how this code works, simply see the content of `tests` folder for working examples, code is kept simple and stupid there; it's sufficient to provide valid account name and admin key.

```python
# replace with valid values;
ACCOUNT_NAME = '<ACCOUNT_NAME>'
ACCOUNT_KEY = '<ACCOUNT_KEY>'
```

## Why
The official Python Azure Storage SDK is designed to work with both Python 2 and 3, and is using `requests` library to make web requests to Azure REST APIs; thus making synchronous and blocking web requests. The fork is created to take advantage of new `async` and `await` syntax and Python 3 built-in support for event loops through `asyncio`.

repository: RobertoPrevato/azure-storage-python

repo_name: RobertoPrevato/azure-storage-python


text:
# How to contribute to RDF4CPP

Be aware of our Code of Conduct - we do not tolerate any discrimantive behaviour such as sexism, racism, antisemitism, ableism, homomysia ("phobia"), transmysia ("phobia"), or any other kind of harassment.

## Found a Bug?

* First things first: Is the bug already reported? If so and you got new information, please add them to the existing issue
* Otherwise use the Issues Bug report on Github and try to be as specific as possible, following the Bug report template
  * Be sure to be specific even in the title, making it easier to search for your bug if other people encountered it.
* If you found a security issue, please let us know immedietly.

## Wrote a Patch for a Bug?

* Create a Pull Request from your fork to `develop`
* Be very specific what your solution does and what it fixes

## Did you fix something purely cosmetic (such as formatting)?

* Purely cosmetic code fixes won't be allowed.

## Want a new Feature?

* First things first: Is the feature already requested? If so and you got additionaly stuff, please add them to the existing issue
* Otherwise use the Issues Feature report on Github and try to be as specific as possible, following the Feature report template
  * Be sure to be specific even in the title, making it easier to search for your feature if other people encountered it.

## Wrote a new Feature?

* Create a Feature Issue on Github first if one doesn't already exists
* Create a Pull Request from your fork to `develop`
* Be very specific what your solution does and what it trys to implement.

rdf4cpp is an Open Source Project under the MIT License and thus we welcome any contribution.
That said feel free to code with us :)

branch_name: refs/heads/develop


text:
## Description

The [MCP23017/MCP23S17](https://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf) (MCP23X17) device family provides 16-bit, general purpose parallel I/O expansion for I2C bus or SPI applications. The two devices differ only in the serial interface:

* MCP23017 – I2C interface
* MCP23S17 – SPI interface

The MCP23X17 consists of multiple 8-bit configuration registers for input, output and polarity selection. The system master can enable the I/Os as either inputs or outputs by writing the I/O configuration bits (IODIRA/B). The data for each input or output is kept in the corresponding input or output register. The polarity of the Input Port register can be inverted with the Polarity Inversion register. All registers can be read by the system master.

The 16-bit I/O port functionally consists of two 8-bit ports (PORTA and PORTB). The MCP23X17 can be configured to operate in the 8-bit or 16-bit modes via IOCON.BANK.

The Interrupt Capture register captures port values at the time of the interrupt, thereby saving the condition that caused the interrupt. The Power-on Reset (POR) sets the registers to their default values and initializes the device state machine.

## User Tips

### Device Address

The hardware address pins are used to determine the device address. Cascadable for up to 8 devices on one bus

### Interrupt Pin

There are two interrupt pins, INTA and INTB, that can be associated with their respective ports, or can be logically OR’ed together so that both pins will activate if either port causes an interrupt. The interrupt output can be configured to activate under two conditions (mutually exclusive):

1. When any input state differs from its corresponding Input Port register state. This is used to indicate to the system master that an input state has changed.
2. When an input state differs from a preconfigured register value (DEFVAL register).

repository: espressif/esp-iot-solution

gha_language: C

repo_name: espressif/esp-iot-solution


text:
# GPT4All Chat UI

The [GPT4All Chat Client](https://gpt4all.io) lets you easily interact with any local large language model.

It is optimized to run 7-13B parameter LLMs on the CPU's of any computer running OSX/Windows/Linux.

## Running LLMs on CPU
The GPT4All Chat UI supports models from all newer versions of `GGML`, `llama.cpp` including the `LLaMA`, `MPT`, `replit`,  `GPT-J` and `falcon` architectures

GPT4All maintains an official list of recommended models located in [models.json](https://github.com/nomic-ai/gpt4all/blob/main/gpt4all-chat/metadata/models.json). You can pull request new models to it and if accepted they will show up in the official download dialog.

#### Sideloading any GGML model
If a model is compatible with the gpt4all-backend, you can sideload it into GPT4All Chat by:

1. Downloading your model in GGML format. It should be a 3-8 GB file similar to the ones [here](https://huggingface.co/TheBloke/Samantha-7B-GGML/tree/main).
2. Identifying your GPT4All model downloads folder. This is the path listed at the bottom of the downloads dialog(Three lines in top left>Downloads).
3. Placing your downloaded model inside the GPT4All's model downloads folder.
4. Restarting your GPT4ALL app. Your model should appear in the model selection list.

## Plugins
GPT4All Chat Plugins allow you to expand the capabilities of Local LLMs.

### LocalDocs Beta Plugin (Chat With Your Data)
LocalDocs is a GPT4All plugin that allows you to chat with your local files and data.
It allows you to utilize powerful local LLMs to chat with private data without any data leaving your computer or server.
When using LocalDocs, your LLM will cite the sources that most likely contributed to a given output. Note, even an LLM equipped with LocalDocs can hallucinate. If the LocalDocs plugin decides to utilize your documents to help answer a prompt, you will see references appear below the response.

GPT4All-Snoozy with LocalDocs. Try GPT4All-Groovy for a faster experience!

#### Enabling LocalDocs
1. Install the latest version of GPT4All Chat from [GPT4All Website](https://gpt4all.io).
2. Go to `Settings > LocalDocs tab`.
3. Configure a collection (folder) on your computer that contains the files your LLM should have access to. You can alter the contents of the folder/directory at anytime. As you
add more files to your collection, your LLM will dynamically be able to access them.
4. Spin up a chat session with any LLM (including external ones like ChatGPT but warning data will leave your machine!)
5. At the top right, click the database icon and select which collection you want your LLM to know about during your chat session.

#### LocalDocs Capabilities
LocalDocs allows your LLM to have context about the contents of your documentation collection. Not all prompts/question will utilize your document
collection for context. If LocalDocs was used in your LLMs response, you will see references to the document snippets that LocalDocs used.

LocalDocs **can**:

- Query your documents based upon your prompt / question. If your documents contain answers that may help answer your question/prompt LocalDocs will try to utilize snippets of your documents to provide context.

LocalDocs **cannot**:

- Answer general metadata queries (e.g. `What documents do you know about?`, `Tell me about my documents`)
- Summarize a single document (e.g. `Summarize my magna carta PDF.`)

See the Troubleshooting section for common issues.

#### How LocalDocs Works
LocalDocs works by maintaining an index of all data in the directory your collection is linked to. This index
consists of small chunks of each document that the LLM can receive as additional input when you ask it a question.
The general technique this plugin uses is called [Retrieval Augmented Generation](https://arxiv.org/abs/2005.11401).

These document chunks help your LLM respond to queries with knowledge about the contents of your data.
The number of chunks and the size of each chunk can be configured in the LocalDocs plugin settings tab.
For indexing speed purposes, LocalDocs uses pre-deep-learning n-gram and TF-IDF based retrieval when deciding
what document chunks your LLM should use as context. You'll find its of comparable quality
with embedding based retrieval approaches but magnitudes faster to ingest data.

LocalDocs supports the following file types:
```json
["txt", "doc", "docx", "pdf", "rtf", "odt", "html", "htm", "xls", "xlsx", "csv", "ods", "ppt", "pptx", "odp", "xml", "json", "log", "md", "org", "tex", "asc", "wks",
"wpd", "wps", "wri", "xhtml", "xht", "xslt", "yaml", "yml", "dtd", "sgml", "tsv", "strings", "resx",
"plist", "properties", "ini", "config", "bat", "sh", "ps1", "cmd", "awk", "sed", "vbs", "ics", "mht",
"mhtml", "epub", "djvu", "azw", "azw3", "mobi", "fb2", "prc", "lit", "lrf", "tcr", "pdb", "oxps",
"xps", "pages", "numbers", "key", "keynote", "abw", "zabw", "123", "wk1", "wk3", "wk4", "wk5", "wq1",
"wq2", "xlw", "xlr", "dif", "slk", "sylk", "wb1", "wb2", "wb3", "qpw", "wdb", "wks", "wku", "wr1",
"wrk", "xlk", "xlt", "xltm", "xltx", "xlsm", "xla", "xlam", "xll", "xld", "xlv", "xlw", "xlc", "xlm",
"xlt", "xln"]
```

#### Troubleshooting and FAQ
*My LocalDocs plugin isn't using my documents*

- Make sure LocalDocs is enabled for your chat session (the DB icon on the top-right should have a border)
- Try to modify your prompt to be more specific and use terminology that is in your document. This will increase the likelihood that LocalDocs matches document snippets for your question.
- If your document collection is large, wait 1-2 minutes for it to finish indexing.

#### LocalDocs Roadmap
- Embedding based semantic search for retrieval.
- Customize model fine-tuned with retrieval in the loop.
- Plugin compatibility with chat client server mode.

## Server Mode

GPT4All Chat comes with a built-in server mode allowing you to programmatically interact
with any supported local LLM through a *very familiar* HTTP API. You can find the API documentation [here](https://platform.openai.com/docs/api-reference/completions).

Enabling server mode in the chat client will spin-up on an HTTP server running on `localhost` port
`4891` (the reverse of 1984). You can enable the webserver via `GPT4All Chat > Settings > Enable web server`.

Begin using local LLMs in your AI powered apps by changing a single line of code: the base path for requests.

```python
import openai

openai.api_base = "http://localhost:4891/v1"
#openai.api_base = "https://api.openai.com/v1"

openai.api_key = "not needed for a local LLM"

# Set up the prompt and other parameters for the API request
prompt = "Who is Michael Jordan?"

# model = "gpt-3.5-turbo"
#model = "mpt-7b-chat"
model = "gpt4all-j-v1.3-groovy"

# Make the API request
response = openai.Completion.create(
    model=model,
    prompt=prompt,
    max_tokens=50,
    temperature=0.28,
    top_p=0.95,
    n=1,
    echo=True,
    stream=False
)

# Print the generated completion
print(response)
```

which gives the following response

```json
{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "logprobs": null,
      "text": "Who is Michael Jordan?\nMichael Jordan is a former professional basketball player who played for the Chicago Bulls in the NBA. He was born on December 30, 1963, and retired from playing basketball in 1998."
    }
  ],
  "created":<PHONE_NUMBER>,
  "id": "foobarbaz",
  "model": "gpt4all-j-v1.3-groovy",
  "object": "text_completion",
  "usage": {
    "completion_tokens": 35,
    "prompt_tokens": 39,
    "total_tokens": 74
  }
}
```


text:
# GitHub Trending (2021-05-27)

![](https://img.shields.io/badge/C%23-New%2054-green?style=flat-square&logo=appveyor)
- [davidortinau/WeatherTwentyOne](https://github.com/davidortinau/WeatherTwentyOne):

![](https://img.shields.io/badge/none-New%20686-green?style=flat-square&logo=appveyor)
- [Tencent/secguide](https://github.com/Tencent/secguide): 面向开发人员梳理的代码安全指南

![](https://img.shields.io/badge/Java-New%20143-green?style=flat-square&logo=appveyor)
- [wuyouzhuguli/SpringAll](https://github.com/wuyouzhuguli/SpringAll): 循序渐进，学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2，博客Spring系列源码：https://mrbird.cc

![](https://img.shields.io/badge/Java-New%20259-green?style=flat-square&logo=appveyor)
- [doocs/leetcode](https://github.com/doocs/leetcode): 😏 LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer（第 2 版）》、《程序员面试金典（第 6 版）》题解

![](https://img.shields.io/badge/Java-New%2026-green?style=flat-square&logo=appveyor)
- [airbytehq/airbyte](https://github.com/airbytehq/airbyte): Airbyte is an open-source EL(T) platform that helps you replicate your data in your warehouses, lakes and databases.

![](https://img.shields.io/badge/Java-New%2022-green?style=flat-square&logo=appveyor)
- [alibaba/spring-cloud-alibaba](https://github.com/alibaba/spring-cloud-alibaba): Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.

![](https://img.shields.io/badge/TypeScript-New%20351-green?style=flat-square&logo=appveyor)
- [withfig/autocomplete](https://github.com/withfig/autocomplete): Fig adds autocomplete to your terminal.

![](https://img.shields.io/badge/none-New%2030-green?style=flat-square&logo=appveyor)
- [chiraggude/awesome-laravel](https://github.com/chiraggude/awesome-laravel): A curated list of bookmarks, packages, tutorials, videos and other cool resources from the Laravel ecosystem

![](https://img.shields.io/badge/JavaScript-New%20247-green?style=flat-square&logo=appveyor)
- [AMAI-GmbH/AI-Expert-Roadmap](https://github.com/AMAI-GmbH/AI-Expert-Roadmap): Roadmap to becoming an Artificial Intelligence Expert in 2021

![](https://img.shields.io/badge/none-New%20174-green?style=flat-square&logo=appveyor)
- [bradtraversy/design-resources-for-developers](https://github.com/bradtraversy/design-resources-for-developers): Curated list of design and UI resources from stock photos, web templates, CSS frameworks, UI libraries, tools and much more

![](https://img.shields.io/badge/JavaScript-New%2045-green?style=flat-square&logo=appveyor)
- [microsoft/Web-Dev-For-Beginners](https://github.com/microsoft/Web-Dev-For-Beginners): 24 Lessons, 12 Weeks, Get Started as a Web Developer

![](https://img.shields.io/badge/JavaScript-New%20434-green?style=flat-square&logo=appveyor)
- [appwrite/appwrite](https://github.com/appwrite/appwrite): Appwrite is a secure end-to-end backend server for Web, Mobile, and Flutter developers that is packaged as a set of Docker containers for easy deployment 🚀

![](https://img.shields.io/badge/Java-New%20102-green?style=flat-square&logo=appveyor)
- [kon9chunkit/GitHub-Chinese-Top-Charts](https://github.com/kon9chunkit/GitHub-Chinese-Top-Charts): 🇨🇳 GitHub中文排行榜，帮助你发现高分优秀中文项目、更高效地吸收国人的优秀经验成果；榜单每周更新一次，敬请关注！

![](https://img.shields.io/badge/none-New%20275-green?style=flat-square&logo=appveyor)
- [EbookFoundation/free-programming-books](https://github.com/EbookFoundation/free-programming-books): 📚 Freely available programming books

![](https://img.shields.io/badge/JavaScript-New%2064-green?style=flat-square&logo=appveyor)
- [inoyna11/jd28](https://github.com/inoyna11/jd28):

![](https://img.shields.io/badge/JavaScript-New%2020-green?style=flat-square&logo=appveyor)
- [portainer/portainer](https://github.com/portainer/portainer): Making Docker and Kubernetes management easy.

![](https://img.shields.io/badge/PowerShell-New%203-green?style=flat-square&logo=appveyor)
- [MicrosoftDocs/azure-docs](https://github.com/MicrosoftDocs/azure-docs): Open source documentation of Microsoft Azure

![](https://img.shields.io/badge/C%2B%2B-New%20271-green?style=flat-square&logo=appveyor)
- [dogecoin/dogecoin](https://github.com/dogecoin/dogecoin): very currency

![](https://img.shields.io/badge/Python-New%2022-green?style=flat-square&logo=appveyor)
- [straightblast/My-PoC-Exploits](https://github.com/straightblast/My-PoC-Exploits): PoC exploits I wrote. They're as is and I will not offer support

![](https://img.shields.io/badge/Python-New%20252-green?style=flat-square&logo=appveyor)
- [bee-san/pyWhat](https://github.com/bee-san/pyWhat): 🐸 Identify anything. pyWhat easily lets you identify emails, IP addresses, and more. Feed it a .pcap file or some text and it'll tell you what it is! 🧙♀

![](https://img.shields.io/badge/Kotlin-New%2035-green?style=flat-square&logo=appveyor)
- [Shabinder/SpotiFlyer](https://github.com/Shabinder/SpotiFlyer): Kotlin Multiplatform Music Downloader, Supports Spotify / Gaana / Youtube Music .

![](https://img.shields.io/badge/PowerShell-New%2016-green?style=flat-square&logo=appveyor)
- [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs): The Microsoft community Windows Package Manager manifest repository

![](https://img.shields.io/badge/none-New%2070-green?style=flat-square&logo=appveyor)
- [tuvtran/project-based-learning](https://github.com/tuvtran/project-based-learning): Curated list of project-based tutorials

![](https://img.shields.io/badge/TypeScript-New%20217-green?style=flat-square&logo=appveyor)
- [cdr/code-server](https://github.com/cdr/code-server): VS Code in the browser

![](https://img.shields.io/badge/C-New%2019-green?style=flat-square&logo=appveyor)
- [gentilkiwi/mimikatz](https://github.com/gentilkiwi/mimikatz): A little tool to play with Windows security

repository: Hsins/Daily-GitHub-Trending

gha_language: JavaScript

repo_name: Hsins/Daily-GitHub-Trending


text:
# beamer-mines

Beamer theme for the Colorado School of Mines.

**This is NOT an official Mines theme but is only an attempt at an implementation.**

## How to use

Clone or copy the `beamercolorthememines.sty` file into your TeX directory or project then in your beamer project use:

```LaTeX
\usecolortheme{mines}
```

<!-- TODO: Move this to environment/command taking image, title, author and subtitle as params -->
## First Slide

The following code can be used to make a nicer title slide:

```LaTeX
{
        \usebackgroundtemplate{\scalebox{-1}[1]{\includegraphics[width=\paperwidth, height=\paperheight]{PATH/TO/BACKGROUND/IMAGE/FILE.png}}}
        \begin{frame}[plain]
            \color{white}
            \vspace{4.8cm}
            {\Huge \fontspec{Montserrat Bold} PRESENTATION TITLE} \\
            \vspace{-0.2cm}
            {\color{white} \rule{\linewidth}{0.1mm}}
            \color{mineslightblue}
            {\Large \fontspec{Montserrat Light} SUBTITLE}
            \begin{spacing}{1.3}
            {\Large \fontspec{Montserrat Light} by} {\Large \fontspec{Montserrat Regular} AUTHOR NAME}
            \end{spacing}
        \end{frame}
    }
```

## What you need

Make sure you have LaTeX installed.

Make sure you install the [Montserrat fonts](https://fonts.google.com/specimen/Montserrat).

You'll need to use `xelatex` not `pdflatex` for compilation due to the use of the fontspec package. The settings.json file in this repo can be used with [VS Code](https://code.visualstudio.com/) and the [LaTeX workshop plugin](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) for the workspace or user settings.

repository: sbeleidy/beamer-mines

repo_name: sbeleidy/beamer-mines


text:
# Suggest Results

Easily customizable search suggestion plugin for jQuery, which suggests results directly, rather than search terms.

It supports feeding results from a local Javascript array, or fetching results via Ajax.

Check out the [Demo][].

## Setup

First of all you will need [jQuery][], visit their [site][jquery] for more info.

Then include both `jquery.suggest_results.js` and `jquery.suggest_results.css` on your page.

    <link href="/suggest_results/jquery.suggest_results.css" rel="stylesheet" type="text/css" />

## Usage

### Local Javascript Array

To use Suggest Results, simply call it on a targeted text input element. For example if you have a search box for a users friends:

    $("#search_friends").suggest_results({
    	data: userFriends
    });

In the above example, `userFriends` is a javascript array that would look something like this:

    var userFriends = [
        {title: "John Doe", href: "/user/johndoe", match: "johndoe<EMAIL_ADDRESS>        {title: "Mike Smith", href: "/user/msmith", match: "msmith<EMAIL_ADDRESS>    ];

This array needs to have two vital attributes, `title` and `href`. When filtering results based on what's been typed in the input field, the `title` and `match` attributes are used. `match` is optional, but `title` is required. `href` is the url to redirect the browser to when the result is selected.

The `match` attribute is useful when you need to include extra information like a username or email and get results based on this data without having to display it.

### Ajax Call

To fetch results via an Ajax call, attach Suggest Results like this to your input element:

    $("#search_friends").suggest_results({
    	url: "/search_friends_json.php"
    });

As a user starts typing, this will trigger a GET request to `/search_friends/json?limit=6&search=j` if the user has started typing `j`. We'll get to the `limit` option a bit later.

Output from `search_friends_json.php` must be in JSON, and look something like this:

    {"results": [
        {"title": "John Doe", "href": "/user/johndoe"},
        {"title": "Mike Smith", "href": "/user/msmith"}
    ]}

Notice how the `match` attribute is not included, as it's not supported for server-side result fetching. No filtering is done client-side of the results returned, hence `match` is useless. You should do all filtering and ordering server-side if going ajax-style.

Also, a query cache is used so a specific search term is only requested once per page load. Otherwise new ajax calls would be triggered each time a user hits the backspace key to remove a letter for example.

## Options

There's a number of options you can pass `$.suggest_results()`.

* **data:** Javascript array with available results.
* **url:** URL to send ajax request to for results. Either `url` or `data` are required for Suggest Results to work at all.
* **name:** When used, the value is used as the class for the suggest box. Useful for having a custom styled suggest box one of two or more input fields with suggestion turned on.
* **exact_match:** Results much be an exact match to typed input. If disabled any one word typed is a value match. Enabled by default, and has no effect when fetching results via Ajax.
* **limit:** Limit the number of suggestions shown. When using the Ajax method, an extra `limit` GET/POST var is supplied.
* **no_results:** When set to true, a "No Results" label is shown if entered text doesn't yield any results. Enabled by default.
* **no\_results\_label:** Text shown when there are no results if `no_results` is enabled. Default is "No Results".
* **url_method:** URL method used for Ajax call. Set to "get" or "post". Default is "get".

## Customization

One of the things I felt most important developing this was it would be really easy to customize the suggestion results, to add an extra field, or a thumbnail icon or whatever you wanted. Cause of this, all html used to generate the suggest box, is stored as an option, and data is inserted mustache style.

For example, if we want to display some extra info underneath our friend's names, we'd start with adding it to the result JSON data if we're fetching things via Ajax:

    {"results": [
        {"title": "John Doe", "href": "/user/johndoe", "info": "Helltown"},
        {"title": "Mike Smith", "href": "/user/msmith", "info": "New York"}
    ]}

When we attach the suggestions to our input element, we specify the `tpl_result_body` option:

    $("#search_friends").suggest_results({
    	url: "/search_friends_json.php",
    	name: "search_friends",
    	tpl_result_body: '{{title}}{{info}}'
    });

In the `tpl_result_body` option, `{{title}}` is replaced with the `title` attribute from the result object, and `{{info}}` is replaced with the `info` attribute.

Then to prettify it, we add some CSS:

    /* Effects all suggestion boxes */
    #suggest_results li span.info {
    	color: #888;
    }
    /* Effects only the #search_friends suggestion box */
    #suggest_results.search_friends li {
		border-bottom-style: dashed;
	}

There are some more options available too for customization, so I recommend you dig through the code a bit ;)

## To-Do

* Better documentation and readme.
* Handle mouse hovering and keyboard navigation a bit better when used at the same time on a suggest box.
* Support suggesting search terms in addition to currently only supporting results.
* Add callbacks for most things.

 But at least it works. If you wanna improve it, please feel free to fork and send me a pull request.

## License

(The MIT License)

Copyright (c) 2009 Jim Myhrberg.

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

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

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[jquery]: http://jquery.com/
[demo]: http://files.jimeh.me/projects/suggest_results/demo/


text:
# CIOL.

Continuous Improvement Opportunity List

## Built With

* [C#](https://docs.microsoft.com/en-us/dotnet/csharp/) - Backend.
* [asp](https://dotnet.microsoft.com/apps/aspnet) - Web Framework.
* [Bootstrap](https://getbootstrap.com/) - CSS Framework.

repository: edgarronda/CIOL

repo_name: edgarronda/CIOL


text:
---
title: "WAQI Card"
date: 2019-11-30T07:18:05-08:00
draft: true
---

# WAQI Meter

The west coast of the United States has had some trouble breathing for the last few months due to the many fires in the region. Several cities, including my own, have had the worst air quality in the world at various points of the summer and autumn. I had been checking the regional air quality daily for some time when I discovered that there is a [World Air Quality Index sensor](https://www.home-assistant.io/components/sensor.waqi/) component in [Home Assistant](https://www.home-assistant.io).

I added the sensor and plopped the numeric value into an entity card and didn't think much more about it. Whenever I needed it I would check the value and, since the air was so routinely terrible, I had a good sense of what the integer value I was seeing meant. Only when the [gauge card](https://www.home-assistant.io/lovelace/gauge/) was introduced did I realize that seeing a number on screen doesn't give any context. When conditions improved locally, the time between my check-ins grew longer, and my memory of the scale grew fuzzy. I'd then have to go to an external site to look up the meaning of the number in hass. I wasn't all that better off after all.

The gauge card was a nice step forward but it's limits for this use case were quickly evident. The three color conditions offered by the gauge card didn't match up well with the six categories of the AQI and it still didn't really offer context. Green is good, certainly, but how bad is yellow? Still, it was better so life went on.

Then it dawned on me that a template sensor can be used to translate ranges of numeric values into categories, which then makes the [picture entity card](https://www.home-assistant.io/lovelace/picture-entity/) a display option. The `state_image` variable allowing for a highlighted display of the air quality scale, one image per range.

![Animated image showing all the possible states of the air quality meter.](images/updates/3.2-1_animated-meter.gif)

## Prerequisites

Set up the WAQI sensor following the instructions in the [component docs](https://www.home-assistant.io/components/sensor.waqi/).

## Template Sensor

This is a very simple sensor. All that we need is a set of conditions such that 0 - 50 is good, 51 - 100 is moderate, etc. I took one small precaution against the WAQI sensor not having data for any reason with my else condition.

```YAML
- platform: template
  sensors:
    waqi_state:
      entity_id: sensor.waqi_eugene__highway_99_oregon_usa
      friendly_name: West Eugene Air Quality
      value_template: >
        {% if states('sensor.waqi_eugene__highway_99_oregon_usa') | int < 51 %}
          good
        {% elif states('sensor.waqi_eugene__highway_99_oregon_usa') | int < 101 %}
          moderate
        {% elif states('sensor.waqi_eugene__highway_99_oregon_usa') | int < 151 %}
          unhealthy-1
        {% elif states('sensor.waqi_eugene__highway_99_oregon_usa') | int < 201 %}
          unhealthy-2
        {% elif states('sensor.waqi_eugene__highway_99_oregon_usa') | int < 300 %}
          unhealthy-3
        {% elif states('sensor.waqi_eugene__highway_99_oregon_usa') | int > 300 %}
          hazardous
        {% else %}
          unknown
        {% endif %}
```

## Picture Entity Card

Keeping it simple here as well. There is one image for each of the states from my sensor defined in my picture entity card's state_image variable. I didn't want to pad the bottom of my images in order to cleanly display the name or state on the picture card, so I've put it in a vertical stack with a entity card that displays the AQI value. I believe I could combine the two by way of a picture-elements card, but that is a project for another day.

```YAML
- id: west_eugene_air_quality stack
  type: vertical-stack
  cards:
    - type: picture-entity
      entity: sensor.waqi_state
      show_name: false
      show_state: false
      state_image:
        "good": /local/air-quality/good.jpg
        "moderate": /local/air-quality/moderate.jpg
        "unhealthy-1": /local/air-quality/unhealthy-1.jpg
        "unhealthy-2": /local/air-quality/unhealthy-2.jpg
        "unhealthy-3": /local/air-quality/unhealthy-3.jpg
        "hazardous": /local/air-quality/hazardous.jpg
        "unknown": /local/air-quality/unknown.jpg
    - type: entities
      entities:
        - entity: sensor.waqi_eugene__highway_99_oregon_usa
          name: West Eugene Air Quality
```

## Images

This was the most time consuming part of the project. I started by trying to turn a png of a serviceable chart found online into what I wanted. In the process I had the kind of things to say to Gimp that can only be dreamt up by a true novice in the software. It was at that point my [graphic designer](http://bdrose.net/) wife, Bonnie, took pity on me as this kind of image work is in her wheelhouse.

![Example of a the air quality index shown as a chart. The current category (good) is full color while the others are faded.](images/updates/3.2-1_waqi-card.png)

This ticks all my boxes. I now get an on-demand view of our local air quality in an attractive card. It gives context to the values both in specific meaning and in scale. That makes it good at delivering quick meaning at a glance and details upon closer inspection.

repository: Bishma/blog

repo_name: Bishma/blog


text:
---
layout: base
title:  'Statistics of Person[psor] in UD_Tupinamba-TuDeT'
udver: '2'
---

## Treebank Statistics: UD_Tupinamba-TuDeT: Features: `Person[psor]`

This feature is language-specific.
It occurs with 3 different values: `1`, `2`, `3`.

This is a layered feature with the following layers: <tt>Person</tt>, <tt>Person[obj]</tt>, <tt>Person[psor]</tt>, <tt>Person[subj]</tt>.

124 tokens (3%) have a non-empty value of `Person[psor]`.
101 types (5%) occur at least once with a non-empty value of `Person[psor]`.
80 lemmas (8%) occur at least once with a non-empty value of `Person[psor]`.
The feature is used with 3 part-of-speech tags: <tt>NOUN</tt> (120; 3% instances), <tt>VERB</tt> (3; 0% instances), <tt>ADP</tt> (1; 0% instances).

### `NOUN`

120 <tt>NOUN</tt> tokens (8% of all `NOUN` tokens) have a non-empty value of `Person[psor]`.

The most frequent other feature values with which `NOUN` and `Person[psor]` co-occurred: <tt>Person</tt><tt>=EMPTY</tt> (119; 99%), <tt>Number</tt><tt>=EMPTY</tt> (74; 62%), <tt>Rel</tt><tt>=EMPTY</tt> (70; 58%), <tt>Case</tt><tt>=EMPTY</tt> (67; 56%).

`NOUN` tokens may have the following values of `Person[psor]`:

### `VERB`

3 <tt>VERB</tt> tokens (0% of all `VERB` tokens) have a non-empty value of `Person[psor]`.

The most frequent other feature values with which `VERB` and `Person[psor]` co-occurred: <tt>Mood</tt><tt>=EMPTY</tt> (3; 100%), <tt>Number</tt><tt>=Sing</tt> (3; 100%), <tt>Person</tt><tt>=EMPTY</tt> (3; 100%), <tt>Person[obj]</tt><tt>=EMPTY</tt> (3; 100%), <tt>Person[subj]</tt><tt>=EMPTY</tt> (3; 100%), <tt>Rel</tt><tt>=EMPTY</tt> (2; 67%), <tt>VerbForm</tt><tt>=Ger</tt> (2; 67%), <tt>Voice</tt><tt>=EMPTY</tt> (2; 67%).

`VERB` tokens may have the following values of `Person[psor]`:

### `ADP`

1 <tt>ADP</tt> tokens (0% of all `ADP` tokens) have a non-empty value of `Person[psor]`.

The most frequent other feature values with which `ADP` and `Person[psor]` co-occurred: <tt>Rel</tt><tt>=EMPTY</tt> (1; 100%).

`ADP` tokens may have the following values of `Person[psor]`:

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

gha_language: HTML

repo_name: UniversalDependencies/docs


text:
---
title: Null Values Support
page_title: Null Values Support | RadMaskedEditBox
description: RadMaskedEditBox supports entering null values. This article shows how you can enable and use this functionality.
slug: winforms/editors/maskededitbox/null-values-support
tags: maskededitbox,null,values
published: True
position: 14
---

# Null Values

Since R1 2017 RadMaskedEditBox supports entering null values. To enable this functionality you need to set the __EnableNullValueInput__ property. Once this is enabled you can use  __Ctrl + Delete__ or __Ctrl + 0__ to clear the value in the editor.

# See Also

* [Properties, Methods and Events]({%slug winforms/editors/maskededitbox/properties-methods-and-events%})

repository: attilaantal/winforms-docs

repo_name: attilaantal/winforms-docs


text:
# Referencing functions

## General idea

Not being able to reference functions by name directly, and instead have to use strings e.g.

```
$fn = 'strlen';
var_dump($fn('test'));

// int(4)
```

is bad is not good, as typos can occur, and are hard for either humans or static analyzers to pickup on.

```
$fn = 'stlren';
$fn('test');
//  Call to undefined function stlren()
```

What's needed is some way to refer to a function that is unambiguously intended to be a reference to a function, or method of a class.

A new piece of syntax could allow this:

```
$fn = $(strlen);
var_dump($fn('test'));
```

or maybe refactor how

## Hurdles to overcome

### Explain the problem more clearly

Currently if you try to use a raw string, it is assumed to be a define:

```
$fn = strlen;
$fn('test');
```

We can't we change that to do the right thing?

### Figure out all of the requirements

Someone needs to figure out what the correct behaviour is around:

* non-existent functions. Does autoloading occur?
* referencing class methods e.g. and can you reference private methods?

## Forecast

PHP 8.2

## Implemented!

First-class callable syntax [implemented in PHP 8.1](https://wiki.php.net/rfc/first_class_callable_syntax).

## Notes

repository: Danack/RfcCodex

repo_name: Danack/RfcCodex


text:
# LoRa App Server

[![Build Status](https://travis-ci.org/brocaar/lora-app-server.svg?branch=master)](https://travis-ci.org/brocaar/lora-app-server)
[![GoDoc](https://godoc.org/github.com/brocaar/lora-app-server?status.svg)](https://godoc.org/github.com/brocaar/lora-app-server)
[![Gitter chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/loraserver/lora-app-server)

LoRa App Server is an open-source LoRaWAN application-server, compatible
with [LoRa Server](https://github.com/brocaar/loraserver). It is responsible
for the node "inventory" part of a LoRaWAN infrastructure, handling of received
application payloads and the downlink application payload queue. It comes
with a web-interface and API (RESTful JSON and gRPC) and supports authorization
by using JWT tokens (optional). Received payloads are published over MQTT
and payloads can be enqueued by using MQTT or the API.

## Screenshots

![nodes](docs/img/web_nodes.png)
![node details](docs/img/web_node_details.png)
![swagger api](docs/img/swagger.png)

## Documentation

Please refer to the [documentation](https://docs.loraserver.io/lora-app-server/) for the
[getting started](https://docs.loraserver.io/lora-app-server/getting-started/)
documentation and implemented [features](https://docs.loraserver.io/lora-app-server/features/).

## Downloads

Pre-compiled binaries are available for:

* Linux (including ARM / Raspberry Pi)
* OS X
* Windows

See [https://github.com/brocaar/lora-app-server/releases](https://github.com/brocaar/lora-app-server/releases)
for downloads. Source-code can be found at
[https://github.com/brocaar/lora-app-server](https://github.com/brocaar/lora-app-server).

## Building from source

Building from souce requires a working [Go](https://golang.org/) environment
with vendoring support. Alternatively, you could use the provided
[docker-compose](https://docs.docker.com/compose/) environment for compiling
the source.

## License

LoRa App Server is distributed under the MIT license. See also
[LICENSE](https://github.com/brocaar/lora-app-server/blob/master/LICENSE).

repository: radekvozak/lora-app-server

repo_name: radekvozak/lora-app-server


text:
# AutoMocker.Use method (1 of 4)

Adds an instance to the container.

```csharp
public void Use(Type type, object service)
```

| parameter | description |
| --- | --- |
| type | The type of service to use |
| service | The service to use |

## See Also

* class [AutoMocker](../AutoMocker.md)
* namespace [Moq.AutoMock](../../Moq.AutoMock.md)

---

# AutoMocker.Use<TService> method (2 of 4)

Adds a mock object to the container that implements TService.

```csharp
public void Use<TService>(Expression<Func<TService, bool>> setup)
    where TService : class
```

| parameter | description |
| --- | --- |
| TService | The type that the instance will be registered as |
| setup | A shortcut for Mock.Of's syntax |

## See Also

* class [AutoMocker](../AutoMocker.md)
* namespace [Moq.AutoMock](../../Moq.AutoMock.md)

---

# AutoMocker.Use<TService> method (3 of 4)

Adds an instance to the container.

```csharp
public void Use<TService>(Mock<TService> mockedService)
    where TService : class
```

| parameter | description |
| --- | --- |
| TService | The type that the instance will be registered as |
| mockedService | The mocked service |

## See Also

* class [AutoMocker](../AutoMocker.md)
* namespace [Moq.AutoMock](../../Moq.AutoMock.md)

---

# AutoMocker.Use<TService> method (4 of 4)

Adds an instance to the container.

```csharp
public void Use<TService>(TService service)
```

| parameter | description |
| --- | --- |
| TService | The type that the instance will be registered as |
| service |  |

## See Also

* class [AutoMocker](../AutoMocker.md)
* namespace [Moq.AutoMock](../../Moq.AutoMock.md)

<!-- DO NOT EDIT: generated by xmldocmd for Moq.AutoMock.dll -->

gha_language: C#


text:
# DefinitionAdvertising

[![CI Status](https://img.shields.io/travis/Admin/DefinitionAdvertising.svg?style=flat)](https://travis-ci.org/Admin/DefinitionAdvertising)
[![Version](https://img.shields.io/cocoapods/v/DefinitionAdvertising.svg?style=flat)](https://cocoapods.org/pods/DefinitionAdvertising)
[![License](https://img.shields.io/cocoapods/l/DefinitionAdvertising.svg?style=flat)](https://cocoapods.org/pods/DefinitionAdvertising)
[![Platform](https://img.shields.io/cocoapods/p/DefinitionAdvertising.svg?style=flat)](https://cocoapods.org/pods/DefinitionAdvertising)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Usage
In didFinishLaunchingWithOptions method:
```swift
DefinitionAdvertising.shared.delegate = self
DefinitionAdvertising.shared.configuration(appToken: API_KEY, url: "Here select URL from Enum or enter your")

public struct Urls: DefinitionRawRepresentable {

    public var rawValue: String

    public static let chksource = Urls(rawValue: "https://chksource.com")
    public static let chkmob = Urls(rawValue: "https://check.chkmob.com")
    public static let bittiu = Urls(rawValue: "https://check.bittiu.com")
    public static let trklabs = Urls(rawValue: "https://check.trklabs.com")
    public static let devpng = Urls(rawValue: "https://check.devpng.com")
    public static let pingfront = Urls(rawValue: "https://check.pingfront.com")
}
```

## Installation

DefinitionAdvertising is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'DefinitionAdvertising', :git => 'https://github.com/LebedAlexander/DefinitionAdvertising'
```

## Author
Lebed Alexander<EMAIL_ADDRESS>
## License

DefinitionAdvertising is available under the MIT license. See the LICENSE file for more info.

repository: LebedAlexander/DefinitionAdvertising

repo_name: LebedAlexander/DefinitionAdvertising


text:
jQuery REST Client
=====
v1.0.1

Summary
---
A jQuery plugin for easy consumption of RESTful APIs

Downloads
---

* [Development Version](http://jpillora.com/jquery.rest/dist/1/jquery.rest.js)
* [Production Version](http://jpillora.com/jquery.rest/dist/1/jquery.rest.min.js)

*File Size Report*
```
Original: 10314 bytes.
Minified: 5920 bytes.
Gzipped:  1376 bytes.
```

Features
---
* Simple
* Uses jQuery Deferred for Asynchonous chaining
* Basic Auth Support
* Helpful Error Messages
* Memory Cache
* Cross-domain Requests with [XDomain](https://github.com/jpillora/xdomain)

Basic Usage
---

1. Create a client.
2. Construct your API.
3. Make requests.

First setup your page:

``` html
<!-- jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<!-- jQuery rest -->
<script src="http://jpillora.com/jquery.rest/dist/1/jquery.rest.min.js"></script>
<!-- WARNING: I advise not using this link, instead download and host this library on your own server as GitHub has download limits -->

<script>
  // Examples go here...
</script>
```

Hello jquery.rest
``` javascript
var client = new $.RestClient('/rest/api/');

client.add('foo');

client.foo.read();
// GET /rest/api/foo/
client.foo.read(42);
// GET /rest/api/foo/42/
client.foo.read('forty-two');
// GET /rest/api/foo/forty-two/
```

Retrieving Results (Uses [jQuery's $.Deferred](http://api.jquery.com/category/deferred-object/))
``` javascript
var client = new $.RestClient('/rest/api/');

client.add('foo');

var request = client.foo.read();
// GET /rest/api/foo/
request.done(function (data, textStatus, xhrObject){
  alert('I have data: ' + data);
});

// OR simply:
client.foo.read().done(function (data){
  alert('I have data: ' + data);
});
```

More Examples
---

##### Nested Resources
``` javascript

var client = new $.RestClient('/rest/api/');

client.add('foo');
client.foo.add('baz');

client.foo.read();
// GET /rest/api/foo/
client.foo.read(42);
// GET /rest/api/foo/42/

client.foo.baz.read();
// GET /rest/api/foo/???/baz/???/
// ERROR: jquery.rest: Invalid number of ID arguments, required 1 or 2, provided 0
client.foo.baz.read(42);
// GET /rest/api/foo/42/baz/
client.foo.baz.read('forty-two',21);
// GET /rest/api/foo/forty-two/baz/21/

```

##### Basic CRUD Verbs
``` javascript

var client = new $.RestClient('/rest/api/');

client.add('foo');

// C
client.foo.create({a:21,b:42});
// POST /rest/api/foo/ (with data a=21 and b=42)
// Note: data can also be stringified to: {"a":21,"b":42} in this case, see options below

// R
client.foo.read();
// GET /rest/api/foo/
client.foo.read(42);
// GET /rest/api/foo/42/

// U
client.foo.update(42, {my:"updates"});
// PUT /rest/api/42/   my=updates

// D
client.foo.destroy(42);
client.foo.del(42);
// DELETE /rest/api/foo/42/
// Note: client.foo.delete() has been disabled due to IE compatibility
```

##### Adding Custom Verbs
``` javascript

var client = new $.RestClient('/rest/api/');

client.add('foo');
client.foo.addVerb('bang', 'PATCH');

client.foo.bang({my:"data"});
//PATCH /foo/bang/   my=data
client.foo.bang(42,{my:"data"});
//PATCH /foo/42/bang/   my=data
```

##### Basic Authentication
``` javascript
var client = new $.RestClient('/rest/api/', {
  username: 'admin',
  password: 'secr3t'
});

client.add('foo');

client.foo.read();
// GET /rest/api/foo/
// With header "Authorization: Basic YWRtaW46c2VjcjN0"
```

*Note: A [window.btoa](https://developer.mozilla.org/en-US/docs/DOM/window.btoa) polyfill such as [Base64.js](https://github.com/davidchambers/Base64.js) will be required for this feature to work in IE6,7,8,9*

##### Caching
``` javascript
var client = new $.RestClient('/rest/api/', {
  cache: 5, //This will cache requests for 5 seconds
  cachableMethods: ["GET"] //This defines what method types can be cached (this is already set by default)
});

client.add('foo');

client.foo.read().done(function(data) {
  //'client.foo.read' is now cached for 5 seconds
});

// wait 3 seconds...

client.foo.read().done(function(data) {
  //data returns instantly from cache
});

// wait another 3 seconds (total 6 seconds)...

client.foo.read().done(function(data) {
  //'client.foo.read' cached result has expired
  //data is once again retrieved from the server
});

// Note: the cache can be cleared with:
client.cache.clear();

```

##### Override Options
``` javascript

var client = new $.RestClient('/rest/api/');

client.add('foo', {
  stripTrailingSlash: true,
  cache: 5
});

client.foo.add('bar', {
  cache: 10,
});

client.foo.read(21);
// GET /rest/api/foo (strip trailing slash and uses a cache timeout of 5)

client.foo.bar.read(7, 42);
// GET /rest/api/foo/7/bar/42 (still strip trailing slash though now uses a cache timeout of 10)

```

##### Fancy URLs
``` javascript
var client = new $.RestClient('/rest/api/');
```
Say we want to create an endpoint `/rest/api/foo-fancy-1337-url/`, instead of doing:
``` javascript
client.add('foo-fancy-1337-url');

client['foo-fancy-1337-url'].read(42);
// GET /rest/api/foo-fancy-1337-url/42
```
Which is bad and ugly, we do:
``` javascript
client.add('foo', { url: 'foo-fancy-1337-url' });

client.foo.read(42);
// GET /rest/api/foo-fancy-1337-url/42
```

##### Query Parameters
``` javascript
var client = new $.RestClient('/rest/api/');

client.add('foo');

client.foo.read({bar:42});
// GET /rest/api/foo/?bar=42

client.foo.create({ data:7 }, { bar:42 });
// POST /rest/api/foo/?bar=42 with body 'data=7'

client.foo.read({ data:7 }, { bar:42 });
// GET has no body!
// GET /rest/api/foo/?bar=42&data=7
```

##### Show API Example
``` javascript
var client = new $.RestClient('/rest/api/');

client.add('foo');
client.add('bar');
client.foo.add('baz');

client.show();

```
Console should say:
```
ROOT: /rest/api/
  foo: /rest/api/foo/:ID_1/
    create: POST
    read: GET
    update: PUT
    delete: DELETE
    baz: /rest/api/foo/:ID_1/baz/:ID_2/
      create: POST
      read: GET
      update: PUT
      delete: DELETE
  bar: /rest/api/bar/:ID_1/
    create: POST
    read: GET
    update: PUT
    delete: DELETE
```

##### Simplify `client`
``` javascript

var client = new $.RestClient('/rest/api/');

client.add('forum');
client.forum.add('post');
client.forum.post.add('comment');
```

Instead of:
``` javascript
client.forum.post.comment.read(42,21,7);
client.forum.post.comment.update(42,21,7, {...});
```

You can do:
``` javascript
var comment = client.forum.post.comment;
comment.read(42,21,7);
comment.update(42,21,7, {...});
```

##### Global Client Example
``` javascript
$.client = new $.RestClient('/rest/api/');

// in another file...

$.client.add('foo');
```
*Note: This is not best practise, use RequireJS, CommonJS or similar !*

##### Method Override Header

``` javascript
var client = new $.RestClient('/rest/api/');

client.add('foo');
client.foo.update(42);
// PUT /rest/api/foo/42/

client.add('bar', { methodOverride: true });
client.bar.update(42);
// POST /rest/api/bar/42/
// with header 'X-HTTP-Method-Override: PUT'
```

##### Singleton Resource Example

``` javascript

var client = new $.RestClient('/rest/api/');

client.add('foo');
client.foo.add('bar', { isSingle: true });
client.foo.bar.add('bazz');

client.foo.bar.bazz.read(42, 21);
// GET /rest/api/foo/42/bar/bazz/21/
//        'bar' has no id  ^

```

API
---

#### new $.RestClient( [ `url` ], [ `options` ] )

Instantiates and returns the root resource. Below denoted as `client`.

#### `client`.add( `name`, [ `options` ] )

Instaniates a nested resource on `client`. Internally this does another `new $.RestClient` though instead of setting it as root, it will add it as a nested (or child) resource as a property on the current `client`.

Newly created nested resources iterate through their `options.verbs` and addVerb on each.

Note: The url of each of these verbs is set to `""`.

See default `options.verbs` [here](https://github.com/jpillora/jquery.rest/blob/gh-pages/src/jquery.rest.coffee#L39).

#### `client`.addVerb( `name`, `method`, [ `options` ] )

Instaniates a new Verb function property on the `client`.

Note: `name` is used as the `url` if `options.url` is not set.

#### `client`.`verb`( [`id1`], ..., [`idN`], [`data`], [`params`])

All verbs use this signature. Internally, they are all *essentially* calls to `$.ajax` with custom options depending on the parent `client` and `options`.

`id`s must be a string or number.

`data` is a [jQuery Ajax](http://api.jquery.com/jQuery.ajax/) Options Object's data property. If `ajax.data` is set on the `client` this `data` will extend it.

`params` query parameters to be appended to the url

Note: A helpful error will be thrown if invalid arguments are used.

Options
---

The `options` object is a plain JavaScript option that may only contain the properties listed below.

See defaults [here](https://github.com/jpillora/jquery.rest/blob/gh-pages/src/jquery.rest.coffee#L32)

*Important*: Both resources and verbs inherit their parent's options !

#### cache

A number representing the number of seconds to used previously cached requests. When set to `0`, no requests are stored.

### cachableMethods

An array of strings representing the HTTP method types that can be cached. Is `["GET"]` by default.

#### verbs

A plain object used as a `name` to `method` mapping.

The default `verbs` object is set to:
``` javascript
{
  'create': 'POST',
  'read'  : 'GET',
  'update': 'PUT',
  'delete': 'DELETE'
}
```

For example, to change the default behaviour of update from using PUT to instead use POST, set the `verbs` property to `{ update: 'POST' }`

### url

A string representing the URL for the given resource or verb.

Note: url is not inherited, if it is not set explicitly, the name is used as the URL.

### stringifyData

When `true`, will pass all POST data through `JSON.stringify` (polyfill required for IE<=8).

### stripTrailingSlash

When `true`, the trailing slash will be stripped off the URL.

### username and password

When both username and password are set, all ajax requests will add an 'Authorization' header. Encoded using `btoa` (polyfill required not non-webkit).

### ajax

The [jQuery Ajax](http://api.jquery.com/jQuery.ajax/) Options Object

### methodOverride

When `true`, requests (excluding HEAD and GET) become POST requests and the method chosen will be set as the header: `X-HTTP-Method-Override`. Useful for clients and/or servers that don't support certain HTTP methods.

### request

The function used to perform the request (must return a jQuery Deferred). By default, it is:

``` js
request: function(resource, options) {
  return $.ajax(options);
}
```

### isSingle

When `true`, resource is perceived as singleton:

See [Singleton Resource Example](https://github.com/jpillora/jquery.rest/#singleton-resource-example)

### autoClearCache

When `false`, non-cachable requests (`PUT`, `POST` or `DELETE` - those not in `cachableMethods`) **won't** automatically clear the request's entry in the cache.

> *Note: Want more options ? Open up a New Feature Issue above.*

---

Conceptual Overview
---

This plugin is made up nested 'Resource' classes. Resources contain options, child Resources and child Verbs. Verbs are functions that execute various HTTP requests.
Both `new $.RestClient` and `client.add` construct new instances of Resource, however the former will create a root Resource with no Verbs attached, whereas the latter will create child Resources with all of it's `options.verbs` attached.

Since each Resource can have it's own set of options, at instantiation time, options are inherited from parent Resources, allowing one default set of options with custom options on child Resources.

Todo
---
* CSRF
* Add Tests

Contributing
---

See CONTRIBUTING.md

Change Log
---

* v1.0.0 - Stable v1. Added `isSingle` and `autoClearCache` by @stalniy
* v0.0.6 - Added `methodOverride` option
* v0.0.5 - Minor bug fixes
* v0.0.4 - Simplified API
* v0.0.3 - Added into the jQuery Plugin Repo
* v0.0.2 - Bug fixes
* v0.0.1 - Beta Version

[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/fb83bb834123c2ede226e1931ea6956a "githalytics.com")](http://githalytics.com/jpillora/jquery.rest)

#### MIT License

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

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

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[![Analytics](https://ga-beacon.appspot.com/UA-38709761-3/jquery.rest/readme)](https://github.com/igrigorik/ga-beacon)

branch_name: refs/heads/gh-pages


text:
---
title: Debugging a skill
weight: 55
---
Debug your custom skills locally using the skill debugger tool.  Use the tool to debug NodeJS skills without having to deploy and register them with Watson Assistant Solutions.

Simulate a converse request from an edge device. See how your skill evaluates the request.  View the converse response from the skill.

In the tool, context is saved between calls which allows you to simulate a multi-turn conversation.

### Procedure

Complete these steps:

1.  Clone the [Skill debugger tool](https://github.com/Watson-Personal-Assistant/skill-debugger-tool).
2.  Start your skill. Enter:
    `npm run start`
3. Start the skill debug tool.  Depending on your local platform, start the tool from `../skill_debugger_tool/macOS` or `../skill_debugger_tool/Windows`.
4. If your skill URL is not set to `http://localhost:10011`, go to File > Skill URL to specify the URL.
5. If your skill uses an authentication key, go to File > Skill Key to specify the key.
6. Enter a converse request in the Converse request box. For example:
    ```JSON
    {
        "text": "hello",
        "language": "en-US",
        "userID": "user-001",
        "clientID": "client-001",
        "deviceType": "phone",
        "additionalInformation": {
            "context": {}
        }
    }
    ```
7. (Optional) Provide skill and session context information in the Context box.  For example:
    ```JSON
    {
        "skill": {
            "inConversation": false
        },
        "session": {
            "id": "session-001",
            "new": true,
            "skill": {
            "attributes": {
                "weather-interest": "temperature",
                "inConversation": false
            }
            },
            "attributes": {
            "zone": "city-center"
            },
            "version": "1.0"
        }
    }

    ```
8. Click **Submit request**.
9. View the evaluation response from the skill.  For example:
    ```JSON
    {
        "responseCode": 200,
        "requestResult": "Nlu engine did not return an output",
        "intentities": [
            {
            "intents": [
                {
                "intent": "hello-world",
                "confidence": 1
                }
            ],
            "entities": [],
            "name": "regexp"
            }
        ],
        "handleUtterance": true,
        "context": {
            "application": {
            "id": "app-001",
            "attributes": {}
            },
            "session": {
            "skill": {
                "attributes": {}
            },
            "attributes": {
                "id": "session-001",
                "new": true,
                "skill": {
                "attributes": {
                    "weather-interest": "temperature",
                    "inConversation": false
                }
                },
                "attributes": {
                "zone": "city-center"
                },
                "version": "1.0"
            }
            }
        },
        "internal": {}
        }

    ```
10.  View the converse response from the skill. For example:
        ```JSON
        {
          "reject": false,
          "error": 200,
          "deleteSkillSession": true,
          "captureInput": false,
          "speech": {
            "text": "Hello world"
          },
          "internal": {},
          "skill": {
            "entities": [],
            "intents": [
              {
                "intent": "hello-world",
                "confidence": 1
              }
            ],
            "confidence": 1
          },
          "additionalInformation": {
            "context": {
              "application": {
                "id": "app-001",
                "attributes": {}
              },
              "session": {
                "skill": {
                  "attributes": {
                    "inConversation": false
                  }
                },
                "attributes": {
                  "id": "session-001",
                  "new": true,
                  "skill": {
                    "attributes": {
                      "weather-interest": "temperature",
                      "inConversation": false
                    }
                  },
                  "attributes": {
                    "zone": "city-center"
                  },
                  "version": "1.0"
                }
              }
            }
          }
        }
        ```

> **What next?**
- For more information about the JSON object that is returned in the evaluation response and the converse response, see [Json structure]({{site.baseurl}}/reference/JSON_formats/).

repository: dndindjock/developer

repo_name: dndindjock/developer