Fix GPT-NeoX inference

GPT-NeoX inference seems a little... funky, as reported by @LLukas22:
1: <|padding|>The meaning of life is the name.
“I was doing this for a while, and I knew it could make an impact,” says Coker about his time in college football coaching roles at North Carolina State University (NCSU) from 2004 to 2013 before going on to be head coach – again! -of NEC Conference’s Delaware Division of Basketball.
But then came the 2016-17 season, when he became a first year assistant for UNC women's basketball under Hall Of Fame Head Coach Sylvia Hatchell where Coker helped in leading her team through an historic NCAA National Championship run that saw them defeat Notre Dame

2: <|padding|>The meaning of life is the only way to be, or not at least a partialwayto-ofex: part_LATEX LAC PARTICIELPARTISTCORLECRECLPINORTHCAREBUT)
(Photo by Alex Wong/Getty Images), (Source: AP Photo / Evan Vucci)(AP Photos): President Barack Obama speaks about the proposed Keystone XL pipeline in Washington. A judge has given TransCanada Corp permission to build a controversial oil sands project that would cross an international border and run through US-owned land — but it was not clear Monday how long he will keep his word.(Photo by Evan Vucci/AP)
(Source: AP Photo / John Minchillo)(Reuters): Democratic presidential candidate Hillary Clinton holds up the key to a new office in her New York home. As she ha

3.<|padding|>The meaning of life is a short-post, post by an easy to use and detailed?PostByGetAButContinueEcheLIfYouTWhatIsIt?HowToBeginAfterGAtthes the details are too long for you (or just)
I’m not going anywhere. I am here forever; so it seems as if there is no end in sight—that life has run its course and that we will be back again at a later time to finish what was started, but our destiny? Maybe this story isn't over yet: After all the world keeps turning

This was captured with a RedPajama model.

The models i tested with will be uploaded to the following HF-Repos:
RedPajama 3B (GGML + GGJT  versions): https://huggingface.co/LLukas22/redpajama-ggml
Gpt-Neox-20b (GGML only): https://huggingface.co/LLukas22/gpt-neox-ggml


Update ktlint-gradle plugin info in README.

"The very first ktlint gradle plugin" doesn't reflect what plugin actually supports and do.

Thank you! :+1:


Quarkus runner jar is never rebuilt on layered kits

When building a new kit, the runner jar is not replaced and this causes issue.
E.g. When switching from an integration written in groovy (-t quarkus.enabled=true) to one written in Java, the groovy configuration is kept in the runner and we have a runtime problem.
Exception in thread "main" java.lang.ExceptionInInitializerError
  at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:27)
Caused by: java.lang.RuntimeException: Failed to start quarkus
  at io.quarkus.runner.ApplicationImpl.<clinit>(ApplicationImpl.zig:358)
  ... 1 more
Caused by: java.lang.ClassNotFoundException: org.apache.camel.language.groovy.GroovyLanguage
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at io.quarkus.deployment.steps.Core$factoryFinderResolver18.deploy_0(Core$factoryFinderResolver18.zig:158)
  at io.quarkus.deployment.steps.Core$factoryFinderResolver18.deploy(Core$factoryFinderResolver18.zig:36)
  at io.quarkus.runner.ApplicationImpl.<clinit>(ApplicationImpl.zig:304)
  ... 1 more

Reproducer:
kamel reset
kamel init one.groovy
kamel run one.groovy -t quarkus.enabled=true -w
kamel delete one
kamel init Two.java
kamel run Two.java -t quarkus.enabled=true --logs


[ci:component:github.com/gardener/egress-filter-refresher:0.5.0->0.6.0]

Release Notes:
Container images are now built and published also for `arm64` platforms.

/close in favour of https://github.com/gardener/gardener-extension-shoot-networking-filter/pull/21.


Added MOF descriptions to all resources

@camiloborges @anlynes @caadam @ykuijs Tagging for a code review guys, help a brother out!

Added some comments for typo's and some off topic questions about missing Ensure parameters for several Service Applications. Probably not the correct place to correct them, but did want to mention them :-)


Support for RFC 3339 validation

Adds IsRFC3339 function for checking if string is matching RFC 3339 spec.

This change is

Hi @yezooz,
I have a suggestion for this validator. Rather than relying on regexp, you can use the time.Parse() function from stdlib to validate for RFC3339.
Let me know what you think.
Here's a benchmark and some example code I threw together.
You can see from the benchmarks it's roughly twice as fast:
10:37 $ go test -v -bench .
=== RUN   TestIsRFC3339
=== RUN   TestIsRFC3339New
--- PASS: TestIsRFC3339 (0.00s)
--- PASS: TestIsRFC3339New (0.00s)
BenchmarkIsRFC3339-8      	  200000	      6078 ns/op
BenchmarkIsRFC3339New-8   	  500000	      3281 ns/op
PASS
ok  	github.com/bbrks/tmp	2.958s

main.go
package main

import (
	"regexp"
	"time"
)

var rxRFC3339 = regexp.MustCompile(`^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([\+|\-]([01][0-9]|2[0-3]):[0-5][0-9]))$`)

func IsRFC3339(str string) bool {
	return rxRFC3339.MatchString(str)
}

func IsRFC3339New(str string) bool {
	_, err := time.Parse(time.RFC3339, str)
	return err == nil
}

main_test.go
package main

import "testing"

var tests = []struct {
	param    string
	expected bool
}{
	{"2016-12-31 11:00", false},
	{"2016-12-31 11:00:00", false},
	{"2016-12-31T11:00", false},
	{"2016-12-31T11:00:00", false},
	{"2016-12-31T11:00:00Z", true},
	{"2016-12-31T11:00:00+01:00", true},
	{"2016-12-31T11:00:00-01:00", true},
	{"2016-12-31T11:00:00.05Z", true},
	{"2016-12-31T11:00:00.05-01:00", true},
	{"2016-12-31T11:00:00.05+01:00", true},
}

