Lab cleanup and organization

[ ] get new monitors for the lab
[ ] make a student project cabinet(s), flexible space where new students can claim a shelf and add their label
[ ] organize the tools in the tool cabinets, use dividers, bins, labels, and other organizational methods
[ ] sort all nuts, bolts, things in the plastic bins with labels
[ ] make 6 workstations
[ ] remove all raw materials to basement in organized fashion, make at least one raw material shelf that is labeled
[ ] get rid bad bicycle rims and tires in the basement (probably metal recycling and trash for tires -> talk to Jan v. F.)
[ ] fold up the mock hexapod bike and store in basement (make sure it can be reassembled with instructions)
[ ] hang interesting bikes on the wall (talk to Jan v. F. for permissions required)
[ ] move all bicycles to the basement that are not in active use in the lab or up there for display/demo purposes
[ ] hang tools on the toolboard (label or make a silhouette of the tool so they end up back in right spot)
[ ] clear old junk from all cabinets to make space

@moorepants can you assign me to this issue?
I can't assign myself and I'm therefore unable to edit/complete the task list...
I think I might need write permissions for the repository

Can you edit now?

I'm assigned to the issue, but I'm still unable to edit the task list unfortunately..

Ok, I need to add you to the org.

Thanks, but I'm still not able to edit your task list (maybe because it's in a reply from you?).
If you are in the lab tomorrow, maybe we could have a brief look at it.


HOSTEDCP-2002: fix typo in doc commands

Which issue(s) this PR fixes:
Fixes #HOSTEDCP-2002

/lgtm


hotfix for deprecated NORMALIZED_UNIT

Not sure how to really fix, but just removing the if else statement of course works.

So what would be the real fix? Somehow hardcoding units (based on locale?), then converting when there's a mismatch?

This seems the only other piece of code that (used to) contain similar stuff: https://github.com/home-assistant/core/pull/124614 (components/sensor/recorder.py +- line 200-250)

I honestly do not know the answer for that. I need to figure out how this is supposed to be done.
I'll likely have to use this fix for now (to avoid the integration crashing) while we figure it out what's the correct way.

Figured that it would be better just to go off whatever unit of measurements are the most. HA's groups should deal with the unit conversions behind the scenes. I'm going to test this code over the next few days, feel free to test the branch of https://github.com/jseidl/hass-magic_areas/pull/393 as well (https://github.com/jseidl/hass-magic_areas/tree/enhancement/sensor-unit-of-measurement-resolution)


chore(deps): update common-dev-assets digest to ed2b244

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
9adf876 -> ed2b244

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

:tada: This PR is included in version 2.11.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Separate the base template from the promo site files

The repo has files that only seem to be used for the Foundation promo site (and appears to have your GA account numbers in the footer code?). This might make it harder for people to use the code in the repo as the basis of their own project...I'm certainly a little confused.
Ensuring that the master branch is only what people need to start their own projects could help.

Thanks for calling this out. We discussed it some this morning and we'll be moving the marketing site into a folder called 'marketing' so it can be easily removed - we want to leave it in the repo partly as a testbed or changes and also because we've received some feedback that users would like a place they can dig into to see Foundation in action. It does make for a larger initial pull, so we'll keep our options open here.

Marketing site has been moved into a subfolder and pushed.


Person to person sharing

Closes #672
What does this PR do?
Initial work to add person to person sharing (aka food baskets).
Using the sketch in https://community.foodsaving.world/t/sharing-feature/281 for the basis for design.
At the moment this is just a design exploration, and early play around with it. Not sure about naming, etc...
Links to related issues
Checklist

[ ] added a test, or explain why one is not needed/possible...
[ ] no unrelated changes
[ ] asked someone for a code review
[ ] joined #karrot-dev channel at https://slackin.yunity.org
[ ] added an entry to CHANGELOG.md (description, pull request link, username(s))

This now requires the backend part to work properly https://github.com/yunity/karrot-backend/pull/855

Phew, nearly ready! My todo list is:

offer conversations in the menu bar dropdown don't have any info about them
should you be allowed to edit accepted/archived offers?
"mark as accepted" -> i18n
show status on detail somewhere when not active? (accepted or archived)
confirmation for accept/archive buttons?
hide by feature flag
set feature flags on group edit page?
use filter by user?
add "loading massive image into canvas" indicator?
move/refactor "mapErrors" into utils
move FormContainer to somewhere more general?

(ones ending in "?" are more like optional)
... and a few backend tasks.
But if you feel like reviewing the bulk of it with that in mind, feel free :+1:

I found getting the offer title into the latestMessages thing on the topbar amazingly fiddly, I actually did it slightly differently, and stored the related offer inside latestMessages in a new "related" state, as the offers store is kept only for the offers currently showing on the group offers page. Hmm.


Building a training set of tags for coffeescript

Hello lovely maintainers :wave:
We've recently added "tags" to student's solutions. These express the constructs, paradigms and techniques that a solution uses. We are going to be using these tags for lots of things including filtering, pointing a student to alternative approaches, and much more.
In order to do this, we've built out a full AST-based tagger in C#, which has allowed us to do things like detect recursion or bit shifting. We've set things up so other tracks can do the same for their languages, but its a lot of work, and we've determined that actually it may be unnecessary. Instead we think that we can use machine learning to achieve tagging with good enough results. We've fine-tuned a model that can determine the correct tags for C# from the examples with a high success rate. It's also doing reasonably well in an untrained state for other languages. We think that with only a few examples per language, we can potentially get some quite good results, and that we can then refine things further as we go.
I released a new video on the Insiders page that talks through this in more detail.
We're going to be adding a fully-fledged UI in the coming weeks that allow maintainers and mentors to tag solutions and create training sets for the neural networks, but to start with, we're hoping you would be willing to manually tag 20 solutions for this track. In this post we'll add 20 comments, each with a student's solution, and the tags our model has generated. Your mission (should you choose to accept it) is to edit the tags on each issue, removing any incorrect ones, and add any that are missing. In order to build one model that performs well across languages, it's best if you stick as closely as possible to the C# tags as you can. Those are listed here. If you want to add extra tags, that's totally fine, but please don't arbitrarily reword existing tags, even if you don't like what Erik's chosen, as it'll just make it less likely that your language gets the correct tags assigned by the neural network.

To summarise - there are two paths forward for this issue:

You're up for helping: Add a comment saying you're up for helping. Update the tags some time in the next few days. Add a comment when you're done. We'll then add them to our training set and move forward.
You not up for helping: No problem! Just please add a comment letting us know :)

If you tell us you're not able/wanting to help or there's no comment added, we'll automatically crowd-source this in a week or so.
Finally, if you have questions or want to discuss things, it would be best done on the forum, so the knowledge can be shared across all maintainers in all tracks.
Thanks for your help! :blue_heart:

Note: Meta discussion on the forum

Exercise: hello-world
Code
helloWorld = ->
  hello: (name) ->
    return "Hello, #{name || 'World'}!"

module.exports = helloWorld

Tags:
construct:string-interpolation
construct:assignment
construct:code-structure
construct:method
construct:module
construct:nested-function
construct:object
construct:parameter
construct:return
construct:ternary
construct:variable
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:string-interpolation

Exercise: hello-world
Code
class HelloWorld

  hello: (name='World') ->
    "Hello, #{ name }!"

module.exports = HelloWorld

Tags:
construct:class
construct:constructor
construct:method
construct:optional-parameter
construct:parameter
construct:string
construct:template-string
construct:visibility-modifiers
paradigm:object-oriented

Exercise: hello-world
Code
class HelloWorld

	hello: (name) ->

		if name
			"Hello, " + name + "!"
		else
			"Hello, World!"

module.exports = HelloWorld

Tags:
construct:class
construct:method
construct:string
construct:visibility-modifiers
paradigm:object-oriented

Exercise: bob
Code
class Bob
  hey: (s) ->
    switch
      when s.match(/^\s*$/)
        "Fine. Be that way!"
      when s.match(/^[^a-z]+$/)
        "Woah, chill out!"
      when s.match(/\?$/)
        "Sure."
      else
        "Whatever."

module.exports = Bob

Tags:
construct:class
construct:method
construct:module
construct:property
construct:regexp
construct:string
construct:switch
construct:when
construct:visibility-modifiers
paradigm:object-oriented
technique:regular-expression
uses:RegExp

Exercise: word-count
Code
class Words
  constructor: (@words) ->
    @count = {}
    for word in @_sanitizedWords()
      @_addWord word

  _addWord: (word) ->
    @count[word] ||= 0
    @count[word] += 1

  _sanitizedWords: ->
    @words.replace(/\W+/g," ").trim().split(/\W+/).map (w) ->
      w.toLowerCase()

module.exports = Words

Tags:
construct:assignment
construct:class
construct:constructor
construct:field
construct:for-loop
construct:function
construct:implicit-constructor
construct:invocation
construct:lambda
construct:map
construct:method
construct:number
construct:object
construct:parameter
construct:property
construct:regular-expression
construct:string
construct:method-invocation
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:higher-order-functions
technique:looping
technique:regular-expression

Exercise: word-count
Code
class Words
  constructor: (@phrase) ->
    @count = countWords(@phrase.toLowerCase().split(/\W+/))

countWords = (wordArray) ->
  result = {}
  for word in wordArray when word != ''
    result[word] = 0 if not result[word]
    result[word] += 1
  result

module.exports = Words

Tags:
construct:class
construct:constructor
construct:for-in
construct:if
construct:invocation
construct:method
construct:number
construct:object
construct:parameter
construct:property
construct:regex
construct:variable
construct:visibility-modifiers
paradigm:object-oriented
technique:looping
technique:regular-expression

Exercise: accumulate
Code
Array::accumulate = (callback) -> callback value for value in this

Tags:
construct:class
construct:method
construct:parameter
construct:prototype
construct:throw
construct:visibility-modifiers
paradigm:object-oriented
technique:exceptions

