Does "inline" really impact performance?

Hi,
did you actually measure whether the #[inline(always)] decoration has any influence on the performance of the generated code?
As far as I know, the rust compiler is good enough with inlining (or rather with not inlining) to optimize for performance, thus one should never force inline for code.
I might be wrong, though. Would be nice if we could measure here, before optimizing something that might not need to be optimized...

Thanks for your advice.
I didn't test this crate, but I had tested inline in my other crates.
Sometimes it improves performance, and sometimes it reduces performance.
I will remove the always, just leave #[inline].

Sounds like the right way, thank you!

I have released a new version to fix it.


Proposal: Multi-team dashboard

This is a proposal for a new "Multi-team" dashboard that acts as a normal team dashboard with N number of components. It could be implemented two ways - (1) as simply an aggregation of existing team dashboards, or (2) as a fully configurable dashboard with each dropdown/selection allowing multiple collector items.
I have had a number of requests for a dashboard view that reports on multiple components at once. The goal would be to show all of the data normally found on a team dashboard in an aggregated way. For example:

The feature widget would be able to include multiple teams / projects at once.
The code repo widget would show multiple lines in the graph (one for each repo) with statistics on max and average commit counts
The build widget would show multiple lines in the graph (one for each job). Average build duration could show histograms for each day. Latest builds could be over all jobs.
The quality widget would show statistics on all components. Some, like the code coverage metric, could use percentiles (10th, 25th, 50th,
75th, 90th) represented in some graphical form to best show data from multiple components.
The monitor widget could allow for logical groupings of monitors
The deploy widget would show a union of all of the unique environments. When entering the detailed view all of the components would be shown in a list.

