Integer constraints don't work for Stock Cutting Problem

Hey there, I submitted an issue where I talked about the Stock Cutting Problem: https://github.com/JWally/jsLPSolver/issues/83
I've come up with a solution that works for one example, cutting 96" boards into:

21x 7"
17x 76"
7x 80"

model = { optimize: 'count',
  opType: 'min',
  variables:
   { version0: { cut7: 13, cut76: 0, cut80: 0, count: 1 },
     version1: { cut7: 2, cut76: 1, cut80: 0, count: 1 },
     version2: { cut7: 2, cut76: 0, cut80: 1, count: 1 } },
  int: { version0: 1, version1: 1, version2: 1 },
  constraints: { cut7: { min: 21 }, cut76: { min: 17 }, cut80: { min: 7 } } }

result = { feasible: true,
  result: 24,
  bounded: true,
  version1: 17,
  version2: 7 }

The versions are the different ways that you can cut 96" board into those pieces. I've constrained the number of each version to be an integer and we have an expected result.
However, when I generalizing that example to a slightly more complicated one, the integer requirements don't work.
The more complicated example involves, cutting 96 inch boards into:

28x 11"
14x 21"
8x 84"
42x 3.5"
4x 79.5"

model = { optimize: 'count',
  opType: 'min',
  variables:
   { version0:
      { cut11: 8,
        cut21: 0,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version1:
      { cut11: 6,
        cut21: 1,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version2:
      { cut11: 0,
        cut21: 4,
        cut84: 0,
        'cut3.5': 1,
        'cut79.5': 0,
        count: 1 },
     version3:
      { cut11: 1,
        cut21: 0,
        cut84: 1,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version4:
      { cut11: 0,
        cut21: 0,
        cut84: 1,
        'cut3.5': 1,
        'cut79.5': 0,
        count: 1 },
     version5:
      { cut11: 8,
        cut21: 0,
        cut84: 0,
        'cut3.5': 1,
        'cut79.5': 0,
        count: 1 },
     version6:
      { cut11: 0,
        cut21: 0,
        cut84: 1,
        'cut3.5': 1,
        'cut79.5': 0,
        count: 1 },
     version7:
      { cut11: 0,
        cut21: 1,
        cut84: 0,
        'cut3.5': 19,
        'cut79.5': 0,
        count: 1 },
     version8:
      { cut11: 0,
        cut21: 0,
        cut84: 0,
        'cut3.5': 4,
        'cut79.5': 1,
        count: 1 },
     version9:
      { cut11: 1,
        cut21: 0,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 1,
        count: 1 } },
  int:
   { version0: 1,
     version1: 1,
     version2: 1,
     version3: 1,
     version4: 1,
     version5: 1,
     version6: 1,
     version7: 1,
     version8: 1,
     version9: 1 },
  constraints:
   { cut11: { min: 28 },
     cut21: { min: 14 },
     cut84: { min: 8 },
     'cut3.5': { min: 42 },
     'cut79.5': { min: 4 } } }

result = { feasible: true,
  result: 18.8,
  bounded: true,
  version5: 2.5,
  version2: 3.23333333,
  version3: 8,
  version7: 1.06666667,
  version8: 4 }

Notice how the results have decimals when I've clearly specified them in the integer constraints.
Any ideas what I can do about this?

I wasn't permuting through all the possible cuts properly in that last one. Here's a more correct example. Still has a problem with not having an integer result value...
model = [ { count: 17, cuts: [ 7, 7, 76 ] },
  { count: 7, cuts: [ 7, 7, 80 ] } ]
{ optimize: 'count',
  opType: 'min',
  variables:
   { version0:
      { cut11: 8,
        cut21: 0,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version1:
      { cut11: 7,
        cut21: 0,
        cut84: 0,
        'cut3.5': 3,
        'cut79.5': 0,
        count: 1 },
     version2:
      { cut11: 6,
        cut21: 1,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version3:
      { cut11: 6,
        cut21: 0,
        cut84: 0,
        'cut3.5': 6,
        'cut79.5': 0,
        count: 1 },
     version4:
      { cut11: 5,
        cut21: 1,
        cut84: 0,
        'cut3.5': 3,
        'cut79.5': 0,
        count: 1 },
     version5:
      { cut11: 5,
        cut21: 0,
        cut84: 0,
        'cut3.5': 9,
        'cut79.5': 0,
        count: 1 },
     version6:
      { cut11: 4,
        cut21: 2,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version7:
      { cut11: 4,
        cut21: 1,
        cut84: 0,
        'cut3.5': 6,
        'cut79.5': 0,
        count: 1 },
     version8:
      { cut11: 4,
        cut21: 0,
        cut84: 0,
        'cut3.5': 12,
        'cut79.5': 0,
        count: 1 },
     version9:
      { cut11: 3,
        cut21: 3,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version10:
      { cut11: 3,
        cut21: 2,
        cut84: 0,
        'cut3.5': 3,
        'cut79.5': 0,
        count: 1 },
     version11:
      { cut11: 3,
        cut21: 1,
        cut84: 0,
        'cut3.5': 9,
        'cut79.5': 0,
        count: 1 },
     version12:
      { cut11: 3,
        cut21: 0,
        cut84: 0,
        'cut3.5': 15,
        'cut79.5': 0,
        count: 1 },
     version13:
      { cut11: 2,
        cut21: 3,
        cut84: 0,
        'cut3.5': 1,
        'cut79.5': 0,
        count: 1 },
     version14:
      { cut11: 2,
        cut21: 2,
        cut84: 0,
        'cut3.5': 7,
        'cut79.5': 0,
        count: 1 },
     version15:
      { cut11: 2,
        cut21: 1,
        cut84: 0,
        'cut3.5': 13,
        'cut79.5': 0,
        count: 1 },
     version16:
      { cut11: 2,
        cut21: 0,
        cut84: 0,
        'cut3.5': 19,
        'cut79.5': 0,
        count: 1 },
     version17:
      { cut11: 1,
        cut21: 4,
        cut84: 0,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version18:
      { cut11: 1,
        cut21: 3,
        cut84: 0,
        'cut3.5': 4,
        'cut79.5': 0,
        count: 1 },
     version19:
      { cut11: 1,
        cut21: 2,
        cut84: 0,
        'cut3.5': 10,
        'cut79.5': 0,
        count: 1 },
     version20:
      { cut11: 1,
        cut21: 1,
        cut84: 0,
        'cut3.5': 16,
        'cut79.5': 0,
        count: 1 },
     version21:
      { cut11: 1,
        cut21: 0,
        cut84: 1,
        'cut3.5': 0,
        'cut79.5': 0,
        count: 1 },
     version22:
      { cut11: 1,
        cut21: 0,
        cut84: 0,
        'cut3.5': 22,
        'cut79.5': 0,
        count: 1 },
     version23:
      { cut11: 1,
        cut21: 0,
        cut84: 0,
        'cut3.5': 1,
        'cut79.5': 1,
        count: 1 },
     version24:
      { cut11: 0,
        cut21: 4,
        cut84: 0,
        'cut3.5': 1,
        'cut79.5': 0,
        count: 1 },
     version25:
      { cut11: 0,
        cut21: 3,
        cut84: 0,
        'cut3.5': 7,
        'cut79.5': 0,
        count: 1 },
     version26:
      { cut11: 0,
        cut21: 2,
        cut84: 0,
        'cut3.5': 13,
        'cut79.5': 0,
        count: 1 },
     version27:
      { cut11: 0,
        cut21: 1,
        cut84: 0,
        'cut3.5': 19,
        'cut79.5': 0,
        count: 1 },
     version28:
      { cut11: 0,
        cut21: 0,
        cut84: 1,
        'cut3.5': 1,
        'cut79.5': 0,
        count: 1 },
     version29:
      { cut11: 0,
        cut21: 0,
        cut84: 0,
        'cut3.5': 25,
        'cut79.5': 0,
        count: 1 },
     version30:
      { cut11: 0,
        cut21: 0,
        cut84: 0,
        'cut3.5': 4,
        'cut79.5': 1,
        count: 1 } },
  int:
   { version0: 1,
     version1: 1,
     version2: 1,
     version3: 1,
     version4: 1,
     version5: 1,
     version6: 1,
     version7: 1,
     version8: 1,
     version9: 1,
     version10: 1,
     version11: 1,
     version12: 1,
     version13: 1,
     version14: 1,
     version15: 1,
     version16: 1,
     version17: 1,
     version18: 1,
     version19: 1,
     version20: 1,
     version21: 1,
     version22: 1,
     version23: 1,
     version24: 1,
     version25: 1,
     version26: 1,
     version27: 1,
     version28: 1,
     version29: 1,
     version30: 1 },
  constraints:
   { cut11: { min: 28 },
     cut21: { min: 14 },
     cut84: { min: 8 },
     'cut3.5': { min: 42 },
     'cut79.5': { min: 4 } } }

result = { feasible: true,
  result: 18.42666667,
  bounded: true,
  version16: 1,
  version9: 4.66666667,
  version21: 8,
  version29: 0.76,
  version23: 4 }

I took the floor of those values to see what sort of remainder was left over...
[ { size: 11, count: 2 },
  { size: 21, count: 2 },
  { size: 3.5, count: 19 } ]

Then I ran my model again on just that remainder...
model = { optimize: 'count',
  opType: 'min',
  variables:
   { version0: { cut11: 8, cut21: 0, 'cut3.5': 0, count: 1 },
     version1: { cut11: 7, cut21: 0, 'cut3.5': 3, count: 1 },
     version2: { cut11: 6, cut21: 1, 'cut3.5': 0, count: 1 },
     version3: { cut11: 6, cut21: 0, 'cut3.5': 6, count: 1 },
     version4: { cut11: 5, cut21: 1, 'cut3.5': 3, count: 1 },
     version5: { cut11: 5, cut21: 0, 'cut3.5': 9, count: 1 },
     version6: { cut11: 4, cut21: 2, 'cut3.5': 0, count: 1 },
     version7: { cut11: 4, cut21: 1, 'cut3.5': 6, count: 1 },
     version8: { cut11: 4, cut21: 0, 'cut3.5': 12, count: 1 },
     version9: { cut11: 3, cut21: 3, 'cut3.5': 0, count: 1 },
     version10: { cut11: 3, cut21: 2, 'cut3.5': 3, count: 1 },
     version11: { cut11: 3, cut21: 1, 'cut3.5': 9, count: 1 },
     version12: { cut11: 3, cut21: 0, 'cut3.5': 15, count: 1 },
     version13: { cut11: 2, cut21: 3, 'cut3.5': 1, count: 1 },
     version14: { cut11: 2, cut21: 2, 'cut3.5': 7, count: 1 },
     version15: { cut11: 2, cut21: 1, 'cut3.5': 13, count: 1 },
     version16: { cut11: 2, cut21: 0, 'cut3.5': 19, count: 1 },
     version17: { cut11: 1, cut21: 4, 'cut3.5': 0, count: 1 },
     version18: { cut11: 1, cut21: 3, 'cut3.5': 4, count: 1 },
     version19: { cut11: 1, cut21: 2, 'cut3.5': 10, count: 1 },
     version20: { cut11: 1, cut21: 1, 'cut3.5': 16, count: 1 },
     version21: { cut11: 1, cut21: 0, 'cut3.5': 22, count: 1 },
     version22: { cut11: 0, cut21: 4, 'cut3.5': 1, count: 1 },
     version23: { cut11: 0, cut21: 3, 'cut3.5': 7, count: 1 },
     version24: { cut11: 0, cut21: 2, 'cut3.5': 13, count: 1 },
     version25: { cut11: 0, cut21: 1, 'cut3.5': 19, count: 1 },
     version26: { cut11: 0, cut21: 0, 'cut3.5': 25, count: 1 } },
  int:
   { version0: 1,
     version1: 1,
     version2: 1,
     version3: 1,
     version4: 1,
     version5: 1,
     version6: 1,
     version7: 1,
     version8: 1,
     version9: 1,
     version10: 1,
     version11: 1,
     version12: 1,
     version13: 1,
     version14: 1,
     version15: 1,
     version16: 1,
     version17: 1,
     version18: 1,
     version19: 1,
     version20: 1,
     version21: 1,
     version22: 1,
     version23: 1,
     version24: 1,
     version25: 1,
     version26: 1 },
  constraints:
   { cut11: { min: 2 }, cut21: { min: 2 }, 'cut3.5': { min: 19 } } }

result = { feasible: true,
  result: 1.42666667,
  bounded: true,
  version16: 0,
  version9: 0.66666667,
  version26: 0.76 }

And I still got decimals...
At the end of the day, 21 * 2 + 11 * 2 = 64 and 19 * 3.5 = 66.5 so I will need to extra boards... but its still a little off that there are decimals there.

@ccorcos, I'm using javascript-lp-solver too and I noticed that there is an error in specifying integer variables in your model. Use "ints" instead of "int" and the result will be as follows:
https://runkit.com/embed/x6496dcvyxvj

I think I have this one under control now.
Pull the current version, and try running your model through like this:
{
    "name": "Fancy Stock Cutting Problem",
    "optimize": "count",
    "opType": "min",
    "_timeout": 5000,
    "options": {
        "tolerance": 0.03,
        "timeout": 1500
    },
    "variables": {
        "version0": {
            "cut11": 8,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 0,
            "cut79.5": 0,
            "count": 1
        },
        "version1": {
            "cut11": 7,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 3,
            "cut79.5": 0,
            "count": 1
        },
        "version2": {
            "cut11": 6,
            "cut21": 1,
            "cut84": 0,
            "cut3.5": 0,
            "cut79.5": 0,
            "count": 1
        },
        "version3": {
            "cut11": 6,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 6,
            "cut79.5": 0,
            "count": 1
        },
        "version4": {
            "cut11": 5,
            "cut21": 1,
            "cut84": 0,
            "cut3.5": 3,
            "cut79.5": 0,
            "count": 1
        },
        "version5": {
            "cut11": 5,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 9,
            "cut79.5": 0,
            "count": 1
        },
        "version6": {
            "cut11": 4,
            "cut21": 2,
            "cut84": 0,
            "cut3.5": 0,
            "cut79.5": 0,
            "count": 1
        },
        "version7": {
            "cut11": 4,
            "cut21": 1,
            "cut84": 0,
            "cut3.5": 6,
            "cut79.5": 0,
            "count": 1
        },
        "version8": {
            "cut11": 4,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 12,
            "cut79.5": 0,
            "count": 1
        },
        "version9": {
            "cut11": 3,
            "cut21": 3,
            "cut84": 0,
            "cut3.5": 0,
            "cut79.5": 0,
            "count": 1
        },
        "version10": {
            "cut11": 3,
            "cut21": 2,
            "cut84": 0,
            "cut3.5": 3,
            "cut79.5": 0,
            "count": 1
        },
        "version11": {
            "cut11": 3,
            "cut21": 1,
            "cut84": 0,
            "cut3.5": 9,
            "cut79.5": 0,
            "count": 1
        },
        "version12": {
            "cut11": 3,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 15,
            "cut79.5": 0,
            "count": 1
        },
        "version13": {
            "cut11": 2,
            "cut21": 3,
            "cut84": 0,
            "cut3.5": 1,
            "cut79.5": 0,
            "count": 1
        },
        "version14": {
            "cut11": 2,
            "cut21": 2,
            "cut84": 0,
            "cut3.5": 7,
            "cut79.5": 0,
            "count": 1
        },
        "version15": {
            "cut11": 2,
            "cut21": 1,
            "cut84": 0,
            "cut3.5": 13,
            "cut79.5": 0,
            "count": 1
        },
        "version16": {
            "cut11": 2,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 19,
            "cut79.5": 0,
            "count": 1
        },
        "version17": {
            "cut11": 1,
            "cut21": 4,
            "cut84": 0,
            "cut3.5": 0,
            "cut79.5": 0,
            "count": 1
        },
        "version18": {
            "cut11": 1,
            "cut21": 3,
            "cut84": 0,
            "cut3.5": 4,
            "cut79.5": 0,
            "count": 1
        },
        "version19": {
            "cut11": 1,
            "cut21": 2,
            "cut84": 0,
            "cut3.5": 10,
            "cut79.5": 0,
            "count": 1
        },
        "version20": {
            "cut11": 1,
            "cut21": 1,
            "cut84": 0,
            "cut3.5": 16,
            "cut79.5": 0,
            "count": 1
        },
        "version21": {
            "cut11": 1,
            "cut21": 0,
            "cut84": 1,
            "cut3.5": 0,
            "cut79.5": 0,
            "count": 1
        },
        "version22": {
            "cut11": 1,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 22,
            "cut79.5": 0,
            "count": 1
        },
        "version23": {
            "cut11": 1,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 1,
            "cut79.5": 1,
            "count": 1
        },
        "version24": {
            "cut11": 0,
            "cut21": 4,
            "cut84": 0,
            "cut3.5": 1,
            "cut79.5": 0,
            "count": 1
        },
        "version25": {
            "cut11": 0,
            "cut21": 3,
            "cut84": 0,
            "cut3.5": 7,
            "cut79.5": 0,
            "count": 1
        },
        "version26": {
            "cut11": 0,
            "cut21": 2,
            "cut84": 0,
            "cut3.5": 13,
            "cut79.5": 0,
            "count": 1
        },
        "version27": {
            "cut11": 0,
            "cut21": 1,
            "cut84": 0,
            "cut3.5": 19,
            "cut79.5": 0,
            "count": 1
        },
        "version28": {
            "cut11": 0,
            "cut21": 0,
            "cut84": 1,
            "cut3.5": 1,
            "cut79.5": 0,
            "count": 1
        },
        "version29": {
            "cut11": 0,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 25,
            "cut79.5": 0,
            "count": 1
        },
        "version30": {
            "cut11": 0,
            "cut21": 0,
            "cut84": 0,
            "cut3.5": 4,
            "cut79.5": 1,
            "count": 1
        }
    },
    "ints": {
        "version0": 1,
        "version1": 1,
        "version2": 1,
        "version3": 1,
        "version4": 1,
        "version5": 1,
        "version6": 1,
        "version7": 1,
        "version8": 1,
        "version9": 1,
        "version10": 1,
        "version11": 1,
        "version12": 1,
        "version13": 1,
        "version14": 1,
        "version15": 1,
        "version16": 1,
        "version17": 1,
        "version18": 1,
        "version19": 1,
        "version20": 1,
        "version21": 1,
        "version22": 1,
        "version23": 1,
        "version24": 1,
        "version25": 1,
        "version26": 1,
        "version27": 1,
        "version28": 1,
        "version29": 1,
        "version30": 1
    },
    "constraints": {
        "cut11": {
            "min": 28
        },
        "cut21": {
            "min": 14
        },
        "cut84": {
            "min": 8
        },
        "cut3.5": {
            "min": 42
        },
        "cut79.5": {
            "min": 4
        }
    },
    "expects": {
        "feasible": true,
        "result": 19,
        "version30": 1,
        "version9": 4,
        "version21": 2,
        "version28": 6,
        "version24": 0,
        "version15": 2,
        "version23": 3,
        "version1": 1
    }
}

I get the following:
{ feasible: true,
  result: 19,
  bounded: true,
  isIntegral: true,
  version30: 1,
  version9: 4,
  version21: 2,
  version28: 6,
  version24: 0,
  version15: 2,
  version23: 3,
  version1: 1,
  messages: [] }

I'm gonna close just so I can do some clean up.
Please feel free to re-open if this didn't work.
Thanks!


Simplify SwiftBasicFormat by introducing structural information of the syntax tree as static properties

The core idea here is that we a static property structure to all the syntax nodes, which allows us to query the statically known structure of the syntax tree. That way BasicFormat can have a list of all the children it should indent or put on a new line, reducing its implementation from 3,000 to 300 lines.
structure will also be useful in a variety of other use cases:

We can use it to improve debugInitCall to insert upcast conversions it is currently missing because it can use childrenKeyPaths to query the static variable type of a child
I have a feeling that childNameForDiagnostics could be implemented more cleanly on top of childrenKeyPaths
I will try to implement keyword completion on top of this infrastructur
It could allow us to specify where nodes should be inserted into a syntax tree. Currently e.g. Fix-Its only support replacements.

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test


Gopkg: update etcd library to v3.3.13

Signed-off-by: André Martins<EMAIL_ADDRESS>

This change is

test-me-please

Coverage increased (+0.02%) to 44.15% when pulling 947a7135e7671c7746f482f56ad2a616bd0d38a8 on pr/update-etcd-lib into 030ceacbcccf4048062db29457491122f0afc0a1 on master.

Test failure appears related - status for Cilium says that kvstore is not ready. However, I'm surprised that it would cause any problems, the change in the vendor'd code is minimal.

test-me-please


Add valid address value to US Address Verification response object

Summary
When using the latest version of the published lob-typescript-sdk it appears that the valid_address component of the API response is not exposed.

Expected Behavior
Using the SDK provided here, when requesting a US Verification an attribute exists on the response object that maps back to valid_address if the call and JSON response were parsed directly.

Current Behavior
Attributes of the response are not mapped in the response object.

Possible Solution

https://github.com/lob/lob-typescript-sdk/blob/main/models/us-verification.ts#L26
The linked file is updated to expose a valid_address attribute mapped to the appropriate response field.
 The use case being addresses of new construction for example.

Hey @mattalline,
Apologies for missing this, I think it got lost in my holiday emails. I will look into this and make it a priority to get a new version out. Thanks for the patience!

@mattalline  The newest version can be found here
this includes a solution to the issue above. Thanks!


deprecate react-wordcloud

test https://www.npmjs.com/package/react-tagcloud and https://www.npmjs.com/package/react-d3-cloud

closed by https://github.com/ppanero/ppanero.github.io/commit/93ecc39a6bc60b9a72212b89051d78ee33aa2c24


make navigation keys work

Page Up and Page Down now moves one page (showamount option) up or down, Home and End also jumps to the beginning/end of the playlist. This makes it easier to navigate very large playlists.

Thanks for the PR! Nice feature.


[Grouped Campaigns] text wrap intro text area

Let's have text wrap around image/video so we don't have lots of whack white space when text area is super tall vertically

cc: @crystalruthbell

No longer an issue, closing! :dancers:


ColorWheel: Labelling is not useful for screen reader user.

📝 Feedback
Labeling the color in the color wheel with the number of degrees is not an equitable experience for screen reader users. I understand that the color wheel is not often used on its own - but there should be a way to read a more useful label than the number of degrees on the color wheel.
🔦 Context

💻 Code Sample

🌍 Your Environment

Software
Version(s)

[Package name]
ColorWheel

Browser
All

Operating System
All (w/ screen readers)

🧢 Your Company/Team

The color components are not yet finished from an accessibility point of view, which is why they are still in beta. We are planning on using a list of color names, translated into each locale, to find the closest hue name with modifiers like light/dark etc. This should be much more descriptive and understandable to a user. However, it is currently blocked on figuring out how to distribute these translated strings in a way that doesn't bloat the bundle size (i.e. loading languages on demand). Some prior discussion here: https://github.com/adobe/react-spectrum/pull/1732#issuecomment-818311480.


[353] Add Liberty profile for build/deploy

Adds liberty maven profile to quickly build and deploy to Open Liberty server for manual testing. Closes #353.

@rdebusscher @Karm do you have comments for this?


Badges displaying incorrectly in +lb.

🐛 Bug Report
Badges will sometimes duplicate when shown in +lb. This seems extremely inconsistent, as I've only seen it around 2-3 times.

This has been corrected.


[Question] Drop normal user account support ?

https://github.com/hammerandchisel/discord-api-docs/blob/4169c543c0133437433006e68aa68debc690f9fb/docs/topics/OAuth2.md#L7

Automating normal user accounts (generally called "self-bots") outside of the OAuth2/bot API is forbidden, and can result in an account termination if found.

As some endpoints start to be blacklisted (see #420 #436) is that not better to drop normal user accounts ?

Shouldn't the library reflect the actual API? Since the API supports user accounts why not the library?
Also just a point to note this isn't totally binding since it's not in the ToS, you wouldn't know this unless you read the documentation which not everyone has.

However I do suggest the library be careful not to get anything wrong! Any improper usage may damage the API, so write code carefull!

Yeah the whole selfbot policy is.. well, not my favorite policy that Discord has.  I'm conflicted here as I agree with @SilverCory and I want this API to support everything you can do with the real API.  However, with Discord's stance I feel like we might be doing a disservice to keep support in the library and it also requires us to deal with both cases (what works with client vs bot).
I'm definitely open to hearing other peoples thoughts on this.

Well I've been banned for selfbots (using rich persistence to play music see bottom) and I utterly refuse that i've broken the ToS since it's not in there (they told me I've been banned for breaking the ToS). If they want it all to stop then add it to the ToS and actually disable user accounts from using the API.

By allowing normal accounts access to the API, even though it's disallowed.

As for the whole support, the API is exactly the same for users and bots? Is it not?

Not really some endpoints are designed for Bot accounts and some other for User accounts, for example bulk is designed for bot purpose in order to clean messages from a channel.
I think bot users have some other mechanics behind and certainly something that discord can disable bot account if their server are too overhelmed.
And as you said @SilverCory  you can ban.
Do we let users use the library as they want with the potential risk of being ban because of the use of a Bot endpoint with a User account ?

Not really some endpoints are designed for Bot accounts and some other for User accounts, for example bulk is designed for bot purpose in order to clean messages from a channel.

Right but this requires no extra support, it just returns 403 if it's a client IIRC.

I think bot users have some other mechanics behind and certainly something that discord can disable bot account if their server are too overhelmed.

If this is the case then why are users and bots allowed to use the API if there's already enough strain to warrant this on their servers. They could easily disallow non bot's from using the API as well.

And as you said @SilverCory you can ban.
Do we let users use the library as they want with the potential risk of being ban because of the use of a Bot endpoint with a User account ?

As mentioned before users can't use these endpoints, it returns 403 (IIRC). But right at this minute the only thing saying users can't use the API is the documentation which nobody is forced to read and agree on. Until it's in the ToS states this isn't not a proper rule.

At least we can set a specific field in the top of discord go to prevent use of bad endpoint depending on Account type and automatically adding "Bot " before the actual Bot token ?

Actually I think it would be nice to have a warning on startup if the token isn't a Bot, exit with code 1 and make them pass an env var to the thing to let them start it. That way they can't say they've not been warned, and you get to keep all support.

@SilverCory Can I message you on discord?

I would keep it in and have a disclaimer that it is at their risk for using it.

@NamedKitten you can contact me via email at me[at]cory.red

At least we can set a specific field in the top of discord go to prevent use of bad endpoint depending on Account type and automatically adding "Bot " before the actual Bot token ?

I feel like you're forgetting there's more than 1 token type, specifically you also have the "Bearer" used for oauth tokens

The issue with log-in with username and password -as it, for now, permitted by discord.go- is that it was considered a bannable thing (iirc) even before they released the statement against selfbots.
Most -if not all- updated libraries have dropped username/password login capabilities because of that, or have put a lot of warnings against it.
I believe it's ok if people want to login as a user account at their own risk, but that should be done using an user token, not username/password.

Thanks for this informations @Kodehawa 👍
So after reading links of Kodehawa's comment it's clearly indicated to not use any of the login system which is currently allowed by the discordgo API.
If we want to follow discord's rules we need to remove all user only endpoints, and I think we should start to do so as discord as started to blacklist some of them.
We can still support self bots (via user token) but only for bot endpoints as otherwise we go against discord docs.
And as said in the doc

The Discord team curates the following list of officially vetted libraries that conform to our APIs standards around authentication and rate limiting. Using custom implementations or non-compliant libraries which abuse the API or cause excessive rate limits may result in a permanent ban.

So Discord go can be remove from the list by discord team as it is not in the standards for some part of the API (remember when ratelimit was implemented, all libraries where removed until they were compliant).
The difference between bot accounts normal user account is that bot accounts are allowed to do some 'testing', getting ratelimit response code and other tries without be immediatly banned (needed for example when you want to create a new library), however for normal user any bad use will be solved by an immediate ban of your user account !
So don't use a user account as a bot or you will risk to be banned.
Selfbot are accepted as they, behave like user (don't use them to respond to others commands for example !), they are useful for example when you want to do a discord client that can be used in a terminal or a custom interface. Selfbot need to be logged by a user token not by auth endpoints !

With the current maintainers of the library and the time we have available I'm going to say - we're only able to continue to support the documented bot endpoints.  That's not to say, we won't have more time in a month, or a year and will be able to devote more time to undocumented endpoints and other more creative uses of the API.
We're not going to rip out working functions though but in terms of PRs and additions - we're going to focus on the documented bot endpoints.
With that, I'm going to close this issue.


BUG: Deploying FungibleToken + FlowToken causes an unknown unexpected error

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Copy the FungibleToken standard interface into account 0x01.
Delete the default implementations for getViews and resolveView because they are not supported in the playground
Deploy to account 0x01
Copy the FlowToken definition into account 0x02
Update imports to import FungibleToken from 0x01
Try to deploy
Error should appear:
Console output:

Cadence Language Client: called execute command: cadence.server.parseEntryPointArguments
instrument.js:107 Error: GraphQL error: something went wrong, we are looking into the issue
    at new t (bundle.esm.js:63:28)
    at Object.next (bundle.esm.js:1004:53)
    at C (Observable.js:135:18)
    at b (Observable.js:179:3)
    at e.value (Observable.js:235:7)
    at bundle.esm.js:866:75
    at Set.forEach (<anonymous>)
    at Object.next (bundle.esm.js:866:27)
    at C (Observable.js:135:18)
    at b (Observable.js:179:3)
    at e.value (Observable.js:235:7)
    at Object.next (SerializingLink.js:52:71)
    at C (Observable.js:135:18)
    at b (Observable.js:179:3)
    at e.value (Observable.js:235:7)
    at bundle.esm.js:76:26
(anonymous) @ instrument.js:107
DevTools failed to load source map: Could not load content for chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/browser-polyfill.js.map: System error: net::ERR_FILE_NOT_FOUND

Expected behavior
Smart contract should deploy properly
Screenshots

Desktop (please complete the following information):

OS: MacOS
Browser Chrome
Version Version 106.0.5249.119
Other users have reported also presumably with different versions

Additional context

We still need to add support for deploying with initialization arguments on Playground. This links to https://github.com/onflow/flow-playground-api/issues/232


How to find indices from a tensor for a perticular value similar to numpy.where()

Hi,
I am searching for a command which is similar to python "numpy.where()" command. Basically my idea is to extract the indices from a tenser. In python I can do simply f_j=(np.where(X==j)) which gives me specific indices(f_j) for the value j.
ex: X=  [0 1  1 0  0  2 3 ]
f_j=(np.where(X==1))
f_j= [1 2]
Is there is any similar function which I can use for this purpose?
I tried to write array search inside a tensor. However I end up with error when calling "if K.equal():" line as
TypeError: Using a tf.Tensor as a Python bool is not allowed. Use if t is not None: instead of if t: to test if a tensor is defined, and use TensorFlow ops such as tf.cond to execute subgraphs conditioned on the value of a tensor.
def loss(y_true, y_pred):
b=K.equal(y_true,0)
b=K.cast(b,dtype='float32')
for i in range(0,5):
if K.equal(b[i],1):
........
y_true = [0 1  1 0  0  2 3 ]

Hi!
This question seems best suited for StackOverflow. Could you post your issue there? Also, remember to close your issue if you do so!
Thanks!

Hi, thanks for the reply. I am wondering why there is not any inbuilt function for this purpose. In keras backend simply If I know the indices I can use K.gather() to select those values. However, when comes to this problem I couldn't able to think a method to find indices with existing keras backend commands. So the only option is writing a searching algorithm using "for loop" and "if command". Moreover, when writing if command apparently it does not support keras boolean tensors. I think it would be really helpful if there is a command like K.where() in keras backend.
So I wanted to know am I missing something in here? or does it exist a similar command to numpy.where()?
According to your reply, I have put this in StackOverflow. Thank you.


Error using load

Hello Mr.Guillod
I got the below error when I ran the run_design_compute_single:
Unable to find file or directory 'dataset/export.mat'.
I unzipped the 'data.zip' before and put the folder in the dataset.

Hi Javad,
Where did you unpack 'data.zip'? The data should be unpacked at the root of the project:
- the 'dataset' folder in data.zip should replace the 'dataset' folder in the source package
- the 'design' folder in data.zip should replace the 'design' folder in the source package
Let me know if the problem is persisting!
Best,
Thomas


Youtube timestamp embed

Previously it wasn't possible to start a YouTube video at a particular timestamp. This pull request modifies a regular expression server side to pick out the timestamp if necessary, and some client side JS that overrides some of Semantic UI's embedding code in order to correctly produce the URL.

Hi @thomasdenney, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

This pull request makes a whitespace change to .gitignore, sorry about that!


Non-persistent mode expects database to be present

Hi,
I am trying to use this configuration to create a client
mykey := os.Getenv("SB_KEY")
conf := &sb.Config{
		APIKey:    mykey,
		Logger:    os.Stdout,
		ThreatLists: []sb.ThreatDescriptor{
			sb.ThreatDescriptor{
				ThreatType:   sb.ThreatType_Malware,
				PlatformType: sb.PlatformType_AllPlatforms,
			},
		},
	}
client, err := sb.NewSafeBrowser(*conf)
...
threats, err := client.LookupURLs([]string{url})
...

When running tests I get this error
safebrowsing: 2017/01/04 14:53:06 database.go:186: ListUpdate failure: safebrowsing: unexpected server response code: 404
safebrowsing: 2017/01/04 14:53:06 safebrowser.go:365: inconsistent database: safebrowsing: unexpected server response code: 404

And looking at the source it seems that it will try to ListUpdate() every request.
What is the right way of running the lookup like documented here?
Thank You

I just tried running this on my machine and with the url set to something like "http://google.com" it printed the following:
safebrowsing: 2017/01/04 09:37:36 database.go:100: no database file specified
safebrowsing: 2017/01/04 09:37:38 database.go:291: database is now healthy
Results: [[]]

I'm surprised that you get 404 errors since nothing in your Config struct changed the ServerURL field.
What revision are you running on? Do you have any local changes?

Hi @dsnet  thanks for your support.
I grabbed the code with go get github.com/google/safebrowsing and did no changes to the source code.
Tried again now with the same config and got
=== RUN   TestCheckMaliciousURL
safebrowsing: 2017/01/07 12:26:40 database.go:100: no database file specified
safebrowsing: 2017/01/07 12:26:40 database.go:186: ListUpdate failure: safebrowsing: unexpected server response code: 404
safebrowsing: 2017/01/07 12:26:40 safebrowser.go:365: inconsistent database: safebrowsing: unexpected server response code: 404
--- FAIL: TestCheckMaliciousURL (0.14s)
	post_test.go:26: safebrowsing: unexpected server response code: 404

with a valid URL with trailing slash.
I am on Windows, maybe this is the issue? :)

I resolved it by removing the ThreatList from the config, don't know why exactly.


WW-5405 Prepares to rename master branch into main

PR prepares on renaming master branch into main. I'm going yo use this approach to rename the branch.
Refs WW-5405

I think this will work fine - but you may be able to simplify the process by first pushing the main branch and making it the GitHub default branch. Then you can remove all references to master from the files in this PR, and merge it directly into main branch. Once that's done, you can permanently delete the master branch from GitHub.

I missed that part, I need ask INFRA to di it for me.


"INEU" is a locality in "INEU" city, "ARAD" county

Description:
When user writes "Păduroiu din Deal", "Păduroiu din Vale", and "Sămara" the locations appear in the drop-down menu next to the comune and the county witch is a part according to the law

Precondition
Empty the search bar after every step;
The website is up an running.

Steps 1
Write "INEU"
Expected result
In the drop down menu you find "INEU, ARAD(INEU)"
Test Data
INEU


add column names to compute.json response in blaze server

xref: https://github.com/bokeh/bokeh/issues/2330

Does this need to be json_format specific?

No I think we should return the same dictionary of stuff no matter what the format js

Is*

I just put json there  because that was where the original stemmed


Passing options to echo is not working

Here's my justfile:
echo:
	echo -n 'hello'

And it fails:
❯ just echo
echo -n 'hello'
-n hello

Why does it behave like this? Is echo a built-in syntax?
I need to alternate the shell by a shebang to make it work, but I'd like to see it supported natively, as -n is quite common to me.

Oh, I didn't notice that the default shell is sh but not bash:
https://github.com/casey/just/blob/9f03441eef28fd662b33a8f1961e2ee97b60f7ff/README.md

Linux, MacOS, and Windows are supported with no additional dependencies. (Although if your system doesn't have an sh, you'll need to choose a different shell.)

Sorry, nevermind!


0066 - Plus One

Description of the Problem
Given a non-empty array of digits representing a non-negative integer, increment one to the integer.
The digits are stored such that the most significant digit is at the head of the list, and each element in the array contains a single digit.
You may assume the integer does not contain any leading zero, except the number 0 itself.
Example 1:
Input: digits = [1,2,3]
Output: [1,2,4]
Explanation: The array represents the integer 123.

Example 2:
Input: digits = [4,3,2,1]
Output: [4,3,2,2]
Explanation: The array represents the integer 4321.

Example 3:
Input: digits = [0]
Output: [1]

Constraints:

1 <= digits.length <= 100
0 <= digits[i] <= 9

Code
class Solution:
    def plusOne(self, digits: List[int]) -> List[int]:

Link To The LeetCode Problem
LeetCode

Hey @vJechsmayr! Can I work on this issue?

Can you assigned me that issue?
I know the proper algorithm.
Thank You.

@vJechsmayr, Can you review my PR?


[ISSUE #5684] request code should be short, to support serializeTypeCurrentRPC=ROCKETMQ

Make sure set the target branch to develop
What is the purpose of the change
#5684
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Error:  /home/runner/work/rocketmq/rocketmq/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java:368:2: 'method def rcurly' has incorrect indentation level 1, expected level should be 4. [Indentation]

Codecov Report

Merging #5909 (ad804e8) into develop (f488e20) will increase coverage by 0.00%.
The diff coverage is 100.00%.

:exclamation: Current head ad804e8 differs from pull request most recent head 3d6c096. Consider uploading reports for the commit 3d6c096 to get more accurate results

@@            Coverage Diff             @@
##             develop    #5909   +/-   ##
==========================================
  Coverage      43.37%   43.37%
  Complexity      8809     8809
==========================================
  Files           1090     1090
  Lines          76412    76409    -3
  Branches        9981     9981
==========================================
- Hits           33145    33144    -1
- Misses         39118    39126    +8
+ Partials        4149     4139   -10

Impacted Files
Coverage Δ

...e/rocketmq/remoting/netty/NettyRemotingServer.java
59.53% <100.00%> (+0.26%)
:arrow_up:

...rg/apache/rocketmq/common/stats/StatsSnapshot.java
84.61% <0.00%> (-15.39%)
:arrow_down:

.../apache/rocketmq/common/stats/MomentStatsItem.java
38.09% <0.00%> (-9.53%)
:arrow_down:

...va/org/apache/rocketmq/store/FlushDiskWatcher.java
81.25% <0.00%> (-9.38%)
:arrow_down:

...ache/rocketmq/common/stats/MomentStatsItemSet.java
39.13% <0.00%> (-8.70%)
:arrow_down:

...va/org/apache/rocketmq/common/stats/StatsItem.java
50.00% <0.00%> (-4.17%)
:arrow_down:

...tmq/remoting/protocol/body/ConsumerConnection.java
95.83% <0.00%> (-4.17%)
:arrow_down:

...mq/broker/topic/TopicQueueMappingCleanService.java
12.43% <0.00%> (-3.63%)
:arrow_down:

...org/apache/rocketmq/common/stats/StatsItemSet.java
41.79% <0.00%> (-2.99%)
:arrow_down:

...c/main/java/org/apache/rocketmq/common/MixAll.java
41.44% <0.00%> (-1.29%)
:arrow_down:

... and 12 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@RongtongJin @echooymxq @HScarb Please review the code again.


Update security md to refer to the OCM community security md file.

Signed-off-by: Mike Ng<EMAIL_ADDRESS>

/assign qiujian16

/approve
/lgtm


Merge with apereo/cas:master?

@tsschmidt I believe we have reached a pretty good milestone with all major issues closed and resolved, huge thanks to you. At this point, would you say this is a good time to do a PR to apereo/cas master and merge so that more folks are given the opportunity to test the baseline functionality while newer shinier things are added, like the domain screen, contacts, etc? Or would you rather wait until at least support for domains is done?

I agree now would be a good time to merge.

From: Misagh Moayyed<EMAIL_ADDRESS>Sent: Wednesday, September 6, 2017 8:28:36 AM
To: Unicon/cas
Cc: Travis S Schmidt; Mention
Subject: [Unicon/cas] Merge with apereo/cas:master? (#20)
@tsschmidthttps://github.com/tsschmidt I believe we have reached a pretty good milestone with all major issues closed and resolved, huge thanks to you. At this point, would you say this is a good time to do a PR to apereo/cas master and merge so that more folks are given the opportunity to test the baseline functionality while newer shinier things are added, like the domain screen, contacts, etc? Or would you rather wait until at least support for domains is done?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Unicon/cas/issues/20, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AS0kvafO8m7f-lGLN8cQBArJpRsTsUNlks5sfrojgaJpZM4POjch.

I guess one caveat before we merge.  Is everyone on board with the new architecture, Angular/TypeScript/Material UI?  What about the project structure?

We have tentatively "lost" a few folks who I'd hoped would be able to review and provide suggestions, if any. While that may still happen, assuming we find the right time and funding, I don't think that should stop us from going forward. So I would personally trust your judgement entirely, and I suppose with time we'll continue to make incremental changes to make things look better.

So assuming you're OK with the current standings, shall I proceed to create the PR and then merge? or would you still rather wait until we get a few more eyeballs on this?

I feel pretty good about it.  I have only a week in the office before a two week vacation, so I say either do it now, or wait until I am back in case issues arise.

Coolio. We'll do it now then. Hopefully by the time you're back we'll only have a few issues to resolve and work through. Thanks!

This is done. You're welcome to stick with the same branch or start a new one (new one likely would be easier).
Have a wonderful vacation!


List of problems I found in the samples.

I could probably fix most of them.
progress-sample

npm run compile uses watch mode
uses 0.1.0 launch.json version
Could not find the task 'tsc: watch - tsconfig.json'. when running
Second task is broken.
.vscode-test should probably be added to .gitignore in my opinion.

lsp-multi-server-sample

requires non-existent file /tsconfig.base.json to build.
Could not find the task 'npm: watch:client'. when trying to run.

basic-multi-root-sample

npm run compile uses watch mode.
uses 0.1.0 launch.json version
Could not find the task 'tsc: watch - tsconfig.json'. when trying to run.

fsprovider-sample

uses 0.1.0 launch.json version

statusbar-sample

uses 0.1.0 launch.json version

theme-sample

uses 0.1.0 launch.json version

virtual-document-sample

uses 0.1.0 launch.json version
missing script compile

webpack-sample

uses 0.1.0 launch.json version
missing script compile

language-configuration-sample

missing script compile

snippet-sample

missing script compile

tree-view-sample

error TS2345: Argument of type '{ focus: true; select: false; expand: boolean; }' is not assignable to parameter of type '{ select?: boolean; focus?: boolean; }'. when building

vim-sample

missing script compile

@x13machine Thanks for spotting the problems!
For language configuration sample and snippet sample, you don't have to compile anything, so there's no "script compile".
I fixed everything else except these 4 errors:
@bpasero progress-sample and basic-multi-root-sample seems to be caused by you moving to tasks 2.0. Can you take a look?
@dbaeumer Can you take a look at lsp-multi-server-sample?
@sandy081 Can you take a look at tree-view-sample?

@bpasero progress-sample and basic-multi-root-sample seems to be caused by you moving to tasks 2.0. Can you take a look?

@dbaeumer do you have documentation how to update to Tasks 2.0? I am sorry, but my knowledge in that area is very limited 👍

Sure https://code.visualstudio.com/docs/editor/tasks#_convert-from-010-to-200

Fixed the issue in lsp-multi-server-sample.

Me too.

@sandy081 I fixed that by updating vscode.d.ts to version 1.32.


Winter '17 SLDS Fix

DO NOT MERGE. Requires all orgs be on Winter '17.
Critical Changes
Changes
Issues Closed
Fixes #321

I know we moved NPSP to use private scoped SLDS not too long ago, but I don't recall us putting in the extends="ltng:outAppUnstyled" tag.  And I seem to recall some recent issues have been making us reconsider our decision in NPSP to not use the system supplied SLDS.  @jjbennett do you recall where we stand on this?

@davidhabib The overall plan is to use the provided SLDS but HEDA Settings is still back on a 0.8 version of SLDS. The ltng:outAppUnstyled is to opt-out of the provided SLDS version that Winter '17 provides automatically. When we get more time I would like to convert to use provided SLDS but everything breaks when we upgrade so opt-out is the best option right now.

@davidhabib we will be removing the scoped slds and using the built in slds after Winter 17 has been pushed to all orgs. Our other option would have been to opt out but opting in also allows us to easily use some of the new lightning base components.

thanks @paulmalenke and @jjbennett.  Those plans both sound good!

Winter '17 is live so this is good to go. Build now passes.


Saving files with original extension in the cache is incompatible with Deno

The change introduced in this commit f93fdd09c8e2bc3a3f11d3342b96625f77328c08 makes this library to behave differentlly from Deno.
Sharing the same cache with Deno makes the file to be download twice because Deno doesn't recognize the file with the extension.
If the issue with Deno.openPlugin still persists, it would be possible to have this behaviour configurable?

Deno.openPlugin is no more.
Still, $DENO_DIR/gen/https/ contains extensions, unlike $DENO_DIR/deps/https/.
https://deno.land/x/fromdeno_cache handles that: https://github.com/fromdeno/cache/commit/6ce344148c9af840e719c60f3ac9cbeda7646d0a


SimpleWeatherJS with GitHub pages

I am fairly new to using GitHub pages, and building websites in general, and i'm trying to figure out how to implement SimpleWeatherJS into my site. I'm using a Jekyll setup on GitHub, and any help would be very appreciated!

Best bet would be to include simpleWeather using the cdn. Using it on GitHub Pages is no different than using it anywhere as it's just javascript. That said, the weather API is pretty unstable so if it's not working it could be due to the API.


Support Phi Models

Description
Added support for microsoft/phi model series: phi-1, phi-1.5 and phi-2. Phi-2 has comparable performance to 7B SOTA models but with 2.7B parameters. The licence for phi-2 was recently changed to the MIT licence.
I have not included further unit tests, instead I have added a demo notebook: demos/phi.ipynb demonstrating agreement with Hugging Face. On the test prompt provided in the notebook, phi-1 and phi-1.5 get 1e-4 tolerance with the HF model, whereas phi-2 only gets 1e-2 tolerance across logits and resid_pre caches. I think this may be due to #385 Rotary Embedding issue impacting LLaMA and Pythia models. Happy to add further tests to this pull request if needed though.
Notes

This model's architecture is very similar to LLaMA but uses tied LayerNorm (ie. same LayerNorm for both attention and MLP blocks) and parallel Attention-MLP (ie. MLP reads from resid_pre) like GPT-J.

Type of change
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)

Checklist:

[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] I have not rewritten tests relating to key interfaces which would affect backward compatibility

Thanks, this looks great! Can you remove the demo? I don't think we need to have a demo for each new model. Otherwise I'm happy to merge this in.

The phi models use a tokenizer, CodeGenTokenizer, that on further inspection doesn't work nicely with existing TL functionality straight away. I'll convert this PR to a draft and address this.

Turns out there was a small bug in the Hugging Face repo for this tokenizer, I've written a PR addressing this that is now merged in. I'll make this ready for merge again soon.

Initially the CodeGenTokenizer was not working well with existing TL functionality, the main reason for this was a small typo on the Hugging Face repo, fixed here. Since the initial commit I have also:

Removed demos/phi.ipynb.
The CodeGenTokenizer does not support adding BOS token when loaded in as CodeGenTokenizerFast, to ensure that it is loaded in as CodeGenTokenizer, I've added a flag to HookedTransformer.py to address this. use_fast is a AutoTokenizer kwarg that by default is set to True by HuggingFace, here it is set to False if the model loaded in is one of the Phi models.


prefix all windows vars by OMNIBUS_

this is actually critically necessary for BUNDLER_VERSION
which collides horribly with the env var of the same name
in bundler 1.14.x which is used for bundler trampolining into
a specific version of bundler.
the value that this script is setting BUNDLER_VERSION to
is nonsensical for the new bundler code so it always errors
out, and consumers wouldn't want to be forced to be trampolined
back into the external bundler version all the time anyway.

setting the env vars in the child process seems to be a side effect of how the script was written, and not an intended API to use -- as the unix side does not use or set env vars at all (explaining why i observed that only my windows tests broke)

cc @chef-cookbooks/omnibus-maintainers

@schisamo BUNDLER_VERSION is not removed by with_clean_env when its set in the calling environment, and its not part of the variables that bundler sets in order to construct a bundled environment, its an external API for callers to request trampolining from bundler:
% cat /tmp/foo.pl
#!/usr/bin/env ruby

require 'bundler'

Bundler.with_clean_env do
  puts ENV['BUNDLER_VERSION']
end

% BUNDLER_VERSION="not cleaned" /tmp/foo.pl
not cleaned

BUNDLER_VERSION is also not cleaned up by the omnibus helper either.

yeah so the other problem is that this is dealing with the ci/verify-chef.bat hook.
omnibus already ran on the builders just fine.
this is the glue around the jenkins job kicking off the bat file to do the verification steps that doesn't have anything to do with the omnibus build framework itself.

@lamont-granquist OK so if verify-chef.sh/verify-chef.bat is the issue wouldn't fix it there? Looking over those scripts it appears there is a spot to unset environment variables:
https://github.com/chef/chef/blob/master/ci/verify-chef.sh#L55-L71
Something similar should be added for verify-chef.bat.
The overall TL;DR here is this is the wrong place to introduce the fix you are after.

I'm fixing it there, but really it should get fixed so the caller isn't polluting the environment -- otherwise writers of any verify-chef.bat need to know to copypasta that block around or else they'll get bit with weird trampolining bugs, only on windows builds.

its also just bad practice of this code to be scribbling over temporary variables that it clearly didn't intend to be used as an external api, which then get injected into all child processes.

@btm @charlesjohnson - after ES releases this cookbook, this change will need to be applied to the PJ builders on manhattan before they go green for windows.


[Stub] Centralize validation outside of the control component

Is your feature request related to a problem? Please describe.

Field validation is implemented through multiple, somewhat conflicting methods that must be defined directly on the control component. If I want to do serious custom validation on a field with an existing widget, I can't - I have to make a new widget.
Describe the solution you'd like

Accept an onValidate method on the object passed to registerWidget. This will be difficult to do in a backwards compatible way, and should probably be brought in as a replacement for all current validation methods in the next major release.
Additional context

Will add issues that will be fixed/helped by this, there are quite a few.

+1 for this.
Personally, I'd just want a callback that passes me the entire entry and lets me return the errors.
{
  success: false,
  errors: {
    title: ["must be less than 110 characters"],
    metaDescription: ["must be less than 255 characters"]
  },
}

This would solve some issues I have:
Using validation libraries
I want to be able to use libraries like zod, joi, and yup. I can easily reuse these validators outside of Netlify CMS and write tests for them.
Controlling validation errors
In an editorial workflow, I want to be able to save drafts even if they fail validation. I only want validation failures to block when publishing.

+1 for this.
Personally, I'd just want a callback that passes me the entire entry and lets me return the errors.
{
  success: false,
  errors: {
    title: ["must be less than 110 characters"],
    metaDescription: ["must be less than 255 characters"]
  },
}

This would solve some issues I have:
Using validation libraries
I want to be able to use libraries like zod, joi, and yup. I can easily reuse these validators outside of Netlify CMS and write tests for them.
Controlling validation errors
In an editorial workflow, I want to be able to save drafts even if they fail validation. I only want validation failures to block when publishing.


Stricter prefiltering for query_top_n() for performance reasons

Stricter prefiltering for query_top_n() in case validate=True.
Otherwise lots of documents might be queried from the database, leading to a surprising slowdown for the users.

Codecov Report

Merging #75 (745017e) into main (ef4af64) will increase coverage by 0.00%.
The diff coverage is 100.00%.

:exclamation: Current head 745017e differs from pull request most recent head bb9bfdc. Consider uploading reports for the commit bb9bfdc to get more accurate results

Impacted Files
Coverage Δ

narrow_down/similarity_store.py
96.63% <100.00%> (+0.02%)
:arrow_up:


drivers: migrate to SPDX identifier

Summary
Most tools used for compliance and SBOM generation use SPDX identifiers This change brings us a step closer to an easy SBOM generation.
Impact
SBOM
Testing
NONE

please ignore nxstyle errors

My CPU was in SleepMode sorry, you have my go :D


CI

Drone, Circle, Travis, etc.

CircleCI seems like a good choice.  If you've got an account setup, I can get started whenever. :D


Simple hide

When just loading data, sometimes we would like to just hide the toast, simply because the user did not really do anything which implies showing success or error.
Would be nice to have a hide method which simply requests the toast to hide while in loading state.

It took me a while but I finally added this!


Use for_each in map Extend and FromIterator

Using for_each allows internal iteration, which can have better
performance for some iterators. For instance, Chain and FlatMap have
to check their state every time next() is called, but when folding
they can just forward to their inner iterators.

bors r+


Artifacts

unity 2017.2f3
using poststack, hbao
receiving (no matter what setting i use, in sponza scene the same)

seems like it has problems identifying geometry
with bloom i get this kind of stuff

when it otherwise looks harmless

with all effects disabled, only one directional light im getting these ghosts of something that doesnt exist there

they are everywhere, all over

Hi,
I've tried the latest Post processing stack + Unity 2017.2 and can't get the bloom artifacts :/ Are you getting these in a vanilla vapor pull too?
The other artifacts look strange too - are you in forward / deferred? Are there any objects there? Sometimes when looking at a void, unity doesn't render the shadowmaps properly for Vapor as it culls away that part - but Vapor does need it. You can mitigate this by placing some invisible cubes that receive shadows in the distance.


class MobilityDataStandard: property "scheme"

The property "mobilitydcatap:scheme has a cardinality : 0..1
Because in some cases, multiple schemes can be provided per data set, especially in DATEX II v3:
I propose to change the cardinality to 0..n

I agree! Not sure if, in this case, we have to specify somehow better the semantics of the property when more than one schema is provided, e.g., "the data are compliant with at least/all/? the schemes provided"

Proposal for v1.1.0:

Change cardinality at mobilitydcatap:schema.
At the same time, add to Usage Note that this property is a sub-property of dct property "conformsTo"

Meeting 05.12.2024:
Decision procedure for the proposed change:
Cardinality of property "schema" changed from from 0..1 to 0..n. Reason: allow for naming multiple schemas.  DECISION POINT: YES / NO
Decision result: no opposition, change to be realised in v1.1.0

Realised in v1.1.0: Updated Respec,  SHACL file


Microsoft PowerToys  0.53.1

Microsoft PowerToys version
0.53.1
Running as admin

[X] Yes

Area(s) with issue?
Installer
Steps to reproduce
We have also noticed that the silent arguments provided in the doc aren't working for PowerToys while packaging the latest version 0.53.1. the installer is requesting t accept license terms and conditions even after adding the below arguments to the package, "-silent --quiet" . Could you check this please?

✔ Expected Behavior
We have also noticed that the silent arguments provided in the doc aren't working for PowerToys while packaging the latest version 0.53.1. the installer is requesting t accept license terms and conditions even after adding the below arguments to the package, "-silent --quiet" . Could you check this please?
❌ Actual Behavior
We have also noticed that the silent arguments provided in the doc aren't working for PowerToys while packaging the latest version 0.53.1. the installer is requesting t accept license terms and conditions even after adding the below arguments to the package, "-silent --quiet" . Could you check this please?

Other Software
No response

@jaimecbernardo Maybe related to #15282?

With 0.53, we changed the bootstrap system.  Moving forward, just a -quiet will work.  Prior, a --silent be the flag.  Don't suggest mixing syntaxes.  We shifted to a standard syntax.
https://docs.microsoft.com/en-us/windows/powertoys/install#installer-arguments has current list.  Using the history for the doc, here are the args prior to 0.53.
PS C:\Users\crutkas> cd .\Desktop
PS C:\Users\crutkas\Desktop> .\PowerToysSetup-0.53.1-x64.exe -quiet


High memory usage

Hi All,
Thanks for all your great work on the aws yun SDK. It's been fun working with it so far!
I would like to make some suggestions about reducing the memory footprint of the MQTT driver. At the moment the example with shadow states takes up 75% of the memory on the ATmega. This leaves little room for other things to run alongside.
I have some suggestions which I would like to make sincerely. I know the driver is a work in progress, so maybe this is already planned.
1: I noticed there are a lot of string literals in aws_iot_mqtt.cpp - these are stored in SRAM when they could be offloaded to the flash. EG:
Instead of: sprintf(rw_buf, "state"reported"%s\n", key);
Use: sprintf_P(rw_buf, PSTR("state"reported"%s\n"), key);
2: The keyed functions will clear the data in the buffer if the value isn't returned correctly. This means I need to use an intermediate buffer and check the error code before copying again. This is a waste of resources, and could be avoided if the client left the target buffers alone on error
Now I have:
if(myClient.getDeltaValueByKey("JSON-0", "text", buffer, 32) == ERROR_NONE)
{ strcpy(theData, buffer); }
Better:
myClient.getDeltaValueByKey("JSON-0", "text", theData, THE_DATA_SIZE)
// I cant do this because myClient clears theData if the result is not ERROR_NONE
3: I still have to construct the return messages on the ATmega, to report the state back up to AWS. This means I need a huge buffer to hold a JSON document. It would be better to have some kind of function similar to the getValueByKey to construct a JSON doc on the linux host.
eg:
myClient.setValueByKey("JSON-R", "state"reported"text", theData)
myClient.sendMessage("JSON-R");
Thanks!

Hi @lukeplausin ,
Thank you very much for all your inputs on the AWS IoT Arduino Yun SDK. Memory optimization and JSON processing are definitely within our roadmap. We will put these in our backlog and prioritize them against other tasks. We will incorporate these changes into future releases.
Thanks,
Liusu

+1!

Improved memory usage in release v2.2.0.

Fix was released in Jul 2016


Add optional nodeSelector to helm chart

Fixes #94

Thanks @kuznero! Please can you signoff your commit?
/approve
/ok-to-test

Hi @JoshVanL, commit is now signed.


4.0.0: Seperated the Train's Braking Power

Old PR renewed. Finished and tested in Fabric.

Thank you! I have put off merging this as I had to make a bunch of changes regarding rails and simulation recently, but I should be able to get to it soon.

Replaced by #829


FIXED: iOS orientation and rotation bug.

Do we really need all those new line additions?

No, not really. I think that they were added automatically by my text
editor. If you want I can send another pull request.
Enviado con MailTrack
<EMAIL_ADDRESS>2016-03-01 13:20 GMT+01:00 mike-eason<EMAIL_ADDRESS>
Do we really need all those new line additions?
—
Reply to this email directly or view it on GitHub
https://github.com/phonegap/phonegap-plugin-barcodescanner/pull/171#issuecomment-190695443
.

Hi @MikelEiza , I tried your code but the XCode returned an error the first time I opened Barcode Scanner.

*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate:  Cannot remove an observer <CDVSplashScreen 0x124e22d50> for the key path "frame" from <UIView 0x124d37050> because it is not registered as an observer.

I'm using XCode 7.3.1 with cordova-ios 4.1.1

Works great!!!
iOS 9.3.2
cordova-ios 4.1.1
cordova-plugin-barcodescanner 5.0.0
cordova CLI 6.2 and ios-deploy 1.8.3 (no xcode)
That's the only fix that made it work in landscape mode without screwing up my App's viewport.
I think this also should fix this issue: https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/40

Tested on iPad iOS 8.1 and iPhone 6 iOS 9.3.1 - works well.

Awesome fix. Thanks so much!
Tested on iPad iOS 9.3.2.

This fixes the black border in landscape mode but I can't scan a code 128 this way. Rotating to portrait fixes this.
I'm sure this works fine for QR codes but not for 2D barcodes I'm afraid.
Do you guys have similar experience with this change applied?

Found a way - needs another change. Will test a bit and update the repo.

Thanks @MikelEiza, I only had to add a little tweak to make 2D barcode scanning work on landscape as well. I had to manually merge it due to the merge conflicts, so closing this. Available in 5.0.1.


Link fixes for extensions

@nschonni Thank you for making this update, I am merging it now and it should be live soon. Thank you.


fluentd logging: sort keys before building volumes

https://github.com/rancher/rancher/issues/15908

LGTM

LGTM

LGTM


missing link/minor typos in docs

Thanks a lot for your work on this - a very interesting project in Rust!
Reading the docs on , I saw some minor typos and a missing link, see commit.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.02%) to 97.172%

Files with Coverage Reduction
New Missed Lines
%

src/shortest_path/all_pairs_bellman_ford.rs
2
98.88%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
12267

Relevant Lines:
12624

💛  - Coveralls


Syntax definition missing end-of-line non-terminal

IFE expression ;;
;; ::= (;[\x00-\xFF^\x10]*)?\x10

Document details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d988b0db-f689-42d4-de78-75ba5d0501de
Version Independent ID: dc1b78d9-d6dd-17df-75e2-38f902309cec
Content: IFE
Content Source: docs/assembler/masm/ife.md
Product: visual-cpp
Technology: cpp-masm
GitHub Login: @corob-msft
Microsoft Alias: corob

Incorporated into Incomplete Syntax definition issue.


U/jrbogart/write fluxes speedup

The branch u/jrbogart/write_fluxes_speedup is based on u/jrbogart/write_fluxes. Additional features, in order of decreasing importance and complexity, are

Support for parallel processing when calculating galaxy fluxes in catalog_creator.py. That part of _create_galaxy_flux_pixel(..) which does the calculation is broken out into static routine _do_galaxy_flux_chunk. On cori the code runs about 20 times faster using this technique.
Add command-line arguments --flux-only, --main-only, and --overwrite-data to create_sc.py   to give caller finer control over what will get done.  Add command-line argument --flux-parallel to specify # of subprocesses to create in 1.
Add entries to config to document magnitude cuts

This is ready for another look, @jchiang87


When I use .saveNextFrameToURL to capture Image from video this message come out. Help Me

When I use .saveNextFrameToURL to capture Image from video this message come out.
2018-09-26 18:48:11.719346+0900 Cherry[3479:700616] [Unknown process name] CGImageCreate: invalid image alphaInfo: kCGImageAlphaNone. It should be kCGImageAlphaNoneSkipLast
Can any one help me.

@Topwiz this is just a warning printed out from PictureOutput - cgImageFromFramebuffer (CGImage initializer),
this won't affect your application and it will save the next frame as intended to passed url..


RSS/ATOM Feeds

From release plan spreadsheet
Estimate from release plan: 8 hours
Expressing interest: none
RSS content must appear off root path of UI (like robots.txt & sitemaps).  "- Proxy the backend's RSS feeds on the express.js server

Add/adapt service to retrieve RSS config from backend (e.g. whether or not it's enabled)
Add RSS buttons to the UI if it's enabled
Backend needs to be determined (might be content negiotiation on the search/discovery endpoint). Once figured out, might become more certain.

Requires: https://github.com/DSpace/DSpace/issues/2864

Updated this to a 0-hour estimate as the code was donated early in #1444 and https://github.com/DSpace/DSpace/pull/8064


GitOps page - seemingly contradictory statements

On this page, we see the following:

You can install the microsoft.flux extension manually using the portal or the Azure CLI (az k8s-extension create --extensionType=microsoft.flux) or have it installed automatically when you create the first Microsoft.KubernetesConfiguration/fluxConfigurations in the cluster. The microsoft.flux extension must be installed in the cluster before one or more fluxConfigurations can be created.

The first sentence suggests that the Microsoft.Flux extension can be installed automatically when the first fluxConfiguration is created. But the second sentence states that the extension must be installed before such fluxConfiguration resources can even be created.
My limited experimentation so far suggests that the latter sentence is accurate.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 22ca9217-9394-a623-57e1-20a0bea3d3e2
Version Independent ID: 9a6dc5c2-c320-b85d-2d00-683149be6c56
Content: Conceptual overview Azure Kubernetes Configuration Management (GitOps) - Azure Arc
Content Source: articles/azure-arc/kubernetes/conceptual-gitops-flux2.md
Service: azure-arc
Sub-service: azure-arc-kubernetes
GitHub Login: @csand-msft
Microsoft Alias: csand

@rossdotpink Thanks for the feedback! We are currently investigating and will update you shortly.

If you reverse the order of the two sentences, then it will be clearer.

@csand-msft - Thanks for providing your insights.
@rossdotpink - Thanks again for bringing this to our attention. We have added this in the backlog and will get the doc updated and it will be live once its merged and approved.  We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

FYI that I am updating the doc and will submit a PR to the doc team tomorrow.

@rossdotpink

@csand-msft Thanks for the update and thanks so much for your work on the Flux extension! ❤ I am really excited for it to GA


python upwards compatibility fix

https://docs.ansible.com/ansible/2.5/dev_guide/testing/sanity/no-dict-iteritems.html

Thank you!
I visually compared the output of collectd.conf (visible in travis testing) before and after this test and things look OK.
Upstream of this encoder [1] https://github.com/jtyr/ansible-config_encoder_filters/blob/master/filter_plugins/config_encoders.py is also using items


Retz claims all the offers in the cluster

At the moment it seems that Retz is caching all the offers that were offered by the server and never releases them until a job is submitted. In particular that means that other frameworks cannot launch their jobs because they get no offers.

There's a configurable limit of the number of offers, so that Retz won't take all offers of the cluster. Maybe default value of 16 could be too big for a small cluster?

OK, thank you. I didn't see that option, but it seems to work as intended.


[MM-24917] Prefecthing of posts

Summary
On webapp we fetch posts when user clicks on a channel. The aim of the PR is to prefetch posts without user intervention
Conditions for prefetching posts:

On load of webapp
On socket reconnect or system comes from sleep
On new message in a channel where user has not visited in the present session
On addition of user to a channel/GM
On Team switch

Priority order:
Channels with mentions are loaded first followed by unread channels.
Prefetch process:
In order not to impact the performance of clients and leave breathing space on network stack for user-initiated requests, we are capping the concurrency of requests made to 2 at a time. New prefetch requests are dispatched when previous requests are processed.
Code Changes:

PR looks for changes in LHS and responds by making requests for channels that don't have a request dispatched.
Adds current channel posts requests to be dispatched as soon as it is set in redux state instead of dispatching it from actions down the hierarchy. Otherwise couple of prefetching requests are sent before the postlist makes a request for posts.
Skipping making a duplicate request if prefetch requests are in progress when switching to a channel.
Add a jitter(0-1sec) for delaying post requests in case of a new message in open/private channels. This is to prevent a case when all clients request messages when new post is made in a channel with thousands of users.

Tickets
https://mattermost.atlassian.net/browse/MM-24917
https://mattermost.atlassian.net/browse/MM-24920
https://mattermost.atlassian.net/browse/MM-24921
https://mattermost.atlassian.net/browse/MM-24924
https://mattermost.atlassian.net/browse/MM-24925

/update-branch

terminating this test server because we need to clean the cluster that is running. If you still need a test server please add the label again in the future

@hmhealey Up for review again

@jgilliam17 please sync with Sudeer on testing this so we can get it soaking on daily

@sudheerDev found one error, I did have some network issues and lost connection for a bit, not sure if its related.

@jgilliam17 Nice catch, Fixed it.
Repo for the earlier issue:

Have a channel with more than 30 unreads
Refresh app with another channel in view.
Refresh the app
Disconnect from internet
Connect back to the internet

During the prefetch of the channel to sync we hit the earlier issue

@hmhealey just needs your review

/update-branch


PartitionKey value must be supplied for this operation.

Version
4.2.2
Describe the bug
Error removing state data from CosmosDB with System.InvalidOperationException - PartitionKey value must be supplied for this operation.
To Reproduce
Any call like this could be at risk
await _accessors.ConversationState.DeleteAsync(turnContext, cancellationToken);
Expected behavior
Should remove the state data from the database without crashing

@juanar, before we take action on this, can you investigate and make a recommendation for how to fix this?

@cleemullins After doing research, we found that inside _storage.DeleteAsync( keys, cancellationToken) the options parameter is not provided to the DeleteDocumentAsync(documentUri, options, cancellationToken) method.  This causes the Invalid Operation Exception thrown since the PartitionKey is obtained from it.
This is due to the parameter options being marked as optional, even though according to the documentation it is required to execute a delete operation.

Partition key is used to identify the target partition for this request. It must be set on read and delete operations for all document requests; (...)For create and update operations on documents, the partition key is optional.

In order to fix it, we changed the DeleteAsync( keys, cancellationToken) method to create an instance of a RequestOptions and pass it as a parameter to DeleteDocumentAsync. If it's ok we can create the PR with this fix.

Fixed in #1537


An example of GOEA with Uniprots

Hi,
I have noticed in the paper that we can use GPAD format from European Bioinformatics Institute’s FTP site for Gene Ontology Enrichment Analysis instead of NCBI's GAF format:

"The annotations are currently available for download from the GOC as GO Annotation Format (GAF), from NCBI’s FTP server in a gene2go format, or from the European Bioinformatics Institute’s FTP site in the Gene Product Association Data format (GPAD). GOATOOLS can efficiently parse these relevant file formats to retrieve rich attributes of each term..."

Based on this, as I have my data in Uniprot format, I am trying to work with the GPAD format to calculate over-represented GOs based on UniprotIDs. But, unfortunately, could not find any examples of that, the way it exists for NCBI gene data.
Having a look at the python files in the repository, I came up to the code below which gives an AssertionError while reading the associations at GpadReader(fin_gpad).
Could you please help me to resolve this issue?
Here is my code:
from goatools.base import download_go_basic_obo
from goatools.anno.dnld_ebi_goa import DnldGoa
from goatools.base import get_godag
from goatools.anno.gpad_reader import GpadReader

obo_fname = download_go_basic_obo()

objdnld = DnldGoa()
fin_gpad = objdnld.dnld_goa('human', 'gpa', None)

godag = get_godag()
objgpad = GpadReader(fin_gpad)

P.S.: For the last line, I also tried objgpad = GpadReader(fin_gpad, godag=godag), but nothing changed.

Thank you for your interest in GOA Tools and for giving your time to write this issue.
Download the annotations before reading using wget:
$ wget http://geneontology.org/ontology/go-basic.obo
$ wget http://current.geneontology.org/annotations/goa_human.gpad.gz
$ gunzip goa_human.gpad.gz

Then read the annotations like this:
from goatools.base import get_godag
from goatools.anno.gpad_reader import GpadReader

godag = get_godag('go-basic.obo')
anno = GpadReader('goa_human.gpad', godag=godag)

I added a new notebook demonstrating how to read annotations from a GPAD file here

Thank you for your helpful answer @dvklopfenstein.
As far as I see, you have downloaded the gpad file in your notebook from GO website that is gpa-version: 1.2 and using this version resolves my issue.
But problem with my first code using goatools.anno.dnld_ebi_goa.py file is that it downloads the gpa file from _ftp://ftp.ebi.ac.uk/pub/databases/GO/goa/HUMAN/goa_human.gpa.gz_, with gpa-version: 1.1. As error details says, GpadReader cannot find some evidence code of this file in eco2group dictionary, and hence it raises an error.
I think to get rid of the error, we have to change goatools.anno.dnld_ebi_goa.py file to use version 1.2 of the gpad file.

BTW, I used evidenceontology to have the updated ECO codes and have written a code to convert this file to a dictionary automatically.
This code can be used in eco2group.py to have the ECO2GRP dictionary automatically rather than hard-coding.
Here is the code:
import pandas as pd

#Use eco file existing in evidenceontology
URL = "https://raw.githubusercontent.com/evidenceontology/evidenceontology/master/gaf-eco-mapping-derived.txt"

# Read file in df format
df_eco = pd.read_csv(URL, comment='#', sep="\t", header = None)

ECO2GRP = dict(df_eco[[0,1]].values)

Very nice.
Thank you so much for the additional information regarding downloading the ECO codes to be used by GOA Tools.
Your idea works well for GOA Tools as our philosophy is to decouple from storing other group's databases, which benefits researchers by giving them the power to use the latest data or to cite a specific data version, which is needed when publishing.
Thank you so much. I will be sure to credit you as a contributor on the next pull request which implements the change you suggest.
Thank you for your time and for your interest in GOA Tools.


Maximum call stack size exceeded at RegExp.toString when using date mask 'mm/dd/yyyy' and 'min' property

This issue occurs only when certain conditions are met:

Alias set to "datetime".
Format is set to "mm/dd/yyyy" or similar beginning with "mm".
"min" property is set to a date which month is greater than 9.
You attempt to enter anything than "1", e.g. "2" or "3".

Those values are not valid, so I shouldn't be able to input them. Instead it hangs for a second and throws an error with following description:
inputmask.js:3180 Uncaught RangeError: Maximum call stack size exceeded
    at RegExp.toString (<anonymous>)
    at f (inputmask.js:3180:216)
    at inputmask.js:3282:61
    at c2 (inputmask.js:3302:33)
    at k (inputmask.js:3321:37)
    at y.p (inputmask.js:3344:33)
    at y.u (inputmask.js:3172:80)
    at y.c (inputmask.js:3159:42)
    at y.s (inputmask.js:3148:64)
    at t2.getMaskTemplate (inputmask.js:3112:40)

If you set a minimum month to 9 or less, the issue is not present.
Example page to reproduce:
<!DOCTYPE html>
<html lang="en-US">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.8/jquery.inputmask.min.js"></script>
</head>
<body>
<form>
	<input type="text" id="field" ><label class="form-label" for="field"> Try to enter a month beginning with anything else than '1'</label>
</form>

<script>
window.onload = function () {
	jQuery("#field").inputmask( {"alias":"datetime","inputFormat":"mm/dd/yyyy","min":"10/25/2023","max":"11/25/2023"});
};
</script>
</body>

@Techn1c4l ,
This seems fixed in v5.0.9.
Can you confirm.


AutoApply with range picker

Is your feature request related to a problem? Please describe.
When using a range picker you can't use auto-apply, because then the date picker will close after you pick the first date. So you can't select a range. I want to have auto-apply to reduce the amount of required clicks.
Describe the solution you'd like
When using auto-apply with a range picker the calendar should close automatically after the user selects two dates, instead of one. And the action-buttons should be displayed, so that the user may choose to just select one date and then click "confirm".
Describe alternatives you've considered
The only alternative now is to not use auto-apply.
Additional context

It does work, you can verify on the playground


aria-label

Why you don't add aria-label attribute to your site - caniuse?
Thank you!
Sorry, for my English.
Yours faithfully, Elchin Khasiev from Ukraine.
<EMAIL_ADDRESS>

aria-label is a global ARIA property among the many roles, properties & states.
Sub-feature of WAI-ARIA?

Perhaps, thanks!

We need an umbrella tracking issue to cover all of these aria attributes.
I think the right question to ask is that do we want to keep aria attribute support together on caniuse.com or as a separate website? aria attribute support works somewhat differently than what caniuse.com currently support. It's less tied to the browser and more to the specific screen reader. It's a support grid of screen reader x browsers x os

@ming-codes see the related issue https://github.com/Fyrd/caniuse/issues/4274.
https://a11ysupport.io/ is a great resource!


graphic issue?

At the last month of this graph, the blue line is becoming horizontal but not the red one

if so the ratio should increase?

Why is there not a link between the 2 graphs?

Idem, I don't understand this :

In the description you write the number of tanks deployed by Ukraine is 2100 and the total of tank of the Ukraine is also 2100, the % of the Ukraine curve must be the same.
Or if you consider that Ukraine has more tanks ( with the new arrival ) than deployed, the first curve of the total should be lower than the curve of the deployed one?

At this point, losses for both sides are so large that short term changes (eg reduced Ukrainian losses) won't be reflected as much. The increase in Russian losses is primarily because of their assault on Avdiivka since the 10/01/2023. While large, they are more or less a drop in the bucket. As a result the change in ratio is not significant, from 2.75:1 to 2.77:1.
For tanks, the initial estimates are based on reported figures. There is considerable uncertainty about them, which is why I used the high-end estimates of recoverable tanks from Russian storage (~13k) and the low end of actively deployed (~3k). The truth is almost certainly somewhere in between.

You make a good point that Ukrainian tanks should be the same, will look into the code to see why they differ.


cachedmethod seems to not properly type itself as a method decorator rather than function decorator

pyright picks it up as
Argument missing for parameter "self" (reportCallIssue)

when calling the method that's been decorated - so for some reason it's not properly being typed.

When interacting with an abstract base class:
"foo" overrides method of same name in class "Bar" with incompatible type "_Wrapped[..., CoroutineType[Any, Any, Unknown], (self: Unknown, *args: Unknown, **kwargs: Unknown), Coroutine[Any, Any, Unknown | Any]]" (reportIncompatibleMethodOverride)


Improve readme.md example

Hi,
I know I can be a bit dense, but it took me like 5 minutes to get the main page example working. I think it should include the "usings"
using BCnEncoder.ImageSharp; was specially hard, as for other usings you can right click and if you're lucky to have intellisense, it will help you, but with the BCnEncoder.ImageSharp one you have no idea what to search for... (I had to go check the tests to see what was different).
At least it works now, time for fun! :)

Hi!
Thanks for the feedback. This is definitely something I overlooked since my own tooling handles usings quite automagically.
I'll add a mention of them in the examples.


Error Unrecognized prop: shipping

Hi,
I met the error, please help me.
My code is
const client = {
			sandbox:    'YOUR-SANDBOX-APP-ID',
			production: 'YOUR-PRODUCTION-APP-ID',
		}
<PaypalExpressBtn
                env={paypalConfig.env}
                client={client}
                currency={paypalConfig.currency}
                shipping={0}
                onError={this.onError}
                onSuccess={this.onSuccess}
                onCancel={this.onCancel}
                total={140} />

@brave-merida Thanks for reporting this problem!
This seems to come from the official Paypal script itself!
Could you please uninstall this latest version, and re-install with version 1.0.1, which is more stable
npm install --save<EMAIL_ADDRESS>Thanks

Great,
Thank you very much!


package.json: Explicitly include js-yaml 3.13.0

Earlier versions have a security vulnerability:
https://www.npmjs.com/advisories/788
It is a dependency of eslint. Pull in 3.13.0 explicitly until eslint is
updated.
Also remove front-matter, which had js-yaml as a dependency as well.
We're not using it.

But if it pacifies the github page, sure :-)

And travis. I wonder if there's a way to only npm audit the actual dependencies...


Add verbosity

Add some verbosity so we can see how long different parts of the algorithm take.

Can this be closed @awohns ? Have we tested that the progressbars (which I think replace this issue) work OK?


Integrate different contact steps for interaction between communities

Dynamic graphs are difficult to implement in the intra-propagation layer but are not so difficult to implement in the inter-propagation layer since there is no need to maintain an adjacency matrix (the edges to the virtual outputs could be deactivated even though it is no problem to take into account previous values of the virtual outputs and reassign them to the virtual outputs if the edge is not considered during the inter-propagation).

A problem of granularity has arisen, the contact times should be between agents (that is the virtual output passed or modified into virtual inputs) or between the previous/subsequent node in the augmented metapathways (not activating the edges in both the augmented metapathways of source type and target type)?

The problem is that changing the augmented graph will result in changing the pseudoinverse in case that the propagation is done with the use of the pseudoinverse. So additional care should be taken when using this type of strategy, the things to take into account should be:

control if there are no contact times (a static graph is used, so all the edges are already present)
zeroing the edges in the adjacency matrix (saved inside the propagation model in other forms, that is as a transposed and normalized matrix, or as a pseudoinverse matrix ) that are not present in the contact times when these are specified in the file
recomputing pseudoinverse(too much time)

Another thing to take into account, when defining the bigger granularity of virtual nodes (see issue #42) in case of multiple definitions of contact between two types (that is different contact times between couples of nodes, the  two in two  different communities, and these couple are from the same types ), what strategy should be used:

union:  take the set union of different contact times, probably the most general way of doing things
intersection: take the intersection of different contact times, probably the most precise way of doing things

Issue #42 could be the solution to the problem of changing the networks, since the virtual nodes are initially defined and, when the communication between types happen, the values are passed with a lesser granularity. That means that contact times are between the virtual inputs and outputs representing the pair (nodeID, type), and that means that every interaction has its own set of contacts, and interaction between types are more of a temporal multi-graph than a temporal directed graph.


Rework Upload Mechanism

Upload atm in Leviathan is complex for no good reason (As far as I think)
Context
The flow is client pings /start endpoint of core, core instead requests with a list of artifacts (with a hash for security purposes...), client receives this request through their websocket connection.
Client responds by looking for the path of the image that it has and processes it along with that same hash to verify that the files have come from the right place. It does the same for the other artifacts. Core calculates the hash of the file, matches the hash with the files it already has and if they don't match, then it starts the upload of the files and receives them.
Why is the core one asking for files, reasons:

Security concern - Previous contributors wanted to avoid anyone sending anything to the testbots. With this current method, the core generates these tokens, and what the client sends must have the same token. (This is broken as even though the tokens need to be the same, you can send a file with whatever type or contents. No checks are done.)
It knows where to put them artifacts and how to process
Caching

Rework
Client sends a set of artifacts, core calculates hash with what artifacts it has, decides caching, receives files, processes files. The core should only be accepting a set defined list of artifacts (example: a config.json file, a suite, and an image file). As more test suites want to send more artifacts to the core, we can rethink our decision to extend the set of artifacts that the core will be receiving.
Vipul will try a PoC.

Investigation into upload mech

issue https://github.com/balena-os/leviathan/issues/567

Client starts the WS connection to ws://${this.uri.host}/start
Core handles the /start endpoint and returns a list of artifacts it wants and a security token
Client receives said list from code and passes it off to the wsMessageHandler
According to the what the artifact ID is, the wsMessageHandler will decide what to do with it.
wsMessageHandler will pass on the artifact process to handleArtifact function where they are processed, gzipped, hash calculated and later uploaded to the core on the /upload endpoint with the security token.
Here's how upload works,

Client sends a message to core with security token, file name, file type, file path, file hash.
Core accepts, and uses the path sent to check for if any files exist on that path
If FOUND, core uses the file type to calculate hash of the file that exists on the core side.
IF the HASH matches, then the cache is used and the upload doesn't take place.
IF the hash doesn't match then the file is deleted? and the upload process starts
Throughout this process, core has an intricate retry process where if the upload fails. Then core lets the client know of exactly how many attempts are remaining for that particular file. We allow 3 attempts to upload. Core is the one that keeps count and retries the upload process on the client side using it's websocket /start connection.
When the upload process concludes, the core sends back the done message and the upload is complete.
After that the core starts the tests and the log message is sent back which then is used on client side to get logs from the tests running on the core and the test process begins.

Questions

Should we keep caching in favor of a configurable upload or not switch?

If you use a switch like that, then what is the use of the caching.
Pros: Easier code to read and less time for calculating the hash.
Cons:

We should keep security tokens around.

Check hash creation for directories, and remove duplicate code

Why can't websockets handle image uploads and why we need a HTTP server.

Figure our a sane retry mechanism

Clean out interactive code

Should we keep caching in favor of a configurable upload or not switch?

I might need some clarification on this one

We should keep security tokens around.

This seems nonsensical to me, just don't allow unauthorized users to upload or use testbots. If we transfer data/files over authorized SSH, the protocol itself checks and guarantees the integrity of the data.

Why can't websockets handle image uploads and why we need a HTTP server.

The WS connection seems redundant/reinventing the wheel. Websockets are useful when you're communicating with browsers, which don't have native sockets. Between two node applications, there's no benefit over a native socket. Indeed, inventing a new protocol to go over a socket, whether native or web variety, in this context, is probably reinventing the wheel. SSH already does secure/verified/compressed transfer of text and binary data between two hosts.

Solution: Rsync with SSH
Specification: https://docs.google.com/document/d/160MKkqVHLRUEqUszCUwc4xSzF11fpR3mhdG3Orq5Tr8/edit?usp=sharing
FD: https://www.flowdock.com/app/rulemotion/p-testbot/threads/mo408W6ORf9ykP8JBKiGmBHz8nd

After recent discussions and moving core off the testbot. It becomes clear how the upload mechanism looks like.

It doesn't exist for the most part.

With #729, volumes will act as a way for core to have direct access to all artifacts needed to run tests. The only uploads that will be there would be the streaming of artifacts to the worker in order to flash the image.
In a chance where we intend to send artifacts to the worker, we intend to create a Rsync tunnel for the back and forth of artifacts between core (testrunner) and worker

With the recent file upload limit imposed on balena-devices.com URLs, the current flashing as well as upload mechanism will have to change considerably and hence making the rsync discussion moot.


Can you please explain this linter to me?

I'm learning Go.
Can you please explain this linter to me?
I'm using interface assertion. It says to me: "type assertion must be checked (forcetypeassert)".
What does this mean?
What should I do?

I had the same problem, it would be nice if the readme gave a solution to its example.
I found that you need to check the second value returned by the type assertion:
_, ok = a.(int)
if !ok {
  // handle error
}