Exercise: binary
Code
class Binary

  constructor: (bin) ->
    @bin = bin

  toDecimal: ->
    if @bin == "carrot"
      0
    else
      binArray = @bin.split("").reverse()
      base2 = (@convert i, char for char, i in binArray)
      base2.reduce (x, y) -> x + y

  convert: (i, char) ->
    num = parseInt(char)
    num * (2**i)

module.exports = Binary

Tags:
construct:add
construct:assignment
construct:class
construct:constructor
construct:double
construct:else
construct:if
construct:implicit-conversion
construct:invocation
construct:lambda
construct:method
construct:multiply
construct:number
construct:parameter
construct:property
construct:string
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:higher-order-functions

Exercise: trinary
Code
class Trinary
  constructor: (@trinary_string) ->

  toDecimal: ->
    accumulator = 0
    if @valid_trinary_string()
      for digit, index in @digits_by_ascending_rank()
        accumulator += parseInt(digit) * Math.pow(3, index)
    accumulator

  digits_by_ascending_rank: ->
    @trinary_string.match(/./g).reverse()

  valid_trinary_string: ->
    /^[0-2]+$/.test(@trinary_string)

module.exports = Trinary

Tags:
construct:class
construct:constructor
construct:for-in
construct:if
construct:invocation
construct:method
construct:multiply
construct:number
construct:parameter
construct:property
construct:regex
construct:string
construct:variable
construct:visibility-modifiers
paradigm:object-oriented
technique:looping
technique:regular-expression

Exercise: hexadecimal
Code
class Hexadecimal
  @hexCodes = '0123456789abcdef'

  constructor: (hex) ->
    @hex = hex.toLowerCase()

  toDecimal: ->
    digits = @hex.split("")
    decimal = digits.reduce (total, digit) ->
      total * 16 + digitToDecimal(digit)
    , 0
    if isNaN(decimal) then 0 else decimal

  digitToDecimal = (digit) =>
    index = @hexCodes.indexOf(digit)
    if index == -1 then NaN else index

module.exports.Hexadecimal = Hexadecimal

Tags:
construct:add
construct:assignment
construct:class
construct:constructor
construct:field
construct:if
construct:invocation
construct:method
construct:number
construct:parameter
construct:property
construct:string
construct:ternary
construct:variable
construct:visibility-modifiers
paradigm:object-oriented

Exercise: hexadecimal
Code
class Hexadecimal
    constructor: (hex) ->
      if(hex.match(/^[0-9a-f]+$/))
          @decimal = parseInt(hex, 16)
        else
          @decimal = 0

    toDecimal : -> @decimal

module.exports = Hexadecimal

Tags:
construct:class
construct:constructor
construct:method
construct:parameter
construct:property
construct:regex
construct:string
construct:visibility-modifiers
paradigm:object-oriented
technique:regular-expression

Exercise: hexadecimal
Code
NumeralSystem = require '../binary/binary'

colors =
  aqua:   '00ffff', black: '000000', blue:   '0000ff', fuchsia: 'ff00ff'
  gray:   '808080', green: '008000', lime:   '00ff00', maroon:  '800000'
  navy:   '000080', olive: '808000', purple: '800080', red:     'ff0000'
  silver: 'c0c0c0', teal:  '008080', white:  'ffffff', yellow:  'ffff00'

module.exports =
  class Hexadecimal extends NumeralSystem
    symbols: '0123456789abcdef'

    constructor: (name) ->
      @numeral = colors[name] or name

      super

Tags:
construct:assignment
construct:class
construct:coffee-script
construct:constructor
construct:extend
construct:field
construct:invocation
construct:method
construct:module
construct:named-argument
construct:object
construct:or
construct:property
construct:string
construct:super
construct:variable
construct:visibility-modifiers
paradigm:object-oriented

Exercise: nth-prime
Code
class Prime
  @nth: (n) ->
    throw "Prime is not possible" if n == 0
    lastPrime = 0
    counter = 0
    while counter < n
      counter += 1 if @isPrime(lastPrime)
      lastPrime += 1
    return lastPrime - 1

  @isPrime: (candidate) ->
    return false if candidate == 1
    return true if candidate == 2
    return false if @isEven(candidate)

    counter = 3
    max = candidate * 0.5 + 1
    while counter < max
      return false if candidate % counter == 0
      counter += 2
    return true

  @isEven: (n) ->
    return n % 2 == 0

module.exports = Prime

Tags:
construct:add
construct:assignment
construct:class
construct:constructor
construct:if
construct:implicit-conversion
construct:invocation
construct:method
construct:multiply
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:throw
construct:variable
construct:visibility-modifiers
construct:while-loop
paradigm:object-oriented
technique:exceptions
technique:looping

Exercise: palindrome-products
Code
class Palindrome
  constructor: (a,b)->
    @value = a*b
    @factors = [[a,b]]
    @isValid = Palindrome.isValid(this.value)
  insert: (a,b)->
    @factors.push [a,b].sort() if @value == a*b
  @isValid: (value)->
    valString = value+""
    valString == valString.split('').reverse().join('')
  @compare: (a,b)->
    if a.value < b.value then -1 else if a.value > b.value then 1 else 0

class Palindromes
  constructor: (options = {})->
    @max = options.maxFactor ? 10
    @min = options.minFactor ? 1
    @palindromes = []
  generate: ->
    @palindromes = objToArray(generatePalindromes(this)).sort(Palindrome.compare)
  smallest: -> @palindromes[0];
  largest: -><EMAIL_ADDRESS>  generatePalindromes = (options)->
    palindromes = {}
    eachPalindromeCombination options.min,options.max, (a,b,value)->
      palindromes[value] = new Palindrome(a,b) unless palindromes[value]?.insert(a,b)
    palindromes
  eachPalindromeCombination = (min,max,callback)->
    for a in [min..max]
      for b in [a..max] when Palindrome.isValid(value = a*b)
        callback(a,b,value)
        [a,b]
  objToArray = (obj)->
    val for key,val of obj

module.exports = Palindromes

Tags:
construct:class
construct:constructor
construct:method
construct:assignment
construct:method-invocation
construct:if
construct:ternary
construct:parameter
construct:optional-parameter
construct:number
construct:property
construct:string
construct:for-loop
construct:for-of
construct:invocation
construct:array
construct:when-clause
construct:visibility-modifiers
construct:variable
construct:object
construct:class
construct:method
construct:implicit-conversion
construct:assignment
construct:lambda
construct:optional
construct:expression
construct:constructor
construct:method
construct:parameter
construct:invocation
construct:method
construct:property
construct:string
construct:subtract
construct:ternary
construct:unless
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:higher-order-functions
technique:looping

Exercise: queen-attack
Code
class Queens

  constructor: (options) ->
    options = options || {}
    @white = options.white || [0,3]
    @black = options.black || [7,3]
    @board = @_drawBoard()
    @_validatePositions()

  toString: ->
    currentBoard = @board
    currentBoard.map (row, idx) ->
      formattedRow = row.join(" ")
      currentBoard[idx] = formattedRow
    currentBoard.join("\n")

  canAttack: ->
    @_sameRow() or @_sameColumn() or @_onDiagonal()

  _drawDefaultBoard: ->
    board = []
    range = [0..7]
    for row in range
      board.push([])
      for column in range
        board[row].push("O")
    board

  _drawBoard: ->
    currentBoard = @_drawDefaultBoard()
    currentBoard[@white[1]][@white[0]] = "W"
    currentBoard[@black[1]][@black[0]] = "B"
    currentBoard

  _validatePositions: ->
    throw "Queens cannot share the same space" if @_whiteBlackSamePosition()

  _whiteBlackSamePosition: ->
    @white.join("") is @black.join("")

  _sameRow: ->
    @white[1] is @black[1]

  _sameColumn: ->
    @white[0] is @black[0]

  _onDiagonal: ->
    Math.abs(@white[1] - @black[1]) is Math.abs(@white[0] - @black[0])

module.exports = Queens

Tags:
construct:assignment
construct:class
construct:constructor
construct:for-loop
construct:if
construct:index
construct:invocation
construct:is-equality
construct:lambda
construct:logical-or
construct:method
construct:number
construct:optional-parameter
construct:parameter
construct:property
construct:string
construct:subtract
construct:throw
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:boolean-logic
technique:exceptions
technique:higher-order-functions
technique:looping

Exercise: wordy
Code
class WordProblem
  constructor: (problem) ->
    @tokens = @tokenize(problem)

  answer: ->
    (new TokenizedWordProblem(@tokens)).evaluate()

  tokenize: (problem) ->
    problem = problem.slice(0, -1) # remove question mark
    problem = problem.split(" ").slice(2) # convert to array; remove "What is"
    problem = problem.filter (e) -> e != "by"
    operands = ["plus", "minus", "multiplied", "divided"]
    throw new Error("Too complicated!") unless problem.every (e, i) ->
      if i % 2 == 0
        Number(e) != NaN
      else
        e in operands
    problem

class TokenizedWordProblem
  constructor: (tokens) ->
    @tokens = tokens

  evaluate: ->
    firstNumber = Number(@tokens.shift())
    operator = @tokens.shift()
    secondNumber = Number(@tokens.shift())
    result = switch operator
      when "plus"
        firstNumber + secondNumber
      when "minus"
        firstNumber - secondNumber
      when "multiplied"
        firstNumber * secondNumber
      when "divided"
        firstNumber // secondNumber

    if @tokens.length == 0
      result
    else
      @tokens.unshift(result)
      (new TokenizedWordProblem(@tokens)).evaluate()

module.exports.WordProblem = WordProblem

Tags:
construct:add
construct:assignment
construct:class
construct:comment
construct:constructor
construct:divide
construct:error
construct:field
construct:if
construct:implicit-conversion
construct:in
construct:index
construct:invocation
construct:lambda
construct:method
construct:multiply
construct:number
construct:parameter
construct:property
construct:string
construct:subtract
construct:switch
construct:throw
construct:unless
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:exceptions
technique:higher-order-functions