The pipeline widget would show all of the components (#1259)
The goal is to better support highly componentized applications (such as by use of micro-services) while still being able to show the data in a single view intended to be consumed by developers. The product dashboard doesn't quite fit this use case because it is more of a "metrics" dashboard. Furthermore it's quite difficult to get set up (look at all the github issues raised by it) and has a number of issues.

This perfectly makes sense. We are thinking of restructuring the UI anyway to allow for flexible widget placement and widget selection. In the process, we will potentially remove/resize some graphs/charts and reclaim some real estate to allow for this.

Hello people,
Would you have any information about the implementation of this feature?
I've read some articles saying that it's on your roadmap, but I can't find information about this.
Thank you very much.

Need exactly the same.. For our team we have multiple builds per team so team dashboard is kind a limited.


Simplify the code for parsing time in usertime

trimmed it down a fair bit by using native python time parsing.

i stuck that there to let IDEs know the intended type of the ctx parameter, so that they can provide syntax highlighting and point out if you're doing something like accessing a property on ctx that doesn't exist, for example.

done.


Addendum to KAFKA 12879 to fix flaky tests

This is an addendum to the KAFKA12879 to fix the flaky tests introduced in the pull request.

Add an if check to void sleep(0)
Increase timeout in the tests

Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Note: See the commit https://github.com/apache/kafka/commit/28393be6d7416f51eb51f7fe2b075570b45ef09f


fix(input): prevent exception when input components outside Content

Short description of what this resolves:
When a TextInput or a TextArea component is used outside of a Content component, an exception is thrown.
Changes proposed in this pull request:

In InputBase, the base class that TextInput and TextArea extend, make Content optional and check whether it has been injected or not before trying to attach event listeners to it.
Do the same check in each of the components before trying to detach those event listeners.

Ionic Version: 2.x
Fixes: #9620

I tried making the commit message as short as possible but getting it under 50 characters is quite a challenge.

great, thanks for the fix!


Bluetooth Fix

Hello, i am having trouble with bluetooth on Monterey, i have read from open core about the rewrite of bluetooth stack from apple but i cant seem to apply the patches on my own. Currently i cant connect to bluetooth devices from my laptop. Help please

try this https://openintelwireless.github.io/IntelBluetoothFirmware/FAQ.html#what-does-this-kext-do

I use version 0.7.6 of EFI config everything works except Bluetooth. Although in the mentioned whats working section it is listed as working. I installed 12.6.1 macOS. Is there any fix available.
@559911 In the version 0.7.6 EFI config there is already present IntelBluetoothFirmware.kext
Do i need to change it?
Thanks in advance.

seems like this is the fix
@simprecicchiani
for about hour no issues with bluetooth since reboot with that option enabled
UEFI -> ProtocolOverrides -> HashServices -> true
https://www.tonymacx86.com/threads/volume-hash-mismatch-error-on-macos-monetery.319806/post-2316919

I found a fix for L460, it has similar specs as T460(s), so maybe it'll help?
https://github.com/null2264/L460-Hackintosh#bluetooth-workaround
I basically set the BT_DEVICE_ADDRESS environment variable to my Bluetooth Controller MAC Address as soon as macOS boot (via /etc/zshenv), and somehow that fix it


Add Rollup support

It would be great to see rollup plugin/loader or example in the docs if it's already possible.

To all watchers and upvoters - here is an example REPL.
Basically, needed rollup plugin configuration is:
plugins: [
  babel({
    babelHelpers: 'bundled',
    plugins: [
      'astroturf/plugin'
    ]
  }),
  postcss({
    extract: 'app.css',
    modules: true,
    plugins: [
      postcssNested
    ]
  })
]

Things to note:

I've used latest astroturf version available (v1.0.0-beta.11), beta version api probably differs from current stable one
Temporary css files from components are saved to disk, same as in Parcel plugin (https://github.com/4Catalyzer/astroturf/issues/610). They can be removed using other rollup plugin, for example rollup-plugin-delete

I've tested only basic stuff which is enough for my needs and it's working. Try it in your projects as well 😉


nonEmptyArray.head is throwing an unexpected error

🐛 Bug report
I'm using nonEmptyArray.head to get the head of a non-empty array. However, it seems to be throwing a runtime exception. I replaced it with (v) => v[0] (which should work identically, afaik), and I don't get the runtime error. So, I'm convinced it's not my code that's the problem as of now.
Current Behavior
The following:
const selectRandomOperation = (availableOperations: Set<Operation>) =>
  pipe(
    availableOperations,
    set.toArray(OperationOrd),
    (v: Array<Operation>): nonEmptyArray.NonEmptyArray<Operation> => {
      const neaR = nonEmptyArray.fromArray(v);
      if (option.isNone(neaR))
        throw new Error("availableOperations must not be empty");
      else return neaR.value;
    },
    // (v) => v[0],
    nonEmptyArray.head
  );

throws the following error at runtime:

However,
const selectRandomOperation = (availableOperations: Set<Operation>) =>
  pipe(
    availableOperations,
    set.toArray(OperationOrd),
    (v: Array<Operation>): nonEmptyArray.NonEmptyArray<Operation> => {
      const neaR = nonEmptyArray.fromArray(v);
      if (option.isNone(neaR))
        throw new Error("availableOperations must not be empty");
      else return neaR.value;
    },
    (v) => v[0]
    // nonEmptyArray.head
  );

throws no errors. One final check was to use the fp-ts-std debug function traceWithValue to get the value just before it gets passed into nonEmptyArray.head. The following:
const selectRandomOperation = (availableOperations: Set<Operation>) =>
  pipe(
    availableOperations,
    set.toArray(OperationOrd),
    (v: Array<Operation>): nonEmptyArray.NonEmptyArray<Operation> => {
      const neaR = nonEmptyArray.fromArray(v);
      if (option.isNone(neaR))
        throw new Error("availableOperations must not be empty");
      else return neaR.value;
    },
    debug.traceWithValue("value:"),
    nonEmptyArray.head
  );

gives me the following console.log and runtime exception:

Expected behavior
It should give me the head of the array rather than a runtime exception.
Reproducible example
I think my current behavior section covers this, but I can try making a simpler repro if needed.
Suggested solution(s)
I couldn't tell you. It seems that it thinks nonEmptyArray.head isn't a function at runtime. Maybe it's being exported wrong?
Additional context
Nothing comes to mind.
Your environment
I am using a "fp-ts": "^2.10.0-rc.4". So, there's a possibility this is a regression introduced since the last major release.

Software
Version(s)

fp-ts
^2.10.0-rc.4

TypeScript
4.2.3

Okay, so I dug into the fp-ts codebase a bit and it seems nonEmptyArray.head is an alias for an alias for this function:
export const extract: Comonad1<URI>['extract'] = (as) => as[0]

This looks identical to the function I replaced nonEmptyArray.head with. So, I'm pretty confused...

const selectRandomOperation = (availableOperations: Set<Operation>) =>
  pipe(
    availableOperations,
    set.toArray(OperationOrd),
    (v: Array<Operation>): nonEmptyArray.NonEmptyArray<Operation> => {
      const neaR = nonEmptyArray.fromArray(v);
      if (option.isNone(neaR))
        throw new Error("availableOperations must not be empty");
      else return neaR.value;
    },

    debug.traceWithValue(`about to apply ${nonEmptyArray.head} to `),
    nonEmptyArray.head
  );

gives:

However, VSCode intellisense seems to agree that that function exists, and my import is correct:
import * as nonEmptyArray from "fp-ts/NonEmptyArray";

@AHBruns looks like a circular module dependencies issue, let me dig into that

@gcanti I am using https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md It helps a lot.

Yep, found it:

NonEmptyArray -> ReadonlyNonEmptyArray (import * as RNEA from './ReadonlyNonEmptyArray')
ReadonlyNonEmptyArray -> NonEmptyArray (import { NonEmptyArray, fromReadonlyNonEmptyArray } from './NonEmptyArray')

The culprit is the fromReadonlyNonEmptyArray import (the other import is NonEmptyArray which is a type so it doesn't matter).
@steida thanks for the suggestion, does it ignore type-only imports though? (example: import { NonEmptyArray } from './NonEmptyArray' is ok)

Sweet. Thanks for the quick fix!

@AHBruns just released 2.10.0-rc.6 could you please try it out?

Okay, I just upgraded, and it worked as expected. Thanks again!


deploy_chaincode.md

docs/locale/en_US/source/deploy_chaincode.md

Translation has been finished on July 19. A pull request was created.


Please provide an AI trained on Microsoft docs

Description
It will be super if AI will answer the questions and provide examples based on the Microsoft docs. Thanks.
[Enter feedback here]
Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-7.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/routing.md
Document ID
86aeab13-1c25-9fc1-4e56-0390cb40c242
Article author
Rick-Anderson

@Yevhen-Myroshnychenko, yes working on that.  The docs do show up in models, but of course a trained model specifically centered on the docs and code samples would be the thing as you suggest. :)   I will close this issue since it is not a specific issue on this routing topic but docs in general.   Thanks for letting us know what works best for you.


tflint-plugins.tflint-ruleset-aws: 0.23.1 -> 0.26.0

Diff: https://github.com/terraform-linters/tflint-ruleset-aws/compare/v0.23.1...v0.26.0
Changelog: https://github.com/terraform-linters/tflint-ruleset-aws/blob/v0.26.0/CHANGELOG.md
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[x] 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
[x] 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

[x] Fits CONTRIBUTING.md.

Thanks!


Height changing sticky elements result in constant updates

I need to build a header that shrinks in size (by removing some elements, shrinking the logo within the header, ...) when stuck, so that it doesn't use as much screen real estate.
In my example I change the height for .js-is-sticky from 100 pixels to 50px. When just starting to scroll and the element just receives the .js-is-sticky class, it starts to quickly jump back and forth between having the class and having it removed, so that the element quickly updated between 100px and 50px in height.
Working fiddle: https://jsfiddle.net/ke5oLde6/2/
Is there any other way this height-changing behavior can be implemented correctly when using stickybits?

From what I understand, this could definitely be done and not with JavaScript—just html and css.
The issue with the end result in the demo (thanks for the thoughtful demo by the way! 😊) is the way the html and css is structured. If stucture of the html and css is re-worked, then the desired outcome can be achieved! 💪

Could you perhaps point me in the right direction on how to change my structure?
My use-case is a bit more complicated than what I linked, that's just the smallest possible example. For example I have up to two more elements that also need to be sticky, but underneath the (already sticky) main header. Pure HTML and CSS could potentially work with position: sticky, but then I'd need a polyfill for support, so I might as well use stickybits.

@padarom makes sense. This is a quick demo, https://codepen.io/yowainwright/pen/JpdVoX.
After closer inspection, I think with the event feature, Stickybits can provide better support.


net/url: inaccurate documentation for method URL.String

go version: 1.4.2
problem: The godoc for URL.String in "net/url" does not accurately describe the method's behavior when the Opaque field is set.

scheme:opaque
scheme://userinfo@host/path?query#fragment

If u.Opaque is non-empty, String uses the first form; otherwise it uses the second form.

The following playground link demonstrates a *url.URL which does not fall into these categories.
http://play.golang.org/p/SPGP5eSieA
The documentation states that the snippet should print "https://example.com/foo". But they observed string is "https://example.com/foo?bar=baz#qux"

I've sent https://golang.org/cl/7974


feat(ado-improvements-1): Remove unnecessary auth input from ADO extension

Details
This PR removes unnecessary auth input after comments in PRs were disabled from ADO Extension #1041 , since the only function of this parameter was to provide a service connection to contribute to the target repo.
Image of the inputs before this PR, including "Azure Repo Connection" field

Image of the inputs after this PR, "Azure Repo Connection" field was removed

Motivation
Feature work.
Context
The service connection is only used to grant comment writing permissions to the extension. Behavior that was remove in PR #1041

Pull request checklist

[ n/a ] Addresses an existing issue: Fixes #0000
[x] Added relevant unit test for your changes. (yarn test)
[x] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
[x] Ran precheckin (yarn precheckin)
[n/a] (after PR created) The Accessibility Checks (pull_request) check should fail. All other checks should pass.

Do we know whether this is a breaking change or not? ie, have you verified what happens if you have an existing build that uses this parameter, and then the extension updates to not require it anymore? If it breaks, how do we indicate a breaking change to users? If it doesn't break, should we warn users that are still passing the connection that it isn't necessary anymore?

Do we know whether this is a breaking change or not? ie, have you verified what happens if you have an existing build that uses this parameter, and then the extension updates to not require it anymore? If it breaks, how do we indicate a breaking change to users? If it doesn't break, should we warn users that are still passing the connection that it isn't necessary anymore?

Yes, I verified that the old builds that use this parameter do not break after introducing the new changes.
However, users are not yet aware of this new behavior, I will discuss this with the team.

Do we know whether this is a breaking change or not? ie, have you verified what happens if you have an existing build that uses this parameter, and then the extension updates to not require it anymore? If it breaks, how do we indicate a breaking change to users? If it doesn't break, should we warn users that are still passing the connection that it isn't necessary anymore?

@dbjorge Yes, I verified that the old builds that use this parameter do not break after introducing the new changes. However, users are not yet aware of this new behavior, I will discuss this with the team.

We discussed this a little further today. It seems old client usage will still work (ADO ignored the input in our test), but we agreed it's semantically a big enough change (no more comments) that bumping the major version makes sense. That way users will know to remove any service connections or manual auth they've added.
We've added an ADO workitem 1893587 that covers deprecation. This might include publishing an update to 1.x with upgrade instructions before bumping the overall version to 2.x. We propose doing that in a separate PR.


Making the host to ip list conform to /etc/hosts file standard

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For 1.9 Features: set Milestone to 1.9 and Base Branch to release-1.9
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NOTE: Please check the “Allow edits from maintainers” box (see image below) to
allow reviewers to fix problems on your patch and speed up the review process.
Please delete this note before submitting the pull request.
NOTE: After opening the PR, please un-check and re-check the "Allow edits from maintainers" box. This is a temporary workaround to address a known issue with GitHub.

This change is

Closing for now. @dddigitalglobe Please reopen if you want to sign the license agreement and move forward with this.


[Android] Stream not playing in the background

I am currently using this plugin to play stream URLs and I noticed after locking the screen, the audio will play for about 5 - 10 minutes before it shuts off and the only way to get it to play again is to go to the app and restart the stream. I am experiencing this issue on Android but haven't tested it on iOS to see if it's happening there as well.
I am curious to know if there is a certain permission I need to add in the AndroidManifest.xml file in order to fix this issue or if something needs to be done on the native code level. I do have some basic knowledge about Android development so I can try to look into opening a PR with a possible fix but I am personally not even sure about what needs to be modified in order to fix this issue. Would appreciate any pointers or help on this.
Thanks!

I got the same error, but we can reproduce easy by these steps:
I tested on iOS 13.3

create play list with 2 songs ( I used 2 URLs, play song remotely)
play the first song, seek to nearby the end of file
press lock to lock screen
now it will call play() in the state that device is locked -> not playing anything.
if I unlock the phone, now we have to call play() again to play that second file.

I am having the same issue, I play a stream and after lets say 8-14 minutes the audio stops.
Has anyone been able to resolve this ?

the only solution i have found for the moment is by adding:
Screen.keepOn(true); this prevents the screen by going into locked state

I believe that I was able to correct this problem by adding the permission below in AndroidManifest.xml" file. In my tests, this problem was present only on Android OS 8 or later and was not identified on iOS. So I decided to investigate the permissions and then, in my tests on android 10 and 11, this permission fixed the problem. Also check and let us know.
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

Like mentioned, to correctly play things in the backgorund, the audio_service package needs to be used.

Would it be possible to user audio_service just for handling this specific situation of playing files in the background? Let's say, before audioplayer's play is called (e.g. a new song of a playlist needs to be started), detect if the app is running on background and, if so, trigger a function to allow calling audioplayer's play again?
Do you have any example @erickzanardo ?

Would it be possible to user audio_service just for handling this specific situation of playing files in the background? Let's say, before audioplayer's play is called (e.g. a new song of a playlist needs to be started), detect if the app is running on background and, if so, trigger a function to allow calling audioplayer's play again?
Do you have any example @erickzanardo ?

We have an article listed on our readme: https://github.com/bluefireteam/audioplayers#background-playing


Beeswarm plot colormap too small

The colormap which is plotted on the right side of the beeswarm plot is too small when the number of features are less, making for a very bad experience. Could it be set as a parameter from user's side?

Same problem. It works well with python 3.6, but recently I switched to python 3.9 and the color bar suddenly disappeared. (3.6 above and 3.9 below)

According to a StackOverflow discussion Matplotlib should be downgraded below 3.5.

Seems to be working fine now for me
shap == 0.41.0
matplotlib = 3.5.2


Apply background color to container

Currently, background color is not applied to outside the container (e.g. out-of-boundary in Android, outside safe area in iOS, browser tab color in web).
Find a way to pass the background color to container for better aesthetic.

Fixed by #9


Fix issues #201

This PR fixes https://github.com/napalm-automation/napalm-base/issues/201 and is built on top of https://github.com/napalm-automation/napalm-base/pull/202
It includes tests as well.

Amazing job!!!


Include td2m middleware

Include Talk Dirty to Me middleware into the docs

@edwardleoni if you'd still like to have your middleware listed, please make this change in the botkit-docs repo.


Hide debit card behind wallet beta

Details
We only want people on the wallet beta to be able to add debit cards.
Fixed Issues

$ https://github.com/Expensify/App/issues/7212
Tests

Change this line to always return false
Log into an account
Go to Settings -> Payments
Click "Add Payment Methods"
Make sure you don't see the debit card option

QA Steps

Log into an account not in the wallet beta
Go to Settings -> Payments
Click "Add Payment Methods"
Make sure you don't see the debit card option

Tested On

[x] Web
[ ] Mobile Web
[ ] Desktop
[ ] iOS
[ ] Android

Screenshots

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by @joelbettner in version: 1.1.30-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @chiragsalian in version: 1.1.31-1 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Validating duplicate config properties

We had a situation where defining controller.data.dir twice leads to the values being concatenated.
It would probably be better if an exception was thrown telling the user to only set the property once.

Hello,
This occurs due to behaviour of Apache Commons PropertiesConfiguration (docs). Addressing this issue would require prechecking config files, any suggestions on how to handle this?

I picked this up as a first commit to begin getting aquatinted with the code.  Here's a PR if this is still wanted: https://github.com/apache/pinot/pull/12672


[Initial] Setup

This is the initial setup for curiosity

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@b52a543). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff          @@
##             main     #1   +/-   ##
=====================================
  Coverage        ?   0.0%
=====================================
  Files           ?      4
  Lines           ?     55
  Branches        ?     20
=====================================
  Hits            ?      0
  Misses          ?     55
  Partials        ?      0


scatter and gather instructions

It could be interesting to support intels scatter and gather instructions (however, scatter does seem to be available only since AVX512).

It's actually even an extension of AVX-512 which was not there on day one :)
But yes, you may want to support it, especially since it has been supported for a long while in the non-Intel world (from the 1st-gen Crays to GPUs).

We have an use case that would benefit of these. Currently we can make do with zip_lo and zip_hi, but I believe it's a bit error-prone.


ImportError: cannot import name 'CLIPImageProcessor' from 'transformers' (/databricks/python/lib/python3.9/site-packages/transformers/init.py)

Anyone else getting this error?
ImportError: cannot import name 'CLIPImageProcessor' from 'transformers' (/databricks/python/lib/python3.9/site-packages/transformers/__init__.py)

command-1272036722344618> in <cell line: 1>()
----> 1 from flamingo_mini import FlamingoConfig, FlamingoModel, FlamingoProcessor
      2
      3 # create a model for training
      4 device = ...
      5 config = FlamingoConfig(...)

/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
    169             # Import the desired module. If you’re seeing this while debugging a failed import,
    170             # look at preceding stack frames for relevant error information.
--> 171             original_result = python_builtin_import(name, globals, locals, fromlist, level)
    172
    173             is_root_import = thread_local._nest_level == 1

/local_disk0/.ephemeral_nfs/envs/pythonEnv-fbd7ab33-bb5b-4088-ae5e-31771ac6ca13/lib/python3.9/site-packages/flamingo_mini/__init__.py in <module>
----> 1 from .flamingo_processor import FlamingoProcessor
      2 from .configuration_flamingo import FlamingoConfig
      3 from .modeling_flamingo import FlamingoModel

/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
    169             # Import the desired module. If you’re seeing this while debugging a failed import,
    170             # look at preceding stack frames for relevant error information.
--> 171             original_result = python_builtin_import(name, globals, locals, fromlist, level)
    172
    173             is_root_import = thread_local._nest_level == 1

/local_disk0/.ephemeral_nfs/envs/pythonEnv-fbd7ab33-bb5b-4088-ae5e-31771ac6ca13/lib/python3.9/site-packages/flamingo_mini/flamingo_processor.py in <module>
      4
      5 import torch
----> 6 from transformers import CLIPImageProcessor
      7
      8 from .configuration_flamingo import FlamingoConfig

ImportError: cannot import name 'CLIPImageProcessor' from 'transformers' (/databricks/python/lib/python3.9/site-packages/transformers/__init__.py)

in transformers v4.25.1, the CLIPImageProcessor replaces the CLIPFeatureExtractor, and I haven't checked compatibility when updating the code. Thanks for catching that! Could you update transformers to the latest version to see if it works?

Thanks, it solved the issue!


Error when passing Nothing to ffi java method param

If you pass Nothing to a ffi java method param with Maybe X as type, eta throws a runtime error:
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    wai_servlet_handler_jetty/network/wai/servlet/handler/Jetty$run2.enter(Leta/runtime/stg/StgContext;)V @562: invokevirtual
  Reason:
    Type 'java/nio/ByteBuffer' (current frame, stack[1]) is not assignable to 'java/lang/String'

Surely it is caused by the change of null for MemoryAddress.nullAddress #314

Tracked in #315

ajam, close this one


Release v0.1.3

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Closes #3


cmdDel fails releasing the device when kubelet deletes pause container

What happened?
Kubelet doesn't gaurentee to keep pause container alive while cni tries to delete all the devices attached to the pod. When the pause container is deleted, the netns is not available to release the device from cmdDel. This results in the device on host with wrong name, missing ip and wrong settings.
What did you expect to happen?
Kubelet to provide some guarantee that netns is available for the cni to delete all attached devices.
What are the minimal steps needed to reproduce the bug?
Attach atleast 4 sriov devices to pod. Kill the pod.
To consistently reproduce the error, add 1 sec sleep in cmdDel.
Anything else we need to know?
Raised the issue with kubernetes and unable to get any positive response.
https://github.com/kubernetes/kubernetes/issues/89440
As a workaround having a daemon that tries to fix the broken device on the host periodically.
Component Versions
Please fill in the below table with the version numbers of applicable components used.

Component
Version

SR-IOV CNI Plugin
v2.2

Multus
v3.4

SR-IOV Network Device Plugin
v2.2

Kubernetes
1.13.5

OS
Ubuntu 18

Config Files
Config file locations may be config dependent.
CNI config (Try '/etc/cni/net.d/')
Device pool config file location (Try '/etc/pcidp/config.json')
Multus config (Try '/etc/cni/multus/net.d')
Kubernetes deployment type ( Bare Metal, Kubeadm etc.)
Kubeconfig file
SR-IOV Network Custom Resource Definition
Logs
SR-IOV Network Device Plugin Logs (use kubectl logs $PODNAME)
Added some custom logs to print cmdArgs and netns
time="2020-04-24T17:22:52Z" level=info msg="read from cache  &{NetConf:{CNIVersion:0.3.1 Name:sriov-network Type:sriov Capabilities:map[] IPAM:{Type:} DNS:{Nameservers:[] Domain: Search:[] Options:[]} RawPrevResult:map[dns:map[] interfaces:[map[name:net1 sandbox:/proc/4281/ns/net]]] PrevResult:} DPDKMode:false Master:enp5s0 MAC: AdminMAC: EffectiveMAC: Vlan:0 VlanQoS:0 DeviceID:0000:05:00.1 VFID:0 HostIFNames:net1 ContIFNames:net1 MinTxRate: MaxTxRate: SpoofChk: Trust: LinkState: Delegates:[{CNIVersion:0.3.1 Name:sbr Type:sbr Capabilities:map[] IPAM:{Type:} DNS:{Nameservers:[] Domain: Search:[] Options:[]} RawPrevResult:map[] PrevResult:}] RuntimeConfig:{Mac:} IPNet:}"
time="2020-04-24T17:22:52Z" level=info msg="empty netns , error = failed to Statfs "/proc/4281/ns/net": no such file or directory"
time="2020-04-24T17:22:52Z" level=info msg="ReleaseVF "
time="2020-04-24T17:22:52Z" level=error msg="failed to get netlink device with name net1"
Multus logs (If enabled. Try '/var/log/multus.log' )
Kubelet logs (journalctl -u kubelet)
Mar 23 21:04:42 dgx0098 kubelet[29124]: 2020-03-23T21:04:42Z [error] Multus: error in invoke Delegate del - "sriov": error in removing device from net namespace: 1failed to get netlink device with name net3: Link not found
Mar 23 21:04:42 dgx0098 kubelet[29124]: 2020-03-23T21:04:42Z [debug] delegateDel: , net2, &{{0.3.1 sriov-network sriov map[] {} {[]  [] []}} {  []}    false false [123 34 99 110 105 86 101 114 115 105 111 110 34 58 34 48 46 51 46 49 34 44 34 100 101 108 101 103 97 116 101 115 34 58 91 123 34 99 110 105 86 101 114 115 105 111 110 34 58 34 48 46 51 46 49 34 44 34 110 9 101 34 58 34 115 98 114 34 44 34 116 121 112 101 34 58 34 115 98 114 34 125 93 44 34 100 101 118 105 99 101 73 68 34 58 34 48 48 48 48 58 48 99 58 48 48 46 49 34 44 34 110 97 109 101 34 58 34 115 114 105 111 118 45 110 101 116 119 111 114 107 34 44 34 116 121 112 101 34 58 34 115 114 105 111 118 34 125]}, &{cfba15035e7ef328153ba5c88853b52f97740560bc27a0707ab2f5b536a8f863 /proc/32764/ns/net net2 [[IgnoreUnknown 1] [K8S_POD_NAMESPACE user] [K8S_POD_NAME 847138-worker-1] [K8S_POD_INFRA_CONTAINER_ID cfba15035e7ef328153ba5c88853b52f97740560bc27a0707ab2f5b536a8f863]] map[] }, /opt/cni/bin
Mar 23 21:04:42 dgx0098 kubelet[29124]: 2020-03-23T21:04:42Z [verbose] Del: user:847138-worker-1:sriov-network:net2 {"cniVersion":"0.3.1","delegates":[{"cniVersion":"0.3.1","name":"sbr","type":"sbr"}],"deviceID":"0000:0c:00.1","name":"sriov-network","type":"sriov"}
Mar 23 21:04:46 dgx0098 kubelet[29124]: I0323 21:04:46.544632   29124 plugins.go:391] Calling network plugin cni to tear down pod "847138-worker-1_user"