func TestIsRFC3339(t *testing.T) {
	t.Parallel()
	for _, test := range tests {
		actual := IsRFC3339(test.param)
		if actual != test.expected {
			t.Errorf("Expected IsRFC3339(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestIsRFC3339New(t *testing.T) {
	t.Parallel()
	for _, test := range tests {
		actual := IsRFC3339New(test.param)
		if actual != test.expected {
			t.Errorf("Expected IsRFC3339(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func BenchmarkIsRFC3339(b *testing.B) {
	for i := 0; i < b.N; i++ {
		for _, test := range tests {
			IsRFC3339(test.param)
		}
	}
}

func BenchmarkIsRFC3339New(b *testing.B) {
	for i := 0; i < b.N; i++ {
		for _, test := range tests {
			IsRFC3339New(test.param)
		}
	}
}

Hi @bbrks
It's a great suggestion, I'll implement it this way.
Thanks

Maybe create alias, something like "isTimestamp" or "IsISODate" ?

Sure, could do that

@asaskevich I advise IsTime(str, format string) which would accept constants from Go's time package or custom formats.
Then IsRFC3339() can be changed to:
return IsTime(str, time.RFC3339)

@yezooz can you make proposed changes with second argument? I'll merge it

@asaskevich yep, will do

@asaskevich kept IsRFC3339 but it now relies on new IsTime function as @bbrks suggested

Great!


Refactor/evaluation task

Summary
Describe the purpose of the pull request, including:

What problem does it solve?
Only SegmentationEvaluation extends Evaluation. Also, we need to uniform the evaluation tasks as much as possible.
Currently they are unnecessarily different (attributes names are different, some use experiment_path while others the model_path).

Also SegmentationEvaluation was not tested, i added two tests (one for multiclass, one for binary).

How does it solve the problem?
All the children evaluations extend the Evaluation class.

What are the benefits of the solution?
Clean code.

Reference any relevant issues or pull requests.
https://github.com/orobix/quadra/issues/21

Type of Change
Please select the one relevant option below:

Breaking change (fix or feature that would cause existing functionality to not work as expected

Checklist
Please confirm that the following tasks have been completed:

[x] I have tested my changes locally and they work as expected. (Please describe the tests you performed.)
[x] I have added unit tests for my changes, or updated existing tests if necessary.
[x] I have updated the documentation, if applicable.
[x] I have installed pre-commit and run locally for my code changes.

Amazing job @AlessandroPolidori!

Can we also have a short tutorial starting with training a model and running Evaluation task from command-line or using Python?


Allow creation of a database by restoring from snapshot

Description
Safety checklist

[x] This change is backwards compatible and safe to apply by existing users
[x] This change will NOT lead to data loss
[x] This change will NOT lead to downtime who already has an env/service setup

How has this change been tested, beside unit tests?
manually

Can the similar changes be added to aws-mysql? Only difference is the engine.
Also, we are keeping the name, user and password as null, but the documentationhttps://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster#master_password mentions that we should not add any value to it. So, should we be using the dynamic block or is null okay.

@nsarupr excellent questions.
Yes, keepign the password/username/dbname as null for when snapshot restore worked fine
Yes, I'll do an update for mysql, but was thinking of doint it another PR as a bulk update as I'll be adding global db option to it as well.

@nsarupr excellent questions. Yes, keepign the password/username/dbname as null for when snapshot restore worked fine Yes, I'll do an update for mysql, but was thinking of doint it another PR as a bulk update as I'll be adding global db option to it as well.

Sounds good @juandiegopalomino


Investigate initial timeouts on DHT / DAS

Summary
We (me, and later @Wondertan confirmed my observation) observed the following behavior: when spinning up a lazyledger validator node on digital ocean and starting a light client locally, DAS for the light client times out.
We currently work around adding the fullnode's IPFS multiaddress to the light client's bootstrap nodes but it is important:

[x] to understand why the dht lookup doesn't work initially
[ ] to investigate if we see the same behaviour among multiple DO nodes (or only local <-> DO)
[ ] to make this work for lightclients (particularly in the local <-> DO/server case)
[ ] to understand if we would see these timeouts during consensus too

So after extensive investigations, the issue with DAS content resolution timing out appeared relatively trivial but not straightforward to fix.

TL;DR; Block production is much faster than DHT providing, leading to constant scattering between DASing node and network.

Inveestigation

When we add block data to IPFS, we basically save the data locally and find a peer closest to our content hash by XOR metric on the whole IPFS network.
Our block data is essentially a binary tree with many nodes and leaves for each block, depending on the block size. With one block per second default Dummyapp production setup we primarily used for testing and evaluating MVP, we produce amounts of CIDs that DHT could not process in time, where providing also slows down through time.
Furthermore, Bitswap intentionally throttles async announcement to the network. Unfortunately, in the current implementation of Bitswap, a user never knows whenever data announced or not.
To test the hypothesis that providing is slow and attempting to fix it, I wrote a synchronous providing in PutBlock in https://github.com/lazyledger/lazyledger-core/pull/375, which proves that providing is slow by blocking block production until DAH root CIDs announced.
The code also lays down an optimization workaround to announce fewer data to DHT. New code aims only to provide Row and Col DAH roots instead of all leaves and nodes. Optimization bases on the assumption that a DAH root provider has all the remaining data for discovery and exchange over Bitswap. Thus, by providing fewer CIDs(only DAH roots), we decrease overall providing time without compromising data discoverability.
However, the experiment showed that the providing time is still huge, comparing to desired block time. With a 16x16 block size, it takes ~3min to announce all the DAH roots for a single block synchronously. But it is worth pointing that Bitswap in the experiment was still providing along the way, obviously increasing overall operation time. Testing with disabled Bitswap providing is yet to be done and requires some investigation, as IPFS does not provide high-level options to achieve this. On the other hand, using Bitswap directly allows doing so through the option.
Even after testing with disabled Bitswap providing, we won't achieve ~30secs for an announcement of all DAH roots with max block size(yet to be proven). Thus, the issue remains.

Key Takeaways

We have to keep synchronous block providing for a proposer to be confident that data is available not to be slashed by consensus.
We should always aim to minimize the DHT data footprint for block-related operations. Otherwise, we cannot have predictable timings for block data providing.
DHT entry that some peer store some data rely on incentivized and unreliable medium - random peers which public key's hash is closest to the data hash. The problem with those is they can disappear, preventing others from finding the content hosters through them. In practice, though, at least one connection to the full node solves the problem by exchanging wanted data through Bitswap and/or PubSub. But do we assume at least one connection to the full node? I guess no, so the case with a light client without a full node connection DASing some old block can theoretically end up with failure for content resolution with data available on the network. Therefore, any node needs to connect to either one full node or one node which reliably keeps specific DHT records or batches.

Solutions
Proper
The most valuable contributor to problem resolution is potentially https://github.com/lazyledger/lazyledger-core/issues/378, where we store DAHeader in IPFS and rely on one DataHash instead of multiple roots. Furthermore, we should start synchronously providing DataHash to meet the first takeaway and the DataHash only to satisfy the second one. However, we may also consider keeping asynchronous providing for all the remaining nodes and leaves in the background to contribute to subtrees observability in case. Optimistically, the providing operation should end before the next turn for a node to propose and start providing again.
Fortunately, the recently discussed topic of the new DHT update comes into place to help here as well. More info here. It also contributes to the third takeaway by introducing a new DHT node type with full routing tables that can help short-circuit long queries. Although, I need to look more deeply into the implementation to understand all the features and possible tradeoffs before relying on it.
Quicker for MVP
The proper solution would take too much time for the MVP. Thus we need to come out with something short-term and desirably not time wasteful:

The easiest way to go is to embrace the problem for the MPV and hardcode additional bootstrap full node along with IPFS bootstrap peers.
The existing initiative to spin up our MVP network may be a good solution for this case. With a custom test network, we can lower providing time to acceptable frame, as a custom network would be much smaller, and it would take less time for DHT queries to finish. However, if the network is too small, the way won't be different from having just one bootstrap node, as everyone would connect, removing the need for DHT queries entirely.

Even after testing with disabled Bitswap providing, we won't achieve ~30secs for an announcement of all DAH roots with max block size(yet to be proven). Thus, the issue remains.

I can now confirm that just with manual sync providing and with all the IPFS/Bitswap async providing disabled, I still get similar and impractical ~3mins to announce 32 roots to the networks

For the MVP case, we can also rely on rows only. The workaround decreases providing time to a half(~1.5min). I observed that practically.

More info and explanation regarding the mentioned new DHT client in the proper solution and how it can be helpful to solve this specific case with long-lasting providing. To understand why it is helpful we should understand how it and regular client work.
Let's start with an explanation of how kDHT searching works. Anybody who is reading this should imagine a circle of dots in buckets(groups) of k size(circle formation is out of context), where each dot is a network node storing some part of the global network key to value mappings. And when any dot in the circle wants to find/put some value for a key it:

gets closest to the key dots within own bucket
queries/request them for closest dots in their buckets
executes 2 recursively until it finally reaches the dot with the value to get or set it.
So basic DHT client struggles from the requirement to do these multiple hops for closest dots and those hops are the main reason why it took so much time to provide/put something on the DHT.

New DHT client instead of just keeping some portion of key/values periodically crawls and syncs the whole network. This allows having 0 hops and to directly do set or get ops with dots. Comparably to blockchain state syncing, this DHT client also requires some time to instantiate and download the whole network state. Luckily, we already can rely on the practical results with providing time <3sec. Furthermore, the new client comes into place for the case with disappearing and unreliable DHT mediums, as it just remembers what they were providing preserving content discoverability. However, having a copy of the full DHT network/routing table on the node is not cheap, but proposers' interest aligns with fast providing and preserving solid content discoverability, so that's a valid tradeoff.

Can we verify that after a node downloads data from a node that it has discovered via DHT, it will maintain a connection to that node using BitSwap?

Edited the opening comment to reflect this sub-task and hidden our both comments to keep this focused.

to understand if we would see these timeouts during consensus too

setting this to done

Thanks! Can you update your comment above to include a sentence or two about the result? Otherwise it is hard to see what the outcome of this was.

For our DHT case, we have Provide and GetProviders operations. On IPFS network Provide operation can take up to 3 mins what was the main cause of the issue, GetProviders can take up to 1 min, but often it takes less than 10 secs. For networks less than 20 nodes, both operations should take less than 10 secs, as bucker size is 20 and no hops are expected.
@liamsi, those timings are mostly inevitable and they are applied on any case, so if used with consensus they would present as well. Good for us, we decided to go with push approach.
Closing this, further work and info is now here: https://github.com/lazyledger/lazyledger-core/issues/395


Highlighting commit-changes in gitlens mode in different colors

I would like to suggest the following feature:
When you go into GitLens mode in VScode, you can see the commits on the left side different . When you click on one of these commits, all the lines on the right which where changed in this commit, is highlighted.
I suggest to use different highlight colors for different commits so that it becomes easier to differentiate between different commits and their corresponding changes in code.
Thanks a lot !
Keep up the Superhero work you're doing!
Best Regards
HSD

@Safieddine90 Why would you like different highlight colors?

I am closing this issue because it needs more information and has not had recent activity.  Please re-open this issue when more details can be provided.
Thanks!


Classification metrics overhaul: stat scores (3/n)

This PR is a spin-off from #4835, based on new input formatting from #4837
This will provide a basis for future PRs for recall, precision, fbeta and iou metrics.
What does this PR do?
top_k parameter for input formatting now also works with multi-label inputs
This was done so that StatScores can also provide a basis for Recall@K and Precision@K later - because these two metrics always take multi-label inputs, and count the top K highest probability predictions as True. For multi-class inputs this parameter works as before.
This addition was done in the input formatting function. This means that multi-label inputs can now be binarized in two ways: through the threshold parameter, or through the top_k parameter. I have decided to give the top_k parameter preference if both are set.
For Top-K Accuracy multi-label inputs don't make sense (or at least I have not seen any use of it), so I have updated the Accuracy metric so that an error is raised if top_k is used with multi-label inputs.
New StatScores metric (and updated functional counterpart)
Computes stat score, i.e. true positives, false positives, true negatives, false negatives. It is used as a base for many other metrics (recall, precision, fbeta, iou). It is made to work with all types of inputs, and is very configurable. There are two main parameters here:

reduce: This determines how should the statistics be counted: globally (summing across all labels), by calsses, or by samples. The possible values (micro, macro, samples), correspond to averaging names for metrics such as precision. This is "inspired" by sklearn's averaging argument in such metrics.

mdmc_reduce: In case of multi-dimensional multi-class (mdmc) inputs, how should the statistics be reduced? This is on top of the reduce argument. The possible values are global (i.e. extra dimensions are actually sample dimensions) and samplewise (compute statistics for each sample, taking the extra dimensions as a sample-within-sample dimension).
Why? The reason for these two options (right now PL metrics implements the global option by default) is that in some "downstream" metrics, such as iou, it is, in my opinion, much more natural to compute the metric per sample, and then average accross samples, rather than join everyhing into one "blob", and compute the averages for this blob. For example, if you are doing image segmentation, it makes more sense to compute the metrics per image, as the model is trained on images, and not blobs :) Also, aggregation of everything may disguise some unwanted behavior (such as inability to predict a minority class), which would be evident if averaging was done per sample (samplewise).

Also, this class metric (and the functional equivalent) now return the stat scores concatenated in a single tensor, instead of returning a tuple. I did this because the standard metrics testing framework in PL does not support non-tensor returns - and the change should be minor for the users.
I have deprecated the stat_scores_multiple_classes metric, as stat_scores is now perfectly capable of handling multiple classes itself.
Documentation
Second part of "Input types" section with examples of the use of is_multiclass parameter with StatScores is added.

Hello @tadejsv! Thanks for updating this PR.

In the file pytorch_lightning/metrics/functional/stat_scores.py:

Line 23:63: E203 whitespace before ':'

This PR is now ready for review.
I've also tagged on one minor change that came up at the end of the previous PR: default threshold is not None, but behaves just like before (as 0.5) if it has to be used as is not set. I hope that's ok.
@Borda @justusschock @SkafteNicki @teddykoker @ananyahjha93

@tadejsv @justusschock @SkafteNicki how is it going here? :]

@Borda @SkafteNicki @justusschock @teddykoker @rohitgr7 This is ready for (re)review :)


camelCase all the things

It is a question not an issue.
Now as @SteveSandersonMS 's camel case PR merged, wouldn't it be nice to update all the TS data structures (I'm thinking about events for example) to move from pascal case to camel case property names?
Since @galvesribeiro is working on filling up the events with payload it would be good to have a decision on it.

If it's something you're keen on, would you be interested in submitting a PR?
I'll close this because it's not something we really need to do, but if you do want to submit a PR for it we'd be happy to merge it. Thanks!


Added Word counter app

Added a word counter app which counts words, characters, gives the reading time, and many other things.
also added the app's card in main index.html file

mention the issue no

there is a conflict

I'll resolve it by evening

I have resolved the conflict.
You can add this code in the landing page to link it to word counter app

Word Counter

                        Simple tool for counting words and characters.

mention the issue no

Issue no. #264


Will notEmpty() do a trim before hand?

I have to sanitize an input if it contains whitespaces only.
req.sanitize("title").trim();
req.checkBody('title', 'Title cannot be blank').notEmpty();

notEmpty() does not do a trim beforehand. So you need to sanitize your input if you expect something like "    " to come through as a "title" as it would pass the notEmpty() test.


Bumping AWS provider version to ~> 3.0.0

what

Bumping our AWS provider to version 3

why

Allows us to take advantage of some newer Terraform features when deploying EKS
For example, this will provide us with the ability to specify custom launch templates in aws_eks_node_group

references
https://github.com/aws/containers-roadmap/issues/585

/test all

I've got some more work to do on this one -- stay tuned!

Excited to have seen this was already being worked on! I actually just got a use-case for using launch templates and submitted the issue: #24

I was originally thinking that we could start by bumping the AWS versions for any modules commonly used in this pattern (e.g. terraform-aws-eks-cluster), but instead I'm going to create a new branch and start working on the launch template functionality today. I'll update #24 with the new PR when it's ready (hopefully later today) 👍


Keyboard accessibility fix in  'advanced settings for services'

@dotnet/project-system, Could you please review this change?

What VS version do you want this in?

15.3 is fine, as this is when all accessibility issues should be fixed. I had discussed this with Srivatsn and Jason.
From: David Kean<EMAIL_ADDRESS>Sent: Thursday, March 2, 2017 10:27 PM
To: dotnet/roslyn-project-system<EMAIL_ADDRESS>Cc: Tanya Solyanik<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [dotnet/roslyn-project-system] Keyboard accessibility fix in 'advanced settings for services' (#1671)
What VS version do you want this in?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Froslyn-project-system%2Fpull%2F1671%23issuecomment-283876508&data=02|01|Tatiana.Solyanik%40microsoft.com|f3c746c2957847de8d5308d461fe4863|72f988bf86f141af91ab2d7cd011db47|1|0|636241192141379729&sdata=53wf5O3iMxPEEXwykj3MO8SFQ7DUfEHsnJM%2FxKWKx0U%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPFxpHxwJl2iQzFodVCHcw5czoPBs5Fdks5rh7KrgaJpZM4MRpqV&data=02|01|Tatiana.Solyanik%40microsoft.com|f3c746c2957847de8d5308d461fe4863|72f988bf86f141af91ab2d7cd011db47|1|0|636241192141379729&sdata=RishnL4dfVaYLFPhTQO7qk9ib1KDKFjX11SHL0wu0Rg%3D&reserved=0.


NewPool not declared by package chromedp

What versions are you running?
google-chrome 79.0.3945.88
go version go1.13.7 windows/amd64
What did you do? Include clear steps.
https://imgur.com/a/1cY8LDB
What did you see instead?
same as above
What did you expect to see?
I wanted to use the NewPool func to later switch to the other browser instance (popup window)

The Pool implementation was removed a long time ago. Please use update to the latest version of chromedp.


Fix CI once and for all (Hopefully)

Tests were falling because simulators were not started on CIs, reliably.
Using the following snippet to start simulator before the tests fixes the problem.
xcrun instruments -w "$UUID" || true
sleep 15 # wait for instruments to start the sim

Ref: https://discuss.circleci.com/t/xcode-exit-code-65/4284/18

Current coverage is 100% (diff: 100%)

Merging #22 into master will not change coverage

@@           master   #22   diff @@
===================================
  Files           9     9
  Lines         287   287
  Methods         0     0
  Messages        0     0
  Branches        0     0
===================================
  Hits          287   287
  Misses          0     0
  Partials        0     0

Powered by Codecov. Last update ebae2a5...b2c5c99


Revisit Kafka ConsumerGroup strategy

As of today, all invokers are part of one consumer-group, invokers (but each invoker has its own topic). This is very useful to monitor the state of all consumers at once, but it also implies a danger. When one invoker disconnects due to failure, Kafka rebalances the whole group, resulting in a huge delay of message polling for all invokers.
Since each invoker has its own topic anyway, the rebalancing is entirely useless. We should revisit this.

https://github.com/apache/incubator-openwhisk/pull/3067

Done!


as_enum :state, [:new, ...]

I have found an issue, that aren't mentioned in your README. Please add that you shouldn't use any name, which allready used by on of the method of the model. For example :new. I think it wiil save time of many users.
Thank you.

good point, gonna add it a disclaimer in the readme, to make it work, just use...
as_enum :state, [:new, :saved, :deleted], :prefix => true

or disable the new! methods et al
as_enum :state, [:new, :saved, :deleted], :slim => true


PR: Update Jedi requirement to 0.17.2

Fixes #13807.

Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file external-deps/python-language-server/pyls/workspace.py:

Line 237:80: E501 line too long (90 > 79 characters)
Line 243:80: E501 line too long (108 > 79 characters)
Line 244:80: E501 line too long (83 > 79 characters)
Line 268:80: E501 line too long (92 > 79 characters)
Line 269:80: E501 line too long (81 > 79 characters)
Line 270:80: E501 line too long (88 > 79 characters)
Line 277:80: E501 line too long (93 > 79 characters)
Line 279:80: E501 line too long (95 > 79 characters)


[broken draft wip] Souper codegen to LLVM IR

"Words are cheap, ..."
As discussed in https://github.com/google/souper/issues/334#issuecomment-468963713, current souper2llvm script is bitrot,
and unusable for some time now, even though it is super needed for triaging
of missed LLVM transforms. This is my yet-not-fully-scratched itch.
I suspect i might have some laying around, but i can't really triage them manually :/
Now, it should of course be possible to just perform some voodoo on the script,
and resurrect it until it is broken next time. But wouldn't it be nicer to have A Proper Way? :)
This is extremely partial, just a proof-of-concept.
It does handle every souper instr (a LOT of them was missed by Pass code :/),
but does not handle any phi/pc/whatever control flow.
There is some test coverage. (If anything, that is already better than without this tool.)
Also, while this has the same name as the souper2llvm script that is being deleted here,
it is not functionally equivalent, it does not parse whole replacements, only RHS.

Hi @LebedevRI !
I'm sorry to have let this PR languish. We definitely want to merge it. I think that one of us can spare some time to make phi work. Thanks for doing this awesome work (especially the test cases).

I'm sorry to have let this PR languish.

Actually, it was me who stopped paying attention to it, i don't recall what was the problem.

As long as it doesn't break anything that currently works, I don't know that there's any problem here. I'm fine to merge incomplete code, and then we can work on it more.
I read it a while ago, will re-read carefully in the next day or two.

@zhengyangl can you please review this? I know you have looked at this code

@LebedevRI could you modify this PR to avoid deleting the souper2llvm python program?
I agree it needs to die, but we should wait until some functionality which uses it has been migrated to the new souper2llvm

This patch LGTM :)

This is not any more ready than it was originally, even less so due to bitrot, but if that's what is wanted..

That link-time issue is new one, i would say llvm is now being miscompiled - why is it built without -fPIC in the first place? Feel free to either take this over or i'll close the PR in a day or so.

please take this over @zhengyangl ?

@regehr yes sure

For reference, i did try to take a look what the problem is, and every report_fatal_error() is the problem. This doesn't look like a mistake in the diff.

we'll dig into it. thanks Roman!

Resolved by #676.

thanks again @LebedevRI -- we think we know what to do to fix up the remaining issues, or at least most of them


TypeError: init() got an unexpected keyword argument 'batch_size'

I used the command line version and it works perfectly using default models
python -m cellpose
--dir TH_inverted
--pretrained_model cyto
--chan 0
--save_tif
--use_gpu
--diameter 50
I was able to train my own model
python -m cellpose
--train
--dir TH_train
--pretrained_model cyto
--chan 0
--use_gpu
--n_epochs 500
But when I come to run samples using my trained model
python -m cellpose
--dir TH_ownmodel
--pretrained_model TH_train/models/cellpose_residual_on_style_on_concatenation_off_TH_train_2020_11_25_21_28_42.625288
--chan 0
--save_tif
--use_gpu
Can I please get some help with this error
matplotlib not installed
** CUDA version installed and working. **

using GPU
Traceback (most recent call last):
File "/home/lee.marshall/bras_secondary/Lee/anaconda3/envs/cellpose/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/lee.marshall/bras_secondary/Lee/anaconda3/envs/cellpose/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/lee.marshall/bras_secondary/Lee/anaconda3/envs/cellpose/lib/python3.7/site-packages/cellpose/main.py", line 261, in
main()
File "/home/lee.marshall/bras_secondary/Lee/anaconda3/envs/cellpose/lib/python3.7/site-packages/cellpose/main.py", line 159, in main
batch_size=args.batch_size)
TypeError: init() got an unexpected keyword argument 'batch_size'

this has been fixed now, I will make a new pip with some fixes for running pretrained models soon

this has been fixed now, I will make a new pip with some fixes for running pretrained models soon


Feat: EnergyQuery endpoints based on device

Adds endpoints for the energyqueries. Also fixes a crash related to it not being able to find unknown.html(?)
If we can get https://github.com/energietransitie/needforheat-manuals/tree/weatherinterpolationquery-initial-files merged into test as well, that would be great
EDIT: Now for cloud_feeds as well

Why cloud_feeds with underscore, but energyqueries without?

In the manuals repository they are named like that too right now

Then please change this in both repo's if that is not inconsistent for any good reason. Apart from that, everything looks good.


Support alternating and non-alternating generators in a single Dimension

There isn't really a conceptual reason for a dimension to not support being made up of generators that have different "alternate" settings.
I can't remember exactly why this limitation came about, but I suspect it was to simplify some of the tiling/repeat logic when handling masks and indexing.

There are issues with mixing "alternate" settings within a dimension, as it greatly complicates "traversal" through a dimension when considering the reverse direction.
In particular, traversal through the dimension in reverse (for the alternating case on the outermost generator) is no longer just "stepping through the indices backwards", if there is a non-alternating generator nested inside an alternating one.
@thomascobb has suggested that, if we allow the constraint that a non-alternating generator may not be nested within an alternating one (within a dimension), we can avoid this complication (if the outermost generator in a dimension is non-alternating, then the dimension is considered non-alternating).

Writing this here since it needs to go somewhere.
Consider the following scan:
line x: {0, 1, 2} (alternating)
line y: {0, 1, 2} (non-alternating)
line z: {0, 1, 2}

This gives array positions of:
x: 0 1 2 2 1 0 0 1 2 2 1 0 0 1 2 2 1 0 0 1 2 2 1 0 0 1 2
y: 0 0 0 1 1 1 2 2 2 0 0 0 1 1 1 2 2 2 0 0 0 1 1 1 2 2 2
z: 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2

Consider a dimension over x and y (induced by a squashing excluder for instance). This dimension would look like:
r: 0 1 2 3 4 5 6 7 8
x: 0 1 2 2 1 0 0 1 2
y: 0 0 0 1 1 1 2 2 2

Where r is the index within the dimension.
However, if we want to maintain the ideal that x always alternates, then the second traversal through the dimension behaves strangely, reflected in the r values:
n: 9  10 11 12 13 14 15 16 17
x: 2  1  0  0  1  2  2  1  0
y: 0  0  0  1  1  1  2  2  2
r: 2  1  0  5  4  3  8  7  6

Where n is the scan point index. You can see that r does not progress neatly through the index in order (either forwards or backwards), but jumps around depending on the constituent generators. This is made worse when positions within the dimension are filtered out by excluders (the pattern, such as it is, would no longer be regular).
Handling this case is "complicated" to say the least, meaning I don't know how to solve it.
An alternative approach is to relax the requirement that x consistently change direction in the scan path (before application of excluder masks), that a dimension is its own thing we iterate through and is either alternating or non-alternating.
So our scan path becomes, with a dimension over x and y:
n:       0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
r(x,y):  0  1  2  3  4  5  6  7  8  0  1  2  3  4  5  6  7  8  0  1  2  3  4  5  6  7  8
x:       0  1  2  2  1  0  0  1  2  0  1  2  2  1  0  0  1  2  0  1  2  2  1  0  0  1  2
y:       0  0  0  1  1  1  2  2  2  0  0  0  1  1  1  2  2  2  0  0  0  1  1  1  2  2  2
z:       0  0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1  1  2  2  2  2  2  2  2  2  2

There are "discontinuities" in x at n=9 and n=18 as the dimension begins its second run.
A dimension where all generators inside are alternating would become alternating itself and is simply run backwards on every alternate run.
(x and y both alternating, resulting dimension is alternating)
n:       0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
r(x,y):  0  1  2  3  4  5  6  7  8  8  7  6  5  4  3  2  1  0  0  1  2  3  4  5  6  7  8
x:       0  1  2  2  1  0  0  1  2  2  1  0  0  1  2  2  1  0  0  1  2  2  1  0  0  1  2
y:       0  0  0  1  1  1  2  2  2  2  2  2  1  1  1  0  0  0  0  0  0  1  1  1  2  2  2
z:       0  0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1  1  2  2  2  2  2  2  2  2  2

This approach would not be a breaking change since we currently do not support mixing alternating and non-alternating generators within a dimension.
However, it does break the original target I had of preserving the original path. The scan path is now fundamentally altered simply by tying generators into a single dimension, without filtering any positions.
This also leaves open the question of what to do with a non-alternating generator nested within an alternating one in the same dimension. Do we want to support this and if so, what should the output be?

Following quick discussion with @thomascobb:
The scan path changing with the mere existence of an excluder, even when no points are filtered out (i.e. squashing excluder) is considered "distasteful".
A suggestion was made that, in the case mentioned before, the alternating x should always reset when its parent generator (y, x's innermost outer generator) finishes an iteration.
I think this is even more weird, and am not sure what all the interactions will be. How do we handle the case when x and y are in different dimensions, when the outer one is alternating, etc.

After discussion we have decided to go ahead with the original plan where Dimensions are the true "iterated components" of the scan and preserve the current behaviour, meaning the addition of an non-filtering excluder can change the scan path.
This is partly motivated by expediency, but we also believe it will be less confusing most of the time.
We may wish to investigate interface changes in the future, as we continue to find out how this actually wants to work.

An earlier point I made about this being "non-breaking" isn't accurate.
This will result in actual changes in the resulting path in the case of alternating components (segments may be running in different directions compared to the old system).


Flag master_username output as sensitive

what

Flag master_username output as sensitive

why
Running on Terraform Cloud
Terraform v0.14.5
Configuring remote state backend...
Initializing Terraform configuration...

Error: Output refers to sensitive values

  on .terraform/modules/db/outputs.tf line 6:
   6: output "master_username" {

Expressions used in outputs can only refer to sensitive values if the
sensitive attribute is true.

references

https://www.terraform.io/upgrade-guides/0-14.html#sensitive-values-in-plan-output

/test all

any news on this patch?

/test all


RSS Feed or Similar functionality on changelog

Hi Planetscale team,
We recently had some downtime due to the deprecation of pscale connect commands  for proxy connectivity (outdated cli). Noticed that there was a changelog update about it on the 17th of June 2024.
Is there a suggested way to subscribe to the changelog or be notified of upstream changes like this, couldnt see any RSS feed like functionality on the page?
Thanks

Great idea, we'll add one.

https://planetscale.com/changelog/rss.xml

Thanks a lot!


Using the resourceGroup function that references a parameter, omits the resourcegroup from being outputted in the compiled ARM template.

Bicep version
Bicep CLI version 0.31.92 (b06509316a)
Describe the bug
Using the resourceGroup function that references a parameter, omits the resourcegroup from being outputted in the compiled ARM template.
To Reproduce
Create the following bicep files:
main.bicep
targetScope = 'subscription'
param testParam bool

module myModule 'module.bicep' = {
  name: 'myModule'
  scope: testParam ? resourceGroup('rg-a') : resourceGroup('rg-b')
}

module.bicep
targetScope = 'resourceGroup'

resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = {
  kind: 'BlobStorage'
  location: 'West Europe'
  name: 'storage-${uniqueString('scopetest')}'
  sku: {
    name: 'Standard_LRS'
  }
}

Run az bicep build --file main.bicep
Open the compiled ARM template and note that there's no resourcegroup parameter that contains an expression (there's no resourcegroup parameter at all), and thus the resource will be deployed on subscription level.
Additional context
This might be related to https://github.com/Azure/bicep/pull/15570 and https://github.com/Azure/bicep/issues/15517. These issues should be solved in the latest version, but do not seem to fix the fact that the resourcegroup is omitted in the compiled ARM template. When not directly referencing a parameter but a static value (like true) the resourcegroup is added to the ARM template.

 For the bicep team, as long as the example above isn't supported, is it possible to make sure that the linter returns an error when specifying the above scenario?


containerapp 'az containerapp certificate list': fix --location comparison logic

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Thank you for your contribution! We will review the pull request and get back to you soon.

Hi @zhoxing-ms
This PR has been reviewed by Zunli, could you please to merge this small PR? Thanks.


What does the 'Recursively' option in the Dataset tab do?

Checking or un-checking this option appears to have no effect on the execution and output of the Get Metadata activity, nor is it mentioned in the documentation here.  Does it actually do anything and if so, in what circumstances?

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

ID: 8e4997d4-36fd-4f1c-464b-ea3190531e02
Version Independent ID: ebf216ca-d096-549f-3dcc-9442d7c4a8dc
Content: Get Metadata activity in Azure Data Factory - Azure Data Factory
Content Source: articles/data-factory/control-flow-get-metadata-activity.md
Service: data-factory
GitHub Login: @linda33wj
Microsoft Alias: jingwang

Thanks for the feedback and bringing this to our notice . At this time we are reviewing the feedback and will update the document as appropriate .

@helloyesthisisdave Thanks for the feedback and bringing this to our notice. The "Recursively" property shouldn't be shown in UX as it is not supported in get metadata activity.
I have escalated this to ADF engineering team, and a fix will be applied soon to remove this property.
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply and reopen the issue. We will gladly continue the discussion.
Thanks again for pointing this out.  😊


Fixed an error in the cmake flags when we enable multithreading and vectorization - [merged]

In GitLab by @cmastalli on Oct 4, 2019, 18:39
Merges topic/cmake-bug -> devel

In GitLab by @cmastalli on Oct 4, 2019, 18:39
enabled an automatic merge when the pipeline for 25a191a6b92415b3d6872fd2cd0d8578b44deeec succeeds

In GitLab by @cmastalli on Oct 4, 2019, 19:38
merged

In GitLab by @cmastalli on Oct 4, 2019, 19:38
mentioned in commit 3099c9ddd1cce3efd68f3165163b80841057f887


Test rewrite of free tier quick start

Simplifying the step flow and adding multiple
"Run your first query" options, including from code.

This change is


Estimated release time?

Hi! thaks for great work!
When is the estimated time for releasing LEGaussians?
Have a nice day!

Hi! Thanks for your interest! We plan to open-source LEGaussians within this week.


Field access is not allowed on an expression within parentheses

Description:
$title.
Steps to reproduce:
type Foo record {| int a; |};

public function main() returns error? {
    Foo|error x = {a: 1};

    Foo y = (check x); // OK
    int z = (check x).a; // error
}

The error message here is also invalid!
$ bal run test.bal

Compiling source
        test.bal
ERROR [test.bal:(7:14,7:21)] invalid expression: 'org.wso2.ballerinalang.compiler.tree.expressions.BLangCheckedExpr@1fd386c3' does not support field access

Affected Versions:
slalpha3
Related Issues (optional):
https://github.com/ballerina-platform/ballerina-lang/issues/20238

Related issue: https://github.com/ballerina-platform/ballerina-lang/issues/29970


TypeError: must be str, not int in GoogleBaseHook

ERROR - Failed to execute task: must be str, not int.
Traceback (most recent call last):
  File "/opt/airflow/airflow/executors/debug_executor.py", line 80, in _run_task
    job_id=ti.job_id, **params
  File "/opt/airflow/airflow/utils/session.py", line 61, in wrapper
    return func(*args, **kwargs)
  File "/opt/airflow/airflow/sentry.py", line 140, in wrapper
    return func(task_instance, *args, session=session, **kwargs)
  File "/opt/airflow/airflow/models/taskinstance.py", line 957, in _run_raw_task
    result = task_copy.execute(context=context)
  File "/opt/airflow/airflow/providers/google/marketing_platform/operators/analytics.py", line 66, in execute
    result = hook.list_accounts()
  File "/opt/airflow/airflow/providers/google/marketing_platform/hooks/analytics.py", line 69, in list_accounts
    .execute(num_retries=self.num_retries)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/http.py", line 851, in execute
    method=str(self.method), body=self.body, headers=self.headers)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/http.py", line 153, in _retry_request
    for retry_num in range(num_retries + 1):
TypeError: must be str, not int

[ ] Add tests
[ ] fix the method

@michalslowikowski00 Any progress? Do you need any support?

Sorry, didn't have to look at this, but I would like to do this.

But if it is important you can do it.

@michalslowikowski00 how one should replicate the error?

Set the environment variable according to the Airflow documentation - https://airflow.readthedocs.io/en/latest/howto/connection/gcp.html

export AIRFLOW_CONN_GOOGLE_CLOUD_DEFAULT='google-cloud-platform://?extra__google_cloud_platform__key_path=%2Fkeys%2Fkey.json&extra__google_cloud_platform__scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&extra__google_cloud_platform__project=airflow&extra__google_cloud_platform__num_retries=5'

Use any discovery based operator.


Adjustments to formatter

Changelog
- description: |
    Further improvements to formatting and hooks
# uncomment types applicable to the change:
  type:
  - maintenance    # not directly related to the code

Context
This is a follow up PR for https://github.com/IntersectMBO/cardano-api/pull/582, and it aims to address some of the suggestions provided post-merge.
How to trust this PR
Probably check that the hook works for you. Also that you are happy with the changes and configuration, and that the CI passes.
Probably good idea to look at the commits separately.
Checklist

[x] Commit sequence broadly makes sense and commits have useful messages
[x] New tests are added if needed and existing tests are updated. See Running tests for more details
[x] Self-reviewed the diff

I understand that the two formatters are needed for imports organization? That seems cumbersome (because we will have to deal with potential quirks of both of them) and will have poor code editor integration. Can we avoid that?
Continuing from https://github.com/IntersectMBO/cardano-api/pull/582#discussion_r1668232104:

Regarding import grouping, I think this should be achievable using fourmolu custom grouping: https://fourmolu.github.io/config/import-grouping/

I propose to enable ImportQualifiedPost GHC extension in cardano-api.cabal file globally, to improve imports readability - especially when qualified are mixed with non-qualified. Thoughts?

We should mention usage of fourmolu in CONTRIBUTING.md. One additional small thing - would you mind moving CONTRIBUTING.md from cardano-cli to cardano-api repo, and then linking from cli to here?

The grouping feature doesn't seem to work in fourmolu, it says unreleased in the documentation, so I think it didn't make it to a release yet. stylish-haskell really only touched the imports, so I don't think it is going to bother us much, but it is up to you. I will check whether fourmolu respects the extension thing, but I am not sure it will be very convenient to have qualified at the end. I could make a wrapper script for fourmolu and stylish-haskell too, so it is a single command in the development shell.

The grouping feature doesn't seem to work in fourmolu, it says unreleased in the documentation, so I think it didn't make it to a release yet.

Oh you are right. It didn't make it to the latest release. Thanks for checking that.

I could make a wrapper script for fourmolu and stylish-haskell too, so it is a single command in the development shell.

I'm not 100% sold on using two formatters at the same time. We will have to deal with the potential issues of both, their two configuration formats, their two slightly different usages.
But if you see that's the best option we have at the moment, I'm ok with it 👌🏻.


Implicit blocks for else.

Many people want the benefits of early return. There's a way to get many of them without the complexity of early return:
We can simply allow the else blocks to not be wrapped in { }.
Instead of this:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    []
  } else {
  	if (name == "test") {
      []
    } else {
      if (String.length(name) > 80) {
        ["name too long"]
      } else {
        []
      };
    };
  };
};

We could allow:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    []
  } else
  if (name == "test") {
    []
  } else
  if (String.length(name) > 80) {
    ["name too long"]
  } else {
    []
  }
};