Exercise: beer-song
Code
class Beer

  @verse: (num) ->
    if num == 0
      lastVerse()
    else if num == 1
      singleVerse()
    else
      regularVerse(num)

  @sing: (start, finish=0) ->
    (@verse(num) for num in [start..finish]).join("\n\n") + "\n"

  regularVerse = (num) ->
    """
    #{num} bottles of beer on the wall, #{num} bottles of beer.
    Take one down and pass it around, #{num - 1} bottles of beer on the wall.
    """

  singleVerse = ->
    """
    1 bottle of beer on the wall, 1 bottle of beer.
    Take it down and pass it around, no more bottles of beer on the wall.
    """

  lastVerse = ->
    """
    No more bottles of beer on the wall, no more bottles of beer.
    Go to the store and buy some more, 99 bottles of beer on the wall.
    """

module.exports = Beer

Tags:
construct:class
construct:method
construct:string
construct:assignment
construct:class-method
construct:default-argument
construct:for-in
construct:if
construct:interpolation
construct:invocation
construct:method-overloading
construct:number
construct:parameter
construct:template-string
construct:visibility-modifiers
paradigm:object-oriented
technique:looping

Exercise: atbash-cipher
Code
Atbash = {}

generateAlphabet = ->
  a = 'a'.charCodeAt(0)
  z = 'z'.charCodeAt(0)
  (String.fromCharCode(i) for i in [a..z])

ALPHABET = generateAlphabet()

REVERSED = do ->
  generateAlphabet().reverse()

encodeChar = (char) ->
  return char if char.match(/\d+/)
  i = ALPHABET.indexOf(char.toLowerCase())
  REVERSED[i]

Atbash.encode = (phrase) ->
  (encodeChar(c) for c in phrase)
    .join('')
    .match(/.{1,5}/g)
    .join(' ')

module.exports = Atbash

Tags:
construct:coffee-script
construct:do
construct:for-comprehension
construct:function
construct:if
construct:index
construct:invocation
construct:method
construct:module
construct:number
construct:object
construct:parameter
construct:regex
construct:return
construct:string
construct:variable
paradigm:functional
paradigm:object-oriented
technique:regular-expression

Exercise: linked-list
Code
LinkedList = ->
  @head = null
  @count = 0

LinkedList.prototype.pushNode = (datum) ->
  return @head = new Node(datum, null, null) if !@head

  @fastForward()
  @head.next = new Node(datum, @head, null)

LinkedList.prototype.popNode = ->
  return undefined if !@head

  @fastForward()
  datum = @head.datum
  @head = @head.last
  @head.next = null
  datum

LinkedList.prototype.unshiftNode = (datum) ->
  return @head = new Node(datum, null, null) if !@head

  @rewind()
  @head.last = new Node(datum, null, @head)

LinkedList.prototype.shiftNode = () ->
  return undefined if !@head

  @rewind()
  datum = @head.datum
  @head = @head.next
  @head.last = null if @head
  datum

LinkedList.prototype.deleteNode = (datum) ->
  @rewind()
  @head = @head.next while @head.next && @head.datum != datum
  @head.next.last = @head.last if @head.next
  @head.last.next = @head.next if @head.last
  @head = @head.next || @head.last

LinkedList.prototype.countNodes = () ->
  return 0 if !@head

  count = 1
  @rewind()
  while @head.next
    count += 1
    @head = @head.next
  count

LinkedList.prototype.fastForward = ->
  @head = @head.next while @head.next

LinkedList.prototype.rewind = ->
  @head = @head.last while @head.last

Node = (@datum, @last, @next) ->

module.exports = LinkedList

Tags:
construct:assignment
construct:class
construct:constructor
construct:field
construct:if
construct:invocation
construct:logical-and
construct:logical-or
construct:method
construct:null
construct:null-coalescing
construct:number
construct:parameter
construct:prototype
construct:return
construct:short-circuiting
construct:variable
construct:visibility-modifiers
construct:while-loop
paradigm:object-oriented
technique:boolean-logic
technique:looping

Exercise: nucleotide-count
Code
class DNA
    constructor: (seq) ->
        @nucleotideCounts = { 'A': 0, 'T': 0, 'C': 0, 'G': 0 }
        for el in seq.toUpperCase().split('')
            @nucleotideCounts[el] += 1

    count:(el) ->
        @nucleotideCounts[el] ? throw "Invalid Nucleotide"

module?.exports = DNA

Tags:
construct:assignment
construct:class
construct:constructor
construct:for-in
construct:method
construct:number
construct:object
construct:property
construct:string
construct:throw
construct:throw-expression
construct:variable
construct:visibility-modifiers
paradigm:object-oriented
technique:enumeration
technique:exceptions
technique:looping


all-in-one tool for chatglm3-6b: 2nd latency of batch size 1 is larger than batch size 2

ipex-llm version is: 2.5.0b20240510

This issue is caused by different logic of inference with batch size=1 and batch size=2. When batch size=1, quantize kv cache will not be enabled automatically, and you may need enable manually by export IPEX_LLM_LOW_MEM=1. When batch size =2, quantize kv cache will be enabled automatically. Noted that enabling quantize kv cache will speed up rest token latency.


Better document possible relabel input modification

Since #11147 the behavior of relabel.Process has changed, rendering its comment slightly out of date. I found this out while working on https://github.com/thanos-io/thanos/pull/5767.
This PR updates the comment to make the side effect of this function more clear.

Note that the current comment says “ May return the input labelSet modified.”

@bboreham I noticed. It's still valuable to properly document the known cases where the input is modified. More importantly, it's super valuable to add tests to ensure that anyone importing this code won't be surprised by a behavior change.
Change done in https://github.com/prometheus/prometheus/pull/11147 introduces a breaking change and now there are more cases where the input is modified than before.

The wording on May return the input labelSet modified. is very confusing. Especially considering the comment also used to say Process returns a relabeled copy of the given label set. These two comments seemed contradictory.

I do not agree with adding tests which explore exactly when the input may be modified.

Reusing the memory of the input and modifying it is part of the behavior/outcome of the function and thus deserves to be accounted for in tests, just as the relabeling does. I know there aren’t guarantees of backwards compatibility a la semver at play here, but having tests covering 100% of the behavior of a function is good, no? Who can guarantee that the memory optimization won’t be broken in a future commit?
Why do you disagree?

I do not think we should test this. Because in the future we might just not change the input anymore. I think that a comment saying that the input may be changed is enough. We should not document in comment when it is changed - because that could also change.

I know there aren’t guarantees of backwards compatibility a la semver at play here, but having tests covering 100% of the behavior of a function is good, no?

(sidenote: We have semver but we publish go modules as v0.x.x, meaning there is no compatibility guarantees.)
Testing 100% is not good, because when you blindly change the behavior, you tend to blindly change tests like this as well. At the end, in this case, it is just more code to maintain without extra benefits.

Why do you disagree?

It’s an implementation detail, not part of the intended contract of the function.

Hello @douglascamata , can you please rebase this pull request? Thanks.

@roidelapluie done. Thank you. 🙇

Thanks!


Libraryimport hcs

PR Summary
Contributes to #18553.
Continue #18194.
I wonder we did not exclude Windows code from Unix...
The new HCS API is natively async and we could use async/await if needed. Example https://github.com/dantmnf/WSLAttachSwitch/blob/f3d9c0a85214c61f04c06ea42f7a1ce79b460a17/ComputeService/HcsOperation.cs
PR Context

PR Checklist

[ ] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[ ] Summarized changes
[ ] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[ ] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[ ] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[ ] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:

[ ] Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode
(which runs in a different PS Host).

[ ] Issue filed:

[ ] Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.

[ ] Issue filed:

[ ] Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).

[ ] Issue filed:

[ ] Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

[ ] Issue filed:

@iSazonov There is a style issue: IntPtr ComputeSystem -> IntPtr computeSystem that could be confusing for reviewers.
You could cherry-pick 4dda94ded35e317e1202f705fa14eb2f942ae89b, or I can submit it as a separate PR.

Sorry, I don't understand.

The local variable naming should use camelCase, not PascalCase, otherwise it looks like a member.

Sorry, I don't understand.

The local variable naming should use camelCase, not PascalCase, otherwise it looks like a member.

It is old code. I have only updated pinvoke code for HcsOpenComputeSystem without cleanups.


Add plugin multi-branch-priority-sorter

Description
This plugin has been forked into jenkinsci/multi-branch-priority-sorter-plugin.
Hosting request HOSTING-781 was done.
Submitter checklist for changing permissions
Always

[x] Add link to plugin/component Git repository in description above

For a newly hosted plugin only

[x] Add link to resolved HOSTING issue in description above

For a new permissions file only

[x] Make sure the file is created in permissions/ directory
[x] artifactId (pom.xml) is used for name (permissions YAML file).
[x] groupId / artifactId (pom.xml) are correctly represented in path (permissions YAML file)
[x] Check that the file is named plugin-${artifactId}.yml for plugins

When adding new uploaders (this includes newly created permissions files)

[ ] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[ ] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[ ] All newly added users have logged in to Artifactory at least once

