Imgui integration

Required Info

Camera Model
D435

Firmware Version
<IP_ADDRESS>

Operating System & Version
Win (10)

Platform
PC

SDK Version
2.32

Language
C++

Segment
desktop app

Issue Description
I'm trying to create some widgets. Specifically an indicator using bitmaps that rotate...
So far I have used the thirdparty(folder) IMGUI and it's worked great. Everything is running smoothly.
I'm happy with your product.
But since  I need to create some graphical indicators to represent calculations on my depth table I've had to download the latest Imgui -  since the examples I've seen didn't compile in the realsense environment.
I noticed that last week a similar question, in Issues, was posed and the answer was that the version of Imgui currently  being used by realsense worked fine. Do I  need to figure out ways  integrate solutions I find from ocornut(mainly)  with the realsense environment or is there a simpler way to do what I want?
If you would like specifics I could paste some code and errors.
Thanks.

Hi @arothenberg   The ideal situation may be to try to create your graphical elements using the SDK's existing Imgui implementation.   The discussion in the link below has directions to information about the SDK's Imgui draw commands and advice about custom rendering.
https://support.intelrealsense.com/hc/en-us/community/posts/360052500553-How-to-draw-shapes-on-a-window-using-ImGiu-

Hi @arothenberg   The ideal situation may be to try to create your graphical elements using the SDK's existing Imgui implementation.   The discussion in the link below has directions to information about the SDK's Imgui draw commands and advice about custom rendering.
https://support.intelrealsense.com/hc/en-us/community/posts/360052500553-How-to-draw-shapes-on-a-window-using-ImGiu-

I'll try looking closer at the Imgui.h procedures and see if it will cover my needs. There is code for rotating bitmaps ocornut uses , as an example, that has a function that performs the rotation but that function is absent in your version.
Alternately, I could try and write my own  code using a rgba8 type pointer  and use glTexImage2D  to render it - I'll try that if there is no easy way through your Imgui implementation to achieve my needs.
Thanks.

I'll try looking closer at the Imgui.h procedures and see if it will cover my needs. There is code for rotating bitmaps ocornut uses , as an example, that has a function that performs the rotation but that function is absent in your version.
Alternately, I could try and write my own  code using a rgba8 type pointer  and use glTexImage2D  to render it - I'll try that if there is no easy way through your Imgui implementation to achieve my needs.
Thanks.

Okay, thanks very much for the update.   Good luck!

Okay, thanks very much for the update.   Good luck!

Hi @arothenberg   Do you require further assistance with this case, please?  Thanks!

Hi @arothenberg   Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.

Case closed due to no further comments received.


[Enhancement]: Auto sync to cnpm and tnpm after publish

ref: https://github.com/ant-design/pro-components/blob/master/scripts/syncTNPM.js

Fixed by #19


net/http: Go 1.6 http.Client doesn't support http2 by default

go version go1.6 darwin/amd64

It's said in documentation that http2 is enabled by default in release 1.6 for server and client, but client refuses to communicate http2.
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	response, err := http.Get("https://http2.golang.org/reqinfo")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("is HTTP2: %v (%s)\n\n", response.ProtoAtLeast(2, 0), response.Proto)
	body, err := ioutil.ReadAll(response.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(body))
}

returns
is HTTP2: false (HTTP/1.1)

Method: GET
Protocol: HTTP/1.1
Host: http2.golang.org
RemoteAddr: REMOVED:33882
RequestURI: "/reqinfo"
URL: &url.URL{Scheme:"", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/reqinfo", RawPath:"", RawQuery:"", Fragment:""}
Body.ContentLength: 0 (-1 means unknown)
Close: false (relevant for HTTP/1 only)
TLS: &tls.ConnectionState{Version:0x303, HandshakeComplete:true, DidResume:false, CipherSuite:0xc02f, NegotiatedProtocol:"", NegotiatedProtocolIsMutual:true, ServerName:"http2.golang.org", PeerCertificates:[]*x509.Certificate(nil), VerifiedChains:[][]*x509.Certificate(nil), SignedCertificateTimestamps:[][]uint8(nil), OCSPResponse:[]uint8(nil), TLSUnique:[]uint8{0xcf, 0x67, 0x6b, 0xfb, 0x3c, 0xc2, 0xc6, 0xc2, 0xb9, 0xfb, 0x1b, 0x24}}

Headers:
Accept-Encoding: gzip
User-Agent: Go-http-client/1.1

Well, crap. :-(
I broke it at the last second in 79d9f48c73124eb21db99efa4b97cee044f52700 with the ExpectContinueTimeout because the http.DefaultTransport defines an ExpectContinueTimeout.
And the unit test to check for automatic http2 upgrade doesn't use DefaultTransport:
func TestTransportAutomaticHTTP2(t *testing.T) {
        testTransportAutoHTTP(t, &Transport{}, true)
}

func TestTransportAutomaticHTTP2_TLSNextProto(t *testing.T) {
        testTransportAutoHTTP(t, &Transport{
                TLSNextProto: make(map[string]func(string, *tls.Conn) RoundTripper),
        }, false)
}

func TestTransportAutomaticHTTP2_TLSConfig(t *testing.T) {
        testTransportAutoHTTP(t, &Transport{
                TLSClientConfig: new(tls.Config),
        }, false)
}

func TestTransportAutomaticHTTP2_ExpectContinueTimeout(t *testing.T) {
        testTransportAutoHTTP(t, &Transport{
                ExpectContinueTimeout: 1 * time.Second,
        }, false)
}

I think DefaultTransport should have it enabled, regardless of its ExpectContinueTimeout.

I'm not 100% convinced by the fix. I would not expect a copy of DefaultTransport to behave differently from DefaultTransport. It's potentially really surprising.

Got an alternative proposal?
Note that ExpectContinueTimeout was only added in Go 1.6 also, so nobody will have a copy of this DefaultTransport in their code already.

Not really, I'm doing some serious peanut gallery here.
However, I did copy paste the DefaultTransport before, or I could see why someone would type assert it and dereference it to get a "future-proof" copy of the DefaultTransport. Those users would unexpectedly get no HTTP/2. Even worse, I can see a small change moving some code from DefaultTransport to a copy of DefaultTransport passing code review as "sure that does not change anything", and instead degrading service. And I see no good way to figure out why two identical Transport behave differently.
Maybe just plainly documenting that ExpectContinueTimeout does not apply to HTTP/2 connections and always ignoring it is more clean and simple. Also considering that ExpectContinueTimeout is new and no one is relying on it yet.

I agree that it's weird that two identical DefaultTransports would behave differently. I mentioned the same concern in some earlier review. (hotel wifi too terrible for me to find it at the moment)
Yeah, perhaps some documentation on ExpectContinueTimeout would be better for now. I do intend to make it work for Go 1.7.
@rsc, opinions?

I am told it is confirmed that go v1.6 initial release does not work with http2, by default, but that it is currently planned for v1.6.1. Looking forward to it :)

@kristian-hermansen To clarify: Go 1.6 supports ("works with") HTTP/2, but requires you to modify the Transport. You don't have to wait until Go 1.6.1.

Right, but not by default, which I guess was what brought me here googling. In a golang support chat, someone told me to wait until v1.6.1 or I might have to change the code again. Is that true, or will modifying the Transport work even after v1.6.1 is out? And if so, do you have some example code that would be forward compatible (since we don't know what changes are planned)? Thanks much! :)

As a workaround, for Go1.6, do this before you use the client:
if tr, ok := http.DefaultTransport.(*http.Transport); ok {
    tr.ExpectContinueTimeout = 0
}

IMHO, the HTTP/2 code should just be ignoring ExpectContinueTimeout if it is not relevant for HTTP/2, and the documentation of ExpectContinueTimeout should say that it's applicable only for HTTP/1.x.

This weekend I found myself copying the DefaultTransport twice, and I thought about this again. One very common example is defining a TLSClientConfig (without losing the timeouts).
Not sure if I like typeassert-dereference-copy or copy-paste more, but both will break HTTP/2 if DefaultTransport is special-cased.
@bradfitz @rsc, did any discussion happen on simply ignoring ExpectContinueTimeout to avoid magic behavior?

I'd like this to go into 1.6.1 but I am concerned on springing a major change on unsuspecting users. They thought they were getting http2 in 1.6, but then didn't, and if we turn it on now I worry things will break. Was http2 working in the release candidates? That would go some way to assuaging my fears.

@adg, 1.6.1 is for security stuff only. This could go into Go 1.6.2, which might happen at about the same time. Yes, this worked in rc releases. I worried about the surprise change, but there are already at least two surprise elements to this as-is:

new(Transport) and http.Get can differ.
new(Transport) to foo.com can do one thing today, and a different thing tomorrow, regardless of your Go version, just because foo.com added HTTP/2 support. So people were already making major codepath changes somewhat outside of their control. (but they could force-override it to HTTP/1)

Also, if Go 1.6.2's correct use of HTTP/2 in the default client breaks something, they've already got the environment variable to turn it off. We should make that clear in the point release notes.


How to enable both adfs login and normal Django login

The documentation does not cover this. Once you add Django-adfs to your settings file, then the normal /login fails - probable because the adfs middle ware will start to handle some of the login URs.
Happy to add config here - if helpful.

I’ve never had this use case myself. I’m sure you can have multiple auth providers, but not sure if this implementation supports it.
You’ll have to look at Django docs and investigate from there.

Adjust your settings.py AUTHENTICATION_BACKENDS value to use both backends. Put the Django ModelBackend one first.
AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'django_auth_adfs.backend.AdfsAuthCodeBackend',
)

https://django-auth-adfs.readthedocs.io/en/latest/azure_ad_config_guide.html?highlight=AUTHENTICATION_BACKENDS#step-2-configuring-settings-py

Thanks, @junctionapps! 😊


Adding an explicit check for relatedImages

With the resent modification to allow partners to manually pin their digest, we were not checking for relatedImages in that case.  RelatedImages are required for Marketplace.  This check uses the digest pinning tool to get the number of images in the CSV and make sure there is an equal number of images listed in the relatedImages.  In a future PR we can use a more robust check that does more than comparing image counts in the CSV to image counts in the relatedImages section.

Just have one question about the cat statement, but otherwise looks good :+1:


Add ca checksum field to clusterregistrationtoken API

What kind of request is this (question/bug/enhancement/feature request):
Enhancement
Steps to reproduce (least amount of steps as possible):
Call https://hostname:8443/v3/clusterregistrationtoken API
Result:
The nodeCommand contains the ca checksum, but it would be easier to parse the data if it was in it's own field.
Other details that may be helpful:
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI):
v2.1.4
Installation option (single install/HA):
single install