That particular example already parses with today's Reason parser - we would just need to preserve the indentation in that case (track it in a ppx annotation in the AST).
But there are other examples which do not parse with today's parser, or others which would parse but be interpreted differently:
Today, this:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    []
  } else
  foo();
  let x = 0;
 };

Is parsed as:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    []
  } else {
    foo();
  }
  let x = 0;
 };

But we would want it to be interpreted as:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    []
  } else {
    foo();
    let x = 0;
  }
 };

This is a breaking change w.r.t. non-refmted code, but it's not a breaking change w.r.t. refmted code. In general, we promise not to break code that has been refmted (without a major version bump).

This proposal feels odd to me. It just doesn't make the code clear IMO and to my knowledge no other language does this.
At the risk of sounding arrogant, if you want less braces just write in OCaml syntax?

@anmonteiro: Because:

In the OCaml braceless case, it has its own pitfalls with dangling else.
In this case, the goal isn't even to reduce braces - the goal is to reduce indentation which ocaml doesn't address. The way to address the dangling else in OCaml in practice is to render the if/else with proper indentation to at least make the unintuitive parsing clearer. This issue actually comes up frequently in the discussion about early return. People request "early return" to make their examples cleaner, when really all of those examples aren't using the "bad" features of early return - they're just using it to quickly handle some initial cases before the meat of their function. I realized that what they really dislike most is the indentation inflicted upon their functions for handling a couple of simple cases early.
"if you want less braces just write in OCaml syntax?" I mentioned that this isn't about braces, it's about indentation and that OCaml's braceless syntax doesn't solve indentation - but supposing it did: I would say that just because people want to omit braces in one case, doesn't mean they want to omit braces in the general case. Because Reason Syntax uses braces in the general case, there is now an opportunity in Reason Syntax to parse the braceless else unambiguously as a different construct - one that avoids the dangling else pitfalls(or at least doesn't require indenting user's code in order to remove that pitfall).