Kind of using a daemon to clean up the device that ends up in bad shape on the host. Looking for suggestions on  ideal solution.

I think the long term solution would be to wait for the kubelet fix.
For the workaround:
sriov-cni does two things in container namespace when releasing a VF:

rename VF
reset effective MAC address
If sriov-cni can capture the failure that netns doesn't exist any more in ReleaseVF, it might be able to continue the releasing process in the init netns (assume VF be released to the default host netns upon failure ). Is there any other information need to recover from an early deletion pause container?

I tried switching to init namespace, however the device is not visible. The device is visible on the host  only after cmdDel command is called on all the devices.

We're running into this currently. We have 4-6 interfaces in use by the CNI, but are often finding 1 or 2 left with a bad interface name, and various settings that weren't reverted. The host usually has enough information to fix the handed back/abandoned interfaces after the failed/incomplete cmdDel. The struggle is we're then racing the cleanup against the pods spinning back up and requesting new interfaces. If they hit one of the abandoned interfaces before cleanup, things go south.
Also when something like the Mellanox E-Switch is involved, the host doesn't have enough information to safely nuke entries  when MACs are being reused.

We're running into this currently. We have 4-6 interfaces in use by the CNI, but are often finding 1 or 2 left with a bad interface name, and various settings that weren't reverted. The host usually has enough information to fix the handed back/abandoned interfaces after the failed/incomplete cmdDel. The struggle is we're then racing the cleanup against the pods spinning back up and requesting new interfaces. If they hit one of the abandoned interfaces before cleanup, things go south.
Also when something like the Mellanox E-Switch is involved, the host doesn't have enough information to safely nuke entries when MACs are being reused.

I think it would be implement a cni plugin that does two things in following order in cmdAdd

Verify the devices on the host are in expected format. If not fix them.
Delegate to sriov-cni

If sriov-cni can provide some ability to run prolog hooks then we can invoke (1) using the prolog hooks.

@blackgold

I tried switching to init namespace, however the device is not visible
Do you know why they aren't visible in the init netns? I figured, once the pod netns is deleted, the devices would return to the init netns. SRIOV CNI could detect the pod netns is deleted but continue on and verify the device is in the appropriate state.

So from within the sriov-cni process when i tried to list devices in the init ns, the devices dont show up. Only after the last cmdDel invocation finishes the devices show up in host ns. ( atleast thats what i remember)

Kind of using a sriov-cleaner daemon to clean up the device that ends up in bad shape on the host. Looking for suggestions on ideal solution.

Would it be helpful if we do the device health check in the device plugin (when kubelet sends the allocate request to device plugin)?  For example, if the requested device is not in init netns (or not  in an expected state than it should be during discovery), device plugin would return unhealthy to kubelet which then repeat the allocate process with another device.

In our use case the job uses all IB devices for training. If even one device is not healthy the job will not run.
It will be nice to have some facility to fix the device.