Build failed; the context from the latest run is:
Expand to view
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
[2019-06-07T16:09:45.955Z] 	at io.jenkins.infra.repository_permissions_updater.ArtifactoryPermissionsUpdater$_generateApiPayloads_closure1.doCall(ArtifactoryPermissionsUpdater.groovy:137)
[2019-06-07T16:09:45.955Z] 	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[2019-06-07T16:09:45.955Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2019-06-07T16:09:45.955Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
[2019-06-07T16:09:45.955Z] 	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
[2019-06-07T16:09:45.955Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
[2019-06-07T16:09:45.955Z] 	at groovy.lang.Closure.call(Closure.java:414)
[2019-06-07T16:09:45.955Z] 	at groovy.lang.Closure.call(Closure.java:430)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachFile(ResourceGroovyMethods.java:1070)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachFile(ResourceGroovyMethods.java:1088)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.dgm$936.invoke(Unknown Source)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
[2019-06-07T16:09:45.955Z] 	at io.jenkins.infra.repository_permissions_updater.ArtifactoryPermissionsUpdater.generateApiPayloads(ArtifactoryPermissionsUpdater.groovy:135)
[2019-06-07T16:09:45.955Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2019-06-07T16:09:45.955Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2019-06-07T16:09:45.955Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2019-06-07T16:09:45.955Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:151)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:102)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)
[2019-06-07T16:09:45.955Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:214)
[2019-06-07T16:09:45.955Z] 	at io.jenkins.infra.repository_permissions_updater.ArtifactoryPermissionsUpdater.main(ArtifactoryPermissionsUpdater.groovy:318)
[2019-06-07T16:09:46.086Z] [Pipeline] }
[2019-06-07T16:09:46.118Z] [Pipeline] // stage
[2019-06-07T16:09:46.203Z] [Pipeline] stage
[2019-06-07T16:09:46.239Z] [Pipeline] { (Archive)
[2019-06-07T16:09:46.273Z] [Pipeline] archiveArtifacts
[2019-06-07T16:09:46.285Z] Archiving artifacts
[2019-06-07T16:09:46.659Z] [Pipeline] archiveArtifacts
[2019-06-07T16:09:46.677Z] Archiving artifacts
[2019-06-07T16:09:46.898Z] [Pipeline] }
[2019-06-07T16:09:46.931Z] [Pipeline] // stage
[2019-06-07T16:09:46.963Z] [Pipeline] }
[2019-06-07T16:09:47.014Z] [Pipeline] // node
[2019-06-07T16:09:47.071Z] [Pipeline] End of Pipeline
[2019-06-07T16:09:47.444Z]
[2019-06-07T16:09:47.444Z] GitHub has been notified of this commit’s build result
[2019-06-07T16:09:47.444Z]
[2019-06-07T16:09:47.444Z] ERROR: script returned exit code 1
[2019-06-07T16:09:47.444Z] Finished: FAILURE

Powered by the Comment Logger

Please use .yml like all of the other files.


Best practice: How to convert a tensor created in init() to the same device as the model

Question
Say I create a tensor in the __init__() of a module, what is the best practice for me to convert it to the same device as the module so that it works for cpu/gpu/distributed training environment?
Things that I tried
I tried to put this type check into the prepare_data() function, and run the module in GPU, but it seems like the module type is still in CPU when this function is called.
I then tried to put in my forward() function, because this is eventually where the train/validation/test will end up with, but this looks ugly because we need to do this check at every step, but essentially we only need to call do it once. Is there a better solution?

This is a PyTorch question. Register it as a buffer.
See pytorch docs for register_buffer.

WOWW this is awesome!! Thank you!!!


smooth scroll

is the ways to scroll to section with transition or animation ???

check this repo: https://github.com/codebushi/gatsby-starter-stellar
copy and paste the Scroll.js component, it'll work.

Hi, about this. Where should Scroll.js be pasted?

duplicated #69


License

Hello! I would want to continue this code for it to be more flexible with my interface names. Declare a license for it please. MIT license?

See the pull request #2

Added MIT LICENSE. Go ahead with the work :)


Need to migrate to new CVS system to use the built in report abuse

The new CVS has a management system for reporting abuse. Instead of maintaining our own, we should migrate to their system at some point.

Migration done.


fix: endless cluster reconnect - race condition

I do have concerns about circuit breaker, in case all nodes are stuck in disconnected state. But I think it should be fine, because nodes should get cleaned up and the error would be different once there are no nodes or error is not caused due to .disconnect being called prior to the command

@luin what do you think about this fix? the flow is generally the following:

cluster connects with hostnames:port
starts ready check
starts connecting to ipaddress:port
disconnects hostname based connection
ready check returns error due to .disconnect()
cluster.disconnect() is called forcing connection shut down across all nodes

endlessly repeats this sequence, unless ready check has not started or already finished before .disconnect on the hostname:port
Another fix that might be a bit more reliable is to resolve hostname to ipaddress before connecting to redis cluster, most likely forming a correct node key right away. But it would still be a problem in case that ipaddress is different from what the redis cluster returns

This change makes sense to me for fixing the issue. However, I'm wondering there may be a case that there is only one node in the cluster (or only one node that we can reach from the given node), this._readyCheck will be triggered endless.

I think in case of only one node that node should be removed from the pool completely after the failure? Or is it not how it works - I admit I don't follow the complete logic for maintaining pool of connections yet so maybe there is something that I'm missing

BTW, in the tests 1 case seem to be particularly flaky, any idea why is that?
  1) cluster:pipeline
       should retry when redis is down:
      Uncaught AssertionError: expected [ null, 'OK' ] to deeply equal [ null, 'bar' ]
      + expected - actual
       [
         [null]
      -  "OK"
      +  "bar"
       ]

      at /home/travis/build/luin/ioredis/test/functional/cluster/pipeline.js:207:28
      at tryCatcher (node_modules/standard-as-callback/lib/utils.js:10:19)
      at /home/travis/build/luin/ioredis/node_modules/standard-as-callback/index.js:20:31
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:189:7)

The test above failed because the new code skips the reconnection. However, the test will make node2 alive again when reconnect (see the stub function of refreshSlotsCache). Since the node2 doesn't become alive, ioredis will pick a node random. So node1 will be picked, which will return 'OK' for both get foo & set foo bar since we don't specify the reply handler for these commands.

One other possible solution I see is resolving hostname -> ip address before connecting, since we know that redis cluster would be returning ip addresses either way, what do you think?
@luin that way there should not be a readyCheck triggered on a node that we already know is going to be disconnected from the list, however, if it does get disconnected for some other reason - it could still be the case of endless retries with that race condition.
Another stab at this could possibly be delaying readyCheck until all of the nodes in the pool have "connected" state

@luin reworked proposed fix a bit, I think it should handle the problem a bit better

chore: all literals that I've found were replaced with string constants, but probably a few more should be replaced, where there are .on/once listeners
once stream is up (sentinel / redis) the node key is updated if it is different, thus removing the need for the node to be disconnected

alright, this seem to be working rather well now, except that I still can see some issues in somewhat random places - one of the tests for monitor & max retries would bug out at times with a timeout error. However, this is also the case with non-modified code
Noteworthy - updated TS to 3.x, added sourcemaps, nothing seems to be breaking, sinon to 6 (5 major versions jump), istanbul of 0.4.x to nyc with most recent versions of it. Locally tests seem to be passing well, waiting for CI

not the best piece of my code, but I think the last solution thats been implemented should be the best. Basically it waits before all nodes are in some sort of final "pre-cluster connected" state and only then tries to do readyCheck
I haven't implemented cancelling promises since its not in the spec, but it shouldn't leak since it must be always resolving with any status - either connect or failure

did some more testing and that specific solution still doesn't eliminate the problem completely, guess need to make some sort of combination between them or automatic redirect of node-agnostic commands on the "manual" disconnect, such as the cluster status one

Do you think resolving the hostnames to IPs before connecting could solve the problem?

it will work for some cases, but I dont think its fail proof. In my opinion it would be great to somehow rework the ready check, specifically to make sure it doesn't trigger full reconnect when one node is manually disconnected due to configuration mismatch

As for the rework of ready check, in which case this pull request doesn't eliminate the problem?

I was thinking that when some node is faulty and wont let us connect for some reason its possible for command to be dispatched to it and then go in circles