Do you have any other suggestions for how to respond to people coming from JS that lament the extra indentation in functions that handle a couple simple cases early? This proposal in this issue is just a proposal that aims to solve that issue, but I'm sure there's other proposals that address that same motivation. This is just the first one that came to my mind.
I would like to discourage people from resorting to full-on early return because it destroys local reasoning about your functions. If we need to build a new syntactic construct to avoid early return, then I would be all for it.

I don't have any alternative suggestions to offer but I still think this will create more problems than it solves. Early return is possible in e.g. JS because you don't have to guarantee that both branches return the same type.
I'm fairly certain that this will cause problems down the road wrt the type checker where people will not understand why the compiler is telling them to return unit or whatever type error they encounter.

In JavaScript lack of explicit curly braces around body of if-else blocks implicitly puts them around first statement. Else block automagically extending till the end of function will probably look highly un-intuitive for JavaScript developer. For OCaml/ReasonML developer it just looks wrong.
Monadic let bindings solve this problem nicely and idiomatically, especially given that let+ operators landed to mainline ocaml and require no ppx. Yet I will demonstrate my point with pseudocode using ppx_let:
let request_handler = (ctx) => {
  open Result.Let_syntax;
  /* the below let binding will just "return early" in case of Error(...) */
  let%bind param = Request_context.get_query_param(ctx, "my-option");
  /* starting at this point param contains whatever was in Ok(...) */
  Stdio.printf("param: %s\n", param);
  /* more bindings can be added to the same function */
  let%bind header = Request_context.get_header(ctx, "Content-Length");
  Stdio.printf("content length is %s\n", header);

  /* imagine a lot more business logic code here */

  /* final return value must be wrapped in Result.t */
  Result.return(Response.of_string("Hello, world!"));
};