Any updates on this? Thanks!

Un-stale.

Un-stale


Train PartiallyReversibleUNet on brats dataset

Dear @RobinBruegger ,
Thanks for making the great work publically available.
Could you give guidance on how to train PartiallyReversibleUNet  on brats dataset?
Best,
Jun

Dear Jun,
Thanks for your interest! I've added some documentation on how to install and use the codebase. Please let me know if you run into any problems.
Best,
Robin

@JunMa11 : Have you success to train on brats 2018 ? I got the error when run python train.py
Segmentation fault (core dumped)

I think it is better to remove commt.ml in training if we run it in server

For got it. It is problem of from matplotlib import pyplot as plt. I fixed it by
import matplotlib as mpl
mpl.use('TkAgg')  # or whatever other backend that you want
import matplotlib.pyplot as plt


New built-in OAuth Access Token Store: iCloud Key-Value Storage

Summary
Added a new OAuth Access Token Store base on iCloud Key-Value Storage.
Why
I wanted to have the opportunity to store access token information in a shared container accessible from other devices that do not have capabilities to support the OAuth 2 authentication process (like tvOS). By using this new built in store, the user can rely on the iCloud Key-Value Storage, connected to his personal iCloud account, to share authentication information retreived from other devices.
Notes

I'm not sure how to write tests for this feature. The new class I created his heavily coupled with a valid iCloud Key-Value Storage. Any idea?

It would be nice to improve the OAuthAccessTokenStore protocol with a proper callback method that notifies when a new access token has been set. Currently, if new information have been sent from another device, the user has to manually query the iCloud Key-Value Store again to retrieve new information.

Hi and thanks for your contribution!
I had a look and I think this is definitely the right way to go!
Regarding testing I would try the following:
Inject the store as a dependency, so that you can mock that out in test (via Dobby). And then you could verify, that the expected methods on the store get called.
Regarding the OAuthAccessTokenStore protocol: Can you sketch out/show/code up what you have in mind?


There misses three activities after creating a C# project with func cli

OS: All
Node.js: V10.13.0
Build Number: 20181218.1
Repro Steps:

Create a JavaScript project with the following command 'func init --worker-runtime node' -> Check the log message.
Create a C# project with the command 'func init --worker-runtime dotnet' -> Check the log message.
Compare these two generated log messages.

Expect:
The generated log messages are consistent.
Actual:

The generated log messages are inconsistent.
There message misses 3 activities for the created C# project.

@v-xuanzh we don't own the func cli. You can file an issue on their repo here if you so desire: https://github.com/Azure/azure-functions-core-tools


added Organization link to header - issue #16

Linked the Organization page in the header, from issue #16. I'm not sure if the content on the Organization page is current so that may need updating.

Not forgotten! I think we just need to update the positions and lock down the about verbiage before it's public. Thanks for making the link ready!

Updated org page. Merging PR


added:: Metadata and SEO

Issue #7

Good work @myselfshivams

Good work @myselfshivams

@Aryainguz Please add labels, as gssoc will not accept this PR.(If possible please give max level 2 or 3)


Formatting

good thing you closed it, otherwise I'd yell at you for incorrect formatting of * and &


Backport of 2613 in stable-3.1

Backport of #2613 in stable-3.1

jenkins test luminous-ansible2.4-centos7_cluster

jenkins test luminous-ansible2.4-docker_cluster


[release-4.15] OCPBUGS-25355: setting TLSSecurityProfile with no minTLSVersion crashes controller

bump library-go to get the fix in commit dc28c15393c9990e5ba0cd7612892bb88b6653cd

/lgtm

/label backport-risk-assessed
/retest

Did pre-merger on AWS-EBS-CSI-Driver-Operator in https://github.com/openshift/csi-operator/pull/90, test result looks good. Other Drivers should have the same behavior.
/label qe-approved
/label cherry-pick-approved

/retest-required

/test e2e-vsphere-ovn-upgrade

/retest-required

/override ci/prow/e2e-vsphere-ovn-upgrade


[Feature] How detect a change on geolocationenabled?

For example when an app starts all services are up. But, for example if the user switches the phone in aeroplane mode, I should have an event when something happens to the geolocation service. Another scenario is my app is started and its purpose is tracking but IsGeolocationEnabled=false and the service doesn't start. I don't know when the service is available.
locator.PositionError += Locator_PositionError;

private void Current_PositionError(object sender,
                                   Plugin.Geolocator.Abstractions.PositionErrorEventArgs e) {
        if (e.Error == Plugin.Geolocator.Abstractions.GeolocationError.PositionUnavailable ||
            e.Error == Plugin.Geolocator.Abstractions.GeolocationError.Unauthorized) {
            GPS = Settings.GPSOffIcon;
    }
}

In this code if I switch Aeroplane mode on I don't receive any error.

Yep.  Needs INotifyPropertyChanged or more events.

Any ideas when this  enhancement is done?

while waiting you could use dependency service in iOS and this:
public class AskLocationUse : IAskLocationUse
{
private TaskCompletionSource tcs;
private CLLocationManager manager;
	public void init()
	{
		tcs = new TaskCompletionSource<bool>();
		manager = new CLLocationManager();
		manager.AuthorizationChanged += (sender, e) => {
			Debug.WriteLine("Auth Changed: " + e.Status);
			if (e.Status == CLAuthorizationStatus.Authorized ||
				e.Status == CLAuthorizationStatus.AuthorizedAlways ||
				e.Status == CLAuthorizationStatus.AuthorizedWhenInUse)
				tcs.SetResult(true);
			else if (e.Status == CLAuthorizationStatus.Denied)
				tcs.SetResult(false);
		};
	}

	public async Task<bool> askAuthorization()
	{
		tcs = new TaskCompletionSource<bool>();
		if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
			manager.RequestWhenInUseAuthorization();
		return await tcs.Task;
	}
}

Is there any update on this? We have tried using the 'PositionError' event but seems like not working.


feat: add templ elements, and templ block elements

@a-h I'm happy that this works as expected now.
Would be good to get your eyes over it first and make sure it's acceptable.
I left callTemplatesExpressions in for backwards compatability, was this right?

Was thinking of updating the "Write" function of the calltemplate expression to write out the new syntax. So templ fmt would migrate.


Add basic DTS

This DTS file does not support the JSX namespace because that is a more complicated issue.
Closes #7

In #7 you speak about tests, do you still want to add them?

Given the DTS size, I think that you're right and tests are not needed at this point.

@pspeter3 One issue though is it seems like you can not have a component that returns another component when using h. Thoughts?

Do you mean?
const AnotherComponent = (props, children) => h("div", {}, "hi")

const Component = (props, children) => AnotherComponent

or
const Component = (props, children) => AnotherComponent(props, children)

I mean the middle one where the component returns another function. I'm not sure a world which that would happen and the implementation of h does not handle it so I didn't make the DTS handle it. I'm not particularly worried about it.

@pspeter3 Got it. Note that the following does work:
const Component = (props, children) => h(AnotherComponent, props, children)

@jbucaran do we still want this?

@pspeter3 Definitely!
For reference: https://github.com/hyperapp/hyperapp/pull/279

So what's next to have this merged?

@pspeter3 Please fix the conflict first! 🙏👍

Fixed

Codecov Report

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

@@           Coverage Diff           @@
##           master      #17   +/-   ##
=======================================
  Coverage   11.71%   11.71%
=======================================
  Files           2        2
  Lines         111      111
  Branches       31       31
=======================================
  Hits           13       13
  Misses         71       71
  Partials       27       27

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 9335d22...e13221d. Read the comment docs.

Ping?

For the comments I left, I'd be happy to jump in a contribute some fixes. I'd also be happy to add some JSDoc comments to the definitions for better intellisense in editors such as VSCode

At some point (either this PR or another) we should look at exposing the available lifecycle methods through the type definitions

@andrewiggins At some point (either this PR or another) we should look at exposing the available lifecycle methods through the type definitions.

Sounds good to me.

@pspeter3 Is this merge ready? and how can I test if this is working, like, how do I tell vscode to pick the typings?
Sorry, total typings n00b here.

Yeah, I think we can merge it.

@pspeter3 Any tips on how to tell vscode to pick this up?

Thank you @pspeter3 for your incredible patience with this! 🎉

I am coming too late, but I am reworking the Hyperapp DTS largely based on the picodom DTS (because you did on awesome job !)
So, h() also accept as parameter a children that will be an array of Vnode, so, why not overloads h() with :
export function h<Data>(
  tag: Component<Data> | string,
  data?: Data,
  children?: VElement<{}>[]
): VNode<Data>

Plus, h() is ready to be use with JSX, so why not type JSX support too ?
declare global {
  namespace JSX {
    interface Element<Data> extends VNode<Data> {}
    interface IntrinsicElements {
      [elemName: string]: {}
    }
  }
}

I am sorry if this comment could be judged as pretty annoying.

@Swizz I'm working on improving the types a bit, including what you mentioned. PR should be out soon.


Divide by zero produces Infinity instead of NULL

Describe the bug
SQL
SELECT c38, c91, c38 / c91 FROM test0 ORDER BY c38, c91;