As a follow up, our post cmdDel() failure cleanup now resets the VF, which causes all E-Switch entries related to that VF to be removed also. This prevents MAC collisions in the E-Switch, as we are changing them for bonding. Since the host namespace only sees VFs that aren't assigned out, we can 'safely' reset all VFs we see without concern about their state.
Though we still have the race condition where the released VF in a bad state might be assigned out before we clean it.

Hi @YitzyD @blackgold question can you share your pod yaml?
just to be sure are you using   terminationGracePeriodSeconds: 0 ?

Also with container runtime are you using? I try this with crio and I am not able to reproduce the issue after using https://github.com/k8snetworkplumbingwg/sriov-cni/issues/219

@SchSeba After investigating further, this seems to be an issue related to docker-shim and as you said, after #220 the issue does seem to be resolved.


endian: Remove CSP_BIG_ENDIAN and CSP_LITTLE_ENDIAN

We can just relay on our compiler for endianness.  Get rid of
CSP_BIG_ENDIAN and CSP_LITTLE_ENDIAN.
This closes #252.
Signed-off-by: Yasushi SHOJI<EMAIL_ADDRESS>

oops.  I apologize for an incomplete PR


Missing client-colcon.meta when creating micro-ros firmware for Renesas RA6M5

Attempted to generate micro-ros firmware for RA6M5 board using the create_firmware_ws.sh [RTOS] [Platform] commands results in an error indicating client-colcon.meta is missing.  Verbatim output as follows.
Dell@GDS-T5810:~/uros_ws$ ros2 run micro_ros_setup create_firmware_ws.sh renesas_ra ra6m5
Creating firmware for renesas_ra platform ra6m5
List of repositories is empty
#All required rosdeps installed successfully
..............
=== ./ros2/common_interfaces (git) ===
Cloning into '.'...
=== ./ros2/example_interfaces (git) ===
Cloning into '.'...
=== ./ros2/libyaml_vendor (git) ===
Cloning into '.'...
=== ./ros2/rcl (git) ===
Cloning into '.'...
=== ./ros2/rcl_interfaces (git) ===
Cloning into '.'...
=== ./ros2/rcl_logging (git) ===
Cloning into '.'...
=== ./ros2/rcpputils (git) ===
Cloning into '.'...
=== ./ros2/rmw (git) ===
Cloning into '.'...
=== ./ros2/rmw_implementation (git) ===
Cloning into '.'...
=== ./ros2/rosidl (git) ===
Cloning into '.'...
=== ./ros2/rosidl_dds (git) ===
Cloning into '.'...
=== ./ros2/rosidl_defaults (git) ===
Cloning into '.'...
=== ./ros2/test_interface_files (git) ===
Cloning into '.'...
=== ./ros2/unique_identifier_msgs (git) ===
Cloning into '.'...
List of repositories is empty
cp: cannot stat '/home/dell/uros_ws/install/micro_ros_setup/config/renesas_ra/ra6m5/client-colcon.meta': No such file or directory

Copying the client-colcon.meta file from the config/freertos directories for one of the other boards (eg nucelo_f767zi) seems to resolve  the issue.
Have I missed a step or is this a known issue?

Solved here: https://github.com/micro-ROS/micro_ros_setup/pull/516
In any case, the preferred option for using the Renesas port is this tool: https://github.com/micro-ROS/micro_ros_renesas2estudio_component

Solved here: https://github.com/micro-ROS/micro_ros_setup/pull/516

Thanks for the prompt fix.

In any case, the preferred option for using the Renesas port is this tool: https://github.com/micro-ROS/micro_ros_renesas2estudio_component

I was having some problems getting the e2studio component to work for me, so attempted the alternative method of generating firmware instead.  I since found there are no pre-defined sample apps for the renesas boards anyway, so it was a bit of a dead end.

You have some examples (ready to build e2studio projects) here: https://github.com/micro-ROS/micro_ros_renesas_demos
And if you found any issue or problem using the e2 component please open an issue there so we can address it.

Thanks again.  I already had the USB agent example working, but not the FreeRTOS UDP one.  I'm not sure whether it is an issue with my code - need to spend a bit more time debugging first :)

Not directly related to this issue, but just FYI - I resolved my issues with UDP version of the e2 studio component.  I needed to open the ufw firewall on the Ubuntu host to allow UDP traffic.


Enable all other happy linters, make unhappy ones explicitly disabled

Enable govet and gocritic and make a few minor edits to test the CI.

Codecov Report

Merging #60 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #60   +/-   ##
=======================================
  Coverage   90.56%   90.56%
=======================================
  Files           6        6
  Lines         318      318
=======================================
  Hits          288      288
  Misses         17       17
  Partials       13       13

Impacted Files
Coverage Δ

graph_connect.go
91.19% <100.00%> (ø)

graph_iip.go
89.47% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7ab278...56ba3c0. Read the comment docs.

@akokhanovskyi i'm a bit outdated on current tooling in Go. Is there something that can automatically fix some of the linter problems, or do you always update the code manually?

I have not seen anything that would fix linter issues beyond the basic gofmt, goreturns, etc. - mostly dealing with formatting, so it's mostly manual.


IndexOutOfRangeException in Persistence SqlServerProvider

IndexOutOfRangeException: EventIndex
at Proto.Persistence.SqlServer.SqlServerProvider.

Could you provide some info on how this occured?

I have a simple counter actor (like the one in the documentation).
In the counter constructor persistence is created using:-
persistence = Persistence.WithEventSourcingAndSnapshotting(provider, provider, actorId, ApplyEvent, ApplySnapshot);
There are no snapshots taken, but events are persisted.
On actor startup persistence.RecoverStateAsync is called and the exception occurs within that call.
The same code works fine when using the SqlLiteProvider.

fixed by #321


move event_handler; make it executable

Moved from /etc to /bin to signify they're executable. Use relative paths (dirname $0) to allow for PREFIXes that are not /usr.
https://github.com/NixOS/nixpkgs/pull/278114

But it's not executable, because it is not meant to be. event_handler is only sourced, and never executed. That's the reason i kept it in sharedir instead.

Fixed with 46d12dbc002917917a79c59bcaefd5e2b3901898


end session validation should not automatically use a single configur…

…ed value
#3072

While reviewing this, we should consider reviewing #3470 at the same time


[TUZ-150][Minor] Add shape_dict param for Compile API

Previously shape dict was not provided and we cannot easily specify the cases for fp16. This change allows we give the shape dict in top-level api and it's still compatible to use float32 as default.
CC @jwfromm @sunggg

Worth noting that unless a dictionary is supplied to dtype_dict, the type defined in the onnx graph is used. This should presumably be fp16 for quantized graphs.


move indexing from Dash.jl

as stated in https://github.com/plotly/Dash.jl/pull/219#issuecomment-1660616422

I'll merge this, but I'll wait until https://github.com/plotly/DashBase.jl/pull/4 is done to release this PR along with https://github.com/plotly/DashBase.jl/pull/4 in DashBase v0.3.0

in DashBase v0.3.0

There are no breaking changes in any if those PRs

From the perspective of DashBase.jl, you're absolutely right. We're just adding things here.
But, what would happen if we release DashBase v0.2.1 off the current master, then users installing or updating Dash.jl would get DashBase v0.2.1 along with Dash v1.3.0 meaning that  Base.getindex(component::Component, id::AbstractString) would be defined in two places. Doesn't that lead to errors?

If you were to make a breaking release, I'd vote for making that 1.0.0.

Yep, we can make the next DashBase release v1.0.0


seccomp: Add ppc and s390x to types/seccomp.go

Proably needed to complete docker/docker#22922
Signed-off-by: Michael Holzheu<EMAIL_ADDRESS>

LGTM

LGTM 🐰


kotlin and vaadin version updates, plus next V14 LTS demo

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

ok to test

CI fails because we proxy all Maven downloads to our own Nexus, which doesn't proxy the Vaadin prereleases repo. Will Vaadin 14 be available in Central?

Sure, the final will be in maven central.. I could deactivate this module first and reactivate it later again.
Von meinem iPhone gesendet

Am 20.06.2019 um 16:13 schrieb Ladislav Thon<EMAIL_ADDRESS>CI fails because we proxy all Maven downloads to our own Nexus, which doesn't proxy the Vaadin prereleases repo. Will Vaadin 14 be available in Central?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

That would be great, thanks!

@Ladicek module is deactivated

Thanks!


Fixed div class and decreased frequency of buzzoff function call

It wouldn't be a bad idea to abstract the function inside the function(){} tag into something named, this all clearly works and works well though. Also feel free to remove the bits you commented out, they're not needed


[MERGE] Branch 1.4 to branch 1.4-ps

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/12934/Build result: ABORTED[...truncated 4428 lines...]	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)Caused by: Command close created at	at hudson.remoting.Command.(Command.java:56)	at hudson.remoting.Channel$CloseCommand.(Channel.java:1074)	at hudson.remoting.Channel$CloseCommand.(Channel.java:1072)	at hudson.remoting.Channel.close(Channel.java:1156)	at hudson.remoting.Channel.close(Channel.java:1138)	at hudson.maven.ProcessCache$MavenProcess.discard(ProcessCache.java:150)	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:857)	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)	at hudson.model.Run.execute(Run.java:1738)	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)	at hudson.model.ResourceController.execute(ResourceController.java:98)	at hudson.model.Executor.run(Executor.java:410)[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project alluxio-tests: Interrupted: InterruptedException -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR]   mvn  -rf :alluxio-tests
Test FAILed.

Jenkins, test this please

This passed locally.


Add drawer module

This module uses matplotlib to draw commonly used data visualization charts, including some legend combinations.

Codecov Report
Attention: Patch coverage is 0% with 255 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (481e3b3) to head (49ec5f1).

Files
Patch %
Lines

src/mathtools/drawer/plot.py
0.00%
105 Missing :warning:

src/mathtools/drawer/heatmap.py
0.00%
60 Missing :warning:

src/mathtools/drawer/bar.py
0.00%
57 Missing :warning:

src/mathtools/initialize.py
0.00%
13 Missing :warning:

src/mathtools/globals.py
0.00%
11 Missing :warning:

src/mathtools/drawer/__init__.py
0.00%
4 Missing :warning:

src/mathtools/__init__.py
0.00%
3 Missing :warning:

src/mathtools/db/__init__.py
0.00%
2 Missing :warning:

:exclamation:  There is a different number of reports uploaded between BASE (481e3b3) and HEAD (49ec5f1). Click for more details.
HEAD has 13 uploads less than BASE

Flag
BASE (481e3b3)
HEAD (49ec5f1)

16
3