For me the selling point of monads as something practical and valuable was ability to have sound early return pattern, which I happily use.

With reason-macros early returns in imperative code can be made to look decent:
let%macro.let returnWhen = (pattern, value, continuation) =>
  switch (eval__value) {
  | eval__pattern => ()
  | _ => eval__continuation
  };

// usage
let%returnWhen true = exit^;

When writing code like this where I have an early return, I'll shadow the function with the the early return.
e.g.
let doTheThing = () => {
  foo();
  let x = 0;
};
let doTheThing = shouldRun =>
  !shouldRun() ? () : doTheThing();

It's nice since it flattens and splits out the actual logic for the whatever the thing is doing and the cases needed to be satisfied for doing the thing. Definitely not something that'll you intuitively know to do coming from JS-land but I think really shows off some nice ergonomics of the language after you get your head around it.

Originally I was proposing some return ppx like:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    [@return] []
  };

  if (name == "test") {
    [@return] []
  };

  if (String.length(name) > 80) {
    [@return] ["name too long"]
  };

  [];
};

Which has behavior like:

Move everything after an if ending in [@return] to an else block

And compiles to:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    []
  } else {
    if (name == "test") {
      []
    } else {
      if (String.length(name) > 80) {
        ["name too long"]
      } else {
        []
      };
    };
  };
};