Spark Plan
AdaptiveSparkPlan isFinalPlan=true
+- == Final Plan ==
   *(2) Sort [c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST], true, 0
   +- AQEShuffleRead coalesced
      +- ShuffleQueryStage 0
         +- Exchange rangepartitioning(c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=42538]
            +- *(1) Project [c38#38, c91#91, (cast(c38#38 as double) / cast(c91#91 as double)) AS (c38 / c91)#45670]
               +- *(1) ColumnarToRow
                  +- FileScan parquet [c38#38,c91#91] Batched: true, DataFilters: [], Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c38:float,c91:float>
+- == Initial Plan ==
   Sort [c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST], true, 0
   +- Exchange rangepartitioning(c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=42524]
      +- Project [c38#38, c91#91, (cast(c38#38 as double) / cast(c91#91 as double)) AS (c38 / c91)#45670]
         +- FileScan parquet [c38#38,c91#91] Batched: true, DataFilters: [], Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c38:float,c91:float>

Comet Plan
AdaptiveSparkPlan isFinalPlan=true
+- == Final Plan ==
   *(2) Sort [c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST], true, 0
   +- AQEShuffleRead coalesced
      +- ShuffleQueryStage 0
         +- Exchange rangepartitioning(c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=42603]
            +- *(1) ColumnarToRow
               +- CometProject [c38#38, c91#91, (c38 / c91)#45678], [c38#38, c91#91, (cast(c38#38 as double) / cast(c91#91 as double)) AS (c38 / c91)#45678]
                  +- CometScan parquet [c38#38,c91#91] Batched: true, DataFilters: [], Format: CometParquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c38:float,c91:float>
+- == Initial Plan ==
   Sort [c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST], true, 0
   +- Exchange rangepartitioning(c38#38 ASC NULLS FIRST, c91#91 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=42583]
      +- CometProject [c38#38, c91#91, (c38 / c91)#45678], [c38#38, c91#91, (cast(c38#38 as double) / cast(c91#91 as double)) AS (c38 / c91)#45678]
         +- CometScan parquet [c38#38,c91#91] Batched: true, DataFilters: [], Format: CometParquet, Location: InMemoryFileIndex(1 paths)[file:/home/andy/git/apache/datafusion-comet/fuzz-testing/test0.parquet], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c38:float,c91:float>

First difference at row 15:
Spark: -3.4028235E38,-0.0,NULL
Comet: -3.4028235E38,-0.0,Infinity
Steps to reproduce
No response
Expected behavior
No response
Additional context
No response

Will be addressed with https://github.com/apache/datafusion-comet/pull/585


summary: Add option to store best value?

By default the values for each metric at the latest step are being saved in the summary. It might be interesting to add an option to additionally save the best value for each metric.
An example use case would be the usual deep learning training loop where the model is being validated at the end of each epoch and the last epoch is not necessarily the one with the best performance. Having the best value saved in the summary could be more useful for comparing experiments (i.e. dvc metrics diff --targets dvclive.json)
A potential problem would be how to expose to the user (https://github.com/iterative/dvclive/issues/75#issuecomment-842186329) some options like whether to use the ¿save_best? or not and what to consider as better (i.e. higher or lower)

As to problems:
Related: #81 - both in this issue and here we need to come up with a way to store the data in a structured way. Maybe summary json needs to be separated into  "latest", "system" and "best" sections.
As to saving the best, I think we should let users provide callable taking list as argument/comparing two values, that by default would be choosing max(list) or max(x1, x2). That way users could provide their own methods to find the best.
This kind of solution might be quite short-sighted though, with heavily customized metrix one might have to provide this argument each time they call log. This is something that needs to be considered. Maybe we need to be able to configure that.

As to problems:
Related: #81 - both in this issue and here we need to come up with a way to store the data in a structured way. Maybe summary json needs to be separated into "latest", "system" and "best" sections.

I think that a structured summary would be a great idea and it would make the summary easier to extend for future ideas/feature requests.

As to saving the best, I think we should let users provide callable taking list as argument/comparing two values, that by default would be choosing max(list) or max(x1, x2). That way users could provide their own methods to find the best.
This kind of solution might be quite short-sighted though, with heavily customized metrix one might have to provide this argument each time they call log. This is something that needs to be considered. Maybe we need to be able to configure that.

I'm not sure if a custom callable would be needed. I searched for similar scenarios (i.e. the tensorflow/keras ModelCheckpoint) and they just provide the options min, max or auto for the mode argument.
A problem in the dvclive scenario would be that the mode for selecting the best value needs to be specified for each metric whereas in the ModelCheckpoint only one metric is being monitored.

I think that a structured summary would be a great idea and it would make the summary easier to extend for future ideas/feature requests.

Yeah, but before implementing that we need to consider how do we want to handle it on DVC side - if we include those in summary json, those values will be treated as metrics from dvc point of view. While it might make sense for  "best" and "latest" I don't think its viable use case for "system" metrics. On the other hand I can totally imagine situation where someone wants to visualize memory usage and want to plot system controlled metrics. We need to research and discuss what do we actually want from those parameters.

Yeah, but before implementing that we need to consider how do we want to handle it on DVC side - if we include those in summary json, those values will be treated as metrics from dvc point of view. While it might make sense for "best" and "latest" I don't think its viable use case for "system" metrics. On the other hand I can totally imagine situation where someone wants to visualize memory usage and want to plot system controlled metrics. We need to research and discuss what do we actually want from those parameters.

I see your point. I think that we could make a distinction between:

live metrics

Generated in dvclive.log
Stored in dvclive/metric.tsv.
Intended to be used along with dvc plots (i.e to monitor the train loop by refreshing the .html)

dvc metrics

Generated in dvclive.next_step
Stored in dvclive.json
Values depending on their corresponding .tsv files using some sort of "aggregation"? (i.e. latest, best, mean, etc.)
Intended to be used along with dvc metrics (i.e. to compare experiments)

So, for the specific case of system metrics (#81), we would have Memory usage as a live metric being periodically logged to the .tsv and then some sort of aggregation (i.e. Mean Memory Usage) saved in the .json for being used as a dvc metric
In this scenario I think that your original idea of custom callable would make much more sense for letting the user decide the "aggregation".

@daavoo Having max/min is a good idea!
Do we need extra metrics / files? Can it be done as DVC cmd. Like dvc metrics show --max metrics.json or --show-json if you need a json file.
For system metrics - yes, a separate metrics / file is needed.

I was trying an example repo with dvclive using dvc expepriments where the pipeline some stages after the train stage (where dvclive is actually used) that depend on selecting the best checkpoint.
In this dvc exp workflow the issue doesn't seem so relevant if you go with the following workaround:

I first run the pipeline and stop after the train stage:
dvc exp run train

At this point dvclive has created all the checkpoints. So I visualize the table:
dvc exp show

And manually  (looking at the metrics/params) select and apply the best one:
dvc exp apply {hash of best checkpoint}
git add .
git commit -m "Applied  {hash of best checkpoint}"

After that I run the downstream stages that depended on the best checkpoint:
dvc exp run {stage-after-train} --downstream

However I think that there should be a better way to automatically "select and apply" the best checkpoint in order to avoid the manual step and allow the pipeline to run end-to-end.

In this case, you not only want to keep an additional metric for the best value, but you might want to save the best model instead of the latest model, similar to the restore_best_weights option in https://keras.io/api/callbacks/early_stopping/. If dvclive could keep track of the best model and save it at each epoch, then it would be trivial to automate that dvc pipeline, and it would save space wasted on worse models.

@dberenbaum wouldn't that mean that we would somehow need to spercify what does "the best" mean?

In this case, you not only want to keep an additional metric for the best value, but you might want to save the best model instead of the latest model, similar to the restore_best_weights option in https://keras.io/api/callbacks/early_stopping/. If dvclive could keep track of the best model and save it at each epoch, then it would be trivial to automate that dvc pipeline, and it would save space wasted on worse models.

If you use dvclive alonside DVC, it kind of already saves the space if you follow the workflow I described above.
dvc exp run saves all models (for example if dvclive.keras integration is used it will create one checkpoint per epoch) but dvc exp apply (user selects which one is the "best")  followed by git commit will delete all the other models and just keep the the selected checkpoint, right?

@dberenbaum wouldn't that mean that we would somehow need to spercify what does "the best" mean?

Yes. At least, it would probably entail specifying the metric to monitor and whether min/max is best.

If you use dvclive alonside DVC, it kind of already saves the space if you follow the workflow I described above.
dvc exp run saves all models (for example if dvclive.keras integration is used it will create one checkpoint per epoch) but dvc exp apply (user selects which one is the "best") followed by git commit will delete all the other models and just keep the the selected checkpoint, right?

Actually deleting the other models requires some additional steps (dvc exp gc and dvc gc), and it doesn't prevent storage from potentially blowing up with poorly performing models in the first place.
Maybe more importantly, keeping only the best model is one way to address the issue you raised:

However I think that there should be a better way to automatically "select and apply" the best checkpoint in order to avoid the manual step and allow the pipeline to run end-to-end.

If dvclive had an option similar to restore_best_weights, the full pipeline could run automatically since the model file from the latest checkpoint would always be the best.

If dvclive had an option similar to restore_best_weights, the full pipeline could run automatically since the model file from the latest checkpoint would always be the best. It also preserves the metrics from epochs after performance started to degrade, unlike the current approach where you lose all information about epochs after the best one.
I'm not sure whether this would be a good idea, but curious to get your thoughts on this workflow @daavoo.

I personally like that workflow more than the checkpoint apply, however I'm not sure what would be the best way to implement it.
On the one hand we could implement all the functionality on the dvclive side; meaning that, in addition to taking care of saving the model (#105) for each integration, we would need to:

Implement the logic for monitoring the best metric
Expose it to the user via configuration, potentially requiring additions on the DVC side (i.e. to the--live namespace).

I think this would have the benefit of leaving us with full control over the implementation.
However, we would probably need to consider how easily users could adapt their code to this workflow and how compatible would be with existing functionality on each integration. For example, if someone is using keras with the ModelCheckpoint and EarlyStopping callbacks and wants to migrate to our hypothetical workflow we should probably suggest them to remove those callbacks in order to work as intended.
This would also mean that, for some integrations, the user will lose functionality as we might not cover as much as the own ML Framework.
On the other hand we could rely on somehow reusing the logic for monitoring the best metric already implemented in each integration, similar to what the mlflow<>keras integration does with the EarlyStopping callback. This would have the benefit for users to easily extend their workflow without removing stuff already implemented in the ML Framework. However this might not be possible in every integration and it would probably significantly increase the effort required to add and maintain integrations.

Great points! Users will probably rather reuse the existing functionality within those ML frameworks, and it fits better with the dvclive ethos of being lightweight and interfering with code as little as possible. It does make the integrations more involved and potentially inconsistent between frameworks, but better to handle this in dvclive than expect users to do it themselves, right?
Existing model checkpoint callbacks already handle storing the best metric value and model weights associated with it:

https://keras.io/api/callbacks/model_checkpoint/
https://pytorch-lightning.readthedocs.io/en/latest/extensions/generated/pytorch_lightning.callbacks.ModelCheckpoint.html#pytorch_lightning.callbacks.ModelCheckpoint

Maybe we can focus on building integrations with existing callbacks.
I can think of a few specific enhancements we could build around summarizing the best values:

ML frameworks assume that overwriting the previous models makes them unrecoverable. DVC makes this constraint obsolete since users can checkout the model from any prior checkpoint. We may want to consider how to utilize DVC's strength here in being able to overwrite previous models but still recover them later. This is similar to the mlflow-keras early stopping integration that you mentioned @daavoo, where instead of only restoring the best weights they log one step with the latest metrics and model and another with the restored metrics and model.
For manual selection of the best model, some advanced sorting or summarization may still be helpful after the fact (see the above suggestion from @dmpetrov). Users can look for best values in multiple ways before deciding which is truly best. Again, DVC's ability to checkout any prior checkpoint makes this easy (although downstream stages still require the clunky --downstream workflow from above).

wandb now has support for something similar: https://docs.wandb.ai/guides/track/log#customize-the-summary.
DVCLive could support something similar with either:

Granular best metrics like live.log("loss", 0.2, keep="min"). This could keep only the min loss instead of the latest loss in the summary metrics.json. Other summary metrics would be recorded with the latest values (or min or max as defined by their log calls).
A single defined objective for the summary like live.make_summary(objective="loss", keep="min"). The difference here is that DVCLive would find the step with the min loss and keep all metrics from that step in metrics.json.

I like the latter since mixing metrics from different steps seems unhelpful to me.


Fixed #30761 -- Prevented floatformat filter from returning a negative zero.

Old behaviour:

floatformat(-0.001, 2)
'-0.00'
floatformat(-0.4, 0)
'-0'

New behaviour:

floatformat(-0.001, 2)
'0.00'
floatformat(-0.4, 0)
'0'

Oh and before I forget, you should add a changelog entry to the 3.1 release 👍

Thanks for the speedy review, and for the suggestion to use Decimal.__bool__ rather than the set, @codingjoe.
I couldn't use d in the if statement, as it's the pre-rounding value, so I made rounded_d and used that.
What do you think?

@countermeasure Thanks for this patch :+1: Welcome aboard :boat:
I moved unrelated tests to a separate commit, pushed minor edits and fixed release notes.

Thanks @codingjoe and @felixxm.
Those changes look good to me :+1:

buildbot


Fix default_storage to be from thumbnail.defaults and not from django

This is because we won't use THUMBNAIL_STORAGE setting here -- OK, by default
it is DEFAULT_FILE_STORAGE, but if we change it, we want to use
THUMBNAIL_STORAGE everywhere.

Could you please elaborate? I'm having a hard time trying to understand the real problem here.

Suppose I want to change THUMBNAIL_STORAGE. I can't now, because in sorl/thumbnail/images.py you were importing django.core.files.storage.default_storage thus overwriting what I set in THUMBNAIL_STORAGE. Proper way is to use sorl.thumbnail.default.storage which is an instance of what I set in THUMBNAIL_STORAGE.

Thank you @CGenie, this is the correct behavior. Sorry about taking to long for merge


use SSE by default.

SSE is supported in Intel and AMD CPU, so we can use it directly.
@iamxy @BusyJay @zhangjinpeng1987

Does this drop support for arm64?

No, ARM is not in our official support.

LGTM

PTAL @andelf

LGTM


Support download of intermediate certificates aka AIA Fetching

We are using okhttp in an react native app and discovered a minor problem for targets that have incomplete certificate chains.
On iOS the app is able to download the missing intermediate certificate itself (not using okhttp obviously) and we would hope this could be possible in the android versions too.
Browsers have built in support to download such certificates transparently.
As an introduction to this problem I suggest this article.
When this might be implemented one could use this site to test the proper behaviour of the new feature:
https://incomplete-chain.badssl.com/
This is how the nodejs guys tackled the problem:
Reference issue in nodejs. https://github.com/request/request/issues/3106

I agree it would be a nice feature. In normal use OkHttp doesn't get involved in this, we leave the certificate validation to the platform stack.  So we'd expect Android to implement this for SSLSession/SSLSocket.
I suspect getting this supported in Google Conscrypt is the clean correct way to do this. https://github.com/google/conscrypt . It would be available via unbundled Conscrypt for all versions, and make its way into the Android platform.
Do you have any examples from JDK or Android HTTP clients that handle this? I didn't see it in Netty, but might have missed it. They have an example of OCSP for servers which is in a similar part of the process.
In theory on Android we could a implement this inside a custom TrustManager, doing synchronous calls to fetch the certificate.
https://github.com/square/okhttp/blob/f8fd4d08decf697013008b05ad7d2be10a648358/okhttp-tls/src/main/kotlin/okhttp3/tls/internal/InsecureAndroidTrustManager.kt
It would be a plaintext request (http) but I think that check is via OkHttp checking the platform network config, so we could make it anyway.
But it makes us responsible for a very critical security implementation, hence hoping we can see if it is something better for Conscrypt?
On JDK I think you can enable com.sun.security.enableAIAcaIssuers https://docs.oracle.com/javase/9/security/java-pki-programmers-guide.htm#JSSEC-GUID-E6E737DB-4000-4005-969E-BCD0238B1566

Example AIA record
https://crt.sh/?id=6094989521
Authority Information Access:
                OCSP - URI:http://ocsp.digicert.com/
                CA Issuers - URI:http://cacerts.digicert.com/DigiCertTLSHybridECCSHA3842020CA1-1.crt

@pke what is the main driver here? Badly configured servers, or changing root CAs on older devices?
Also doesn't look like Node request implemented anything, got closed for going stale.

thanks for the discussion! I just came to okhttp as the default client used in react native apps didn't know about Conscrypt. I just did a little research and it seems this scenario is not handled on Android at all. It is handled in Desktop Java and we enabled it in the JDK for our severs already (as per com.sun.security.enableAIAcaIssuers).

@pke what is the main driver here? Badly configured servers, or changing root CAs on older devices?

The scenario are solely badly configured servers.
iOS seems to handle it automagically already (in react native at least).

But it makes us responsible for a very critical security implementation, so I'd be nervous about implementing it in OkHttp instead of Conscrypt?

If other clients could benefit from that this would definitely be the way to go and not put this security related issue in the hands of okhttp.

Going to close this out and follow along with Conscrypt.  @prbprbprb mentioned this https://bugs.chromium.org/p/boringssl/issues/detail?id=42, which possibly indicates a move away from fetching on incomplete chains.
But I don't think we can justify implementing this critical security feature inside of OkHttp, I don't want to explain the CVE afterwards :)
I suspect, you can technically implement this inside of React Native with a custom TrustManager, but do you really want to be responsible for correctness of the TLS implementation. If it's badly configured servers, there is also the argument that the client failures are a prompt for servers to fix their setup.


rpath and warnings

Hi... when installing the lib, libcltorch.so gets linked with various things (libluaT, libTHCl...), and libclBLAS. Strangely, while all libs are linked with rpath, libclBLAS is not. Any reason for this? [I am running under mac]
Unrelated question: when running (still on mac) the test(), I get a lot of warnings (not critical ones). Does it appear on your development platform?

I dont have access to a mac... I'm tempted to buy one, just to test the build, but so far have not done so... I think that rpath is a mac-specific concept right?  Again, I have no way of playing with rpath to find out what it is, what it does, how it behaves.  Is fixing the mac build something you might have a moment to look into sometime?

Thanks! rpath is unix, but the way it is handled under mac is slightly different than linux. Will look into it, during my spare time :) Should I fix the warnings, too?
Note: except the "libblas not found" (because of rpath) issue, it works like a charm under mac.

Ok.  What warnings are you getting?  By the way, just to check, there are no legal ways for me to run Mac OS X in a vm, is that right?  Or to at least set up an identical build/clang environment?

By the way, I finally found a way of building stuff on Mac :-)  I'm only building DeepCL for now, but the method seems generally applicable https://travis-ci.org/hughperkins/homebrew-test-travis-osx/builds/93269984

Quick update: found that travis can natively build mac os x projects, quite easily in fact, and set up a travis for deepcl at https://travis-ci.org/hughperkins/DeepCL/builds  .  A lot of build warnings should have disappeared now I think?

Hmmm, wrong library, deleted prevoius comment :-P  though I am gradually working on adding unit tests for cltorch travis build too... https://travis-ci.org/hughperkins/cltorch/builds/100137705

Build on mac works ok now https://travis-ci.org/hughperkins/cltorch
=> closing.


Feature: Option to rename item based on fundamental and property runes, materials

A button in the item card that renames the item from the base name (Shortsword) to a name using all runes and materials (+1 Striking Flaming Cold Iron Shortsword) and vice versa by reverting the item to its base. The expanded name could be dynamic (update when runes and materials change) or be static and need updating via the same button.

I'm not sure what's being requested here. Weapons are renamed automatically.

@stwlam I haven't done this in a long time, and yes it does! I apologize for asking for something already developed.


Prime Factorization of a number

Prime Factorization of a number is added under the math folder.

@akhem301
I tested your program and I get some errors:

@akhem301 I added a note in your README


Replaced method get_projects, added new auth header to youtrack.py

I'm not sure that this will fix the subsequent integration logic, since absolutely all endpoints in the old URL are disabled and no longer return data.
But using the get_projects example, you can see that the new youtrack api returns a JSON response.
To test youtrack.py as a standalone module, don't forget to export your environment variables
YT_URL
YT_TOKEN

Replace method init module youtrack.py (_login on env YT_TOKEN)


Add output of ref'd openrpc document for other consumers

This adds a new file to the assembled spec deploy refs-openrpc.json which lets other projects ref parts of it like here.
fixes #70

This is a nice pattern. It'll open things up more for being able to share the schemas across projects.


fix service addressed traffic

service-addressed traffic which doesn't have it's own waypoint shouldn't use a workload attached waypoint and should instead proceed directly to dst ztunnel.

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all


Using tf.keras.utils.image_dataset_from_directory with label list

I have list of labels corresponding numbers of files in directory example: [1,2,3]
train_ds = tf.keras.utils.image_dataset_from_directory(
  train_path,
  label_mode='int',
  labels = train_labels,
#   validation_split=0.2,
#   subset="training",
  shuffle=False,
  seed=123,
  image_size=(img_height, img_width),
  batch_size=batch_size)

I get error:
ValueError: Expected the lengths of labels to match the number of files in the target directory. len(labels) is 51033 while we found 0 files in ../input/jpeg-happywhale-128x128/train_images-128-128/train_images-128-128.
I tried define parent directory, but in that case I get 1 class.

image_dataset_from_directory() takes directories in current path as input labels and then open those files and take the images inside it as data. In your case, it is reading the images/data as classes and trying to open them which is not possible and hence the errors.
I recommend you to use native method, i.e., reading the images label-wise using OpenCV or Pillow and then save it into a numpy array after doing the operations you want to de done to images using OpenCV/Pillow predefined functions. If you do not have the names of the data file in your label list you can use the os module to read them.

@dimka11 Could you please refer to the comment and also let us know if this SO  thread helped ?
Thanks!


[Bug] Toggling "Enable Wifi" switch does not save state

What I saw
https://github.com/user-attachments/assets/1db8e680-cbf0-4e2e-b075-dfcf4d052ff2
Toggle state does not actually apply/persist
What I expect
Toggling actually works

Hello, what did you do at the 4th second?
Did you open multiple web pages and then switch between them?

Hello, what did you do at the 4th second?
Did you open multiple web pages and then switch between them?

I just paused recording to censor out my wifi address. Toggling enable then refreshing the page (hit f5) doesn’t keep it toggled off


Default style properties getting reset if not specified in the hooks

Hey there! First off, absolutely love what you're doing with this library 👏  It's a breath of fresh air and very exciting. I'm a big fan.
One thing I've noticed as I started experimenting. Say I have a button and it has some default styles applied:
/* index.css */
button {
  font-size: 1.25rem;
}

And my hooks definition looks like this:
// css-hooks.ts
const [css, hooks] = createHooks({
  ...recommended,
  "@media (min-width: 1024px)": "@media (min-width: 1024px)",
});

When I specify an override for font-size for a specific hook, but don't include it in the base style overrides, ie:
// App.tsx
<button
  style={hooks({
    background: "aquamarine",
    "@media (min-width: 1024px)": {
      background: "chartreuse",
      fontSize: "2rem",
    },
  })}
>

That property gets reset to browser defaults - not the default styles, as I was expecting.
I'm guessing this happens because of unset?

Is there any way around this? I'm looking to augment a React component library with this, where we have a very kludgy custom prop for specifying overrides. Doing it via style prop with the hooks would be a greatly improved experience, but the benefits would certainly be tainted if users had to specify all style property overrides now, as opposed to just the ones they want.
Would love to hear your thoughts on this, and again thank you for your great work.
Here's a sandbox for reference: https://codesandbox.io/p/sandbox/vigorous-black-dkhzlv

Great question! Indeed, unset is the problem here, but I think that's the best fallback value available today. I believe revert-layer actually has the behavior we're looking for, but it's not widely supported yet. (That said, I just did a quick test in desktop Chrome, Safari, and Firefox, and it seems there is some kind of partial support at least.)
If you're OK with the experimental status of revert-layer, you could do this today:
// App.tsx
<button
  style={hooks({
    background: "aquamarine",
    fontSize: "revert-layer", // explicitly fall back to revert-layer
    "@media (min-width: 1024px)": {
      background: "chartreuse",
      fontSize: "2rem",
    },
  })}
>

Another solution that doesn't depend on revert-layer would be to introduce a custom property in the CSS file that defines the default font size:
button {
  --button-default-font-size: 1.25rem;
  font-size: var(--button-default-font-size);
}

Then, as before, provide an explicit fallback value:
// App.tsx
<button
  style={hooks({
    background: "aquamarine",
    fontSize: "var(--button-default-font-size)",
    "@media (min-width: 1024px)": {
      background: "chartreuse",
      fontSize: "2rem",
    },
  })}
>

Of course, you'll know better than I do whether this provides any benefit over your current state of affairs...

I see - thanks for confirming! Yeah, looks like revert-layer is doing exactly what I'm looking for here.
The problem I have with either approach though is that users would still need to specify that fallback manually, which can get pretty verbose, and is leaking implementation details IMO. But I understand the need. Will have to think about how to tackle this.
Curious, would it be possible to customize what the default fallback value is? Say instead of unset specifying to use revert-layer, that way the default behaviour would do what I'm after, without users having to pass fontSize: "revert-layer" manually.
Something like this?
const [css, hooks] = createHooks({
  ...recommended,
  "@media (min-width: 1024px)": "@media (min-width: 1024px)",
}, {
  fallback: "revert-layer"
});

I love that idea! If you have any interest in contributing, I think it would be a relatively straightforward change: Just search for the two instances of "unset" here and you'll see where the new option would need to be applied. On the other hand, if you're too busy, no worries at all. I'll have a go at it later this afternoon if I don't hear back from you by then.

Oh - fantastic! Happy to hear that. Thank you - I would love to, but won't have time for it this week unfortunately. This isn't a pressing matter, so please don't feel like you have to if there are other priorities - I'd be glad to look at it next week. But I'm happy to hear that a workaround is possible 🙌

I'm curious, your blog post mentions initial instead of unset, what made you switch? Wouldn't inherit solve the issue the same way as revert-layer does? But I'm probably missing something 😄
Great library by the way! Will definitely use it!

Hi @joakimbeng, thanks for your interest and the great question.
First of all, this may be a different context than what you have in mind. The initial value as referenced in my blog post is the basis for the fallback trick that makes this all possible. If you're interested in reading more about that, you can find the relevant CSS spec here.
This issue, on the other hand, is related to the "syntactic sugar" of nested style objects. Consider this example:
{
  color: "blue",
  hover: {
    color: "lightblue"
  }
}

When you apply the css function, the resulting style object will look something like this:
{
  color: "var(--hover-1, lightblue) var(--hover-0, blue)"
}

That's a fairly straightforward transformation, but what about this case?
{
  hover: {
    color: "lightblue"
  }
}

Notice that there's no default color value. What can we use for the --hover-0 fallback value, then?
As you mentioned, we currently use unset in a case like this:
{
  hover: "var(--hover-1, lightblue) var(--hover-0, unset)"
}

The unset keyword doesn't provide exactly the behavior we are probably looking for, hence the discussion of using revert-layer instead. revert-layer would fall back to another user-defined ruleset, like one written in a style sheet.
Unfortunately, revert-layer is experimental.
Hope this helps, and please let me know if it leaves you with any unanswered questions.
By the way @mryechkin, apologies for taking longer than anticipated. It is still on my radar.

Sorry for reviving an old thread and happy to create a new one if needed.
I recently ran into this issue and I wonder if an alternative solution is to look at the css property being styled and using the default value for it instead of relying on 'unset' (not safe in safari) or 'revert-layer' (poor support).
So for font-family it could use inherit or something.

Hi @cly, thanks for reaching out with your concerns.
First, I have a couple of questions for you:

Can you tell me more about unset being unsafe in Safari?
Do you have any findings or resources you can share regarding revert-layer? I had compatibility concerns as well, but Web Platform Tests data seems to indicate pretty wide support.

I would consider adding support for property-specific fallback values, although (to keep the library small), you'd probably need to bring your own logic via configuration, e.g.
const { styleSheet, css } = createHooks({
  hooks: {
    // ...hook config...
  },
  fallback: propertyName => propertyName === "font-family" ? "inherit" : "revert-layer",
});

There was also #59 which might be similar enough that a single generic feature could be added to address both use cases...

Reopened by mistake - a bit prematurely, I think. Let's figure out how to proceed once we have a bit more information.

Regarding safari, I thought it was the same issue as OP but actually I just tested it again and maybe it's different.

Relevant css hook:
light: {
    or: [
      "[data-theme='light'] &",
      {
        and: ["[data-theme='auto'] &", "@media (prefers-color-scheme: light)"],
      },
    ],
  },
  dark: {
    or: [
      "[data-theme='dark'] &",
      {
        and: ["[data-theme='auto'] &", "@media (prefers-color-scheme: dark)"],
      },
    ],
  },

Relevant css():
{
  light: {
    backgroundColor: surface.backgroundColor.hex(),
    color: surface.color.hex(),
  },
  dark: {
    backgroundColor: surface.dark.backgroundColor.hex(),
    color: surface.dark.color.hex(),
  },
}

Generates the following css rule
var(--mbscpo-1, var(--jyjjxp-1, #393939) var(--jyjjxp-0, #ebebeb)) var(--mbscpo-0, var(--jyjjxp-1, #262626) var(--jyjjxp-0, var(--jkmqlp-1, #f5f5f5) var(--jkmqlp-0, unset)))

which works in Chrome but not in safari.

For revert-layer i was looking at https://caniuse.com/mdn-css_types_global_keywords_revert-layer with 3% coverage.

WRT fallbacks, that seems reasonable. Although if revert-layer has wide support, could just use that.

@cly I'm a bit surprised by the Safari issue. The dark mode toggle on the CSS Hooks website is very similar and works fine for me in Safari. What version are you using? If you could please reproduce this in a CodeSandbox environment or similar, I'd be happy to have a look.

Here you go: https://github.com/cly/css-hooks-playground
Actually, it behaves differently (2nd test doesn't seem to work in this repo) than what I have in another repo and I haven't figured it out yet.
Safari (16.1)

Chrome

Actually removing the "and" block seems to work so maybe it's just a bug with the 1.8x way of create the hooks. I haven't tried it on 2.x yet.


how to run it just use source

when I use node bin/index.js --watch db.json ,it doesn't work, the nodejs tell me Cannot find module 'update-notifier'.I should install other module befor I use this server? I can't use the  nmp install -g json-server command line to install this server,the network is limited.

Hi @ikidou,
Yes, update-notifier needs to be installed as well as other dependencies listed in https://github.com/typicode/json-server/blob/master/package.json
You can do so by running npm install from source directory. Can you use it?

Hi，Thanks for your answer，I re-tried again after setting the proxy and with admin privileges, the installation was successful。And The server is working now，Thinks

Great :)


Create a playground for slides.

This is part of #57
We need some space where we could experiment with different approaches for inlining slides.
First thing I would try:

Using https://github.com/gnab/remark
Something for the diagrams

https://github.com/kirjs/ng2-codelab/blob/master/src/app/app-routing.module.ts

Things to investigate besides what's in the slides:

interactive examples/Demos (code + result)
Displaying expected app result in a browser frame (kind of like in the pic below)


useetv(.)com

@intact
I doubt to request to create a plugin for this streaming site useetv(.)com
Because they use Geo-Blocking, But who knows, always there is many ways to do it.
Please take a look this site useetv(.)com, Hopely you could do it.
Thank You So Much.

@intact are still around? Now useetv(dot)com no longer using ip geo blocking if you have time could you fix this plugin to using in streamlink... Thank you so much man..

You can try https://github.com/intact/streamlink/blob/useetv/src/streamlink/plugins/useetv.py but some streams are still geo-blocked.

Hello Intac,
So sorry just checked my email. So sorry for late replied.
Thank You so much, again so very fast respond from you.
The plugin working very good.. Again thank you for your help.
On Thu, Feb 14, 2019 at 3:14 AM intact<EMAIL_ADDRESS>wrote:

You can try
https://github.com/intact/streamlink/blob/useetv/src/streamlink/plugins/useetv.py
but some streams are still geo-blocked.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/chrippa/livestreamer/issues/1387#issuecomment-463571377,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGXqK6ByZ953FvdkOkJNK8oGm8AtbqWkks5vNTcEgaJpZM4JILlc
.

@intac Genius, smart and humble person.  Thank you so much. The plugin work very good. Thanks for fast respond.


New version: GeoThermalCloud v0.1.2

Registering package: GeoThermalCloud
Repository: https://github.com/SmartTensors/GeoThermalCloud.jl
Created by: @montyvesselinov
Version: v0.1.2
Commit: 20f80f17dfb02a553b5bb4aa6b089fae34d25b76
Reviewed by: @montyvesselinov
Reference: https://github.com/SmartTensors/GeoThermalCloud.jl/commit/20f80f17dfb02a553b5bb4aa6b089fae34d25b76#commitcomment-49779393

@montyvesselinov the package is missing a license file
[noblock]

@montyvesselinov this is still missing a license file
[noblock]


Add support to run custom scripts

What changes were proposed in this pull request?

Added a way to run custom shell scripts.
Resolves #390
Conditional livenessProbe has also been added in case the custom script interrupts in the detection of the pod failure.
For example:
A shell script that checks for the connector endpoint to be ready first "infinitely" and once available sends POST requests to create connectors. Scripts like these can take a long time as the connector container tries to the Kafka-broker endpoint. load config etc. In case Kafka-brokers (i.e. "kafka.bootstrapServers") are unavailable, pod should restart but now it would not because their is a script running infinitely or for a long time producing informational messages until the endpoint is ready.
To avoid such conditions, livenessProbe comes to rescue which starts the container if the connect endpoint is not ready for a specified period of time and livenessProbe fails
A sample script has been provided in "cp-helm-charts/examples/create-connectors.sh" which can be really useful to the users who would like to automate the step of creating the connectors.

How is this PR useful?

Users will be able to write simple bash scripts and run them while deploying in order to perform various tasks like creating connectors

A script like below can be a good example:
echo "Waiting for Kafka Connect to start listening on kafka-connect  "
while :; do
    # Check if the connector endpoint is ready
    # If not check again
    curl_status=$(curl -s -o /dev/null -w %{http_code} http://localhost:8083/connectors)
    echo -e $(date) "Kafka Connect listener HTTP state: " $curl_status " (waiting for 200)"
    if [ $curl_status -eq 200 ]; then
        break
    fi
    sleep 5
done

echo "======> Creating connectors"

# Send a simple PUT request to create/modify the connector
curl -X PUT \
  http://$CONNECT_REST_ADVERTISED_HOST_NAME:8083/connectors/sample-connector/config \
  -H "Content-Type: application/json" \
  --data '{
      "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
      "tasks.max": 1,
      "connection.url": "jdbc:mysql://<IP_ADDRESS>:3306/test_db?user=root&password=pass",
      "mode": "incrementing",
      "incrementing.column.name": "id",
      "timestamp.column.name": "modified",
      "topic.prefix": "sample-connector-",
      "poll.interval.ms": 1000
  }'

This bash script is inspired by this comment on one of the confluentinc/cp-docker-images issues.

How was this patch tested?

helm install and helm upgrade were used to deploy and upgrade this patch on GKE (1.14.10-gke.17)
kubectl logs command was used to make sure that the custom is running successfully

NOTE:

Refer to the values.yaml file and this PR to mount and run an external script from inside the container.

@confluentinc It looks like @amit-k-yadav just signed our Contributor License Agreement. :+1:
Always at your service,
clabot

This helped me out a lot, thank you very much!

This helped me out a lot, thank you very much!

Glat that I could help. I am waiting for this to be merged in the master.

This is one piece of the puzzle but the chart doesn't offer any way to get the script into the container.
Did you create a custom image or is there something I'm overlooking?
Since values.yaml doesn't give the user the option to create a custom configmap we need some hacks to get this going.

Hi @joekohlsdorf , there is actually a way to get a script mounted inside the container without using a custom Dockerfile.
This pull request deals with creating secrets and mounting volumes.
Below is a simple example showing how one can create their own custom script, mount the same inside the container and execute it without modifying the Dockerfile or the chart.
...

# Creating secret with a random command
secrets:
    externalScript: |-
        #!/bin/bash
        echo "Script executed"

# Mounting this secret as a file inside the container
volumes:
  - name: external-script
    secret:
      secretName: secret-with-shell-script
      items:
        - key: externalScript
          path: external-script.sh
          mode: 0755
volumeMounts:
  - name: external-script
    mountPath: /tmp/scripts/external-script.sh
    readOnly: true
    subPath: external-script.sh

# Setting the variable to run the script
customEnv:
    CUSTOM_SCRIPT_PATH: /tmp/scripts/external-script.sh
...

See this line in deployment.yaml that is responsible for running the script before executing the container command.
Please try the above, and let us know here if you still have some doubts or queries. :smile:

Sure, that is an option but it feels extremely hacky. Common practice is to use a configmap instead of a secret to do this.

@joekohlsdorf I agree. But in my case, I wanted the script to be a secret. As you can see there can be some really sensitive content in the script like below:
"connection.url": "jdbc:mysql://<IP_ADDRESS>:3306/test_db?user=root&password=pass",

I would just have the secret as a secret:
"connection.url": "${MYSQL_CONNECTION_URL}",

thank you @amit-k-yadav this helps a lot.

@joekohlsdorf I agree. But in my case, I wanted the script to be a secret. As you can see there can be some really sensitive content in the script like below:
"connection.url": "jdbc:mysql://<IP_ADDRESS>:3306/test_db?user=root&password=pass",

@joekohlsdorf The security issue with putting the secret value directly in the worker confi

Is the livenessProbe expected to be within the Values.customEnv.CUSTOM_SCRIPT_PATH if?

Is the livenessProbe expected to be within the Values.customEnv.CUSTOM_SCRIPT_PATH if?

Yes. You can mount your script anywhere in the container, and provide that path using this variable.

Is the livenessProbe expected to be within the Values.customEnv.CUSTOM_SCRIPT_PATH if?

Yes. You can mount your script anywhere in the container and provide the path using this variable.


Github doc publish secret naming

https://github.com/treeform/nimtemplate/commit/ccbdc0421bcd29b0f4c3d7ad530fd4facd3b33e9
The docs step uses the "GITHUB_TOKEN" secret. However when I try to manually create this secret in the github UI, I get an error that the token cannot start with GITHUB. GH_TOKEN works fine however.

Whelp, no I just didn't do enough digging. there's actually a setting to allow the provided GITHUB_TOKEN permissions for pages.  This should probably be mentioned somewhere.


Changes for Fedora 5.0.0

Related to https://github.com/Islandora-CLAW/CLAW/issues/966
Associated PRs:

https://github.com/Islandora-CLAW/Syn/pull/14
https://github.com/Islandora-Devops/ansible-role-fcrepo/pull/3
https://github.com/Islandora-Devops/ansible-role-fcrepo-syn/pull/6

This PR adds the configuration parameters to use Fedora 5 and along with https://github.com/Islandora-CLAW/islandora_demo/pull/10 allows the admin user to push objects to Fedora by default.
There is an outstanding issue where Taxonomy terms don't get synced to Fedora, it is being tracked at https://github.com/Islandora-CLAW/CLAW/issues/988
How to test

Pull down this PR.
Delete the below role directories

./roles/external/Islandora-Devops.fcrepo
./roles/external/Islandora-Devops.fcrepo-syn

Apply this patch to your claw-playbook.
Run vagrant up --no-provision
Run ansible-galaxy install --roles-path=roles/external --role-file=requirements.yml
Edit the file ./roles/external/Islandora-Devops.fcrepo-syn/tasks/install.yml

Edit line 12 to be url: https://github.com/whikloj/Syn/releases/download/v{{ fcrepo_syn_version }}/islandora-syn-{{ fcrepo_syn_version }}-all.jar

Run ansible-playbook -i inventory/vagrant -u vagrant -e 'islandora_distro=ubuntu/xenial64' playbook.yml

Once it comes up your should have a fully functional Islandora.
But if you try to PUT directly to Fedora without a valid JWT or static token you will be denied.
> curl -i -XPUT http://localhost:8080/fcrepo/rest/forbid
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1068
Date: Fri, 14 Dec 2018 21:06:35 GMT

<!DOCTYPE html><title>Apache Tomcat/8.0.32 (Ubuntu) - Error report</title>
HTTP Status 401 - Token authentication failed.

type Status report

message Token authentication failed.

description This request requires HTTP authentication.

Apache Tomcat/8.0.32 (Ubuntu)
%

> curl -i -XPUT http://localhost:8080/fcrepo/rest/forbid -H"Authorization: Bearer bob"
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1068
Date: Fri, 14 Dec 2018 21:06:46 GMT

<!DOCTYPE html><title>Apache Tomcat/8.0.32 (Ubuntu) - Error report</title>
HTTP Status 401 - Token authentication failed.

type Status report

message Token authentication failed.

description This request requires HTTP authentication.

Apache Tomcat/8.0.32 (Ubuntu)
%

> curl -i -XPUT http://localhost:8080/fcrepo/rest/forbid -H"Authorization: Bearer islandora"
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Cache-Control: private
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Set-Cookie: JSESSIONID=5E033FE18EFCEE1B60FC6AB3F7308A92; Path=/fcrepo/; HttpOnly
Set-Cookie: rememberMe=deleteMe; Path=/fcrepo; Max-Age=0; Expires=Thu, 13-Dec-2018 21:06:51 GMT
ETag: W/"eb893e43e9a05ccdde02b141dd50d0382452010e"
Last-Modified: Fri, 14 Dec 2018 21:06:51 GMT
Link: <http://localhost:8080/fcrepo/rest/forbid>; rel="timegate"
Link: <http://localhost:8080/fcrepo/rest/forbid>; rel="original"
Link: <http://localhost:8080/fcrepo/rest/forbid/fcr:versions>; rel="timemap"
Link: <http://mementoweb.org/ns#OriginalResource>; rel="type"
Link: <http://mementoweb.org/ns#TimeGate>; rel="type"
Link: <http://localhost:8080/fcrepo/rest/forbid/fcr:acl>; rel="acl"
Location: http://localhost:8080/fcrepo/rest/forbid
Content-Type: text/plain
Content-Length: 40
Date: Fri, 14 Dec 2018 21:06:51 GMT

http://localhost:8080/fcrepo/rest/forbid

@Islandora-Devops/committers @dannylamb

@whikloj will test over the weekend.

All went well up to setp 7, where the Drupal installation failed, from what I can tell at You are about to DROP all tables in your 'drupal8' database.:
TASK [geerlingguy.drupal : Install Drupal with drush.] **********************************************************************
Sunday 16 December 2018  09:25:21 -0800 (0:00:00.040)       0:07:05.081 *******
fatal: [default]: FAILED! => {"changed": true, "cmd": ["/var/www/html/drupal/vendor/drush/drush/drush", "site-install", "standard", "-y", "--root=/var/www/html/drupal/web", "--site-name=Islandora-CLAW", "--account-name=admin", "--account-pass=islandora"<EMAIL_ADDRESS>"delta": "0:00:01.374657", "end": "2018-12-16 17:25:21.455944", "msg": "non-zero return code", "rc": 1, "start": "2018-12-16 17:25:20.081287", "stderr": " [notice] Starting Drupal installation. This takes a while. Consider using the --notify global option.\n\nIn install.core.inc line 2280:\n                                                           \n  File system: Writable (public download method)  \n                                                           \n  Array                                                    \n                                                           \n\nsite:install [--db-url DB-URL] [--db-prefix DB-PREFIX] [--db-su DB-SU] [--db-su-pw DB-SU-PW] [--account-name [ACCOUNT-NAME]] [--account-mail [ACCOUNT-MAIL]] [--site-mail [SITE-MAIL]] [--account-pass ACCOUNT-PASS] [--locale [LOCALE]] [--site-name [SITE-NAME]] [--site-pass SITE-PASS] [--sites-subdir SITES-SUBDIR] [--config-dir CONFIG-DIR] [--existing-config] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--notify [NOTIFY]] [--druplicon] [--xh-link XH-LINK] [--] <command> [<profile>]...", "stderr_lines": [" [notice] Starting Drupal installation. This takes a while. Consider using the --notify global option.", "", "In install.core.inc line 2280:", "                                                           ", "  File system: Writable (public download method)  ", "                                                           ", "  Array                                                    ", "                                                           ", "", "site:install [--db-url DB-URL] [--db-prefix DB-PREFIX] [--db-su DB-SU] [--db-su-pw DB-SU-PW] [--account-name [ACCOUNT-NAME]] [--account-mail [ACCOUNT-MAIL]] [--site-mail [SITE-MAIL]] [--account-pass ACCOUNT-PASS] [--locale [LOCALE]] [--site-name [SITE-NAME]] [--site-pass SITE-PASS] [--sites-subdir SITES-SUBDIR] [--config-dir CONFIG-DIR] [--existing-config] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--notify [NOTIFY]] [--druplicon] [--xh-link XH-LINK] [--] <command> [<profile>]..."], "stdout": "\n // You are about to DROP all tables in your 'drupal8' database. Do you want to \n // continue?: yes.                                                             ", "stdout_lines": ["", " // You are about to DROP all tables in your 'drupal8' database. Do you want to ", " // continue?: yes.                                                             "]}
	to retry, use: --limit @/home/mark/Documents/hacking/vagrants/claw-playbook/playbook.retry

I reran ansible as recommended:
ansible-playbook --limit @/home/mark/Documents/hacking/vagrants/claw-playbook/playbook.retry -i inventory/vagrant -u vagrant -e 'islandora_distro=ubuntu/xenial64' playbook.yml

but got the same result. My Drupal now shows the default installation page. Here's the recap:
Sunday 16 December 2018  09:33:32 -0800 (0:00:01.047)       0:06:32.896 *******
===============================================================================
geerlingguy.drupal : Install dependencies with composer require (this may take a while). --------------------------- 322.30s
install extra packages ubuntu ---------------------------------------------------------------------------------------- 6.63s
geerlingguy.php : Ensure configuration directories exist. ------------------------------------------------------------ 2.65s
geerlingguy.solr : Ensure dependencies are installed. ---------------------------------------------------------------- 2.17s
geerlingguy.php : Ensure APCu config file is present. ---------------------------------------------------------------- 2.16s
geerlingguy.php : Ensure OpCache config file is present. ------------------------------------------------------------- 2.15s
geerlingguy.php : Place PHP configuration file in place. ------------------------------------------------------------- 2.13s
install aptitude ----------------------------------------------------------------------------------------------------- 1.80s
geerlingguy.php : Check for existing APCu config files. -------------------------------------------------------------- 1.46s
geerlingguy.php : Check for existing OpCache config files. ----------------------------------------------------------- 1.43s
geerlingguy.solr : Apply Solr configuration changes. ----------------------------------------------------------------- 1.35s
gather facts --------------------------------------------------------------------------------------------------------- 1.13s
geerlingguy.drupal : Install Drupal with drush. ---------------------------------------------------------------------- 1.05s
geerlingguy.solr : Remove the downloaded Solr archive. --------------------------------------------------------------- 0.98s
Gathering Facts ------------------------------------------------------------------------------------------------------ 0.96s
geerlingguy.apache : Enable Apache mods. ----------------------------------------------------------------------------- 0.94s
geerlingguy.mysql : Copy my.cnf global MySQL configuration. ---------------------------------------------------------- 0.91s
Gathering Facts ------------------------------------------------------------------------------------------------------ 0.82s
Gathering Facts ------------------------------------------------------------------------------------------------------ 0.82s
geerlingguy.java : Ensure Java is installed. ------------------------------------------------------------------------- 0.79s

Did I miss a step somewhere?

FYI I stashed the changes to claw-playbook, checked out the master branch, and reran ansible-playbook -i inventory/vagrant -u vagrant -e 'islandora_distro=ubuntu/xenial64' playbook.yml with the same result.

@mjordan @whikloj Spinning one up now to see if I can reproduce.

@mjordan Mine's not done yet, but it has successfully made it past installing drupal with drush.  Not sure which step you could've missed that would affect that particular command, though.  If all else fails, maybe re-clone it down from github so you know your claw-playbook directory is fresh.  I had to do that a couple of weeks ago.

@dannylamb OK, will try, thanks.

@whikloj :champagne: Works.  I don't have the taxonomy terms in Fedora because of https://github.com/Islandora-CLAW/CLAW/issues/988, but I just made an image and it got sent to Fedora and derivatives were made.  I also tested it through the command line like you suggested and things worked as expected.
How should we proceed here?  Merge and slice versions for the roles, then the same for Syn.  Then this?

I think this definitely goes last, because I could add a final commit updating the requirements.yml to the correct versions. Other than that, the order is not as important.
One thing I did notice is that I didn't update the syn-settings.xml with the ansible-role-crayfish to include the header attribute. It is not needed in Crayfish, but does make that syn-settings appear different from the one in Syn.
Should I add a PR to it to add a value (maybe a default "no-used") for the header attribute on that role?

Ninja'd by @dannylamb, but I did get it to install after recloning claw-playbook into a clean directory. Passes all smoke tests outlined above.

@whikloj For uniformity and clarity, sure, but that can be done after we pull in the working code :+1:

@whikloj I'll merge as soon as you update requirements.yml to point to all the new versions I just sliced for Syn, ansible-role-fcrepo, and ansible-role-fcrepo-syn.

Bumped the versions and added the --userid option for the migration. My test worked, but you all give it a run too.

@whikloj Will do.  Thx for adding the --userid param :heart:

Renamed from 0.3.0 to v0.3.0 and am reprovisioning now

...and we should take note of that naming conventions so I don't derp this up again.

Looks good.  Tags were in Fedora from the migration that ansible ran.  Could make objects and got derivatives. :+1:


Deployment().location should be allowed as a value in Microsoft.Resources/deployments

When using bicep to perform a subscription scoped deployment through a module, the arm template uses the deployment().location for the location property in resource type 'Microsoft.Resources/deployments'
This is touched on in this github issue
Based on the discussion in the above link, and given the nature of bicep modules, I recommend that the 'Location Should Not Be Hardcoded' test accepts "location": "[deployment().location]" for resources of type 'Microsoft.Resources/deployments'
I am not aware of a way to not use the deployment().location when performing nested subscription scoped deployments with bicep.
To repro:
main.bicep:
// Budget params
param budgetAmount int
param budgetActualThreshold int
param budgetForecastThreshold int
param budgetStartDate string

module budget 'budget.bicep' = {
  name: 'budgetDeploy'
  params: {
    amount: budgetAmount
    actualThreshold: budgetActualThreshold
    forecastThreshold: budgetForecastThreshold
    startDate: budgetStartDate
  }
}

budget.bicep:
targetScope = 'subscription'

// When creating a budget (not when updating) the budget startDate must be within the current month
param startDate string
// The total amount of cost or usage to track with the budget
param amount int
// Threshold values associated with notifications.
// a notification is sent when the threshold is exceeded.
// It is always percent and has to be between 0 and 1000.
param forecastThreshold int
param actualThreshold int
param contactEmails array = [
]
param contactRoles array = [
  'Owner'
  'Contributor'
]
param contactGroups array = [
]

resource budget 'Microsoft.Consumption/budgets@2021-10-01' = {
  name: 'budget-${subscription().displayName}'
  properties: {
    timePeriod: {
      startDate: startDate
    }
    timeGrain: 'Monthly'
    amount: amount
    category: 'Cost'
    notifications: {
      NotificationForExceededBudget1: {
        enabled: true
        operator: 'GreaterThan'
        threshold: forecastThreshold
        thresholdType: 'Forecasted'
        contactEmails: contactEmails
        contactRoles: contactRoles
        contactGroups: contactGroups
      }
      NotificationForExceededBudget2: {
        enabled: true
        operator: 'GreaterThan'
        threshold: actualThreshold
        contactEmails: contactEmails
        contactRoles: contactRoles
        contactGroups: contactGroups
      }
    }
  }
}

For the life of me, I thought we fixed that...
@StartAutomating - deployment().location should be allowed on a resourceType of Microsoft.Resources/deployments

merged the fix, but we need a test case for it...

test case added


Add Dushyant to Contributors list

@dushyantRathore, I'm quite elated about your PR. I wanna evolve this project to addresses various problems faced by first-time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a PR and learned that I merged it?


Vagrant File network settings

The network settings in the Vagrant File is not working for mac users. I think there was a wrong commit made to it on the network configuration
net_ip = "192.168.50"
The vagrant error shows it has to be  56.0/21 so please change the VagrantFile to have the right IP range
correct one
net_ip = "192.168.56"

Have you tested it with that change?
Can you copy and paste the exact error output you're seeing?
Thanks!

I do not see that IP stump, but an added .1. Though I also have an error during vagrant up after a fresh clone of this repo:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "ipconfig", "vboxnet3", "--ip", "<IP_ADDRESS>", "--netmask", "<IP_ADDRESS>"]

Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

vagrant: 2.2.6
virtualbox: 6.1.32_Ubuntu r149290
OS: Tuxedo (basically an Ubuntu 22/04)

If we the ip range is on 192.168.50 i get the following error.

ababu@ZALANDO-61522 salt-vagrant-demo % vagrant up
Bringing machine 'master' up with 'virtualbox' provider...
Bringing machine 'minion1' up with 'virtualbox' provider...
Bringing machine 'minion2' up with 'virtualbox' provider...
==> master: Checking if box 'generic/ubuntu2004' version '3.6.14' is up to date...
==> master: Clearing any previously set forwarded ports...
==> master: Clearing any previously set network interfaces...
The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.
Address: <IP_ADDRESS>
Ranges: <IP_ADDRESS>/21
Valid ranges can be modified in the /etc/vbox/networks.conf file. For
more information including valid format see:
https://www.virtualbox.org/manual/ch06.html#network_hostonly
ababu@ZALANDO-61522 salt-vagrant-demo % vi Vagrantfile
ababu@ZALANDO-61522 salt-vagrant-demo % grep "net_ip =" Vagrantfile
net_ip = "192.168.50"
ababu@ZALANDO-61522` salt-vagrant-demo %

After changing the net_ip value to "192.168.56." the issue is resolved and vagrant is getting nodes up and running.

I'm using an Intel MacBook Pro.

Regards,
Akhilesh

Hm. I just upgraded my virtualbox install.  I had 5.x and I upgraded to 6.1.x  (latest) and I'm getting the same error as you.

Virtualbox 6.1.x defaults to a 192.168.56 ip address range.
I just pushed the fix for this.
Thanks @najnuk86 for reporting this!

@UtahDave : You are welcome :)

This fixes it also for my case. Thank you.


Round trip calculation

I've been working on a simple round trip calculation in the last days and the results are not perfect yet but okayish. The method is using an alternative route calculation under the hood so as a side effect we have now basic alternative route calculation support, see the alternate_route branch.
The UI is not yet adapted only a rough workaround can make the round trip and/or the alternatives working there:

checkout and build graphhopper and start graphhopper web
Provide two locations, where only the first one is actually necessary and the additional api.round_trip.max=1 parameter e.g. this link
The alternative route calculation needs a similar parameter api.alternatives.max=1, multiple alternatives are returned using multiple Paths leading to a strange additional green line in the UI

Still do be done for round trip:

[x] update to latest master
[ ] filter round trips by the enclosing area
[x] fix UI

In another issue we then improve alternative routes:

[ ] calculate 'share' to improve quality
[x] breaking change for GraphHopper.route necessary where we return List<AlternativeRoute> and every AlternativeRoute is holding multiple Paths
[ ] add a similar penalty method that we are already using for round trip calculation
[ ] fix UI

Later we also need:

[ ] improve performance
[ ] do this for edge based traversal
[ ] do this for CH

Closing due to #640


[BUG] (Android) Commissioning to a custom fabric, FindOperational fails with CHIP Error 0x00000054: Invalid CASE parameter

Reproduction steps
I have added the Wi-Fi socket that I'm attempting to commission to a custom fabric. I've got self-signed RCAC and use it to provide a NOC during commissioning.  The NOC generation is completed.
Attempts to establish CASE
Sent Sigma3 msg.
Fails with  Error on commissioning step 'FindOperational': 'src/protocols/secure_channel/CASESession.cpp:1918: CHIP Error 0x00000054: Invalid CASE parameter'
Any provide a proper solution how to resolve?.
Attached the both App side and device firmware side logs
CASE_Session_failure.txt
below for references.
Matter Device App Side Log.txt
Bug prevalence
hour
GitHub hash of the SDK that was being used
https://github.com/project-chip/connectedhomeip/commit/8f66f4215bc0708efc8cc73bda80620e67d8955f
Platform
android
Platform Version(s)
No response
Anything else?
No response

It looks like you issued a separate certificate including the NOC. Did you add the rootCA and NOC (Optional ICA) correctly? I think we need to look at the certificate to be able to analyze it.


Prevent sending Authorization header to other than the original host

It's an easy fix and really important (from my perspective) - mainly for security reasons.

This should not happen at all if you scope your creds. Did you do that?

Ah, ok. Thanks!


Configuring Method Level Caching for API Gateway for Individual Endpoint with Path Variable is Not Working

I'm trying to use SAM to configure API gateway caching for a specific end point with a path variable.  My endpoint is /content.  It works perfectly if I leave my endpoint as just /content (without a path variable) but, what I want to do is /content/{language}.  The SAM template config for my API GW look like this
MyApi:
    Type: AWS::Serverless::Api
    Properties:
      CacheClusterEnabled: true
      CacheClusterSize: "0.5"
      MethodSettings: [{
        CachingEnabled: true,
        CacheTtlInSeconds: 300,
        ResourcePath: "/content/*",
        HttpMethod: "GET"
      }]
      ...

The goal is to cache the same content for several languages. For whatever reason the wild card is not working...I have tried all of the following:
ResourcePath: "/content/*"
ResourcePath: "/~1content~1*"
ResourcePath: "~1content~1*"

I have used this link as guidance in configuring: https://github.com/awslabs/serverless-application-model/releases
To determine whether this works, I take a look at the API GW after deploying to CF and see that the basic top level setting is correct but the  Override for this method radio button is not selected.  Again this does acutally work when the endpoint is simply /content (method is overridden etc) just not when I try to configure the  ResourcePath as /content/*

Have now also tried:
ResourcePath: "/content/{language}"

Looks like this needs to be: ~1content~1{language}/POST. You can obviously swap POST out for any method you need. You may also be able to specify * in place of POST but I haven't confirmed this.

How to enable api gateway cache ttl using methodSettings ? I am using this in template yaml but it does not work, it is not enabling caching at method level. Any thing missing here. Please help.
  CacheClusterEnabled: true
  CacheClusterSize: "1.6"
  MethodSettings:
     - ResourcePath: "/*"
       CachingEnabled: true
       CacheTtlInSeconds: 600
       HttpMethod: "GET"

@sjain2015 Maybe try setting the resource path specifically for endpoints. Although thats not practical if you have a lot of API endpoints. But for us specifying the endpoint in the resourcepath attribute worked, and as methodsettings is a list you can add more than one endpoint.

Thanks, this has worked for me. I wish to enable api gateway caching for all the endpoints. Is it possible to do in some way using sam template ?

@sjain2015 I can't comment about when (or even how) you can do it with the sam template. Although if you want to do it without manually writing it for each endpoint, I would suggest you to use a templating engine like jinja2. It should ease the manual job, although I would also like to have something like the wildcard to apply to all endpoints. But unless that's done, we are using jinja for it.


index term fonts/special markup not supported

I am generating an index for documentation, and some of my terms are programming symbols (such as macros).  In my main document I mark these up with literals, but the markup does not carry over to the index itself, where these symbols are represented using the normal body font.
I'd like these to be marked up with the monospace/literal font that I use everywhere else, if possible, when in the index.

We're intentionally stripping the terms down to plain text to make it easier to sort and render. This assumption is baked deep into the handling of the index terms. If you can figure out how to make it work while preserving the formatting, feel free to submit a patch. However, to me it's not always clear what to sanitize and what to leave as is. There's a lot of nuance once you start to allow formatting. So the first step is to define what should be preserved and what should be stripped.

Fair enough.  I'm finding that this limitation isn't as big a deal as I once assumed it would be.

Ahh. I was coming to open a ticket, but thought I should check first. Your reasoning makes sense.
What if...any given index term is translated into some value object. That value object would hold two values, the original and the sanitized version. That sanitized version could simply be a function, making that property virtual. Use one to perform all sorting and collating, but then grab the original format when it's time to drop it in place.
WDYT @mojavelinux?

Thanks for giving me that idea, @gregturn! That turns out to be exactly what I needed to do. In fact, it has made the code easier to implement because we actually want the parsed version of the text instead of the sanitized version. Why? Because the parsed version gives us the sanitized version too. So it's perfect.
I submitted PR #2238 to implement this enhancement.


change all instance of SPECIALREQUEST to SPECIAL_REQUEST

help review bbs <3

Codecov Report

Merging #183 (43fdd10) into master (265c86b) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master     #183   +/-   ##
=========================================
  Coverage     74.33%   74.33%
  Complexity     1254     1254
=========================================
  Files           167      167
  Lines          3854     3854
  Branches        511      511
=========================================
  Hits           2865     2865
  Misses          840      840
  Partials        149      149

Impacted Files
Coverage Δ

...edu/address/logic/commands/AddCustomerCommand.java
100.00% <ø> (ø)

...du/address/logic/commands/EditCustomerCommand.java
85.55% <ø> (ø)

...address/logic/parser/AddCustomerCommandParser.java
100.00% <100.00%> (ø)

...ain/java/seedu/address/logic/parser/CliSyntax.java
94.73% <100.00%> (ø)

...ddress/logic/parser/EditCustomerCommandParser.java
89.13% <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 265c86b...43fdd10. Read the comment docs.