Additional details and impacted files
@@             Coverage Diff              @@
##              main      #6        +/-   ##
============================================
- Coverage   100.00%   0.00%   -100.00%
============================================
  Files            1       9         +8
  Lines          158     413       +255
============================================
- Hits           158       0       -158
- Misses           0     413       +413

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add classes to move PanelActions into flyout menu (on Desktop)

Summary | Résumé
Overhaul of PanelActions menus

for root elements, moved PanelActions into a fly-out menu on desktop screen sizes (remains inline for smaller screens).
for sub elements, PanelActions display below the element, but styled differently
All menus show on FocusWithin (ie, an input within the Element has focus)

Before
After

Test instructions | Instructions pour tester la modification
Sequential steps (1., 2., 3., ...) that describe how to test this change. You should include
anything outside the README that will help the developer access your changes and be able to test
them such as any environmental setup steps and/or any time-based elements that this requires.
This will help a developer test things out without too much detective work.
Unresolved questions / Out of scope | Questions non résolues ou hors sujet
Are there any related issues or tangent features you consider out of scope for
this issue that could be addressed in the future? If so please create issues and provide
links in this section
Pull Request Checklist
Please complete the following items in the checklist before you request a review:

[ ] Have you completely tested the functionality of change introduced in this PR? Is the PR solving the problem it's meant to solve within the scope of the related issue?
[ ] The PR does not introduce any new issues such as failed tests, console warnings or new bugs.
[ ] If this PR adds a package have you ensured its licensed correctly and does not add additional security issues?
[ ] Is the code clean, readable and maintainable? Is it easy to understand and comprehend.
[ ] Does your code have adequate comprehensible comments? Do new functions have docstrings?
[ ] Have you modified the change log and updated any relevant documentation?
[ ] Is there adequate test coverage? Both unit tests and end-to-end tests where applicable?
[ ] If your PR is touching any UI is it accessible? Have you tested it with a screen reader? Have you tested it with automated testing tools such as axe?

Turned auto-complete off for the inputs - as it was covering the sub element menu


Bug when rendering a "PipeLine" ?

Steps to reproduce the behavior:

join my server or solo
crash
it say error when rendering a render.bgl.PostProcessPipeline

Screenshots or/and videos
https://medal.tv/games/minecraft/clips/1rhHHR-6TAINTw/d1337gpP7rBo?invite=cr-MSxVa1AsMTk3MTY0MDAzLA
Logs or/and crash reports
https://mclo.gs/nJrXenh
https://mclo.gs/BA0rS58
Versions

Modern Warfare Cubed: [e.g. MWC-0.1-Dev-14]
Forge: [e.g. 1.12.2 - <IP_ADDRESS>60]

Specification:
NVIDIA Corporation' Version: '4.6.0 NVIDIA 536.23' Renderer: 'NVIDIA GeForce GTX 970/PCIe/SSE2'
Launched Version: 1.12.2
Win 10
Additional context
Sometime it crash and sometime it just go back to normal

Disable rain and snow effects in the config


Typography updates

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/graycoreio/daffodil/blob/master/CONTRIBUTING.md#commit
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Fixes: N/A
What is the new behavior?
Clean up typography mixins and styles. Update mixin names in components.
Does this PR introduce a breaking change?
[ ] Yes
[x] No

Other information

/azp run

/azp run


Detect when a drive has been inserted

Firstly, thanks for the module!
Is it possible to listen for when a drive has been inserted into the computer without setting a timeout that would check every x seconds, for example to listen for when a USB has been inserted?

I think what you're asking for is "a level above" what drivelist is designed for, and calling drivelist repeatedly (and then looking for the difference in results) is probably your best option?
IIRC that's what we do in Etcher, right @jviotti ?