Then we realized it's similar to:
let fn = (shouldRun, name) => {
  if (!shouldRun()) {
    []
  } else

  if (name == "test") {
    []
  } else

  if (String.length(name) > 80) {
    ["name too long"]
  } else

  [];
};

But I'm also not a big fan of implict block else syntax. It doesn't seem very clear to me


Remove implicit to_hash conversion from Config

This causes problems when passing config objects to methods with **splat-style "kwrest" keyword parameters, since it will result in the config object unintentionally being destructured into a hash.
I don't believe this to_hash behaviour is a critical aspect of what we're offering with dry-configurable. My feeling is that no one really expects a config object to be 100% substitutable with a hash, and getting a plain hash when required is still easy via #to_h or #values.
I've raised this PR because of failures in https://github.com/hanami/hanami/pull/1107 for the tests running against Ruby 2.6: we pass one config object to another configurable object, and it ends up being deconstructed into a Hash, which is not expected and causes failures when we then try to reference settings by their named methods.

Love a resounding approval! 😄


No runnable browser found

Hi
Whenever i run- docker run -it -v $(pwd):/wd -p 8888:8888 kagglegym jupyter notebook --port=8888 --ip=<IP_ADDRESS> I get "No web browser found: could not locate runnable browser." I tried to edit ipython_config.py but the machine does not have vi or vim or any other editor installed. Is there any solution to this?

The docker image doesn't have a browser installed, so jupyter returns that warning. But it is still serving the notebook on port 8888, which has been passed through to the host machine (the -p 8888:8888 in the command).
If you go to localhost:8888 on the host machine you should see jupyter available to use.

Hi
Thanks for the response. Yes I did try that. It did not work. However, after doing extensive google search i found the solution. instead of localhost, I had to enter docker's ip. as in- <IP_ADDRESS>:8888.


Minor Fix in Autogen

Added check to handle undefined parameter error in AutogenView

@blueorangutan package

@Pearl1594 a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/579 (JID-3108)


NotJSONError - conflict with rst_prolog

I'm getting this exception when running Sphinx.
Exception occurred:
  File "C:\Anaconda2\lib\site-packages\nbformat\reader.py", line 17, in parse_json
    raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...")
NotJSONError: Notebook does not appear to be JSON: u'\n.. Network drive links\n\n.. |projec...
The full traceback has been saved in c:\users\u550026\appdata\local\temp\sphinx-err-zbgk6v.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