Touchpad does not work(

It seems like in the build from November 14, everything worked on Monterey, but now my mouse 0_0 does not move

Thanks for pointing out the issue. I am working to resolve this issue.

I could not reproduce this issue on my machine.


test: add request/response body reading test

Closes #419

Released: v0.34.3 🎉
This has been released in v0.34.3!

📄 Release notes
📦 npm package

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.

Predictable release automation by @ossjs/release.


Window freezing

If you ill minimize window and wait for about 1 minute, window will maximize behind all active windows, if you'll try to click on it you its process will be finished immediately

Unfortunately, RenderDoc showed nothing, logs did the same

As testing has shown the window gets stuck in the resize mode and stops responding to events. Most likely, it is something with the work of these methods GLFW or rendering.

you mean glfw window methods?

Found that title changing frezzed too

Exception of type 'System.ExecutionEngineException' was thrown.

Okay I find reasone -> https://github.com/opentk/opentk/issues/1073
GC collect GLFW callbacks

Probably fixed, but

Happened when i was "flying" with camera, ill look on it better so i could determine if it linked to this

Yeah, this one is linked, but ill open another issue


Fix taking all screen on phone

Phone and devices with width <500 px, form took all space.
Moved 500px to width
Set max-width to 90% to allow some margin on the sides while on phone

can I get a review on this pls?


Cholesky decomposition issue when doing classification with a custom kernel

example_data.zip
I constructed a custom Matern32 kernel to operate on some expensively computed matrix values which contain the `distance' between my data points:
import numpy as np
import tensorflow as tf
import gpflow

dat_mat = np.load('example_matrix.npy')

dat_diag = tf.constant(np.diag(dat_mat),dtype=tf.float64)
dat_mat = tf.constant(dat_mat,dtype=tf.float64)

def sub_mat(A,A2):
        global dat_mat
        A = tf.cast(A,tf.int32)
        A2 = tf.cast(A2,tf.int32)
        K_rows = tf.transpose(K_rows)
        K_mat = tf.gather_nd(K_rows, A2)
        K_mat = tf.transpose(K_mat)
        return tf.cast(K_mat, tf.float64)

class Matern32_RBF(gpflow.kernels.Kernel):
        global dat_mat, dat_diag
        def __init__(self):
                super().__init__(input_dim=1, active_dims=[0])
                self.var = gpflow.Param(1.0, transform=gpflow.transforms.Exp())
                self.mag = gpflow.Param(1.0, transform=gpflow.transforms.Exp())

        @gpflow.params_as_tensors
        def K(self, A, A2=None):
                if A2 is None:
                        A2=A
                K_mat = sub_mat(A,A2)
                z = np.sqrt(3)*K_mat*self.var
                return self.mag*(1+z)*tf.math.exp(-z)
        def Kdiag(self, A):
                A=tf.cast(A,tf.int32)
                K_diag = tf.cast(tf.gather_nd(dat_diag, A),tf.float64)
                z = np.sqrt(3)*K_diag*self.var
                return self.mag*(1+z)*tf.math.exp(-z)

This custom kernel was implemented for a binary classification task (example data files attached):

Y=np.loadtxt('example_data.csv', usecols=1)
len_dataset = len(Y)

#These x-values only refer to the rows of my computed distance matrix
X=np.array(range(len_dataset))
X=X.astype(int)

X=X.reshape(-1,1)
Y=Y.reshape(-1,1)

k = Matern32_RBF()

#Data_set split
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, Y, random_state=1)

custom_config = gpflow.settings.get_settings()
custom_config.numerics.jitter_level = 1e-3

opt = gpflow.train.ScipyOptimizer()
model = gpflow.models.VGP(X_train, y_train, likelihood=gpflow.likelihoods.Bernoulli(), kern=k)

with gpflow.settings.temp_settings(custom_config):
        opt.minimize(model)

Running the above returns the following error:
Traceback (most recent call last):
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
return fn(*args)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cholesky decomposition was not successful. The input might not be valid.
[[{{node VGP-cb46397c-6/Cholesky}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "trial.py", line 64, in
opt.minimize(model)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/training/scipy_optimizer.py", line 89, in minimize
**kwargs)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/training/external_optimizer.py", line 175, in minimize
optimizer_kwargs=self.optimizer_kwargs)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/training/external_optimizer.py", line 436, in _minimize
result = scipy.optimize.minimize(*minimize_args, **minimize_kwargs)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/scipy/optimize/_minimize.py", line 601, in minimize
callback=callback, **options)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/scipy/optimize/lbfgsb.py", line 335, in _minimize_lbfgsb
f, g = func_and_grad(x)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/scipy/optimize/lbfgsb.py", line 285, in func_and_grad
f = fun(x, args)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 300, in function_wrapper
return function((wrapper_args + args))
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 63, in call
fg = self.fun(x, *args)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/training/external_optimizer.py", line 398, in loss_grad_func_wrapper
loss, gradient = loss_grad_func(x)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/training/external_optimizer.py", line 309, in eval_func
augmented_fetches, feed_dict=augmented_feed_dict)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run
run_metadata_ptr)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _run
feed_dict_tensor, options, run_metadata)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
run_metadata)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cholesky decomposition was not successful. The input might not be valid.
[[node VGP-cb46397c-6/Cholesky (defined at /home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/models/vgp.py:108) ]]

Caused by op 'VGP-cb46397c-6/Cholesky', defined at:
File "trial.py", line 61, in
model = gpflow.models.VGP(X_train, y_train, likelihood=gpflow.likelihoods.Bernoulli(), kern=k)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/core/compilable.py", line 90, in init
self.build()
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/core/node.py", line 156, in build
self._build()
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/models/model.py", line 79, in _build
likelihood = self._build_likelihood()
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/decors.py", line 67, in tensor_mode_wrapper
result = method(obj, *args, **kwargs)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/models/vgp.py", line 108, in _build_likelihood
L = tf.cholesky(K)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/ops/gen_linalg_ops.py", line 767, in cholesky
"Cholesky", input=input, name=name)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
op_def=op_def)
File "/home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1801, in init
self._traceback = tf_stack.extract_stack()

InvalidArgumentError (see above for traceback): Cholesky decomposition was not successful. The input might not be valid.
[[node VGP-cb46397c-6/Cholesky (defined at /home/wjm41/.conda/envs/gpenv/lib/python3.6/site-packages/gpflow/models/vgp.py:108) ]]

I've tried varying the jitter level in the GPFlow settings as well as the initial values of the kernel parameters but that hasn't fixed this Cholesky decomposition issue. My custom kernel works fine for regression tasks so I'm not sure where the problem is. Is my data just really badly conditioned? (example data is a small subset of full dataset)
I'm using Python 3.6, GPFlow 1.3.0, and TensorFlow 1.13.1.

Hi @wjm41, thanks for your interest in GPflow - I hope you generally find it useful! The github issues are for issues with the code inside GPflow, though, or for bugs in the interfaces - it's not intended for support for custom code. You are very welcome to repost this as an issue on stackoverflow.com, under the gpflow tag - this has the advantage that a much wider number of people would be able to help you, and moreover, the answer would then still be available to help other people in the future who may have similar questions (unlike a github issue, which ideally disappears as "closed" sooner rather than later).


Merge pull request #1 from HORNET-Storage/main

New Update

Correct me if I am wrong but this pr has no files changed? Can you confirm if it was created correctly when you can please @Maphikza

I am sure it was an error on my part if there are no changes. I am still getting comfortable with the pr system. I hope I did the last pr correctly where I added the sqlite db.

Yeah the other one looks fine mate, don't worry about it just wanted to double check, will close this one 😄


(Question) How to view contents of request

First off, thanks for your time. I'm sure you're busy.
I'm trying to debug some restful applications speaking to each other, and I've been trying to setup your mitm service to do so.
Reading your documentation I can get to the point where I dump the headers of a given request, but I can't figure out how to view the body of the request.
Here's what I have so far:
    @FunctionalInterface
    private interface MyFilter extends HttpFiltersSource {
        default int getMaximumRequestBufferSizeInBytes() {
            return 0;
        }
        default int getMaximumResponseBufferSizeInBytes() {
            return 0;
        }
    }

and a simple main method to run the application:
    private static final AttributeKey<String> CONNECTED_URL = AttributeKey.valueOf("connected_url");

    public static void main(String[] args) throws RootCertificateException {
        HttpProxyServer server =
                DefaultHttpProxyServer.bootstrap()
                        .withPort(3455)
                        .withManInTheMiddle(new CertificateSniffingMitmManager())
                        .withFiltersSource((MyFilter) (originalRequest, context) -> {

                            System.out.println("-----------------------------------------------------");
                            HttpMethod method = originalRequest.getMethod();
                            String originalUri = originalRequest.getUri();
                            System.out.println(method + " -> " + originalUri);
                            originalRequest.headers().forEach(entry -> {
                                System.out.println("-- " + entry.getKey() + ":" + entry.getValue());
                            });

                            if (HttpMethod.CONNECT.equals(method) && Objects.nonNull(context) && originalUri.endsWith(":443")) {
                                String url = "https://" + originalUri.replaceFirst(":443$", "");
                                context.channel().attr(CONNECTED_URL).set(url);
                                System.out.println("(Manipulating connection request for successful HTTPS: " + originalUri + " -> " + url + ")");
                            }
                            return new HttpFiltersAdapter(originalRequest, context);
                        })
                        .start();

        System.out.println("Running mitm server");
    }

I've been digging into the ChannelHandlerContext via debugging and some of the javadoc, and my initial assumption about the body being located here appears to be false. So really my question, I suppose, is how do I access the request body given that it doesn't appear to be present in either the request or context object?

I have found a (seemingly) working solution using a little more experimentation and reading. I'm sure I won't be the only one that has this question, so I'll include what I came up with here. I'm not sure what the implications of HttpFilters#clientToProxyRequest returning null are (I can't find any documentation at the moment to explain what the expected behavior is) but it isn't breaking (I'm going by the assumption that because the static NOOP_FILTER field doesn't override this method that it's standard and okay behavior).
.withFiltersSource(new HttpFiltersSourceAdapter() {
    public HttpFilters filterRequest(HttpRequest originalRequest, ChannelHandlerContext context) {
        System.out.println("-----------------------------------------------------");
        HttpMethod method = originalRequest.getMethod();
        String originalUri = originalRequest.getUri();
        System.out.println("CLIENT " + method + " -> " + originalUri);
        originalRequest.headers().forEach(entry -> {
            System.out.println("-- " + entry.getKey() + ":" + entry.getValue());
        });

        if (HttpMethod.CONNECT.equals(method) && Objects.nonNull(context) && originalUri.endsWith(":443")) {
            String url = "https://" + originalUri.replaceFirst(":443$", "");
            context.channel().attr(CONNECTED_URL).set(url);
            System.out.println("(Manipulating connection request for successful HTTPS: " + originalUri + " -> " + url + ")");
            return new HttpFiltersAdapter(originalRequest, context);
        }

        return new HttpFiltersAdapter(originalRequest) {

            @Override
            public HttpResponse clientToProxyRequest(HttpObject httpObject) {
                if (httpObject instanceof LastHttpContent) {
                    LastHttpContent copy = ((LastHttpContent) httpObject).copy();
                    String body = copy.content().toString(StandardCharsets.UTF_8);
                    System.out.println("REQUEST BODY:" + body);
                }
                return null;
            }

            @Override
            public HttpObject serverToProxyResponse(HttpObject httpObject) {
                if (httpObject instanceof HttpResponse) {
                    HttpResponse response = (HttpResponse) httpObject;
                    System.out.println("SERVER RESPONSE");
                    response.headers().forEach(entry -> {
                        System.out.println("-- " + entry.getKey() + ":" + entry.getValue());
                    });
                }
                return httpObject;
            }
        };
    }
})

(Just as a side note, the reason I am having to check for LastHttpContent might be because I set the buffer sizes to 0 in my default interface, this will require further digging when I have more time: stackoverflow citation)

In clientToProxyRequest you shouln't find an instance of LastHttpContent. A last content of a chunked response should be always empty in HTTP/1.1, but FullHttpResponse extends LastHttpContent given to you by io.netty.handler.codec.http.HttpObjectAggregator.
It is important to set org.littleshoot.proxy.HttpFiltersSource.getMaximumResponseBufferSizeInBytes() to a size like 10 MB depending your devices memory and network transfer rate. This causes LittleProxy to add an inflater and aggregator the pipeline which avoids compressed and chunked responses. But if you detect a huge download you have to remove both from the pipeline.
Javadoc: Indicate how many (if any) bytes to buffer for incoming HttpResponses. A value of 0 or less indicates that no buffering should happen and that messages will be passed to the HttpFilters response filtering methods chunk by chunk. A positive value will cause LittleProxy to try an create a FullHttpResponse using the data received from the server, with its content already decompressed (in case the server was compressing it). If the response size exceeds the maximum buffer size, the response will fail.
I hope this helps. See the description of filters source and filters in #32 too.


Needed a composable to show the showering of papers

Support for jetpack compose

Will mention a duplicate library completely rewritten in jetpack compose in few hours or days


Allow User/Maintainer control of Email and Package Version

Hi,
I've just given Warehouse a whirl. This is a huge improvement. Thanks for all the hard work!
I have some feedback on my first experience.
When uploading a package, I was asked to change my email format ('user at domain dot com' did not parse correctly; HTTPError: 400 Client Error: author_email: Invalid email address.). When I changed the format, the site used my email to create a mailto link. That feels like an invasion of my privacy, and it would be great if maintainers who are uncomfortable with it like myself could turn that off.
For the moment, I've removed the author_email field entirely. However, when I run python setup.py check --strict --metadata --restructuredtext I am told warning: check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too. Removing both author and author_email also causes the check to raise an error.
The combined user experience here is not great. I'm not sure what the right way to go about having a discussion on this front is (is this a setuptools issue, or a PEP issue?). If the mailto link isn't created, then does it matter? On the other hand, if the data is not being used, why specify it?
Given the mailto link, I decided to remove the version of the package I had just uploaded, but warehouse doesn't seem to have the ability to do so! Worse, deleting the version of the package on https://pypi.python.org/pypi doesn't seem to affect pypi.org. Before removing legacy PyPI, I'd suggest allowing maintainers to delete versions of a package.
Thanks again!

I'm too tired to properly consider the rest of your email, so I'll respond to in depth later.
However I just wanted to mention now, that deleting versions from legacy PyPI does effect Warehouse, it just doesn't purge the cache so it may take up to uh, 24h or so for it to show up on Warehouse. In the interim time there's a bit of a hack you can use to manually purge a single URL from the cache by doing curl -XPURGE https://pypi.org/project/foobar/ which will just invalidate the cache on our CDN servers, and cause it to get fetched from the origin servers again.
Longer term, the need for a undiscoverable CLI invocation or waiting ~24h goes away because when we add this functionality to Warehouse, it will correctly purge it's own cache.

Ok, now that I've had some time to think about this. First I'd want to ask if it would be fine for you to just remove the field? I know that python setup.py check raises an error, but the reality of the situation is that those fields are not actually mandatory in any situation except that if you omit them distutils will fill them in with UNKNOWN. I believe setuptools could patch this to remove the somewhat silly warning and if you're fine with just omitting the email address I think that could/should be considered a resolution to this issue?
If not, I would need to more fully understand why you consider a properly formatted email address as invasion of privacy but don't consider a slightly munged one to be one.

Thanks for getting back to me so quickly!
tl;dr:
I have absolutely no problem leaving the author_email field blank.
When you force me to think about the munged email, I realize that I had originally munged emails to avoid robots and spam. However, this is probably not an effective protection anymore (if it ever was). What's more, given that I want people to file bugs or contact me via Github for these packages, there is no benefit to providing a badly obfuscated email.
I'm therefore closing this issue as I believe it's resolved. Please note that I will be opening an issue on pypa/setuptools to see about changing the check.

And by setuptools I mean distutils, because that's where that check actually lives. >.>

Can you check if it’s the metadata spec (PEP) that requires author + email, or only distutils?  If it’s the spec, then the distutils check is right and this warehouse ticket should be reopened.

I don't believe that either PEP 426 (Draft) not PEP 345 (Accepted; current) mention a dependency between author or author_email. PEP 345 in particular makes them sound separate (relevant section).


Add module and plugin deprecation mechanism

The goal of this ticket is to add a deprecation mechanism to core for modules and plugins. The proposal is to:

Add a deprecated boolean field to module.yml When this is set to true, the compiler should issue a deprecation warning when the module is imported
Add a deprecation and replacedby field to the @plugin decorator. When set to true it should print out a warning that the plugin is deprecated. When replaceby is set the message should also say something like This plugin has been replaced by {replacedby}

If the current code does not support unkown keyword arguments it is best to create a new decorator so that we do not make modules incompatible with older releases. Similar for the additional keyword in the module.yml If required we need to support it as well in ISO5.
ISO4 modules are not updated so that should not be an issue.

Hey team! Please add your planning poker estimate with Zenhub @arnaudsjs @FloLey @Hugo-Inmanta @sanderr

Small proposal to get one step further with this (in a way which I think would improve the usability overall):

Instead of passing a string in replaced_by, pass directly the other plugin object.  The advantages I see:

You are sure that whatever this replaced_by is referring to must exist, and if at some point it doesn't anymore (should not happen), we will notice it directly.
You can still access the name and even the location of the plugin (the name is in <the_function_object>.__name__ and might even be extracted by the plugin decorator, no idea about how that thing is implemented) to improve the warning message.

Allow to overwrite/extend the warning message, with another field in the decorator (something like message)

@edvgui
For me the message argument is overkill:
The default deprecation warning will already tell that the module will be deprecated and the replace_by will give more information about this. I think this is all what is needed. Adding a custom message will in most cases result in 'less' info than what the decorator would build.
For the rest I'm not against it :)


Toolchain not being picked up

I've been trying to make a seamless integration between my bazel toolchain setup and clion, and failing.  I believe I've replicated my problem using data from the test data packaged with bazel.  I took the code out of https://github.com/bazelbuild/bazel/tree/master/src/test/shell/bazel/testdata/bazel_toolchain_test_data, copied it into a new directory, fixed up the links, added a call to register_toolchains, and was good to go.
The specific bug I'm experiencing is that even though the command line compile (blaze build //:hello) works fine, clion is unable to resolve any of the system includes in hello.cc.  I get red squigglies under all of the includes at the top of the file, std:: is undefined, as is NULL and EXIT_SUCCESS
I'm using bazel v 0.19.0, clion 2018.2.6 and clion bazel plugin 2<IP_ADDRESS>.4.
One other thing which took me forever to debug was that a mispelling in the toolchain_type member of toolchain fails silently, with no red squigglies or bazel error; you simply end up with 'no matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type'.  To replicate that, simply change both toolchain_type values in tools/arm_compiler/BUILD to be @bazel_tool instead of @bazel_tools.
Thank you for your help, and for making an awesome product!

I think the problem is that we don't do "resolveToIncludeDirectories(executionRootPath)" for the toolchain supplied flags that we'd do from BUILD target attribute supplied flags (like here for a "cideinfo" https://github.com/bazelbuild/intellij/blob/02b148713798c71d86121e3c22ca5ef5470cb08b/cpp/src/com/google/idea/blaze/cpp/BlazeCWorkspace.java#L221).
====
Debug info

add cidr.show.compiler.info=true to clion-2018.2/bin/idea.properties
restart IDE, then open hello.cc, and use "Find Action" (ctrl+shift+a), then type "Show compiler info"

From there, I see a dump of compiler switches.
In particular:
-isystem
external/org_linaro_components_toolchain_gcc_5_3_1/arm-linux-gnueabihf/include/c++/5.3.1/arm-linux-gnueabihf
However, at the end there's a section that says "Header Search paths", and that section doesn't have the "c++/5.3.1" directory.
Because we aren't processing those flags with resolveToIncludeDirectories(executionRootPath) it's missing the execroot prefix like
/home/jvoung/.cache/bazel/_bazel_jvoung/94fe03a4b5f41858095550cc3173afb9/execroot/main

OK.  Note this is a simple pull up out of the bazel repo test dir, so I thought it would be a pretty reasonable starting point.  Is there a better example out there I should be using?
I'll try to make this one work though.

Oh, I didn't realize this wasn't a reduced version of your actual project. I suspect the issue is that I am not set up for ARM development.
Unfortunately, I can't comment on the CLion issues, which seems to be the problem @jvoung flagged related to resolveToIncludeDirectories. @jvoung would be the best person to determine if there's a workaround for you.

Yeah I agree, the best avenue of attack is @jvoung 's point.  I await instructions :)
But: it's interesting, actually - does the test from the bazel repo work on your box?  It's this one here: https://source.bazel.build/bazel/+/master:src/test/shell/bazel/bazel_toolchain_test.sh .  I was trying to just lift out of the main repo's tests to make it easier to make a test for the plugin, you see; but if the main repo test isn't set up right then I guess that won't work...
Thanks for looking!

@Jonpez2 That's interesting. I did the same thing you did (defined testdata_path, and then manually ran the commands from that test), and that did work.
The only changes I see that you've done are the WORKSPACE and .bazelrc, so it must be one of those that confuses Bazel.
In either case, I'm glad I could figure out why the sample didn't work properly!

Put in a change doing more resolveToIncludeDirectories in the next plugin release (2019.02.11).

more resolveToIncludeDirectories
around https://github.com/bazelbuild/intellij/blob/e76fdadb0bdabbe2be913cba03d9014eb2366374/cpp/src/com/google/idea/blaze/cpp/IncludeRootFlagsProcessor.java#L91


Ia 769 polio send email creation campaign

https://user-images.githubusercontent.com/82500/133642708-2fb7e9aa-d714-4fb0-8b66-22a8de2217f9.mp4

content of mail sent as per spec

Dear GPEI coordinator – ALGERIA
This is an automated email.
Following the newly confirmed virus PV1 reported from ALGERIA with date of onset/sample collection 2021-09-16. A new outbreak test email has been created on the timeline tracker, to visualize the campaign visit: https://bluesquare.org/dashboard/polio/list
Some campaign details are missing at this stage. It is important to update the outbreak response information on this link https://bluesquare.org/dashboard/polio/list, to ensure optimal coordination of activities. The information should be updated at least weekly. Details for log in will be provided.
For more follow up: contact RRT team.
Timeline tracker Automated message


Upgrade packages and images

Upgraded packages to fix multiple high severity images. Upgraded the docker image to a newer version to fix a low risk vulnerability.

@huashengdun upgrading the packages used will reduce the number of vulnerabilities. Please make this safer for everyone to use


feat: support kubelet server certificate rotation

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

23 of 27 (85.19%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.06%) to 76.026%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/agent/utils.go
18
22
81.82%

Totals

Change from base Build<PHONE_NUMBER>:
0.06%

Covered Lines:
2648

Relevant Lines:
3483

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

23 of 27 (85.19%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.06%) to 76.026%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/agent/utils.go
18
22
81.82%

Totals

Change from base Build<PHONE_NUMBER>:
0.06%

Covered Lines:
2648

Relevant Lines:
3483

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

25 of 31 (80.65%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.03%) to 75.997%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/agent/utils.go
20
26
76.92%

Totals

Change from base Build<PHONE_NUMBER>:
0.03%

Covered Lines:
2650

Relevant Lines:
3487

💛  - Coveralls


Cesium still cannot work when using webgl 2.0 in Chrome ??

Sandcastle example:
Browser: Chrome latest
Operating System:  Mac OS

And nothing is rendered.

Cesium does not officially support WebGL 2 at this time.  We would like to fully support WebGL2 soon, but I'm not sure when we'll be able to make it a priority.  In the meantime, we would be happy to review a pull request to get WebGL 2 working again if you have some time to look into it!  Thanks


Use https://react-bootstrap.github.io/ for UI

To make the app look better, use https://react-bootstrap.github.io/ for building UI

Moved to @jkulak sad  jkulak/smartplaylsit-www


HDDS-7791. Support display and persist owner info to DB

What changes were proposed in this pull request?
current support persists the owner info to DB and reads the owner info from DB,
the owner will be the user that creates the Object, for ozone fs and ozone sh key, it will be the system user that executes the command, for aws s3 it will be AWS Access Key ID
supported command:
write:
support ozone fs and ozone sh key and aws s3/s3api related Object creation commands. will present owner info to DB when creating an object.
read (support display real owner info):
if the owner field is null will fall back to the old logic, use the OS login user to fill the owner field. This is possible during an upgrade from the previous version
ozone fs -ls
ozone fs stat
ozone sh key ls
ozone sh key info
aws s3api list-objects

aws s3api get-object-acl  not support current, will be support next
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7791
How was this patch tested?

create some key/file/dir through ozone fs, ozone sh key, aws s3
environment

[pony.chen@linux /root/ozone]% aws configure
AWS Access Key ID [****************chen]:
// xxxxxx
[pony.chen@linux /root/ozone]% whoami
pony.chen

[pony.chen@linux /root/ozone]% ozone sh key put /s3v/bucket1/putfile ~/testfile.img
[pony.chen@linux /root/ozone]% ozone fs -mkdir ofs://localhost/s3v/bucket1/dir1
[pony.chen@linux /root/ozone]% ozone fs -touch ofs://localhost/s3v/bucket1/file1
[pony.chen@linux /root/ozone]% aws s3 --endpoint http://localhost:9878 cp ~/testfile s3://bucket1/s3file
upload: ../../testfile to s3://bucket1/s3file
[pony.chen@linux /root/ozone]%

switch to another user and display key/file info about owner, the owner info will be real info created above
environment.
You can see that the owner is pony.chen instead of root (before this PR it will be root)

linux:~ root# whoami
root

linux:~ root# ozone sh key ls s3v/bucket1 | grep "name\|owner"
  "name" : "dir1/",
  "ownerName" : "pony.chen",
  "name" : "file1",
  "ownerName" : "pony.chen",
  "name" : "putfile",
  "ownerName" : "pony.chen",
  "name" : "s3file",
  "ownerName" : "pony.chen",
linux:~ root#

linux:~ root# ozone fs -ls ofs://localhost/s3v/bucket1/
Found 4 items
drwxrwxrwx   - pony.chen root          0 2022-12-06 15:06 ofs://localhost/s3v/bucket1/dir1
-rw-rw-rw-   3 pony.chen root          0 2022-12-06 15:06 ofs://localhost/s3v/bucket1/file1
-rw-rw-rw-   3 pony.chen root    1048576 2022-12-06 15:05 ofs://localhost/s3v/bucket1/putfile
-rw-rw-rw-   3 pony.chen root    1048576 2022-12-06 15:07 ofs://localhost/s3v/bucket1/s3file
linux:~ root#

linux:~ root# aws s3api --endpoint http://localhost:9878 list-objects --bucket bucket1
None
CONTENTS        2022-12-06T07:06:07.468Z        dir1/   2022-12-06T07:06:07.468000+00:00        0       STANDARD
OWNER   pony.chen       pony.chen
CONTENTS        2022-12-06T07:06:22.887Z        file1   2022-12-06T07:06:22.887000+00:00        0       STANDARD
OWNER   pony.chen       pony.chen
CONTENTS        2022-12-06T07:05:39.955Z        putfile 2022-12-06T07:05:39.955000+00:00        1048576 STANDARD
OWNER   pony.chen       pony.chen
CONTENTS        2022-12-06T07:07:00.776Z        s3file  2022-12-06T07:07:00.776000+00:00        1048576 STANDARD
OWNER   pony.chen       pony.chen

@errose28 can you please review the latest pull?
@xichen01 Can you please look into the workflow failures?

I just had some minor comments and questions posted here and on HDDS-7577. I probably won't have time to review this PR, at least not any time soon.

@xichen01 Do you plan to update this PR?  There are lots of conflicts, unfortunately.

@adoroszlai @smengcl @errose28 PTAL.

@smengcl @errose28 Is it sufficient for S3 to use the AWS Access ID directly as the Owner of the Object (one-to-one Access ID and Owner of the Object)

@smengcl @errose28 Is it sufficient for S3 to use the AWS Access ID directly as the Owner of the Object (one-to-one Access ID and Owner of the Object)

@xichen01 Uh preferrably not. accessId should be mapped to a user name (similar idea to ugi.getShortUserName()) before it can be used in the owner field:
https://github.com/apache/ozone/blob/cce2f969a85323441c476aaeaf27d45b081b0c2f/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L417-L420

@smengcl @errose28 Is it sufficient for S3 to use the AWS Access ID directly as the Owner of the Object (one-to-one Access ID and Owner of the Object)

@xichen01 Uh preferrably not. accessId should be mapped to a user name (similar idea to ugi.getShortUserName()) before it can be used in the owner field:
https://github.com/apache/ozone/blob/cce2f969a85323441c476aaeaf27d45b081b0c2f/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L417-L420

@sumitagrawl. Thank for your suggestion.
How to map the accessId to a user name. Are you saying we should use Displayname as the owner of the Ozone key?
The AWS S3 Owner is the ID and Displayname, while the Ozone Owner is simply a string.
public class S3Owner {

  public static final S3Owner
      NOT_SUPPORTED_OWNER = new S3Owner("NOT-SUPPORTED", "Not Supported");

  @XmlElement(name = "DisplayName")
  private String displayName;

  @XmlElement(name = "ID")
  private String id;

}

@smengcl @errose28 Is it sufficient for S3 to use the AWS Access ID directly as the Owner of the Object (one-to-one Access ID and Owner of the Object)

@xichen01 Uh preferrably not. accessId should be mapped to a user name (similar idea to ugi.getShortUserName()) before it can be used in the owner field:
https://github.com/apache/ozone/blob/cce2f969a85323441c476aaeaf27d45b081b0c2f/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L417-L420

@smengcl. Thank for your suggestion. How to map the accessId to a user name. Are you saying we should use Displayname as the owner of the Ozone key? The AWS S3 Owner is the ID and Displayname, while the Ozone Owner is simply a string.
public class S3Owner {

  public static final S3Owner
      NOT_SUPPORTED_OWNER = new S3Owner("NOT-SUPPORTED", "Not Supported");

  @XmlElement(name = "DisplayName")
  private String displayName;

  @XmlElement(name = "ID")
  private String id;

}

@xichen01

@smengcl @errose28 Is it sufficient for S3 to use the AWS Access ID directly as the Owner of the Object (one-to-one Access ID and Owner of the Object)

@xichen01 Uh preferrably not. accessId should be mapped to a user name (similar idea to ugi.getShortUserName()) before it can be used in the owner field:
https://github.com/apache/ozone/blob/cce2f969a85323441c476aaeaf27d45b081b0c2f/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L417-L420

@smengcl. Thank for your suggestion. How to map the accessId to a user name. Are you saying we should use Displayname as the owner of the Ozone key? The AWS S3 Owner is the ID and Displayname, while the Ozone Owner is simply a string.
public class S3Owner {

  public static final S3Owner
      NOT_SUPPORTED_OWNER = new S3Owner("NOT-SUPPORTED", "Not Supported");

  @XmlElement(name = "DisplayName")
  private String displayName;

  @XmlElement(name = "ID")
  private String id;

}

We can add a helper method to do the conversion. For accessId -> user name conversion there are two cases to be considered:

When accessId is generated with ozone s3 getsecret (not managed under an Ozone tenant), the accessId is the Kerberos principal, e.g<EMAIL_ADDRESS>The conversion can be done with ugi.getShortUserName() (it automatically applies the conversion rules specified in hadoop.security.auth_to_local), where ugi can be created from String like this:

https://github.com/apache/ozone/blob/2ae531b0f6a069db5a46bd486bb50225a168485d/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java#L1502-L1503

When accessId is generated with ozone tenant user assign (managed by an Ozone tenant), the accessId to username mapping is stored in tenantAccessIdTable table. So the conversion can be done by first getting the OmDBAccessIdInfo associated with the accessId, then getting its userPrincipal, which should already be the (short) user name we need for the owner field:

https://github.com/apache/ozone/blob/6d7ba130cf5a660780aceb773bb17d738df33905/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmDBAccessIdInfo.java#L47-L50

@smengcl PTAL.

@smengcl PTAL. Thanks

Thanks @xichen01 for the big patch. lgtm
Only concern left from my side is the one regarding snapshot diff: #4188 (comment)

Have modified.

Thanks @xichen01 for merging master to this PR.
But there is build failure after the conflict resolution. Would you check?

Thanks @xichen01 for working on this!
Also thanks @sumitagrawl @errose28 for the reviews.


The versions of the nvidia gpu, driver, cuda, cudnn?

I am trying to start the carla 0.9.10 docker on the gpu 3090 (driver 460.27). However, the 9.10 docker fails to start because the driver is too new. Could you please tell these parameters when conducting the think-twice experiments?

Hi,  ThinTwice has been tested across multiple types of devices including RTX 3090 and nvidia drive 460.  I have not observed any specific requirements for CARLA.
BTW, CARLA might have problems when under the root user, you may want to try to avoid that by creating a new non-root user.

Many thanks


Update Readme and function

I think right now this PR is trying to merge from your fork to theoutlier_identifier branch, but I think it should be from the outlier_identifier branch to the main branch. I don't think we're using forks this time for this course


toString and readTxt/writeTxt related fixes

Fixes Nd4j.readTxt/writeTxt to work with true scalars and vectors.
Fixes bug associated with col vectors
Deprecates jsonReader/jsonWriter which had an @Ignore on the tests so was completely not supported previously.
Added in a test utility to hit corner cases with shapes (this might be present somewhere else?)
Improves formatting on toString to look more like numpy:

col vectors will print like column vectors are expected too
when length of an array is longer than a 1000 elements it will get summarized to only print first and last three slice/elements in every dimension
will switch to scientific notation when max abs value > 1000 or min abs value < 0.0001 or the ratio of the two is > 1000
default print is now four decimal points
Also our printing was completely wonky for shapes like [1,2,1] or [1,1,2] (not just because we didn't print col vectors properly) with brackets and all that now matches numpy. before vs after print examples that show this.

Other print examples here
Issue: We rely heavily on slice for the toString conversion and there is a bug that only affects f order with some cases of shape where the size(rank-1) == 1 and till this is fixed I internally do a dup to c order only for this slice..Same for tads which we use in readTxt

And anyone who will have an opinion on printing these arrays please review.

Thanks for looking at this, it's something we definitely need...
Here's a simple test on this branch:
    @Test
    public void test(){
        INDArray arr = Nd4j.create(new double[][]{
                {-1,0,1,0},
                {-0.1, 0.1, -10, 10},
                {-1e-2, 1e-2, -1e2, 1e2},
                {-1e-3, 1e-3, -1e3, 1e3},
                {-1e-4, 1e-4, -1e4, 1e4},
                {-1e-8, 1e-8, -1e8, 1e8},
                {-1e-50, 1e-50, -1e50, 1e50},
        });

        System.out.println(arr);
    }

[[  -1.0000E0,   0.0000E0,   1.0000E0,   0.0000E0],
 [ -1.0000E-1,  1.0000E-1,  -1.0000E1,   1.0000E1],
 [ -1.0000E-2,  1.0000E-2,  -1.0000E2,   1.0000E2],
 [ -1.0000E-3,  1.0000E-3,  -1.0000E3,   1.0000E3],
 [ -1.0000E-4,  1.0000E-4,  -1.0000E4,   1.0000E4],
 [ -1.0000E-8,  1.0000E-8,  -1.0000E8,   1.0000E8],
 [-1.0000E-50, 1.0000E-50, -1.0000E50,  1.0000E50]]

That's definitely a step up on what we currently have... however I wonder if we can improve it further?
Notably, the E0 suffix actually makes it harder to read IMO for those small integer values and I'd be tempted to not zero pad.
Also being pedantic, I'd use lower-case e - shorter character than digits makes it easier to read IMO
So 0.0 would print as 0.0, not 0.0000E0 or 0.0000e0, and 10.0 would print as either 1.0e1 or 10.0 (I'm open to either, with slight preference for switching to scientific on a per number basis instead of a per-array basis)

Thanks for the review Alex. I was following along numpy's convention to switch to scientific notation for the whole array and totally agree that we can improve on that :)
Will be sure to get this into our next release.

[[       -1e0,        0e0,     1.0000,        0e0],
 [      -1e-1,     0.1000,       -1e1,    10.0000],
 [      -1e-2,     0.0100,       -1e2,   100.0000],
 [      -1e-3,     0.0010,       -1e3,  1000.0000],
 [      -1e-4,       1e-4,       -1e4, 10000.0000],
 [      -1e-8,       1e-8,       -1e8,        1e8],
 [       -0e0,        0e0,         -∞,          ∞]]

When switching to scientific notation (or if the value is zero) I don't zero pad but in other cases I do because I like the way the decimal point aligns. It makes for easier reading IMO.
[[[  1.0001e4],
  [       1e5]],

 [[    0.1100],
  [    0.2690]]]

vs

[[[  1.0001e4],
  [       1e5]],

 [[      0.11],
  [     0.269]]]

ok

OK, so I'm kind of undecided between thowe two cases in your most recent comment... decimal alignment is good for readability, as is removing zeros.
The per-element example you have there is pretty good - I guess my only concern is the fact that we show only 2 significant figures for the 1e-3 case (vs. up to 8 for the 1e3 case).
Otherwise the formatting here is looking pretty good overall, IMO :+1:

p.s. i think we might never see those “how to change INDArray precision” messages :)

I had looked into printing so that the significant digits are consistent across elements a while back. I didn't find a solution I was happy with. Android Java has some support apparently but not DecimalFormatting. Something to look into later.
For now I am going to merge. Yay.

For the curious on sig digits:
https://stackoverflow.com/questions/5474742/is-there-a-java-number-formatting-library-that-handles-significant-digits


python311Packages.pyopenuv: 2023.02.0 -> 2023.08.0

Changelog: https://github.com/bachya/pyopenuv/releases/tag/2023.08.0
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 260153 run on x86_64-linux 1

5 packages built:

home-assistant-component-tests.openuv
python310Packages.pyopenuv
python310Packages.pyopenuv.dist
python311Packages.pyopenuv
python311Packages.pyopenuv.dist


Renaming outside of method, but after method, renames method parameter.

PythonToolsMockTests.RefactorRenameTests.DelNonLocal (under 3.4)

This is failing, not repeatedly.  Ctrl-r-r on the last 'abc = 100'.  Sometimes it renames that abc, other times, that one doesn't change at all

def g():
    fob = 100
    def f():
        nonlocal fob
        del fob

abc = 100

Adding to this
def method(abc):
    abc = 2
abc = 3

Renaming the last line's abc changes the others.  We aren't properly detecting the end of the method.

Cannot repro this, probably since #3166, but nonlocal fob doesn't count as a reference to fob for the purposes of F12 or rename on it. We should fix that.


Add a migration section to the readme for updating from ewr/elasticsearch_exporter

Title says it all.
Probably just say to update the name of the docker image on the deployments.

IMHO the current readme and examples should provide sufficient help to get anyone started.


✨ [Feature request]: Create a Home page section for Twitter mentions

Is your feature request related to a problem? Please describe.
We need a place on the home page that brings the mentions we get for the ReactPlayIO Twitter handle.
Describe the solution you'd like
Make the Twitter API cal to fetch last 10 Tweets that mentioned the @ReactPlayIO handle and show them like cards,
Describe alternatives you've considered
NONE
Additional context
The Twitter API Key will be supplied by Admin.

Who is working on this Twitter mentions issue?
I have used two ways to showcase the latest tweet:

GitHub Profile --  lowlighter/metrics plugin with API Key and GitHub Action
My Portfolio Web -- react-twitter-embed package without API Key

Who is working on this Twitter mentions issue?
I have used two ways to showcase the latest tweet:

GitHub Profile --  lowlighter/metrics plugin with API Key and GitHub Action
My Portfolio Web -- react-twitter-embed package without API Key

Can you explain the second solution? What does it bring? Iframe?

Can you explain the second solution? What does it bring? Iframe?

react-twitter-embed

React Import

Iframe Compiled Code

Package react-twitter-embed

Can you explain the second solution? What does it bring? Iframe?

react-twitter-embed

React Import

Iframe Compiled Code

Package react-twitter-embed

How about a non-iframe based solution?

Is your feature request related to a problem? Please describe. We need a place on the home page that brings the mentions we get for the ReactPlayIO Twitter handle.
Describe the solution you'd like Make the Twitter API cal to fetch last 10 Tweets that mentioned the @ReactPlayIO handle and show them like cards,
Describe alternatives you've considered NONE
Additional context The Twitter API Key will be supplied by Admin.

Here is an idea:(Taken from https://hypefury.com/)

Here is an idea:(Taken from https://hypefury.com/)

The solution idea looks impressive. Though I have not implemented the non-iframe based solution.

I can made that using node fetch

Anyone working on this issue ?

Anyone working on this issue ?

Nope

Anyone working on this issue ?

Nope

can i work on it?

Anyone working on this issue ?

Nope

can i work on it?
if yes then like what i have to can you run down on it a bit

Anyone working on this issue ?

Nope

can i work on it? if yes then like what i have to can you run down on it a bit

You are most welcome. Join our discord and let's discuss.

where can i find the discord link?

Here you go
https://discord.gg/wtnbTNX2


Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier & Dependency Removal)

TODO

👋 @mchowning !
Can you verify that this change I did here, which removes this incorrect OkHttp dependency declaration, is actually correct? 🙇
PS: I did that because otherwise Lint errors for both, this repo and the react-native-bridge module within the gutenberg repo.

Since we removed the source code for these projects from react-native-bridge, we don’t need these updates to happen together with the other projects anymore. That means we can close this draft PR for now and reopen it, if need be, in the future. There is little value in merging this now and diverging from the source repo.
PS: Eventually, we might upgrade Gradle & AGP when using a newer version of React Native if the new RN version requires it.


Clicking on Save button doesn't add the author.

Describe the bug
Clicking on the save button does not add the author.
To Reproduce
Steps to reproduce the behavior:

Go to the project
Click on Edit Author
Add author manually
Click on Save
Author does not get saved.

Screenshots

Save is disabled before clicking add


ControlledAddOrSubtract Bloq

Has half the T-cost of a controlled addition gate. Useful to perform an Rz rotation via addition into phase gradient, at half the cost of a ZPow.

Some nits but LGTM, but I'll let @tanujkhattar take a final look


[DROOLS-1127] allow to configure a custom ThreadFactory

@ge0ffrey I didn't create a KieBaseOption because it doesn't make sense to configure this for the single KieBase.

+1 to merge