Yeah, polling is probably the way to go. We could implement an event based interface on top of this module, but that would use polling anyway.
You might want to take a look at RxJS (https://github.com/resin-io/etcher/blob/master/lib/gui/modules/drive-scanner.js#L41), which makes this task particularly elegant.

That's perfect! Thank you both @lurch @jviotti

By coincidence, I spotted this earlier today: https://www.npmjs.com/package/drivelist-scanner

Ah that's interesting, thanks!
@lurch


Final Fantasy Mystic Quest and Bumper Stickers Filler YAMLs

Final Fantasy Mystic Quest and Bumper Stickers Filler YAMLs

Many of the settings are somewhat loosely based/inspired by historical ALTTP weights, with some adjustments: FFMQ's "logic" is inspired off of item pool, "sky_coin_mode" is inspired by alttp's "goal[s]" featuring local MacGuffins (sky coin fragments in ffmq's case), and FFMQ's  "map_shuffle" is based off ALTTP's "entrance_shuffle" weights.
non-specific "random [sic]" settings are based instead weighted for the purpose of spreadsheet design
Enemy weights are based on Final Fantasy 1's standard settings.
I set "leveling_curve" weights to: potentially, be on the easier side, for a small amount slots.

As a Bumper Stickers player, there's basically no amount of settings you could change that would make the game "not beginner friendly". Pretty sure you could put every single setting on Random and have no issues.
No traps is a good way to emphasize that, though.


Error Occurs After Clicking BID Button

i was wonderring to bid a domain http://registrar.ens.domains/#bitfury which was opened yet, but after i click the "BID" button, nothing happened.
here is the log

Thanks for the bug report! Can you open this again on https://github.com/ethereum/ens-registrar-dapp/issues/new, please:)


Multi-model after time average

Hey,
I'm hoping that someone can help me figure out whats going wrong here. I'm trying produce a multi-model mean of a 2D (x-z dimensional) field. It's a fairly complex preprocessor, several of the stages can be quite slow, and I'll need to run it over lots (dozens?) of model datasets. With that in mind, I'm trying to keep it lightweight:
  prep_transect: # For extracting a transect
    custom_order: true
    time_average:
    regrid:
      target_grid: 1x1
      scheme: linear
    zonal_means:
      coordinate: longitude
      mean_type: mean
    extract_levels:
      levels: [0.1, 0.5, 1, 10, 20, 40, 80, 120, 160, 200, 240, 280, 320, 360, 400, 440, 480, 520, 560, 600, 640, 680, 720, 760, 800, 840, 880, 920, 960, 1000, 1200, 1400, 1600, 1800, 2000, 2200, 2400, 2600, 2800, 3000, 3200, 3400, 3600, 3800, 4000, 4200, 4400, 4600, 4800, 5000, 5200, 5400, 5600, 5800]
      scheme: linear
    multi_model_statistics:
      span: full
      statistics: [mean, ]

(The extract_levels field is a bit silly, please don't worry about it too much.)
The problem that I'm seeing now is that the multi_model_statistics part doesn't produce any results. I think that this is because it can't find a time overlap between the files:
2019-03-12 15:56:35,921 UTC [29013] DEBUG   esmvaltool.preprocessor._multimodel:304 Multimodel statistics: computing: ['mean']
2019-03-12 15:56:35,923 UTC [29013] INFO    esmvaltool.preprocessor._multimodel:313 Time overlap between cubes is none or a single point.check datasets: will not compute statistics.

The first step of the preprocessor is to take a time average, as this reduces the workload of the function by an order of magnitude or more. However, I suspect that this is the reason why it can't find any overlap in the time range between the models.
Perhaps people can suggest a better way to do this - or perhaps a way to get the multi-model mean function to ignore the time overlap?
Cheers!

@ledm _get_overlap() is your enemy here:
    all_times = []
    for cube in cubes:
        span = _datetime_to_int_days(cube)
        start, stop = span[0], span[-1]
        all_times.append([start, stop])
    bounds = [range(b[0], b[-1] + 1) for b in all_times]
    time_pts = reduce(np.intersect1d, bounds)
    if len(time_pts) > 1:

if the cube has a single time point then start = stop = single_cube_time_point and if single_cube_time_point is different from cube to cube by more than 1 then bounds will have no overlapping interval. You have two options: either make the cubes' single time points the same or introduce a condition in this function alike if start == stop: time_pts = range(start - 1, stop + 1), return time_pts - the second option will work fine but may introduce significant errors if the time points of the cubes are far apart in time eg you compute a multimodel between say, two models that one has its time point in 1971 and the second has its time point in 2019 which works functionally but has no statistical meaning

so a minimal temporal check has to be done, but that one is up to you ie how far part in time you can still compute the multimodel stats


Analyze popup when uploading data about loosing data

With #223 it was #214 fixed
Need to analyze why this popup for loosing data activated.
On V2 FE Non Draft 108:
In Object Page, go to edit mode and change a line. Then upload a Excel file.
A popup appears about loosing data.
Apparently also happens on list report when uploading Excel files twice.
Currently the popup is just turned off, but there is maybe and underlying issue or better solution for this.
Maybe this is just the best solution.

Heyo, not a solution but maybe the input can help? Maybe not and I'm completely off base here. ^^
I had a look at 1.108 vs 1.96. In 1.96 when you're doing the following sequence:

go into the object page
click edit
upload something via spreadsheet uploader

It leaves the edit mode but the table isn't refreshed with the newly added entry, oddly enough, I also couldn't see something in the getPendingChanges method of the default (unnamed) model. If you enter edit mode again, randomly press save (though you haven't, technically at this point, done any more change, the model updates!) the table displays the uploaded entry.
In 1.108 or the latest even, doing the same looked alright? Meaning, if I had one demo entry and added 4 more entries using the spreadsheet uploader, there were now 5 entries in total, as expected.

In Object Page, go to edit mode and change a line. Then upload a Excel file.
A popup appears about loosing data.

Not sure if this is just to reproduce the popup but in general this action/behavior in itself makes total sense to me and doesn't classify as a bug. By changing anything within the table before uploading, you're creating a pending change in the model and thus triggering the data-loss popup. Seems about right, doesn't it? You have a change, adding new entries may remove previous changes, thus, prompting the abort of the action itself?
Though you may argue that adding new entries via the spreadsheet uploader doesn't adjust/change the previous changes or entries in total and they will therefore remain in tact making the popup a "bug" in that sense. But is that always the case then? Err'ing on the safe side seems reasonable.
You have probably debugged here already multiple times, still: bHasChanges + bNeedsPopup would be great places for a breakpoint here in the DataLossHandler (coming from CommonUtils):

Apparently also happens on list report when uploading Excel files twice.

This I couldn't reproduce at all. Uploaded a few times the same things like a maniac in 1.120, 1.108 and 1.96 but aside from not properly updating the tables in some version(s) it seemed fine.
The way wouter described it in his initial issue definitely seems like a bug but I couldn't reproduce that. Except: Could that be the "not displayed but yet still created" row in my observation above? Then maybe I looked at the wrong model or pending changes? If so ... I guess some more playing around with the upload and observing application state and trying to actually trigger the popup would be needed.


Feature Request: Server

Usecase: multiple, non-technical teammates have an interest in viewing the output of promptfoo. Exposing the output via a webserver interface would be extremely helpful in this regard.
Additionally, a server would open a path to a lot of other interesting features, such as storing history of prompts, easier sharing, history of evals, eval regressions (big feature) etc.. although maybe at this point this is sounding like a full-featured, paid service (a la https://openpipe.ai/). Big ask, but would be helpful to know if you are planning on moving in this direction, because the # of internal stakeholders asking for this feature is growing.

Also, the nice thing about running a server right now is you can expose APIs, which, IMO, is alot easier to work with than text files. For example, right now I have a use case which requires a lot of janking with the text file regime. So for me, alot of my LLM usage is for static content that gets generated in sequential fashion. Essentially, its a chain of multiple choice prompts, where at each stage of the chain, the user can select from a set of statically generated LLM output, and I have generated all permutations of the chain and now want to evaluate random paths through the chain.
To accomplish this, I am basically thinking of writing a script to generate n custom python script providers, that each read the nth column of a csv file that I have (with each row containing a random path of length n). Then Im thinking of using a blank vars.txt file with a single variable to pass the row number to each of the provider files ... lol
Maybe this is kind of a psycho use case for promptfoo, since its mostly static content that Im dealing with (which btw, if there is a better solution, please suggest) but I think I still would prefer to use promptfoo because Im thinking I can re-use the flexibility of the custom script providers for a more dynamic setup in the future.
Anyways, point is, Im having to generate a lot of text files as part of the test script, and feel like if there was an API solution, it might be simpler to plug into my existing code. Would like to hear your thoughts on this, and would be down to help make this happen, in some limited capacity, although not a typescript guy

Hi @JohnPeng47,
Thanks for the suggestion.  Definitely planning to move in this direction, including a self-hosted server - I also work with a team that would benefit greatly.
Have you tried using promptfoo share (docs)?  It generates a shareable URL, for example: https://app.promptfoo.dev/eval/f:3756cd5e-9ae9-4e91-9a57-cad229cd646f.  Won't solve all the use cases you listed, but at least makes it easier to share with nontechnical people.
Roughly speaking, what would your ideal API look like?

Yes, the share feature is actually great haha, love how the live server integration.

Closing this out as we implemented a server long ago


git-phlow notifies about not moving Jira issue in progress, even though it actually does.

It seems that git-phlow doesn't register the state change correctly when moving a Jira issue through workon. The Jira issue is moved into: "In Progress" :
git workon -v PHLOW-6
Exec: git status
Exec: git config --get phlow.service
Exec: git config --get phlow.issue-api
Exec: git config --get phlow.issue-web
Exec: git config --get phlow.remote
Exec: git config --get phlow.delivery-branch-prefix
Exec: git config --get phlow.integration-branch
Preparing workspace...
Exec: git fetch --all
Exec: git branch -a
Exec: git config --get phlow.jirauser
Exec: git config --get phlow.jiratoken

-------- Issue #PHLOW-6--------
Issue #PHLOW-6 could not be moved to 'In Progress'
Assignee => @dgg
Exec: git checkout -b PHLOW-6-this-gets-moved-in-progress origin/master
Created workspace:  PHLOW-6-this-gets-moved-in-progress

Jira Version: v7.2.1#72003
History

Jira Workflow

I think we will see if we can write a test to reproduce it, and obviously fix it. It seems to be something around interpreting return code from their API.

Fine, let me know if you need more information about our Jira setup.

it could be an api error, we have tested it again 6.x


Fields with string base types cannot be optional

The use case I'm presenting is what I'd consider the current-conventional use case. We're not submitting a form/url-encoded to the api end point, but rather posting application/json. Thus to validate the request, we have to pass a Go struct defining the data to the validator. When unmarshalling the JSON, all string fields on the struct will be assigned "" (empty string) if no value is present in the post body's JSON. This brings us to the various alpha* validation rules and "required".
The problem is that empty string fails every string rule even when "required" isn't set as a rule on a field.
How should we approach this?

Can you share some code snippet?
I'm replying based on what I understand from the question.
package main

import (
	"encoding/json"
	"fmt"
	"net/http"

	"github.com/thedevsaddam/govalidator"
)

// User ...
type User struct {
	Username string           `json:"username"`
	Email    string           `json:"email"`
	Web      string           `json:"web"`
	Age      govalidator.Int  `json:"age"`
	Agree    govalidator.Bool `json:"agree"`
}

func handler(w http.ResponseWriter, r *http.Request) {
	var user User
	rules := govalidator.MapData{
		"username": []string{"max:5"},
		"email":    []string{"required", "min:4", "max:20", "email"},
		"web":      []string{"url"},
		"age":      []string{"required"},
		"agree":    []string{"required"},
	}

	opts := govalidator.Options{
		Request: r,
		Data:    &user,
		Rules:   rules,
	}

	v := govalidator.New(opts)
	e := v.ValidateJSON()
	fmt.Println(user) // your incoming JSON data in Go data struct
	err := map[string]interface{}{"validationError": e}
	w.Header().Set("Content-type", "application/json")
	json.NewEncoder(w).Encode(err)
}

func main() {
	http.HandleFunc("/", handler)
	fmt.Println("Listening on port: 9000")
	http.ListenAndServe(":9000", nil)
}

Let assume we set a rule max:5 for username field, when submitting the post body without providing any value for username field we won't get any validation error for the field.
Input
{
<EMAIL_ADDRESS>  "age": 30,
  "web":"https://www.google.com",
  "dob": "2019-10-11",
  "phone": "01731375076",
  "roles": ["admin", "user", "manager", "superadmin"],
  "address":{
  	"postalCode": "1233",
  	"village": "some village"
  }
}

Output
{
    "validationError": {
        "agree": [
            "The agree field is required"
        ]
    }
}

But I we beak the rules providing more than 5 chars for the field we'll get error
Input
{
  "username":"johndoe",
<EMAIL_ADDRESS>  "age": 30,
  "web":"https://www.google.com",
  "dob": "2019-10-11",
  "phone": "01731375076",
  "roles": ["admin", "user", "manager", "superadmin"],
  "address":{
  	"postalCode": "1233",
  	"village": "some village"
  }
}

Output
{
    "validationError": {
        "agree": [
            "The agree field is required"
        ],
        "username": [
            "The username field must be maximum 5 char"
        ]
    }
}

Firstly, thank you so much for your prompt reply. I was just about to edit to apologize for my ignorance. I stepped through the code and the problem was that getNonRequiredJSONFields wasn't returning these fields into nr; and the reason was v.Opts.RequiredDefault was set to true -- by me. A setting I placed right when I started out with this and had forgotten about. Lesson learned.


Change the color of either string or html attribute?

They have the same color, so it can be hard to read if an html tag has a lot of attributes.

I put the tag in color, a dark pink


Update the docs footer to match design guidelines

docs.dagger.io footer should have a similar design as dagger.io website.
Preview: https://deploy-preview-7094--devel-docs-dagger-io.netlify.app/
Fixes DEV-3495

Just want to point out that the capitalization in the footer is not consistent. Some items use Word Case, others use Sentence case. We should make this consistent wherever required.

Just want to point out that the capitalization in the footer is not consistent. Some items use Word Case, others use Sentence case. We should make this consistent wherever required.
UPDATE: This seems to be an issue only for the docs site, the capitalization is correct on dagger.io FYI @slumbering

Done. Thanks

I have manually re-run the deploy and confirmed that the capitalization issue is fixed.


Release v1.17.0

@agherzan @floion

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Needs rebase.


FIX: proper classes for horizontal form layout

The rendering of horizontal forms was broken for use with the current Bootstrap 4 version. These changes generate the proper CSS classes for the labels and the div container.

Coverage increased (+0.008%) to 91.253% when pulling 250010ae39876b3fa2ca08452e2ca7243ede1267 on mincowski:forms into 8df66c47970aed15f571ae092b118b5eff0d9598 on zostera:develop.

Thanks. I needed this to be fixed too, was going to do it but saw this. Looks good to me.

Fixes #30.

Thanks!


Allow to chain event handlers

It would be nice if event handlers could be chained to create a new event handler that invokes each handler after each other. Something like:
chain(defineCorsHandler(...), eventHandler(event => ...)) // this is an event handler again

This is especially relevant for usage in nuxt, where one usually declares one event handler for a certain route and then in the declaration would like to specify cors options (using h3-cors) in parallel to invoking the actual handler.
Related: https://github.com/unjs/h3/issues/177

Hi @tobiasdiez. As explained in the relevant issue, h3 utilities like cors, are meant to be called functions on demand and in the body of the event handler as best practices.
Middleware style chaining is also possible using an app stack, createApp().use(corsMiddleware).use(actualHandler) which itself is an event handler if you prefer chaining. Have you tried this pattern?
For the purpose of pre/post handlers, we might improve defineHandler BTW probably by supporting something like this:
defineHandler((event) => {}, { before: [cors], after: [validate] })

Whyt?

Thanks for your answer!

As explained in the relevant issue, h3 utilities like cors, are meant to be called functions on demand and in the body of the event handler as best practices.

That works, except if you want to chain two event handlers that you don't really have control (in my case the cors handler, and a apollo-h3-server handler that I'm currently developing). It is also not so convenient if the cors handler sometimes should handle the complete request (preflight) but in other cases only modify the response.

Middleware style chaining is also possible using an app stack

Nice suggestion. Is this production ready or is the overhead of createApp too big? (creating an app sounds expensive, but since h3 is so lightweight...)

defineHandler((event) => {}, { before: [cors], after: [validate] })

Sounds like a good idea. I guess if you need multiple handlers you just add them to the array?
defineHandler((event) => {}, { before: [cors, auth], after: [validate] })

createApp is not working. ERROR: Invalid lazy handler result. It should be a function

@pi0

import { createApp } from "h3"

export default function eventHandlers(...handlers: Array<any>) {
    const app = createApp()
    app.use(handlers.map((func) => defineEventHandler(func)))
    return app
}

@pi0 ?

@notshekhar Currently the code for supporting lazy handlers is plaguing the interpretation of functions
The correct way would be something like
handlers.reduce((a, h) => a.use(eventHandler(h)), app);

@nopeless This also isn't working

@nopeless I tried this and it worked
useBase(
        "/",
        handlers.reduce((a, h) => a.use(eventHandler(h)), app).handler
    )

@nopeless I tried this and it worked
 handlers.reduce((a, h) => a.use(eventHandler(h)), app).handler

Without the .handler it doesn't work?
@notshekhar

@nopeless No is wasn't working without .handler

@nopeless No it wasn't working without .handler

Oh, right, you were using nuxt. Yeah that should be the behaviour. I really think Nuxt should accept Router and App as well
Thanks for responding quickly

@pi0 Hi and sorry for the tag. I use nuxt 3 and I don't understand how to chain event handlers. I don't want global middlewares but an authentication handler that will be put before every routes that need the user to be authenticated. I created the auth handler but I don't know where to put it. I tried a h3 router, and some other things but it seems that I can't chain handlers like I would in Express.

Found a solution that works here: https://github.com/unjs/h3/issues/127

You can also try this I am using in my project, This function creates an event handler that executes all of the event handlers passed to it in the order they are received. The function returns the result of the first event handler that returns a value that is not undefined. If all of the event handlers return undefined, the function returns undefined as well. The event handler is asynchronous and awaits the result of each event handler before moving on to the next one. The event handler is also wrapped in another event handler called eventHandler.
export function eventHandlers<T = any>(...handlers: Array<EventHandler<T>>) {
  return eventHandler(async function chained(event: any) {
    let res = undefined;
    for (const func of handlers) {
      res = await func(event);
      if (res !== undefined) return res;
    }
    return res;
  });
}

Hi. Sorry for not adding comments on this for long time. I belive this is something worth to support to allow hooks such as authentication, cors and validation to run before and after event handler but chaining them is probably not best solution. Instead we are gonna support an object syntax for event handlers with before and after hooks for fine gained control and also composibility. Please track via #424 and ping us here if you belive chaining handler might have it's own advantages comparing to object syntax to reopen discussion 👍🏼

Is the before/after syntax only a different syntax or will it behave differently? That is, are the following equivalent?
defineEventHandler({ handler: d, before: [a,b,c], after: [e,f] })

chainEventHandlers([a,b,c,d,e,f])

If they are functionality-wise equivalent, then I'm indeed a fan of the before/after syntax as the ofther handlers are most likely defined globally somewhere else and only imported, and in this case this syntax is shorter and puts the focus on the actual event handler.


v3.1.0

Will close this now to retry after I fix the workflow

Will close this now to retry after I fix the workflow


Investigate potential platforms

What
We have previously used SmartSurvey, but there are some questions about our access to it this year.
There is potential that even if we do have access to it, that access will be limited to the user researcher role only, which could impede delivery.
Done when

[x] Check our access to SmartSurvey and whether we'll be able to use it again this year
[x] Investigate our access to Optimal Workshop
[x] Investigate access to other platforms if necessary

We've decided on SmartSurvey


Memory map heap snapshot blob file

Avoids the initial memory spike of reading the heap snapshot file in memory and deleting it shortly after.
Related to: https://github.com/NativeScript/NativeScript/issues/1563
ping @atanasovg, @KristinaKoeva

:+1: Looks great, I wonder does this add some measurable improvement?

It reduces the startup memory of the process in the Android Monitor.


Sticker Images are too small

It's a major difference that is seen. I've looked at the main website and I have seen that they are implementing a new History feature, which is nice and all, but the sticker images still are very small compared to the normal item pictures.

https://github.com/ztizzlegaming/CSGOWinBig/blob/master/src/history.html#L166
Play around with the "360fx360f" dimensions.

@TheAnthonyNL
Is there a way to easily determine if the item is a sticker?

@wwcam If the name contains "Sticker |"?

I've fixed it. I'm using this code in place of the referred code above.
if (itemName.indexOf("Sticker") > -1) {
							//It's a sticker!
							var itemIconUrl = 'http://steamcommunity-a.akamaihd.net/economy/image/' + itemIcon + '/120fx120f';
						} else {
							//It's not a sticker!
							var itemIconUrl = 'http://steamcommunity-a.akamaihd.net/economy/image/' + itemIcon + '/360fx360f';
						}

That may be problematic for Sticker Capsules, as they will be counted as Stickers. Replace Sticker with Sticker | to get the desired result.

somehow you dont have to apply that if statement cause all images will fit anyway.


Add battery-level calculation

The battery-level value function in the Nest Protect sensor has been updated to convert the state value to a percentage.
Both battery and wired Protect require Energizer Ultimate Lithium AA (L91) batteries.
Protect (Battery) requires 6 AA batteries. Protect (Wired) requires 3 AA as backup batteries.
Wired Protects will use backup batteries if there’s a power outage.
I assume:

A set is three batteries placed in series.
The battery protect places two sets in parallel, while the wired has only one set.
state is the battery level in mV.

The normal open circuit voltage for an L91 ranges from 1.75-1.8V.
This makes the maximum voltage of 1 set or 2 sets in parallel: 3 * 1.8 = 5.4V = 5400mV
Battery Percentage = state / max * 100
Battery Percentage = state / 5400 * 100 = state / 54
Rounded Percentage = floor((Battery Percentage / 54) + 0.5)

Closes #67

If we're looking for a battery percentage reading that results in:

100%: brand new batteries
0%: device will no longer operate (batteries must be replaced)

then the calculation in this PR will not currently achieve that.
Every device has a minimum operating voltage, below which it stops working.  This is rarely (never?) 0V.  If we want a sensor reading as described above, we need to know (or estimate) the minimum operating voltage of the device.   Two ways to determine that would be:

Run the device on batteries until it dies (or the app says batteries must be replaced) and then check the voltage
Observe battery percentage reported elsewhere, measure actual voltages, and extrapolate/interpolate.

This would still be an approximation, because as mentioned above, voltage change over battery life is typically not linear.  It's probably good enough, though.
As an example, some of my Zigbee sensors use coin batteries rated at a nominal 3V.  Brand new batteries measure around 3.2V, and the devices stop working around 2.5V.  So the linear formula for battery percentage would be: (v - 2.5)/(3.2 - 2.5) * 100

IMO...
The value of "battery level" itself has nothing to do with the device's operating voltage or any linearity.
It's an absolute value representing the voltage-level of the battery.
It's not a "battery has this much juice left to keep my device running" sensor.
I assume, sensor battery-health decides on having enough battery juice.
If the level drops below the operating voltage, the (battery operated) device wouldn't send a level at all (or anything else).
BTW... I do understand what you're trying to say, but see things differently.
No offense to anyone, but after at least a year of an unknown level, I think this PR is suitable and more than welcome.
@iMicknl
Still a wonderful package. Thank you very much.
Ik ben niet zo thuis in de Home Assistant omgevingen, maar ik help je graag.

Every other device I have in Home Assistant with a battery_level entity provides it as a percentage from 0 to 100.
As such, I agree with @ErikSGross that the minimum state should be subtracted.
I have been using this in my setup and it seems to work perfectly:
value_fn=lambda state: round(100 * (state - 4200) / (5400 - 4200)) if state > 4200 else 0,
Based on the discharge profile in this Energizer L91 datasheet, I'm assuming state will range from 4200 to 5400 (1.4V at 0%, 1.8V at 100%).

To be fair, I have several Zigbee and Z-Wave devices that stop responding while the last battery report is 10% or more. Then, some go to 1% for days or weeks. Essentially the Nest app says when battery is reported "low" you have a few weeks to replace before, so it obviously know the slope of that battery very well and is probably one of several reasons they don't recommend any other kind. Also, the one factor that gives them an advantage of accuracy is knowing the draw rate by the device which I could find no documentation of anywhere. I think that the approximation is sufficient, given that we can see the level by this calculation, then match the level to when the Nest app says "replace". Since there is such a wide range of when a device stops working at various battery levels, I don't really see the approximation being a drawback by any means. Besides, it could always be tightened up over time, but something now is way better than no value at all IMHO. Just my 2 cents.

The current approximation in this PR will give 100% for battery_level when batteries are at full voltage, and 78% when batteries reach their minimum voltage.
The battery_health binary sensor that already exists sounds like what you might want?

You are right that the battery voltage change is not exactly linear. Based on the L91 discharge profile it starts off almost linear at high voltages and accelerates at around 1.6V.
I'd guess it is common practice to assume the voltage change is linear - the battery level seems to drop off relatively quickly on my other sensors when they are low.
I'm happy with the linear approach I mentioned above, but I would be interested to see your formula if you find it!

Last comment from me on this topic...
I think the voltage-level is confused with charge or operating voltage-level.
78% is still correct.
If the device stops operating at that level, it doesn't mean the battery has run out of juice.
It ran out of juice l, enough to operate the device.
The voltage-level depends on the current-draw and may run up or down, depending on what the device is doing. E.g. standby vs sounding the alarm.
The dis_charge_ profile represents voltage-level against capacity at a current. Higher current, means greater voltage drop.
Theoretically, the battery is depleted when the voltage is 0.8V, according to the datasheet.
Since we don't know the current draw, we can't say anything about how much % of the capacity is left.
I think it's on Mick to decide if he wants it to represent the actual voltage-level in relation to the max or represent the operating voltage-level.

I'm happy with the linear approach I mentioned above, but I would be interested to see your formula if you find it!

Ok, I found the Excel file thankfully.  Now I just have to remember how I coded it in Python.  Will update soon.  Just for reference, I came up with 4 separate slopes based on the data I could find on the batteries.  I then compared my calculations using my slopes to the values found in the Nest app for my 14 smoke detectors and it was dead on, so I was pretty happy with it.  Below are the slopes and some of the values in those ranges to test the calculation:
Slope  Voltage      Test mV  My Result
1      1.75 - 1.65     5100        72%
2      1.64 - 1.60     4850        42%
3      1.59 - 1.50     4600        23%
4      1.49 - 1.40     4400         9%

Nice, looks like you've put way more effort into this than I have!
Those slopes sound promising - especially for slope 2 and 3 which come out about 10% lower than with the linear model above that I've been using.

@danVnest + @DigiLive, did you agree on which of your PRs to merge? I have to say, this is not really my expertise, so if both of you can decide on the best way forward, I will merge it!

While I think @rmcginty's solution is what the majority of the community expect for a battery_level sensor,  I can certainly understand wanting the voltage exposed to Home Assistant as well.
@iMicknl with the current setup I'm not sure if there is an easy way to have both battery_level and battery_voltage?
If not, this custom component could provide battery voltage and users could create template sensors in Home Assistant for the percentage.
Just tested the following which works for me (see this commit for more detail):
In custom_components/nest_protect/sensor.py:
    from homeassistant.const import UnitOfElectricPotential, TEMP_CELSIUS

    NestProtectSensorDescription(
        key="battery_level",
        name="Battery Voltage",
        value_fn=lambda state: round(state / 1000, 3),
        device_class=SensorDeviceClass.BATTERY,
        native_unit_of_measurement=UnitOfElectricPotential.VOLT,
        entity_category=EntityCategory.DIAGNOSTIC,
    ),

In configuration.yaml:
template:
  - sensor:
      - name: Nest Protect garage battery percentage
        state: "{{ max(0, min(100, (100 * (float(states('sensor.nest_protect_garage_battery_level')) - 4.2) / (5.4 - 4.2)) | round(2))) }}"
        unit_of_measurement: "%"
        state_class: measurement

This option does require more user config though, so I still vote for @rmcginty's solution.

Thanks all, I will have a look. This will require some code changes nevertheless, since temperature sensors and smoke sensors have the same state available, with a different meaning. I will make some changes in the code to reflect this.

Sorry forgot to close this, but your work has been added to the beta branch. Thanks for your contribution!


Set header to indicate behind Nginx

Better approach (?) because it avoids having to remember to set an env var

Codecov Report

Merging #20 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #20   +/-   ##
=======================================
  Coverage   87.34%   87.34%
=======================================
  Files           1        1
  Lines         166      166
=======================================
  Hits          145      145
  Misses         21       21

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9eb1ac...e007abc. Read the comment docs.


[Research] Use a message queue service

May be https://azure.microsoft.com/en-us/services/storage/queues/

After rethinking this. Notification for Moonglade doesn't have to be a queue. Messages can be delivered regardless of time order. Closing this issue as won't fix.


adding a for sale page for binos

👷 Deploy Preview for sparkly-mousse-72daf9 processing.

Name
Link

🔨 Latest commit
1a88dc392b4693a0ca2648422058a54df0a1ac93

🔍 Latest deploy log
https://app.netlify.com/sites/sparkly-mousse-72daf9/deploys/630272f1c952d20009a830c3


Build chrome on Travis

Signed-off-by: Gábor Lipták<EMAIL_ADDRESS>Is dist.zip the artifact generated for both targets (and used to upload to the markets)? Is the zip the same for both Chrome and Firefox? Thanks

npm run build:prod:chrome and npm run build:prod:firefox both output a file named dist.zip
I first run npm run build:prod:chrome then upload the generated dist.zip to the chrome store.
I then run npm run build:prod:firefox then upload the (new) generated dist.zip to the firefox marketplace.
It would be pretty trivial to add a command that would generate both at the same time and name them: dist-chrome.zip and dist-firefox.zip. The name of the zip doesn't really matter.

@eejdoowad I renamed the targets.


Racist content in dataset

I noticed this item in revision d000e30:
1157	{"instruction": "Why Indians are so lazy", "context": "", "response": "Indians love food and do not wants to work, That makes them more lazy and that actually makes the country poor", "category": "brainstorming"}

Maybe this doesn't reflect the sort of answers you want the model to give?

Thank you for bringing this to our attention, we've removed the record.
https://github.com/databrickslabs/dolly/pull/71


Serve intl to browsers who identify as chrome <= version 34 (Samsung 2)

Resolves https://github.com/Financial-Times/polyfill-service/issues/509

With the UA posted in the original issue, the browser detected is samsung_mob/2.1.0 so while this will improve the situation, it will not fix it for the majority of devices.

@ruiaraujo those devices are supported already by including &unknown=polyfill in the polyfill.io url. E.G. https://polyfill.io/v2/polyfill.js?features=Intl&ua=samsung_mob/2.1.0&unknown=polyfill


(Fix) Design rejects (Part 1)

This PR is related to #167347142:
Fixed some issues from the TO-DO list. I will be creating different PRs so we can start merging fixes with less delay:
Fixes:

[x] The use of normalize has been limited to only the fontSize property (as it should be per https://github.com/react-native-training/react-native-elements/issues/67) All of the remaining elements requiring the use of dimensions now use the platform agnostic dp Generally speaking, proportions should be more consistent across devices now (not pixel perfect, of course).
[x] Claim: No spaces between the numbers and the words on the statistic text.
[x] Claim: Not enough padding inside the counter box.
[x] Claim: The padding of the button from below is too big.
[x] Claim: The text is not correct.
[x] Claim: The visual is cut.
[x] Claim: While there's a spinner there shouldn't be a button.
[x] Claim button is located too high.
[x] Feed: The 'colored label' with the texture in the Feed Cards are not in the right width. (On second thought, maybe it's the corner radius of the card that is not right...) And the Texture does not match the wireframes. -> Changed width from 8 to 10. Border radius is 5 as in the design. Grabbed the texture from the design, so it should be OK now.
[x] Feed: The 'Reason' is not aligned (height) inside the card.
[x] Feed: The Delete slide shouldn't go that far to the left. -> This couldn't be fixed. The attribute maxSwipeDistance doesn't seem to work (it allows the user to fully swipe the element to the left). It 'snaps' the element when releasing it, though. On a side note, it seems the component SwipeableFlatList has been removed from react-native from v0.59.8 onwards.
[x] Feed: The Icons and the Feed Cards are not aligned (height).
[x] Feed: The profile pics are not aligned.
[x] Feed: There are no '+' and '-' beside the numbers.

Generally speaking: Dashboard, Claim Section, and FR Intro also should look more like on the latest designs. Had to make several changes on those sections to be able to fix some of the items from the list above.
Screenshots:

I think you need to update some snapshots, because build is failing because of that...

@kbardi
Worked on your feedback. I don't think I've worked on quite a few of those files, but those are some general issues which should have been addressed anyway.
Also updated snapshots.


hapi usage without options.path throws

closes #554
closes https://github.com/hoodiehq/ember-hoodie/pull/21

LGTM! But looks like coverage decreases a lil?

Looks good for me. Would only check this coverage though...

Yeah the coverage is another open issue :)
https://github.com/hoodiehq/camp/issues/4


List of projects to be excluded when opening the Atom

Several times, when starting the Atom, the list of projects disappears, and I have to add all again.
P.S: I use Mac OS X Yosemite.

Can you give us more information about what you mean by projects list?

When we go to the menu "File - Add Project to Follder ..." and select a project, they are now displayed fixedly on the left side of the screen, making navigation.
However, some holes in times when the atom is opened, the projects add up, and I have isnerir again. What is very annoying.
Do not I get many projects added at most a 5.

How are you restarting atom? From the dock? From the command line? If command line, what command are you typing on the command line?

From the Dock.


nan in logits

Hi,
I tried to perform inference in parallel on two 3090 graphics cards, but after outputting a few tokens, the logits output by the model were all nan. Do you have any suggestions for solving this issue?
The error info in the terminal is 'nan in logits, set nan_default_token to proceed in BaseStrategy.forward.' This info can be located in the following code:
 if torch.isnan(logits).any():             if nan_default_token is None:                 raise ValueError('nan in logits, set nan_default_token to proceed in BaseStrategy.forward.')             logits.fill_(-1000)             logits[..., nan_default_token] = 0
I've tried setting nan_default_token to 0 or other values, and the model can respond, but the answers don't make sense.
Additionally, my computer has 64GB of memory, and I manually added 64GB of virtual memory to solve a previous error: 'RuntimeError: [1] is setting up NCCL communicator and retreiving ncclUniqueId from [0] via c10d key-value store by key '0', but store->get('0')'.
Thank you for any suggestions in advance.

You should use bf16 instead of fp16.

Hi, could you please tell me how did you find the logits? I have been struggling to do the same.

Hi,
I didn't solve this bug and used other LLMs instead.

From: joel-simp @.>
Sent: Wednesday, June 19, 2024 2:51 PM
To: THUDM/CogVLM @.>
Cc: Haobo Luo (SSE, 219019075) @.>; Author @.>
Subject: Re: [THUDM/CogVLM] nan in logits (Issue #96)
Hi, could you please tell me how did you find the logits? I have been struggling to do the same.
Screenshot.2024-06-19.at.12.20.19.PM.png (view on web)https://github.com/THUDM/CogVLM/assets/170931221/461808fc-2ca9-4225-a0d4-76899ffc4923
—
Reply to this email directly, view it on GitHubhttps://github.com/THUDM/CogVLM/issues/96#issuecomment-2177883854, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKWVFWP6VNX55Y4Z7YEHYCTZIETATAVCNFSM6AAAAABJRNF4ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXHA4DGOBVGQ.
You are receiving this because you authored the thread.Message ID: @.***>

You used other LLMs to check the confidence score of the texts generated by CogVLM? umm how does that work?


Aalen Additive Model

Is your feature request related to a problem? Please describe.
In continuing expansion for survival data, one model to add is Aalen's additive hazard model. This can be structured as an estimating equation and gives some additional survival analysis support. It's not a super common model in the (epidemiology) literature, but it seems to have some uses.
Describe the solution you'd like
Add an ee_* for the Aalen additive hazard model
Describe alternatives you've considered
Don't provide an implementation, which limits the survival analysis tools provided in deli
Additional context
Some resources
https://pubmed.ncbi.nlm.nih.gov/12182121/
https://github.com/KenLi93/pci2s/blob/main/R/lin_ah.R#L115

Also
https://www.med.uio.no/imb/english/research/groups/causal-inference-methods/software/addreg/aalen.html


Flag/show estimated support/eol dates

For some support/eol dates we use a calculation for estimation

https://github.com/search?q=repo%3Aendoflife-date%2Fendoflife.date estimat&type=code
https://github.com/search?q=repo%3Aendoflife-date%2Fendoflife.date+projected&type=code

For now we write a comment in the md file for our reference. The users of the website and api don't see that the date is estimated.
My idea is to flag those dates and show the user that the date is an estimation and perhaps also show how we calculated.

Relates to #2245.


Meeting with CE team & Tanya re: survey tooling

When [Situation]?
Planning an on-site survey for GE
I want to [Motivation]
Connect with CE team about possibly using LimeSurvey
So I can [Expected Outcome]
Balance their workload pressures with our project timing and find a survey tool that works

Tanya advises 6 week lead time needed
Sarah from SCD team following up re: possibility of SCD team getting own instance


Underbrace in StackEdit 5 not working

Hi benweet,
your current StackEdit-Version is not rendering the command $\underbrace{Text}_{Text}$. I am not able to fix this via custom settings or similar approaches. I tried your app on Windows 10 (Firefox, Edge, Chrome) and Android (Firefox, Chrome) nowhere it is working. It would be nice if you could create a hotfix for this.
Regards,
SchoolGuy

The v5 uses katex. I guess you should open a ticket there.

In my eyes there is a high posibility that you have misconfigured your webserver: https://github.com/Khan/KaTeX/issues/908. If not then I will open a ticket on the katex repo.

@benweet Is this checked? In the referenced issue it shows that this feature is working.

Yeah it must be a bug in StackEdit.