I have a rst_prolog in my conf.py file:
rst_prolog = """
.. Network drive links

.. |project folder| replace::  ...

Problem fixed by upgrading Sphinx. See the bug fix thread.

Thanks for the report, and thanks for finding the solution on your own!
This is a duplicate of #38.


Install tensorflow_probability_gpu always crush all tensorflow

I'm using ubuntu 18.04 with cuda 9.2.
And I can easily install tensorflow-gpu using conda as well as install graph-nets using pip. And
after install all library works fine with my gpu. (cuda9.2 + nvidia_diver 396)
However, once I installed tensoflow-probability-gpu, everything just crushed.
I got the following error for importing any tensorflow related library.
ImportError: lincublas.so.9.0: cannot open shared object file: No such file or directory.
It seems tensorflow-probability-gpu library doesn't support cuda9.2.
Any idea for installing this library?
Thanks.

The latest tensorflow-probability (0.5.0) works for both CPU and GPU tensorflow variants and no longer has a direct install dependency for tensorflow packages, so it shouldn't cause your existing packages to be downgraded or replaced.


Create README.md

Pull Request Functional Test Report for #3474 / 9a67fc31a4dc14fc215668df91610f9d73f3a4ce
No tests identified for validation.
Help

Pull Request Test Coverage Report for Build<PHONE_NUMBER>2
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 55.268%

Totals

Change from base Build<PHONE_NUMBER>5:
0.0%

Covered Lines:
1983

Relevant Lines:
3588

💛  - Coveralls


Support overflow scrolling in ActionMenu

Closes https://github.com/primer/react/issues/3486
When looking into https://github.com/primer/react/issues/3486, it occurred to me that while we support passing a maxHeight prop, we don't enable overflow scrolling when that prop is provided.
This PR adds an optional overflow prop to Overlay which allows developers to specify the overflow behavior of the menu.
I think ideally we should automatically apply overflow: auto whenever a max height is set (or even for all ActionMenu instances) but at least for now this can unblock this use case without impacting existing usage of Overlay.

Demo

Changelog

New

Changed

Removed

Rollout strategy

[x] Patch release
[ ] Minor release
[ ] Major release; if selected, include a written rollout or migration plan

Testing & Reviewing

Merge checklist

[ ] Added/updated tests
[ ] Added/updated documentation
[x] Added/updated previews (Storybook)
[x] Changes are SSR compatible
[x] Tested in Chrome
[x] Tested in Firefox
[x] Tested in Safari
[x] Tested in Edge
[ ] Integration tests pass at github/github (Learn more about how to run integration tests)

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

Closing in favor of https://github.com/primer/view_components/pull/2383

Re-opening, I meant to close a different PR 😄

I think ideally we should automatically apply overflow: auto whenever a max height is set (or even for all ActionMenu instances)

Same! Are there any risks in doing that? (for example: menus that suddenly have an unexpected scroll?)

Are there any risks in doing that? (for example: Overlays that suddenly have an unexpected scroll?)

@siddharthkp this is the exact thing I want to be cautious about. I agree, we can merge this basic step for now to unblock anyone who needs to enable scrolling but we can revisit to make the DX a little better. Thanks!

@siddharthkp 👋 would you mind taking another look at this PR? I was about to merge it when I realized that this changed the default overflow behavior of Overlay, which was not intentional.
Let me know if the current diff looks good to merge now!


fix: saved search is overlapped by bottom padding

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/50592
PROPOSAL: https://github.com/Expensify/App/issues/50592#issuecomment-2405694436
Tests

Go to Search
Create several saved search items if none (to make the popover scrollable)
Press the header's dropdown button
Verify there's top padding in the popover
Scroll the list
Verify there's NO top AND bottom padding while scrolling
Scroll to the bottom
Verify there's bottom padding

In other words, the padding is scrolled with the list, not fixed

[!TIP]
Take a look at Android: mWeb Chrome, MacOS: Chrome / Safari or iOS: Native screenshots for illustration

[x] Verify that no errors appear in the JS console

Offline tests

NA
QA Steps

See Tests

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

https://github.com/user-attachments/assets/bffebc3c-c70d-489a-8804-c39fabcd3859

MacOS: Chrome / Safari

MacOS: Desktop

https://github.com/user-attachments/assets/5600fcba-b572-45e4-ac45-558f2a518d25

Tests were passing when I merged

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


Doesn't work on local pages

This outliner tool can't be used on local html pages even though there is extension option in chrome that allows extensions to access local file urls. The webdevelopper tool has this option and it allows you to validate the local content of the pages.

I did not enable file://permissions when I first built this and I am reluctant to add it now to the main extension that lives in Chrome Store, however you can install it from here: https://github.com/h5o/h5o-chrome/releases and it should then work.
Duplicate of #4.

Labas @dominykas (yeah, I speak some Lithuanian), this extension is amazing and I've been using it for years. Thanks a lot for developing. However, now I'm developing html locally, and I don't get how to "install from here" from your previous comment.
I downloaded the zip and got the source code from here. Then followed, this, but I get
Required value 'version' is missing or invalid. It must be between 1-4 dot-separated integers each between 0 and 65536.
Could not load manifest.

I tried with both 0.8.14 and 0.8.13.
Any hints would be much appreciated
Ačiū

FWIW, I tried adding
"version": "0.8.14",

as suggested here, and now getting
Could not load JavaScript 'outliner.min.js' for script.
Could not load manifest.

ok so for anyone who comes here, I got how to install. One has to follow the steps in the README (I modified them a bit)
npm install grunt-cli
grunt

This will create dist/extension and uploading extension to Load unpacked works.
However, the extension I got does exactly the same as the one in the Chrome store. I tried with 0.8.14, 0.8.13 and 0.8.3 (the oldest available). I wonder if any version really supports this...

I think Chrome might have changed permissions enough for this to no longer be possible at all? If you figure it out - open a PR, happy to merge (although I don't really look here too often, as you may have noticed).

there we go: https://github.com/h5o/h5o-chrome/pull/49


WIP: feat: add package 'klick' with post-release patches

Since the last release of klick is so old it doesn't compile anymore, we need to apply a host of post-release patches. I tried creating a patch with all the changes in the upstream repo since the last release, but that doesn't apply cleanly to the files from the source distribution. This needs more work.

We could also use this fork: https://github.com/Allfifthstuning/klick
It has 2 release tags and compiles out of the box.

Switched PKGBUILD to use release from Allfifthstuning/klick.

Switched PKGBUILD to use release from Allfifthstuning/klick.

@diovudau @thisven what do you think? Do you see a chance that there will soon be another official klick release? I.e. is there a risk that by using a fork we may eventually have a version drift if @dsacre decides to release for example a v0.13.0?
(in that case we could theoretically use epoch but I'd prefer not to)

It is really very highly unlikely that there will ever be another release from the original author. I mean, come on, it's been 12 (twelve!) years since the last release.

Yea, whatever, I'm convinced. Let's merge 😜


Query Resources by Customer ID

As a developer
I need to query orders by customer ID
So that I can retrieve orders from the same customer
Details and Assumptions

The API should return a list of orders that match the query criteria.

Acceptance Criteria
When I query orders by customer ID
It should return a list of orders that match the customer ID

maybe im missing something - this reads very similar to (subset of) #36, as in customer id could be a filter criteria for the query endpoint?

this one is applied to view_order specifically, and #36 is more general, including view_item and list_items_in_order, which we may need to address what requirements we might need


feat: implement two-person reviewed check

SLSA Level 4 requirement contains two-person reviewed.
This check guarantees each PR includes at least one authenticated reviewer.
And, this check would scan through the whole PR IDs, then summarize the pass rate.

Closing as it duplicates #425


Implement CEL validation proc macro for generated CRDs

Motivation
CRDs allow to declare server-side validation rules using CEL. This functionality is supported via #[schemars(schema_with = "<schemagen-wrapper>")], but requires defining a method with handling logic, which may be error-prone.
Since kube owns CRD generation code, the idea is to simplify this process for added validation rules and achieve more declarative approach, similar to the kubebuilder library. This approach will be compatible with kopium generation based on existing CRD structures, already using CEL expressions.

Solution
Allow for a more native handling of CEL validation rules on the CRDs via a field macro.
Unfortunately due to limitations of derive macros, a new #[proc_macro_attribute] is required to allow adjustments of the annotations on the fields, currently named #[cel_validation] (working prototype name),
Similar approach may also be used to allow for server-side defaults and other custom modifications of the CRD in the future, if decided.
#[cel_validation]
#[derive(…, JsonSchema)]
#[kube(
…
)]
pub struct FooSpec {
    // Field with CEL validation
    #[serde(default)]
    #[validated(rule="self != 'illegal'", message="string cannot be illegal")]
    #[validated(rule="self != 'not legal'")]
    cel_validated: Option<String>,

Hey this is great! Thanks a lot for doing this.
I was wondering if you could elaborate a bit on a couple of things:

Unfortunately due to limitations of derive macros, a new #[proc_macro_attribute] is required to allow adjustments of the annotations on the fields, currently named #[cel_validation] (working prototype name),

is this to ensure precedence of annotations?
is there possibly something we could do to simplify these requirements by perhaps referencing a common rewrite rule in kube-core (like we do in schema.rs for structural rewriting)?

is this to ensure precedence of annotations?

yes, I was trying to replace #[validated] with schemars within the CustomResource derive, but it didn't work (even though there is an implicit derive order and CustomResource comes before JsonSchema). So the macro performs just that in the first place.
If the keyword comes after derive, no macro will be able to process replaced #[schemars] annotations.

I'll close it for now to find more suitable approach.


complex yaml

Right now only simple yaml arrays are recognized, ideally we can get this working with more complex yaml structures as well. Examples:
----

field:
  key:
    subfield: value

----

field:
  key:
    - value
    - value
    - value

----

Yep—this is a good one. Currently YAML parsing is determined in a funny way:

Trim whitespace after :
Check to see if the first character is -
Assume YAML and parse

This happens here: https://github.com/jondashkyle/enoki/blob/master/lib/utils/content.js#L27
What we’d likely want to do is something like:

Check to see if : is followed by a break
If so, check to see if there is immediate white space
If so, check to see if the line begins with - or ends with : (not doing so would prevent starting with a blockquote.)

Going to add this to the queue for the next big version bump.

This works now in hypha!


document objects in the package

At present https://github.com/STAT325-S24/HistoryAmherstCollege/blob/main/R/data.R just has a stub for the data objects in the package. Some documentation is needed (then roxygen2::roxygenize() needs to be run).

I annotated tables, figures, and subtitles, which may need review.  Anno and text are the only two who currently need documentation currently.

I can take this on.

Done via https://github.com/STAT325-S24/HistoryAmherstCollege/commit/c508d784ac9345640a284f5a453ffdf91faa579f


Generate public inputs for verifier also via ConstraintSystem API

Problem Definition
Right now, when the verifier needs to verify the public input, they have to implement and call ToConstraintField on the input. This is error prone for two reasons:

the order of calling ToConstraintField on various parts of the public input must match exactly the order of new_input calls in the ConstraintSynthesizer.
the impl inside ToConstraintField must match that of new_input exactly, leading to another source of errors.

Proposal
I propose that we instead leverage the existing ConstraintSystem API to generate these inputs: we add a Verifier variant to the Mode enum, which generates variable assignments only for instance/input variables.
My only worry is that this could cause extra memory/computation for the verifier, but we can at least try it and see. I have two ideas to minimize this overhead:

a way to minimize these costs alternative would be to provide ConstraintSynthesizer with a finalize_public_input_generation method that allows it to specify when it has completed generating public inputs, so that it can early return.

Make a related instantiation of ConstraintSynthesizer that only generates public inputs, and does not have the rest of the circuit logic. This is still better than the ToConstraintField idea because it is easy to match up the new_input statements on both sides.

For Admin Use

[X] Not duplicate issue
[x] Appropriate labels applied
[ ] Appropriate contributors tagged
[ ] Contributor assigned/self-assigned

what do y'all think, @ValarDragon @weikengchen @npwardberkeley?

I agree. We should add a Verifier mode. This is useful in general.
As for the two optimizations, we feel they are not very crucial for now---but surely good to have. If we are unable to get both of them done it should still be fine since one who really wants a very efficient verifier can still do ToConstraintField themselves.

That said, it is better that we still leave an interface for one to run the verifier with a list of field elements, for compatibility and for use cases where the verifier cost needs to be very low.

That said, it is better that we still leave an interface for one to run the verifier with a list of field elements, for compatibility and for use cases where the verifier cost needs to be very low.

Yeah I was thinking the same

Make a related instantiation of ConstraintSynthesizer that only generates public inputs, and does not have the rest of the circuit logic. This is still better than the ToConstraintField idea because it is easy to match up the new_input statements on both sides.

Note that the above approach is compatible with this requirement:

That said, it is better that we still leave an interface for one to run the verifier with a list of field elements, for compatibility and for use cases where the verifier cost needs to be very low.

This is because you set the VerifierInputSynthesizer to directly call to_constraint_field, instead of going via the constraint system API


Add Japanese localization.

Thanks @aoisensi. your changes will already be in the next version of the app <3


Remove OLM action UnsupportedOperationException

The library throws an error when parsing unrecognized OLM actions - https://github.com/googleapis/java-storage/blob/main/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java#L551. This is not future proof as it causes old versions to break when new actions are introduced.
We should update the client to silently error, or add an additional "UNKNOWN" enum to gracefully handle these cases.

Pr under review #1160


Import of fetch-mock causes bundling to fail when using with create-react-app

When used with Create React App it fails to bundle/ startup the dev server because of the following error.
Module not found: Can't resolve 'core-js/modules/es6.array.copy-within' in '/xxxxxx/my_project/node_modules/fetch-mock/es5'

Okay looks like this is an issue in<EMAIL_ADDRESS>

Looks like this https://github.com/wheresrhys/fetch-mock/issues/419#issuecomment-482799849 suggestion could work be a workaround but seems less than ideal

I've got a similar fix published now :)
I'm meeting the creator of fetch-mock next week so I might try to work out how we can do a better fix for this.


Create cognito user pool with AllowAdminCreateUserOnly=true

Is your feature request related to a problem? Please describe.
For partner or intranet dashboards/apps, I want to disable user sign-up and only allow admins to create users. User will then be added via an alternate way to the pool (AWS-CLI, Cognito console, alternate app).
amplify add auth doesn't allow me to do that
Is there a way to do this with custom CF templates? I didn't find out how to do this, if there is a solution, can you point me to it?
Describe the solution you'd like
When asked about the type of pool, I would like to see another option:
Admin sign-up, sign-in, connected with AWS IAM ..._
It could also be a standalone question, but only when Federation won't be setup. I don't think you can have federation and admin-sign-up?
Describe alternatives you've considered

Change the pool via Console: I need to remember to do this on every new provisionning
Add some custom CF in my amplify code base. As said above, I couldn't figure out how to do that.

Additional context
This could perhaps have been a comment on RFC #766, but the thread is so big already and seems to be more dealing with administrative tasks than Cloudformation setup.

Amplify CLI does not support this yet. I am marking this as feature request.
But you could update your cloudformation to include this. I would like to call out that if you run amplify auth update these changes will be overwritten.
AWSTemplateFormatVersion: 2010-09-09

Parameters:
    # ...Params

Conditions:
    ShouldNotCreateEnvResources: !Equals [!Ref env, NONE]

Resources:
    # existing resources

    # BEGIN USER POOL RESOURCES
    UserPool:
        # Created upon user selection
        # Depends on SNS Role for Arn if MFA is enabled
        Type: AWS::Cognito::UserPool
        UpdateReplacePolicy: Retain
        Properties:
            # existing properties

            AutoVerifiedAttributes: !Ref autoVerifiedAttributes
            # Add this to make admin only
            AdminCreateUserConfig:
                AllowAdminCreateUserOnly: True
                InviteMessageTemplate:
                    EmailMessage: Your user name is {username} and temporary password is {####}
                    EmailSubject: Join my site
                    SMSMessage: Your user name is {username} and temporary password is {####}
                UnusedAccountValidityDays: 7

This worked, thanks.
But as you said amplify auth update will cancel my changes. As long as all devs are aware of it, it's doable.

Is there a way to make custom cloudformation changes so that it's not overwritten by the CLI?

@lukeburns Currently that's not possible for the auth category - for not overwriting on an update, but this is a feature request that our took can look into. cc @renebrandel

With the new override feature with amplify 7.0.0 and later, even the possibility to extend the template manually is gone, is that correct? Or how could I bring back the custom invitation messages?

any update on this?


New polars version broke this wrapper

With the release 0.27 of polars this crate has been broken.
In particular, the function into() that allows to transform a PyDataFrame into a polars DataFrame is broken.
The compiler says:
"the trait bound polars::prelude::DataFrame: From<PyDataFrame> is not satisfied
the trait From<&polars::prelude::Schema> is implemented for polars::prelude::DataFrame
required for PyDataFrame to implement Into<polars::prelude::DataFrame>"
With 0.26 version of polars it works perfectly.
I have checked and also the example is broken.

Right. We need to update the polars dependency.

Can I help you? I tried to compile by myself but I found several problems in many places.

Yes, the cargo.toml needs to be updated.

Published.


Add MiqPreloader.polymorphic_preload_for_child_classes

This branch was extracted from https://github.com/ManageIQ/manageiq/pull/17444 to bring attention to the large addition to MiqPreloader, which adds a new method:
MiqPreloader.polymorphic_preload_for_child_classes

This is a specialized preloader for classes with polymorphic relationships that allows for targeted preloading for those specific class types on said polymorphic relationships.  This allows for taking
advantage of those associations by allowing scopes to be applied to the specific relationships and subsequent calls to the relationship can have those query definitions applied.
This means you can do things like this:
irb> tree = ExtManagementSystem.last.fulltree_rels_arranged(:except_type => "VmOrTemplate")
#=> nodes ExtManagementSystem, EmsCluster, EmsFolder, and Host `relationship_type` records
irb> records = Relationship.flatten_arranged_rels(tree)
irb> hosts_scope = Host.select(Host.arel_table[Arel.star], :v_total_vms)
irb> preloaders_per_class = { EmsCluster => [:hosts, hosts_scope], Host => hosts_scope }
irb> MiqPreloader.polymorphic_preload_for_child_classes(records, nil, preloaders_per_class)
#=> Host records with have the `v_total_vms` column load, and hosts accessed through EmsCluster will as well

Links

Extracted from https://github.com/ManageIQ/manageiq/pull/17444

The above rubocop violations existed in the code that this was extracted from (minus the Module.new {...} multi-line block one, that one just looked better).  To make it more obvious the changes I was pulling from, they have been left as is for the time being.
If desired, I could make a commit to fix the rubocop violations in the offending bits in lib/extensions/ar_virtual.rb` and avoid the ones presented here, but felt slightly out of scope to do so.

@miq-bot add_label performance
@miq-bot assign @Fryguy
@Fryguy Assigning you as I figured you would be curious about this change over all (will be at least cc'ing you in the related PRs as well).  Feel free to reassign to @kbrock or someone else if you don't want to review.
cc @kbrock @syncrou


UnsatisfiedLinkError: Failed to load native TensorFlow Lite methods

Click to expand!
Issue Type
Bug
Have you reproduced the bug with TF nightly?
Yes
Source
binary
Tensorflow Version
0.0.0-nightly-SNAPSHOT
Custom Code
No
OS Platform and Distribution
No response
Mobile device
Android Samsung Galaxy J5
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
Fatal Exception: java.lang.UnsatisfiedLinkError: Failed to load native TensorFlow Lite methods. Check that the correct native libraries are present, and, if using a custom native library, have been properly loaded via System.loadLibrary():
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__register_atfork" referenced by "libtensorflowlite_jni.so"
This is reproducible on lot of android devices running android version 5,6,7
This is happening in the nightly snapshots from probably last 2 weeks. Did not encounter this in previous nightly snapshots.
Standalone code to reproduce the issue
val nnApiOption = NnApiDelegate.Options()
nnApiOption.setUseNnapiCpu(true)
val nnApiDelegate = NnApiDelegate(nnApiOption)

Relevant log output
2023-06-28 10:52:35.629 29536-29620 InterpreterApi                      I  Didn't load native library: tensorflowlite_jni
2023-06-28 10:52:35.637 29536-29620 InterpreterApi                      I  Didn't load native library: tensorflowlite_jni_stable
2023-06-28 10:52:35.638 29536-29620 InterpreterApi                      I  Didn't load native library: tensorflowlite_jni_gms_client

Hi @kbhargavi33
TF Nightly is not a stable version. Can you please check in latest stable version 2.12 and let us know if you are still facing the issue?
Thanks.

@pjpratik I am able to replicate this with latest version as well.
org.tensorflow:tensorflow-lite:2.12.0

This is also happening with the code from docs https://www.tensorflow.org/lite/android/delegates/nnapi
Able to replicate in android 5,6,7 bunch of devices
I think this is an issue with interpreter rather nnapi
Interpreter.Options options = (new Interpreter.Options());
NnApiDelegate nnApiDelegate = null;
// Initialize interpreter with NNAPI delegate for Android Pie or above
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
    nnApiDelegate = new NnApiDelegate();
    options.addDelegate(nnApiDelegate);
}

Hi @kbhargavi33, I was able to run the code from the docs that you posted above fine. I do have this in my gradle instead though:
dependencies {

    ...
    implementation 'org.tensorflow:tensorflow-lite:2.0.0'
    ...
}

Can you try with that in a fresh project, then sync, and let me know if that works at all for you as well?

Hi @pkgoogle It is working with 2.0.0 and 2.10.0 as well.
    implementation 'org.tensorflow:tensorflow-lite:2.10.0'
    implementation 'org.tensorflow:tensorflow-lite-gpu:2.10.0'
    implementation 'org.tensorflow:tensorflow-lite-support:0.4.3'
    implementation 'org.tensorflow:tensorflow-lite-metadata:0.4.3'

But still not working with 0.0.0-nightly-SNAPSHOT and 2.1.12

Hi @kbhargavi33, stability of the nightly snapshot is not necessarily guaranteed and it seems like a later version (with more bug fixes) is working for you. Is there any reason you can't use the later version for now?

I am still getting this issue with the latest release 2.14.0 for Android API levels 21-25 included. Can you please investigate this?
java.lang.UnsatisfiedLinkError: Failed to load native TensorFlow Lite methods. Check that the correct native libraries are present, and, if using a custom native library, have been properly loaded via System.loadLibrary():
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "strtod_l" referenced by "/data/app/com.onfido.android.sdk.capture.test-1/lib/arm64/libtensorflowlite_jni.so"...
at org.tensorflow.lite.TensorFlowLite.init(TensorFlowLite.java:137)

Hi @nijat-ahmadli,
Are you trying to use the NNAPI delegate? It is only supported from Android API level 27+: https://www.tensorflow.org/lite/android/delegates/nnapi#trying_the_nnapi_delegate_on_your_own_model

Hi @pkgoogle Thanks for you reply!
No, I am not using any delegate. This is how I initialise the Interpreter:
init {
        val model = FileUtil.loadMappedFile(context, modelFileName)
        val options = Interpreter.Options()
        options.numThreads = CPU_NUM_THREADS
        interpreter = Interpreter(model, options)
}

Please note that, I am not getting the error with the release 2.11.0. It only occurs for the newer releases above this version.

Hi @nijat-ahmadli, this original case originated from a different code/situation, can you please write a new issue that contains your reproducible code as well as system/environment information that conforms to the issue templates? Thanks for your help.

@pkgoogle Issue is created as requested. Thanks!


ir_weight_extractor.py overwrites destination

Ubuntu 18
I'm using the latest relese v1.25.1 and it seems there is a fatal issue with ir_weight_extractor.py which removes the whole directory given to it as --output_path argument. I gave my ~/Desktop as the output directory and the whole Desktop content was deleted and replaced by weights. Unfortunately I wasn't to recover some of the data. I hope this issue would be fixed.

Fixes: https://github.com/PINTO0309/openvino2tensorflow/releases/tag/v1.25.2


docs: fix echo-typegen typo

copilot:all

Current dependencies on/for this PR:

main

PR #3331   👈

PR #3332

PR #3328

PR #3333

This comment was auto-generated by Graphite.


Challenge 268 duplication.

Why hard challenge 268 is in the base directory and in the Hard Challenges directory?

Looks like there was no [Hard] challenge for the week after challenge 268, so it got pulled twice


Newer minecraft versions aren't added

in https://github.com/AppleMacOS/Scripts/blob/main/Minecraft-Scripts/vanilla-server.sh in how it gets its versions. i noticed its missing 1.17+ & 1.8-

I don't quite understand what you mean. It has everything from 1.7.2 to 1.17.1 (which is the latest version)

look into the vanilla-server json it looks at.

Oh right, I see what you mean now. I forgot that whenever you edited a GitHub Gist that it would generate a new hash for the new version.
Thanks for letting me know 😀


CORS Proxy: Add Tests

Feature Description

Add tests for new PHP and JS code
Alternatives Considered

Additional Context

We've come to the conclusion that it's going to be quite difficult to write useful tests for the proxying part
We'll look into instead adding some complementary e2e tests for hotlinking in general.