Support let guards and let chains

Currently blocked on formatting decision: https://github.com/rust-dev-tools/fmt-rfcs/issues/169
Fixes #4955
Fixes #5177

I made an assumption that && let should always wrap. I suppose that can stir a debate and probably should be added to the style guide if we keep that?

Thanks for taking the time to implement Let formatting!
I think the implementation of rewrite_let looks good! I do want to make sure that we're not overlooking anything though. Would it be possible to include more tests with more complex patterns and expressions to fully test this out? Including some with Structs, Tuple Structs, fully qualified identifier paths, function calls, chains, etc. Including a test or two for patterns and expressions that are broken up over multiple lines would definitely be helpful, and even including tests where users leave pre and post inline or block comments inside the pattern and expression would be great. I think I'd also like to see similar tests with more complex patterns and expression for if let guards.
I know that's a lot so please let me know if you want help coming up with test cases.
Maybe you can also get some inspiration from tests in the compiler:
https://github.com/rust-lang/rust/tree/master/src/test/ui/rfc-2497-if-let-chains
https://github.com/rust-lang/rust/tree/master/src/test/ui/rfc-2294-if-let-guard

I made an assumption that && let should always wrap. I suppose that can stir a debate and probably should be added to the style guide if we keep that?

I had a similar thought about always forcing newlines, but I think it would probably be best to make an amendment to the style guide before codifying those rules into rustfmt. This is just my own personal preference, but I think I'd argue that your "must wrap" test case would be perfectly fine on a single line.
// must wrap
if xxx
    && let x = x

Lets see where the discussion goes around forcing newlines before removing those changes from the PR.

This is just my own personal preference, but I think I'd argue that your "must wrap" test case would be perfectly fine on a single line.

Yeah I agree for that case. But looking at cases where the let drifts farther right, wrapping seems more necessary. Of course rustfmt needs a codified rule to apply to every scenario. We could introduce a magic/configurable number: wrap && let if preceded by more than 12 (?) characters in the same line?
// 7 characters - no wrap
if xxx && let Some(x) = y {

// 13 characters - wrap it
if cond(xxx)
    && let Some(x) = y {

We can also just not introduce new behavior with regard to wrapping in this PR since the change is easily separable.  Maybe we should get more experience with the feature first?

We can also just not introduce new behavior with regard to wrapping in this PR since the change is easily separable.

I think in this case that's probably the best course of action. I think the main goal for this PR should be to introduce formatting for Let expressions, and then we can worry about wrapping rule changes in the future (most likely with an amendment to the style guide).

Opened rust-dev-tools/fmt-rfcs#169 to discuss the wrapping question.

Updated the implementation to use rewrite_assign_rhs_with_comments so that comments after = are handled. Also added more tests.

Thanks for this and for the good discussion. Definitely agreed that forced wrapping would at a minimum need to reflect change Style Guide text as well, likely echoed on the rules for control flows and matches.
In the same vein is various discussions elsewhere, we typically only get one shot at introducing the "right" formatting because of the strong desire to avoid introducing breaking formatting changes multiple times. The chains are still too new in my opinion for enough folks to have had enough time to fully formulate how these should be formatted (especially since that formatting will likely remain the same indefinitely), so let's park this for the time being.

Any plans to land this?
The feature is widely useful, and projects using it are accumulating a lot of "formatting debt" now due to rustfmt refusing to format it (see e.g. https://github.com/rust-lang/rust/pull/95262).

we typically only get one shot at introducing the "right" formatting because of the strong desire to avoid introducing breaking formatting changes multiple times.

@petrochenkov I think that's the main concern here. We want to make sure we're not overlooking anything.

The chains are still too new in my opinion for enough folks to have had enough time to fully formulate how these should be formatted

The feature has been around for some time since that comment, so maybe we should get more eyes and community engagement on https://github.com/rust-dev-tools/fmt-rfcs/issues/169 before moving forward with this? It would be great if the authors from those projects could give their input on the format RFC.
@calebcartwright, would another option be to move forward with the proposed changes, but lock them behind a new unstable configuration option, which defaults to false? Something like format_let? What's our stance on breaking formatting changes for unstable options?

The context and constraints haven't changed, and this PR is intentionally still parked and will continue to be so for the foreseeable future.
@petrochenkov - I hope https://github.com/rust-lang/rust/pull/95262#issuecomment-1077692898 provides some more context. I appreciate the angle of accumulating unformatted code, but there's nothing particularly novel with these new let constructs in that respect. It's a side effect of the historic disjointed syntax/lang and formatting processes that's happened before and will continue to occur until we can bring those closer together.
However, I'm not going to violate our core operating process just because folks are excited and adopting these newer constructs and want to have them formatted

@calebcartwright, would another option be to move forward with the proposed changes, but lock them behind a new unstable configuration option

Understand the line of thinking, but no I don't see that being viable.
There's a difference between knowing what should be done but having an untested implementation vs. not even knowing what should be done. We're unequivocally in that latter camp until we actually have rules defined. Conditionally rolling out behind a config option could be a consideration if we've got a partial implementation with known gaps (e.g. we know it'll blow up if there's comments), but not as a means of doing some arbitrary, undefined formatting. This follows the same rationale of why we wouldn't want to change the sequence for language features to first do the implementation behind a feature gate, and then follow up the implementation with an RFC

Let chains are stabilizing soon (it's already stable on nightly, from what I can gather) and it seems very unfortunate if rustfmt doesn't support it when it hits stable. During RustConf, @compiler-errors indicated that they've been using this patch in a local build of rustfmt for their contributions to the compiler. That sounds like this patch works well enough for us to just go with it.
I gather there's some concerns about this not having a formatting RFC? If this is considered a blocker for rustfmt to support new rust-lang syntax, I think we should probably start requiring formatting guidance into RFCs that add new syntax into the language.

I'm going to somewhat preemptively cut off any additional discussion about broader processes because we need to be able to keep this PR focused on the changes to the codebase proposed here.
However, I understand why questions and comments are surfacing so I'll share what is hopefully helpful context around why this is blocked.
First and foremost, we on the rustfmt team do not get to arbitrarily determine what the default style/format is for Rust code (nor do we want to). Those rules are defined in the Rust Style Guide, and rustfmt is the implementing tool. rustfmt cannot apply formatting rules that do not exist, so if the Style Guide lacks prescription for new syntax, then so too does rustfmt. The relevant rules have not been defined yet, and do not even have anything approaching a consensus
Having the Style Guide rules defined is not a nice to have nor optional component, but an unequivocal prerequisite. It's quite similar to making any non-trivial change to the Rust compiler, language, etc. where an RFC is a mandatory up front step.
Additionally, rustfmt output does not have a nightly vs. stable concept when it comes to default formatting. The formatting stability guarantee applies across all channels, so we can't just pick one style one day and then change it something different as more information comes in/more opinions are raised.
Part of the problem is that there is no longer a Style Team (owners of the Style Guide) as a subset of the lang team, and the other is that the rustfmt team typically isn't even aware of syntax changes until very, very late in the game. The relevant folks are aware of these problems and there have been/are continued discussions around how to resolve them (https://github.com/rust-lang/rust/pull/93628, lang team meetings, etc.). However, such solutions are naturally going to be future looking, and things currently at hand (including let exprs and chains) will still have to deal in the realities of the present, and in this case that means "blocked"

Can this be gated behind an unstable option in the interim? The fact that rustfmt completely skips constructs that use let_chains makes the feature rather unusable.

@goffrie I asked the same question https://github.com/rust-lang/rustfmt/pull/5203#issuecomment-1077625775 here, and was already told that it's not a viable option https://github.com/rust-lang/rustfmt/pull/5203#issuecomment-1077707041. The main issues is that we still don't know how to format them. If you'd like to contribute to the formatting discussion you can do so at https://github.com/rust-dev-tools/fmt-rfcs/issues/169

This can be closed now that https://github.com/rust-lang/rustfmt/pull/5910 was merged.


Compiling openBLAS:  ar: strmm_kernel_LN.o: No such file or directory

uname -a:
Linux laptop 4.4.14-smp #2 SMP Fri Jun 24 14:44:24 CDT 2016 i686 Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz GenuineIntel GNU/Linux
while compiling openBLAS, at library building stage I get an error:
ar: strmm_kernel_LN.o: No such file or directory
../Makefile.tail:40: recipe for target 'libs' failed
make[1]: *** [libs] Error 1
make[1]: Leaving directory '/home/hbd/Downloads/xianyi-OpenBLAS-bcfc298/kernel'
Makefile:133: recipe for target 'libs' failed
make: *** [libs] Error 1
Help requested.

Please run 'make clean' before next build.
Any compelling reason to have 32bit system on a very recent 64bit CPU?

Can you post /proc/cpuid (just last core info, this ULT Haswell is not with CPUID range with other Haswel)
TARGET=Haswell should build for your CPU

Please try building with "make BINARY=32" after the "make clean" (this should work but will give only NEHALEM-class optimization, see #657)

[A] from /proc/cpuinfo:
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 69
model name      : Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz
stepping        : 1
microcode       : 0x17
cpu MHz         : 1599.992
cache size      : 3072 KB
[B]
with: make clean and make TARGET=Haswell
No luck, same error
[C] with  make BINARY=32  it worked!
OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)
OS               ... Linux
Architecture     ... x86
BINARY           ... 32bit
C compiler       ... GCC  (command line : gcc)
Fortran compiler ... GFORTRAN  (command line : gfortran)
Library Name     ... libopenblas_nehalemp-r0.2.19.a (Multi threaded; Max num-threads is 4)
[D] Why 32-bit system on a 64-bit machine?: My older laptop went dead just a couple of hours before the first day of an engineer's  training series which I needed to engage. Already having a DVD of Slackware 14.2 (32-bit), compelled me to install it on the new 64-bit machine.
Thanks a lot for help.

[A] from /proc/cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 69
model name : Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz
stepping : 1
microcode : 0x17
cpu MHz : 1599.992
cache size : 3072 KB
[B]
with: make clean and make TARGET=Haswell
No luck, same error
[C] with make BINARY=32 it worked!
OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)
OS ... Linux
Architecture ... x86
BINARY ... 32bit
C compiler ... GCC (command line : gcc)
Fortran compiler ... GFORTRAN (command line : gfortran)
Library Name ... libopenblas_nehalemp-r0.2.19.a (Multi threaded; Max
num-threads is 4)
[D] Why 32-bit system on a 64-bit machine?: My older laptop went dead just
a couple of hours before the first day of an engineer's training series
which I needed to engage. Already having a DVD of Slackware 14.2 (32-bit),
compelled me to install it on the new 64-bit machine.
Thanks a lot for help.
--
-- HBDave
Senior Consultant (Training), eInfochips, Ahmedabad, India
May you do good and not evil May you find forgiveness for yourself and
forgive others May you share freely, never taking more than you give.

                                  -- from Sqlite3 source code*

On Fri, Feb 24, 2017 at 1:10 PM, Andrew<EMAIL_ADDRESS>wrote:

Can you post /proc/cpuid (just last core info, this ULT Haswell is not
with CPUID range with other Haswel)
TARGET=Haswell should build for your CPU
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/xianyi/OpenBLAS/issues/1106#issuecomment-282225335,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEHd7qAbkHjGmCIpiLiAoF5fRbKHV_7jks5rfologaJpZM4MKyGL
.

[A] from /proc/cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 69
model name : Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz
stepping : 1
microcode : 0x17
cpu MHz : 1599.992
cache size : 3072 KB
[B]
with: make clean and make TARGET=Haswell
No luck, same error
[C] with make BINARY=32 it worked!
OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)
OS ... Linux
Architecture ... x86
BINARY ... 32bit
C compiler ... GCC (command line : gcc)
Fortran compiler ... GFORTRAN (command line : gfortran)
Library Name ... libopenblas_nehalemp-r0.2.19.a (Multi threaded; Max
num-threads is 4)
[D] Why 32-bit system on a 64-bit machine?: My older laptop went dead just
a couple of hours before the first day of an engineer's training series
which I needed to engage. Already having a DVD of Slackware 14.2 (32-bit),
compelled me to install it on the new 64-bit machine.
Thanks a lot for help.
--
-- HBDave
Senior Consultant (Training), eInfochips, Ahmedabad, India
May you do good and not evil May you find forgiveness for yourself and
forgive others May you share freely, never taking more than you give.

                                  -- from Sqlite3 source code*

On Fri, Feb 24, 2017 at 1:20 PM, Martin Kroeker<EMAIL_ADDRESS>wrote:

Please try building with "make BINARY=32" after the "make clean" (this
should work but will give only NEHALEM-class optimization, see #657
https://github.com/xianyi/OpenBLAS/issues/657)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/xianyi/OpenBLAS/issues/1106#issuecomment-282226817,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEHd7p0BTds66OjDPsePgai3MVfFm4byks5rfou4gaJpZM4MKyGL
.

with make BINARY=32 can work.
Thanks a lot.


ci: enable error detection

Which issue(s) this PR fixes:

Issue Longhorn/longhorn#7985
What this PR does / why we need it:
Special notes for your reviewer:
Additional documentation or context

The error is due to https://github.com/longhorn/longhorn-spdk-engine/pull/110

the PR check failed.

The CI test always failed.
https://drone-pr.longhorn.io/longhorn/longhorn-spdk-engine/134/1/3
@shuo-wu Can you help check it? Should we enable CI test for now?

Not sure why the go vet error doesn't break the pipeline first 🤔
Running: go vet
# github.com/longhorn/longhorn-spdk-engine/pkg/spdk
pkg/spdk/replica.go:523:14: result of fmt.Errorf call not used

Not sure why the go vet error doesn't break the pipeline first 🤔
Running: go vet
# github.com/longhorn/longhorn-spdk-engine/pkg/spdk
pkg/spdk/replica.go:523:14: result of fmt.Errorf call not used

Is it an error or warning?

Not sure why the go vet error doesn't break the pipeline first 🤔
Running: go vet
# github.com/longhorn/longhorn-spdk-engine/pkg/spdk
pkg/spdk/replica.go:523:14: result of fmt.Errorf call not used

Is it an error or warning?

I think it's error. We have to remove this line too.
https://github.com/longhorn/longhorn-spdk-engine/blob/dfb90ba8d693863da3ddae2adad5069ef401dcc0/scripts/validate#L7


SW-4367 Allow batches to have photos

Add endpoints to create, list, read, and delete photos of seedling batches.
The read endpoint supports thumbnails via the usual maxWidth and maxHeight
query string parameters.
The batch's history will include records of photos being created and deleted.
In the case of a deleted photo, the creation event doesn't include a file ID
since the file no longer exists in the system, but it still includes the user
ID and time.

Current dependencies on/for this PR:

main

PR #1454   👈

This stack of pull requests is managed by Graphite.


oracle proposal

This is a proposal for oracle specification and mainly meant to serve as a basis for discussion. DO NOT MERGE

Added some details about periodic events.

Related to #44

Concept ACK, I think this lay out well each concept of the oracle subsystem : event, oracle, URI, templates, signatures.
@LLFourn I guess our confusion on Slack was you're speaking about the event namespace (the URI path) when I was thinking about the logical encoding of events in template (my relation between two quantities rough scheme). IMO, that's two different encoding, and the good thing with opt-in for TLV as a serialization format it would make easy to introduce new logical encoding, beyond the current ones (enumeration, scoped range, exponent-mantissa range)

FWIW I don't think there's confusion. I am precisely saying that we shouldn't separate these two things. I think from the URI for the event you can generate all outcomes and the client can fully determine the semantics of each outcome without making any HTTP requests.
I will provide a motivation for this when I make a counter proposal.
@Tibo-lg thanks this document is good.

@Tibo-lg  Consider extracting the "event descriptor" portion of this into it's own spec and removing it from here: https://github.com/discreetlogcontracts/dlcspecs/blob/master/Messaging.md#the-event_descriptor-type
I think it makes sense for oracle things to be in their own document.
I suggest putting HTTP api ideas somewhere else and perhaps leaving them until later.

@Tibo-lg Consider extracting the "event descriptor" portion of this into it's own spec and removing it from here: https://github.com/discreetlogcontracts/dlcspecs/blob/master/Messaging.md#the-event_descriptor-type
I think it makes sense for oracle things to be in their own document.
I suggest putting HTTP api ideas somewhere else and perhaps leaving them until later.

Done
@benthecarman I ported your TLV serialization here, tried to merge things as cleanly as possible, but let me know what you think. One thing I changed which might be controversial is moving the oracle_nonce(s) to the event descriptors, mainly because large range events need to have multiple while others need (or must have) only one.

Implemented all the TLV changes and left comments of where I was confused about stuff. Otherwise, lgtm

For both range and large range it is unclear what we are signing. In my implementation I am signing
taggedSha256(Int32(num).bytes, "DLCv0/Outcome").bytes

For both range and large range it is unclear what we are signing. In my implementation I am signing
taggedSha256(Int32(num).bytes, "DLCv0/Outcome").bytes

I vote for both base and digits being serialized as BigSizeUInt

For both range and large range it is unclear what we are signing. In my implementation I am signing
taggedSha256(Int32(num).bytes, "DLCv0/Outcome").bytes

I vote for both base and digits being serialized as BigSizeUInt

At the moment I just use the ASCII value of the digit, but I don't have a strong opinion. Though if we use tagged hash I think we will have to define or reference it (unless that's already done and I haven't noticed?)

I am indifferent to specifics, I was using a tagged hash to keep things pre-spec different than post-spec

ACK c19a5e2 pending on this, just to be sure we don't have issue.

I implemented something that was inspired by this over the last couple of days.
The differences are:

I use "json" to encode the oracle_event for easier development and iteration
The nonces are not in the event_descriptor, so it is more of an outcome_descriptor. I felt the descriptor should only do the job of telling you what the possible outcomes are and how many signatures will be used to attest to the outcome. The nonces are communicated in a sibling field. This allows the descriptor to be reused even for signature schemes that don't have nonces e.g. BLS signatures.
renamed event_maturity_epoch to expected_outcome_time which I think is a better name.

Here's what my oracle's api looks like for a simple binary outcome:
curl -s h00.ooo/random/2020-10-26T17:56:00/heads_tails?left-win |jq
{
  "announcement": {
    "oracle_event": {
      "encoding": "json",
      "data": "{\"id\":\"/random/2020-10-26T17:56:00/heads_tails?left-win\",\"expected_outcome_time\":\"2020-10-26T17:56:00\",\"descriptor\":{\"type\":\"enum\",\"outcomes\":[\"heads_win\",\"tails_win\"]},\"nonces\":[\"0abc60c1fa4329f9340766f302211c5732564e009d9068608f8b04f4cce69786\"]}"
    },
    "signature": "c37e1600d9848802fbc917d73fcf7f701e11916de1df42f6f377fa4628b9fd12a3f135bc978f5f0236db0a5c9f89c73191d6aec2827d61ad27d3b757d93d5e9f"
  },
  "attestation": {
    "outcome": "heads_win",
    "scalars": [
      "bf156ff1c44672349d2273bcc782d93be69e55bfcb31e6169afc03d147906e83"
    ],
    "time": "2020-10-26T17:56:00"
  }
}

The oracle_event by itself:
curl -s h00.ooo/random/2020-10-26T17:56:00/heads_tails?left-win | jq -r .announcement.oracle_event.data | jq
{
  "id": "/random/2020-10-26T17:56:00/heads_tails?left-win",
  "expected_outcome_time": "2020-10-26T17:56:00",
  "descriptor": {
    "type": "enum",
    "outcomes": [
      "heads_win",
      "tails_win"
    ]
  },
  "nonces": [
    "0abc60c1fa4329f9340766f302211c5732564e009d9068608f8b04f4cce69786"
  ]
}

Note this is just informational and not a demand to change anything.

@LLFourn

The nonces are not in the event_descriptor, so it is more of an outcome_descriptor. I felt the descriptor should only do the job of telling you what the possible outcomes are and how many signatures will be used to attest to the outcome. The nonces are communicated in a sibling field. This allows the descriptor to be reused even for signature schemes that don't have nonces e.g. BLS signatures.

Actually I think originally the nonces were not in the event descriptor but in the oracle event. IIRC I moved it to the oracle event because of the TLV serialization since some event types can have multiple while others have only one, and it felt error prone to not enforce single nonce for event that require it. But based on what you say, maybe we should reconsider this and move them to the oracle event structure? @benthecarman what do you think?

renamed event_maturity_epoch to expected_outcome_time which I think is a better name.

My opinion on this is very weak, so I'll let @benthecarman decide since I think he chose the original name.

But based on what you say, maybe we should reconsider this and move them to the oracle event structure? @benthecarman what do you think?

I think both are valid. I originally had the nonces outside the event descriptor for the same reason that @LLFourn describes. However, I do like having them in the descriptor so the number is enforced at the type level. Since I think they are both equally valid maybe we should change to what @LLFourn is doing so we are more compatible?

renamed event_maturity_epoch to expected_outcome_time which I think is a better name.

I think event_maturity_epoch makes more sense, maturity is meant to signify that it is the earliest an event can happen, so for example if you're signing for "Do aliens invade in 2020", you can sign immediately if they do, rather than needing to wait until the end of the year. Also, epoch is meant to make it more explicit we are using epoch time.

I think both are valid. I originally had the nonces outside the event descriptor for the same reason that @LLFourn describes. However, I do like having them in the descriptor so the number is enforced at the type level. Since I think they are both equally valid maybe we should change to what @LLFourn is doing so we are more compatible?

Thinking about this more, we could just make 2 OracleEvent TLVs, one for multi nonce and one for single nonce. That could help keep things more error prone

I think event_maturity_epoch makes more sense, maturity is meant to signify that it is the earliest an event can happen, so for example if you're signing for "Do aliens invade in 2020", you can sign immediately if they do, rather than needing to wait until the end of the year. Also, epoch is meant to make it more explicit we are using epoch time.

It sounds like we are talking about different things. For expected_outcome_time I was trying to communicate when the event was expected (not the earliest possible). Why is the earliest useful to clients?

However, I do like having them in the descriptor so the number is enforced at the type level. Since I think they are both equally valid maybe we should change to what @LLFourn is doing so we are more compatible?

I agree that the type safety is gives you is good. You can still enforce this at the type level just use pack the nonces after the descriptor without a type and length, then use the number of nonces implied by the descriptor to decode. I think it's really useful not to have the nonces in there since then you can: (i) re-use the descriptors across different curves and signature schemes (ii) check that two descriptors describe the same outcomes through a simple equality check.

Put the nonces in the oracle_event.

Thinking about this more, we could just make 2 OracleEvent TLVs, one for multi nonce and one for single nonce. That could help keep things more error prone

I think that even though I agree it could be nicer, it would make things a bit too complicated. And I think we should be able to catch any inconsistency at deserialization time, and have internal type handle the type safety.


Refine the protocol properties of GPS Device

Currently in configuration.toml, the protocol properties are defined as follows:
https://github.com/edgexfoundry-holding/device-gps/blob/master/cmd/res/configuration.toml#L64-L67
However, the Address and Port are not used in the driver.   We only need to define the ProtocolProperties driver needs to connect to the real device, for example:
  [DeviceList.Protocols]
    [DeviceList.Protocols.gps]
      Path = "/dev/ttyUSB0"

In this case, the hard code path of GPS Device could be moved into the ProtocolProperties.

In README.md:

The default device service behavior is to read from the mock data file. This needs to be changed. Edit line 91 in driver/gpsdevice.go, changing gps_output_test.txt to /dev/ttyUSB0.

However, it is not in line 91 anymore, and it is in line 62.  Thus, we had better avoid hard code the path.

Thank you for pointing this out. What's the best way to reference the property in driver/gpsdevice.go on line 62?


Adding gpg-signed onion address / gpg key to onion sites

Description Linked Data Proposal to WWW Servers Inside Tor
This proposal is to all HTTP servers inside Tor network.
The problem: We are wondering how we could get authenticated hidden service descriptions. That is, descriptions of hidden services that are provided by the hidden service operator themselves. We would like to show these official descriptions in ahmia.fi search.
The solution proposal: Simple linked description datasheets provided by the hidden services.
How to do this: Simply provide a linked description file in your hidden service web page. You can write your information to this form and use the generated JSON file. Please make sure that your JSON description is valid JSON. You could then provide JSON information of your hidden service in this way http://something.onion/description.json and anyone could find this file.
Example JSON (DuckDuckGo):
{
"title": "DuckDuckGo",
"description": "DuckDuckGo is a search engine that is based in Valley Forge, Pennsylvania and uses information from crowd-sourced sites (like Wikipedia) with the aim of augmenting traditional results and improving relevance. The search engine philosophy emphasizes privacy and does not record user information.",
"domains": ["http://duckduckgo.com/", "http://3g2upl4pq6kufc4m.onion/"],
"keywords": ["search engine", "privacy", "no tracking", "DuckDuckGo"],
"type": "search engine",
"language": "en",
"contactInformation": "http://help.duckduckgo.com/customer/portal/emails/new",
"keyFP": "879B DA5B F6B2 7B61 2745  0A25 03CF 4A0A B3C7 9A63",
"gpg_signature": "BEGIN PGP SIGNATURE...",  //// optional
"gpg_asc": "http://duckduckgo.com/sig.asc, http://xxxxx.onion/sig.asc"
}
You can download and study the example JSON file.
Help us:
Please tell us your opinion about this. We are considering this as a simple method for getting official description information from the hidden services. We will show these in our page. See here.
Signature example
https://gist.github.com/glamrock/ae79384f6a714f6dcf0a  (the pad keeps breaking format)

Thanks, Juha!


[Help Request] Convert observations into tensors

High Level Description
my simplified observations looks like:
({
    'Agent 0': {'active': 1, 'steps_completed': 1, Waypoint(pos=array([134.8,43.03544217]), heading=Heading(0.0)},
    'Agent 1': {'active': 1, 'steps_completed': 1}
},
{
    'Agent 0': {'score': 0, 'env_obs': 0, 'done': False, 'reward': 0, },
    'Agent 1': {'score': 0, 'env_obs': 0, 'done': False, 'reward': 0, }
})

Version
1.4.0
Operating System
No response
Problems
i can't convert this obs into tensorstensor = th.tensor(obs, dtype=dtype, device=self.device), i'm so confused about what type the waypoint or via etc. is, could someone give me a simple example about def get_obs(self): and def get_state(self): thank you for your reply

Hi @knightcalvert,
Observation for each individual agent is a dictionary with multiple key value pairs. Refer here and here, which describes the observation structure and the formatted observation.
We should cast the desired individual components of the observation to tensors, rather than casting the entire observation into a tensor.
If you need further clarification, providing a minimal working code along with the question, will enable us to provide more specific assistance.


Log errors when parsing configuration values

What does this PR do?
Log a warning message every time a parsing error appears while retrieving a configuration parameter.
Motivation
For now, these errors are silently ignored potentially leading to unclear situations for the user. We want to make sure there's an easier way to detect them.
Additional Notes
Anything else we should know when reviewing?

I also wish there were better documentation added to the changes in Viper because it's unclear to me what type of parsing errors are possibly being returned and what the motivation behind these changes is. Since it was approved already it's all good, but wanted to comment on that.

Please ignore my previous comment, after looking more deeply it's clearer to me now what those errors are.

@gbbr Yes I believe it makes sense to draft a new version given the changes introduced.

@remeh Thanks! AFAIK nothing very precise for now.


Flash verification during programming

DAPLink should verify each block flashed by reading back the flash. This should either be turned on by default or enabled by a configuration value.

IOTDEV-925

Note that some flash algos do this themselves. For instance, this is the Kinetis flash algo page program functions:
uint32_t ProgramPage(uint32_t adr, uint32_t sz, uint32_t *buf)
{
    int status = FLASH_Program(&g_flash, adr, buf, sz);
    if (status == kStatus_Success)
    {
        // Must use kFlashMargin_User, or kFlashMargin_Factory for verify program
        status = FLASH_VerifyProgram(&g_flash, adr, sz,
                              buf, kFLASH_marginValueUser,
                              NULL, NULL);
    }
    return status;
}

Note that some flash algos do this themselves. For instance, this is the Kinetis flash algo page program functions:

Agreed. The flash algo should be responsible for verify. Its a little disappointing to see it listed as optional 👎
http://arm-software.github.io/CMSIS_5/Pack/html/flashAlgorithm.html

Created PR #221 to resolve this.

@mbed-bot: TEST


Memory usage in chrome exceeds 1GB

Augury version (required): latest (version on 11-6-2018)
Angular version (required): latest (verson on 11-6-2018)
Date: 11-6-2018
OS: Windows 10 pro
Description of issue:
For the past few months, I've been using Augury to improve my Angular2 workflow. However, today i noticed an unexpected sideeffect. Augury uses (even when you have no angular app running in the browser) 700-1000MB memory in idle! Tbh, for an extension doing absolutely nothing (since there is no angular app that it can inspect) this is way, WAY too much. Why is this?
Steps to reproduce:

Install augury
go to a non-angular website
Open the windows taskmanager and look at the memory usage of chrome. Collapse the processes and kill the highest memory consuming process. You will notice that crhome gives you an error that "Augury unexpectedly closed"

Hey @NickvdMeij, thanks for contributing.
While inspecting an actual Angular page, with the augury tab open, I do not see the heap space allocation you are reporting.
Augury runs in 3 different contexts (background, devtools, and within the inspected application). Here are some snapshots of the total heap space in each context (note that, for example, in the inspected application context, this includes the memory usage of the inspected application + augury).
The application being inspected here is a small demo app.

Can you take some memory snapshots?

@santiago-elustondo Hi, like I stated previously, I'll look into it later if you don't mind. Currently not on near the PC where the problem occurred but when I'm at that PC, ill see what I can find.
Furthermore, I didn't look in chrome dev tools but in the windows task manager. There I noticed Chrome taking up 4GB memory with +- 20 running processes. The highest one was 812MB and I killed it, and that's when I noticed it was augury I killed. At this time, I didn't have any angular application open in any of the tabs within Chrome.

@santiago-elustondo I doubt the heap snapshot counts the memory used by Chrome extensions. IMO it only displays memory statistics for the website you're viewing...
That said, opening Augury made my Chromium instance eat RAM like pancakes.

Thanks for the info.
We're currently doing some structural rework that aims to fix this problem. Stay tuned.

FYI, I had the same issue yesterday, the extension was taking 2.5gb of ram and 100% CPU Usage in his chrome.exe process. I don't have any screenshot, sorry, I'm just reporting that I'm experiencing the same issues has described above.

Closing in favour of #1320


Repeated runs of xgb.cv in R eventually crash

If I run xgb.cv multiple times in a single R session, one of the runs will inevitably get "stuck" and not complete.  The RAM and CPU usage does not appear to be excessive when the issue occurs.
I have reproduced this issue across a variety of machines (all Windows) using the newest version of xgboost.  I have included a minimal working example of this issue in the code below.
library(xgboost)
library(MASS)
n <- 300000
NModels <- 100
xg_pars <- list(eta=0.01, max.depth=3)
for (i in 1:NModels) {
x <- mvrnorm(n=n, mu=c(0,0,0), Sigma=matrix(c(1,0,0,0,1,0,0,0,1), c(3,3)))
y <- x[,1] ^ 2 + x[,2] ^ 2 + x[,3] ^ 2 + runif(n=nrow(x), min=-1,max=1)
xg_model <- xgb.cv(xg_pars
, data = xgb.DMatrix(data.matrix(x), label=data.matrix(y), missing=NA)
, nrounds=6000
, nfold=5
, verbose=FALSE)
}

Sander, it looks like the "." in xgb.cv got lost somehow.  Try changing "xgbcv" to "xgb.cv". You will also need to change "xgbDMatrix" to "xgb.DMatrix" and "datamatrix" to "data.matrix".
If anyone has a Mac, I'd be curious to see if this issue occurs on your machine.  I have not tested this on a Mac. I should mention that this code will take quite a while to run (hours or days, depending on your machine)

Sander, it looks like the "." in xgb.cv got lost somehow.  Try changing "xgbcv" to "xgb.cv". You will also need to change "xgbDMatrix" to "xgb.DMatrix" and "datamatrix" to "data.matrix".
If anyone has a Mac, I'd be curious to see if this issue occurs on your machine.  I have not tested this on a Mac. I should mention that this code will take quite a while to run (hours or days, depending on your machine)

super I fixed file and send to you, pls check
meantime it runs very long time
may you recommend how to short time by use simple model and then make it
more complicated step by step
this way we may find problematic point..
On Fri, Jan 1, 2016 at 11:48 AM, ronmexico2718<EMAIL_ADDRESS>wrote:

Sander, it looks like the "." in xgb.cv got lost somehow. Try changing
"xgbcv" to "xgb.cv". You will also need to change "xgbDMatrix" to
"xgb.DMatrix" and "datamatrix" to "data.matrix".
If anyone has a Mac, I'd be curious to see if this issue occurs on your
machine. I have not tested this on a Mac. I should mention that this code
will take quite a while to run (hours or days, depending on your machine)
—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/xgboost/issues/717#issuecomment-168316703.

super I fixed file and send to you, pls check
meantime it runs very long time
may you recommend how to short time by use simple model and then make it
more complicated step by step
this way we may find problematic point..
On Fri, Jan 1, 2016 at 11:48 AM, ronmexico2718<EMAIL_ADDRESS>wrote:

Sander, it looks like the "." in xgb.cv got lost somehow. Try changing
"xgbcv" to "xgb.cv". You will also need to change "xgbDMatrix" to
"xgb.DMatrix" and "datamatrix" to "data.matrix".
If anyone has a Mac, I'd be curious to see if this issue occurs on your
machine. I have not tested this on a Mac. I should mention that this code
will take quite a while to run (hours or days, depending on your machine)
—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/xgboost/issues/717#issuecomment-168316703.

Unfortunately, I cannot recommend a way to shorten the runtime.  The problem seems to occur only training a big model multiple times.  If I use simple models, the problem does not occur.
Thanks so much for your help and let me know if there's anything else I can do to help.
Will

Unfortunately, I cannot recommend a way to shorten the runtime.  The problem seems to occur only training a big model multiple times.  If I use simple models, the problem does not occur.
Thanks so much for your help and let me know if there's anything else I can do to help.
Will

One other note.  I am running this on a machine with a 4-core processor.  When I reduce the number of processors used in the parallelization by setting nthread=2, this delays, but does not prevent, the crashing.  That is, the code will still crashing, but it will successfully train more models before crashing.  That is, when I set nthread=2, the code might crash on i=150, but when i don't set nthread=2, the code crashes around i=60

One other note.  I am running this on a machine with a 4-core processor.  When I reduce the number of processors used in the parallelization by setting nthread=2, this delays, but does not prevent, the crashing.  That is, the code will still crashing, but it will successfully train more models before crashing.  That is, when I set nthread=2, the code might crash on i=150, but when i don't set nthread=2, the code crashes around i=60

About a few weeks ago, I thought I had the same issue you reported, that XGB got stuck after running on a long cv session on windows with rstudio.
then last week I realised that even for a long but "normal" for loop, my rsession will also get stuck after 3-4 hours running.
I am more thinking this is a issue with rsession memory management, perhaps others have similar experience?

@yifanxie if you can provide a reproducible case. I might have time to look into it.
The difference of R memory management on Windows and Linux is very minor.

Thanks @yifanxie and @thirdwing for looking into this.  At the top of the thread I provided a reproducible example of this issues.  The code does take quite a long time to run.  Unfortunately, this is necessary.  I only receive this issue when running relatively intense computation for a long time period

Hi guys, I'm experiencing exactly the same problem as @yifanxie and @ronmexico2718, i.e. xgboost getting stuck after several xgb.cv runs in the same R session, typically after 6-8 hours (sometimes more, sometimes less).
I'm using Windows 7 64-bit and R studio.
Just to provide an extra information, when xgboost gets stuck there is a curious situation: I find the cpu still running at 25% (I've got a quad core cpu, that means 1 core is somehow still running).

This problem might be already fixed by https://github.com/dmlc/xgboost/pull/1489.


[SPARK-18377][SQL] warehouse path should be a static conf

What changes were proposed in this pull request?
it's weird that every session can set its own warehouse path at runtime, we should forbid it and make it a static conf.
How was this patch tested?
existing tests.

Test build #68390 has started for PR 15825 at commit 1200e2d.

CC @yhuai @rxin @srown @gatorsmile

Test build #68390 has finished for PR 15825 at commit 1200e2d.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68390/
Test FAILed.

retest this please

Test build #68395 has started for PR 15825 at commit 1200e2d.

Test build #68395 has finished for PR 15825 at commit 1200e2d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68395/
Test PASSed.

Merged build finished. Test PASSed.

Regarding the code changes, LGTM except a couple of minor comments.
BTW, this introduces reasonable external behavior changes. Maybe we need to document it in the release of Spark 2.1

Test build #68583 has started for PR 15825 at commit 66874f0.

Test build #68583 has finished for PR 15825 at commit 66874f0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68583/
Test PASSed.

Merged build finished. Test PASSed.

retest this please

Test build #68665 has started for PR 15825 at commit 66874f0.

Test build #68665 has finished for PR 15825 at commit 66874f0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68665/
Test PASSed.

Merging in master/branch-2.1.

I added a releasenotes label to the ticket, so that we won't forget


Improve coding style

Make explicit comparison with NULL to address reported issue #499. Not a bug
Closes #499

(forgot to sign off commit first time)


sftp does not find any command

I have installed the extension on VSCode 1.53.2 Mac, setup the server which comes on the side but everytime I am trying any command, VSCode says:
Command 'SFTP: ...' resulted in an error (command 'sftp.... not found)
Is there anything I have to do?
Please help.

This is related to #881 .


Profile Nargo's high memory usage during compilation and determine optimization opportunities

We're currently getting very high memory usage when compiling the protocol circuits in aztec-packages so we should put in some work in order to determine where this memory is going.
There's a couple of potential tools which can help with this:

Heaptrack: Seems like it wouldn't need any changes to our code and just works externally.
Tracy: Cody has recommended this as what the crypto team uses. This is targetted more at C++ but there's a rust crate to hook into it (It does mention the need to use https://docs.rs/tracy-client/0.17.4/tracy_client/index.html to get memory data out though)
Others?

I don't know which option is best here so some exploration on how the various tools work and which is best would be very useful
Ideal outcomes:

Internal docs for how to install the chosen tool/tools.
Internal docs or scripts for usage of the chosen tool/tools.
Shortlist of locations where we can improve memory usage.
Memory reports which we can track in CI (nice to have)

I have investigated Heaptrack and Tracy:
Heaptrack
Heaptrack is straightforward to use.
You can install it with:
sudo apt-get install heaptrack
And check the installation with: heaptrack -v
Nargo can be profiled very easily: heaptrack nargo compile
This generates a dump, which must be processed like this:
heaptrack --analyze heaptrack.nargo.409749.gz
The analyse reports all the allocation done by nargo. In particular, the peaks are interesting.
For instance, compiling the blake3 test, which simply performs one call to a blackbox function, mention several peak memory around the elaborator. It makes sense because in this case, most of the work is done on the frontend.
The summary contains the following information:
total runtime: 1.47s.
calls to allocation functions: 1156118 (789159/s)
temporary memory allocations: 272381 (185925/s)
peak heap memory consumption: 78.39M
peak RSS (including heaptrack overhead): 105.05M
total memory leaked: 1.38M
Heaptrack could be added to the CI in order to keep track of the peak heap memory consumption.
Tracy
Tracy is more involved and cannot really be integrated with CI.
In fact Tracy is used to profile Barretenberg, via scripts and code instrumentation, and the scripts are not added to the CI.
Although Tracy is dedicated for profiling C++ applications, there are several Rust adapters.
Tracy requires:

code instrumentation, i.e to modify the source code to emit custom trace data to collect
server/client architecture, where the program to be profiled emits the data and the Tracy server collect that data
a GUI to show the collected data

Fortunately, each step is not too difficult to setup and at the end, you get a very powerful profiler.
Installation
On the mainframe, Tracy needs to be compiled from source:
git clone https://github.com/wolfpld/tracy
git checkout tags/v0.11.0
sudo apt-get install -y libdbus-1-dev libdbus-glib-1-dev libtbb-dev libfreetype-dev ;
cmake -B capture/build -S capture -DCMAKE_BUILD_TYPE=Release
cmake --build capture/build --config Release --parallel

Tracy is very sensitive to versioning, the client/server versions must be identical, which can be an issue due to the rust wrapper for the client. I found that version 0.11.0 works, but in order to get it to compile, I had to add the following line inside capture/CMakelist.txt:
add_compile_options(-Wno-error=stringop-overflow)
The master version does not requires it but I could not find a compatible rust client.
For information, the libraries I had to install for the master version are:
pkg-config, libxkbcommon-dev, libxkbcommon-x11-dev, libwayland-dev, wayland-protocols, libglvnd-dev, libdbus-1-dev
The profiler must be installed locally. For instance, on MacOS you'd simply do
brew install tracy
Instrumentation
Nargo needs to be modified in order to emit trace data. For this I use tracy-client which support memory profiling.
This is done by adding tracy-client = { version = "0.17.1", default-features = false, features = ["enable"] } to noir/tooling/nargo_cli/Cargo.toml
In main.rs, you can add the following to enable memory profiling:
use tracy_client::{Client, ProfiledAllocator};
#[global_allocator]
static GLOBAL: ProfiledAllocator<std::alloc::System> =
ProfiledAllocator::new(std::alloc::System, 100);
and then you start tracy client in main():
fn main() {
let _client = Client::start();
...
Sections of the code can be profiled simply by adding a span on the scope you are interested in. For instance I added one in compile_workspace_full(..):
let _span = span!("compile workspace");
You can additionally emit values or text.
Profiling
Once Nargo is instrumented, you can profile it by running:
capture/build/tracy-capture -o tracy_dump
This should tells you: Connecting to <IP_ADDRESS>:8086...
...waiting for a client to connect. However, since Nargo is instrumented, the lsp might interfere, so if you use VSCode, you should disable the Noir Language Support VSCode extension.
You can now run Nargo as usual (from another terminal, but on the same machine) and you should see that it connects to tracy.
When Nargo finishes, tracy will have collect the data on the provided output (-o tracy_dump).
You can visualise it locally using tracy by running tracy tracy_dump. Since it will open a GUI for visualisation, you need to run this on your computer, not on the mainframe.
I profiled the poseidonsponge_x5_254 test case and it shows that memory usage peaks at 380 MB during the mem2reg pass.
Tracy could be used to help debugging a specific memory issue.

I profiled the peak memory usage of the test programs, and they are all around 80MB, except for a few below:

Program
Peak Memory

bench_2_to_17
3.1G

regression_5252
3G

ram_blowup_regression
2.8G

eddsa
885M

poseidonsponge_x5_254
396M

regression_4709
387M

hashmap
280M

sha256_var_padding_regression
237M

sha256_regression
190M

regression_4449
185M

sha2_byte
150M

sha256_var_size_regression
130M

workspace
128M

poseidon_bn254_hash_width_3
128M

conditional_1
115M

uhashmap
114M

no_predicates_numeric_generic_poseidon
104M

fold_numeric_generic_poseidon
102M

sha256
93M

keccak256
90M

debug_logs
88M

array_dynamic_blackbox_input
87M

nested_array_dynamic
86M

sha256_var_witness_const_regression
84M


[Feature] Add additional steps to the Step1 tagging activity

Summary

Clarify the Step1 "tagging activity" by adding additional instructions/details.
Changes

Adds additional information.
No risks beyond another sentence to read. :wink:
:dart: Once there's some agreement here, I'd be glad to build up a pull request to flex my GitHub skills. :grinning:
Thank you for the feedback in advance!
Additional context
Within Step 1

4. In the field for Tag version, specify a number. In this case, use v0.9. Keep the Target as main.

could be
4. In the field for Tag version, specify a number. In this case, use v0.9. Click Create new tag. Keep the Target as main.

@mjbear Thank you for raising this issue! ✨ I'll triage this for the team to review


Install may be broken on Ventura

Device: 14" 2021 MBP
When installing from Ventura, the install silently failed to set Asahi as the default. When opening startup options, the device bootlooped until it eventually opened up RecoveryOS to let me know that macOS needs to be reinstalled. Selecting my drive as the startup disk let me boot into macOS again. When going into startup options after this, I was able to select the Asahi Linux option and got this message:
https://imgur.com/a/cK7QPrK
Going into startup options started the bootloop again, which I was able to get out of by selecting the startup disk. I'm assuming that it doesn't like booting into an old RecoveryOS, as Asahi currently uses 12.3 as far as I know.

(pressed enter before addind desc lol)

I cannot reproduce this, and your description isn't really consistent with what you think happened.

When installing from Ventura, the install silently failed to set Asahi as the default.

Then it would just boot normally into macOS. The fact it didn't means it did set Asahi as the default.

When opening startup options, the device bootlooped until it eventually opened up RecoveryOS to let me know that macOS needs to be reinstalled.

That means you didn't follow the instructions properly (hold down the power button), so you ended up trying to boot Asahi Linux without following the second step of installation. At this point you have a macOS XNU kernel and no root filesystem installed, which results in the bootloop. The correct action in this case it to shut down the machine without doing anything (just holding down power works), wait for it to be properly shut down, then follow the post-install instuctions again (hold down the power button etc).

Selecting my drive as the startup disk let me boot into macOS again.

Right, because nothing actually happened to your regular OS install. But at this point you made it much harder to actually complete the install, because Asahi is no longer the default, so...

When going into startup options after this, I was able to select the Asahi Linux option and got this message

The system requires paired Recovery to change boot options, and the booted Recovery corresponds to the default boot OS. By setting macOS to the default, you broke this.
Unfortunately, there's no user friendly fix for the situation you got yourself into, because you can't set Asahi as the default boot partition in this state, because the installer uses a trick to make it into a sort of combined "USB install + bootable OS" state where the regular macOS boot pickers won't do the right thing when making it bootable. You need to use bless --setBoot --device /dev/<your Asahi Linux system volume> from macOS and then try again the shutdown, hold power, etc. process. Eventually we will have some kind of "repair" option in the installer that can do this (and other fixes) for you. Alternatively, delete your partitions and reinstall.

I've added an explanatory note to the installer so that others who run into this issue know what to do.

Also added a feature to the installer to resume broken installations like this. Try curl -L https://alx.sh/dev | sh from macOS and see if that lets you fix your existing install.

https://www.raspberrypi.com/news/the-ventura-problem/
So it seems that changes to the way files are copied in Ventura might be causing issues.

This has nothing to do with Ventura. You're using expert mode. "min" has never worked in expert mode. This is fixed in the latest installer dev releases already.

Hi, I tried reinstalling after wiping the partition and had the same issue. I recorded the whole process here: https://youtu.be/q9NPPEX3Z8Q


Update for audit By Fandy - [closed]

In GitLab by @luotian-github on Jul 3, 2018, 06:53
Merges dev-audit-new -> dev

In GitLab by @wknet123 on Nov 13, 2019, 11:11
The test coverage for backend is 23.9%  ,The test coverage for frontend is 38.11   , check  consolse log

In GitLab by @wknet123 on Nov 13, 2019, 11:11
duplicate #1486

In GitLab by @wknet123 on Nov 13, 2019, 11:11
closed


Water rendering

[x] Render a alpha blended water layer
[x] Add a wave motion
[x] Adjust normal's to the new position
[ ] Add light distortion of the area rendered behind.
[ ] Add reflection
[ ] Add refraction

Reference

This is almost done. I'll close it because I don't plan to continue in this project


Fixed #26679 -- Documented which methods are disabled on RelatedManager if there's an intermediate table

https://code.djangoproject.com/ticket/26679

merged in 59523c06fe482232dad9dc63ef0baab63418196d, thanks!


2D categorical plots do not plot all categories

In the basic notebook tutorial there is an example on a 2D categorical plot.
The raw data contains 3 x 5 categories, but only 2 x 4 bins are visible when plotting with matplotlib:
histy = hg.Categorize('eyeColor', )
histx = hg.Categorize('favoriteFruit', value=histy)
histx.fill.numpy(df)
histx.plot.matplotlib();

The values seem to be correctly stored in the histogram, just not correctly plotted:
x_labels, y_labels, grid = get_2dgrid(histx)
x_labels, y_labels, grid

(['apple', 'banana', 'strawberry'],
 ['blue', 'brown', 'green', 'grey', 'red'],
 array([[24., 27., 26.],
        [25., 24., 22.],
        [34., 25., 23.],
        [21., 29., 26.],
        [39., 28., 27.]]))

After digging a bit, it seems the problem lies with pcolormesh, used in https://github.com/histogrammar/histogrammar-python/blob/dd3be584e9b55a3a1a9e9c3bad2c7ed5e075d2b1/histogrammar/plot/matplotlib.py#L763

It seems pcolormesh doesn't like categorical coordinates. Forcing shading='nearest' doesn't change anything.

It seems the issue is during the plotting with pcolormesh in line https://github.com/histogrammar/histogrammar-python/blob/dd3be584e9b55a3a1a9e9c3bad2c7ed5e075d2b1/histogrammar/plot/matplotlib.py#L763
pcolormesh expects to receive n+1 edge coordinates, but for categorical variables it gets only n.
If lines 759 to 761 are changed to
# plot 2d grid
xtick_pos = np.arange(len(x_labels)) + 0.5
ytick_pos = np.arange(len(y_labels)) + 0.5

I believe that the categorical features are plotted correctly, but one would have to check if nothing wrong happens to the numerical ones.

Thanks Joao!
I got it fixed now. Indeed pcolormesh needs edges, not centers.
I'll push the fix and release a new patch release.

Fyi I released histogrammar v1.0.26 with the fix.


Pin nireports version and allow GIFs

Closes none. Overrides the changes in #880.
Changes proposed in this pull request

Stop hardcoding extensions for GIF figures.
Pin Nireports version to one that supports GIFs.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 28.48%. Comparing base (4474c00) to head (1502dbe).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #883   +/-   ##
=======================================
  Coverage   28.48%   28.48%
=======================================
  Files          68       68
  Lines       10152    10152
  Branches     1146     1146
=======================================
  Hits         2892     2892
  Misses       7162     7162
  Partials       98       98

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

🚨 Try these New Features:

Flaky Tests Detection - Detect and resolve failed and flaky tests


Not done yet but have basic logic mapped out for tests

Please lmk if I missed stuff. It says some files not shown so I am not sure what that means. Don't forget to add our hosts!


!ecp and !events command

I've also since learnt not to rebase onto master but instead to merge onto master. Thus why you see the merge remote commits in this PR :'(

Woops, I thought this was already merged in. I've put !events on top of this as well, could it be reviewed again @TRManderson

maybe split it out?

I am not that good at git, I should be making branches for each command, I'll do that in the future

fair fair hehe

If you want to split it out:
$ git branch convert-events 904e762
$ git reset HEAD~2
$ git push --force
then push up the convert-events later branch when ready.
I'm sure there are other ways, but that sequence should give you two branches, and two PRs later.

woah @CameronAavik I didn't mean to unroll the list comp into a for loop, I meant given you were creating several intermediate lists you could just use a generator expression

The last two list transformations act on the entire list, not per item so I couldn't do a list comp. I only combined the two list comprehensions into a for loop as I thought that the first one was getting a bit long.
Also I think it's more readable personally

Yeah it is more readable, and I'm fine with it, hence the approval


Can't copy

ctrl+c not work!

Nope, sure doesn't. The default keybinding for copy is Ctrl+Shift+C, as we've discussed in many other threads. If you want to bind Ctrl+C as copy, you can do so by following this doc


Task Comment

#942  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


Time scale bugs in bar and line charts type

Hi,
I see there's some issues with charts of bar type when "xAxes" are time scaled. Found myself with that bug and did some examples to confirm:

Simple example using "category" scale (works fine): http://codepen.io/CauanCabral/pen/dpGkzX
Simple example using "time" scale (doesn't works): http://codepen.io/CauanCabral/pen/ZpQvbb
Seems that problem occur not only with bar type, but also with line, as follow:
Simple example of line type and "time" scale (doesn't works too): http://codepen.io/CauanCabral/pen/WGAXJg
My workaround are treating scale as "category", set scale with integer timestamp. So format "ticks" and "tooltips" manually to display as date. Another trick is explicity define min and max of axes.
Any idea what are the scale problem? If so, maybe I can help with a PR.
Thanks for that great work.

@CauanCabral are you referring to the giant gap on the left side of the chart before the first line?

@etimberg yes. But are others problems too.
In image above, my datasets have 3 dataset, with 6 points, but line have only 5.
I build him explicitly setting xLabels and yLabels - this is wrong? My x values are unix timestamp.
For chart bar at codepen example, you can see again 1 "bar" is missing from chart (array data define 5 "bars", but shown only 4). Also, the last two labels are overlapping.

One more thing®, when scale are not "time", there's no problem whith labels/points.
Thanks.

#3233 has a potential solution to the large offset problem. it comes in because of the larger labels.
The bars do not work well on time axes. This is covered by other open issues. The problem is that it is difficult do determine a sizing algorithm that works in the majority of cases. If you have ideas, please leave them in #2415

Thanks, I'll following thats issues.
And about missing datapoints in graphic? That occur in both graphics type (line and bar) when scale is time.
I'm forgetting something or it's bug?

Do you mean the missing bar?

Yes

Yup, I think that's related. I think it's getting calculated with a very small width and so doesn't appear


Need support for Node.js 20

Node.js 20 will be designated as the active LTS version as of October 24, 2023.
The SDK has a dependency on @azure/msal-node, which appears to be outdated. Running the npm install commandresults in warnings due to its incompatibility with Node.js 20.

@ramfattah Any news to support the current nodejs LTS

Also Waiting for Node.js 20 Support...

+1 We were hoping to update our project to node 20 but were limited to node 18 due to this dependency.

Any news on this one @microsoftopensource  / or maybe @ceciliaavila?

Apparently there are no breaking changes between @azure/msal-node v1 and v2 aside from the dropped nodejs 16 support in v2.
So until the dependency is being updated you could just overwrite the dependency globally in package.json
[...]
        "overrides": {
		"@azure/msal-node": "2.6.0"
	},
	"dependencies": {
		"@azure/msal-node": "2.6.0",

[...]

Are there plans to upgrade to @azure/msal-node v2 and therefore support Node 20?

@alexnault Yes.  But there is a complication.  While it's out of support, we still have a healthy number of customers on Node 16.  Not good manners to just drop it without a heads up.  For the next few releases, the release notes will include a notice about updating to Node 18+.  Does elovins suggestion work for you?

@tracyboehrer Great to hear that Node 20 support is on the horizon!
I understand that dropping support for Node 16 is a breaking change. To me, this shoudl warrant a major version upgrade over a notice, like @azure/msal-node did.
Meanwhile, I added overrides as @elovin suggested and it does work:
"overrides": {
  "@azure/msal-node": "^2.6.1"
}

Cheers!

is error<EMAIL_ADDRESS>really not support  node 20?
maybe  just  remove this constraint  and allow node 20 in<EMAIL_ADDRESS>?
The engine "node" is incompatible with this module. Expected version "10 || 12 || 14 || 16 || 18".

Hey, what's the status of this? Waiting for this to be implemented for https://github.com/OfficeDev/TeamsFx/issues/10849

We received an email today that Azure Functions will drop node <18 next month and projects need. to update to keep receiving security updates and costumer service. In this regard I think this issue's priority should be elevated and done as soon as possible.
Excerpt from the Microsoft email:

Support for Node.js 18 ends on 30 April 2025—upgrade your apps to Node.js 20
You’re receiving this email because you have one or more Node.js 18 app(s) on Azure Functions.
On 30 April 2025, Node.js 18 will end. Your apps that are hosted on Azure Functions will continue to run, but security updates will no longer be available, and we’ll no longer provide customer service for Node.js 18. Learn more about Azure Functions stack version support.

Thanks all.  This is high priority for us, but we are blocked by another dependency.  Working it.

Outdated dependencies in botbuilder are starting to rack up vulnerabilities, e.g. https://security.snyk.io/vuln/SNYK-JS-AZUREIDENTITY-7246760, https://security.snyk.io/vuln/SNYK-JS-AZUREMSALNODE-7246761 - @azure/identity is two major versions behind, and then there's<EMAIL_ADDRESS>Given that some of these are inside Microsoft, perhaps there could be a way to backport some of the fixes to the older versions, to keep things maintained?
As much as the breaking changes are not necessarily viable for certain customers who are on old versions of Node.js (which is unmaintained for 9 months, mind you), increasing the vulnerability footprint is a problem for other customers, and I'm not sure which one is more important (and dangerous).

One more vulnerable outdated dependency under botframework-streaming: https://security.snyk.io/vuln/SNYK-JS-WS-7266574


Changed to Sync pool model

Changed threadpools to be Sync, which required the addition of a non-sync manager type in between Pool and Scoped.
Added Sentinels to respawn threads (make respawn optional in the future?).
Moved benchmarks to benches directory.
Removed build script and rustc dependency, changed lazy_static dependency to a fixed version number.
Some renaming of methods.

Hi, thanks for your contribution!
Could you explain a bit in detail why the manager type is needed? It's not directly obvious to me :)
Likewise for Sentinel, I'm not exactly sure what it is/how it works.
What is the motivation for the method renames? (That is, why are the new names better than the old ones?)

Hi, just wanted to say that I haven't forgotten about this patch, but I hadn't yet time to look into it further.
I also still have those open question in my first comment. :)

Any update on this? :)


log the expected /etc/exports config

@jsingle this just prints out the expected config so people can just copy paste it into their etc/exports file. hoping that helps a few folks.

it should also only print if there is a need to update the config, which for most people shouldn't be an issue.

Awesome, looks great! :shipit:


chore: Update to go 1.18 and other fixes

Description of change

chore: update man pages
chore: update to go 1.18
feat: make production releases
fix: unshallow error
fix: description on dispatcher updates

Type of change

[ ]  New feature
[x]  Bug fix
[x]  Refactor
[ ]  Documentation

@raulb Is it possible to test out the basic functionality of this PR first, by adding a condition to the workflow file, that allows the CI process to be triggered whenever a push is made to the raul/fix-dispatch-event feature branch?
This way, we may be able to catch anything that you may want to tweak before wrapping up, approving and merging the PR. What do you think?

@jayjayjpg tested:

https://github.com/meroxa/cli/runs/6576722975?check_suite_focus=true
Dispatch one depends on turbine-go so I'll verify on the next update if that's ok


Fix bug in sagemaker cluster factory

Current dependencies on/for this PR:

main

PR #459   👈

This stack of pull requests is managed by Graphite.


NTR: expand carrier screening terms

[ ]  preimplantation genetic testing,
[ ] cell free fetal DNA,
[ ] and now less commonly things like integrated screening

I agree that genetic carrier screening should be parent. This is just a note (to myself or others ;) ) to expand terms under genetic carrier screening. More research will need to be done. Any references you know of would be greatly appreciated.

No problem as far as expanded carrier screening including reproductive carrier screening this is probably helpful:
PMID: 30240948
PMID: 35334631
PMID: 31774570
PMID: 37086152
PMID: 36756860

Thanks for your input

added synonyms and cell free DNA testing. closing


Python 3 support?

Year 2020 has landed ;-)

I've done some testing on Python 3, and it looks good so far.
Some test cases and CI would be helpful.
Also, it would be great to see this published on PyPI, where setup.py/pyproject.toml can advertise the Python version support.  https://pypi.org/project/ReDoS/ is available ;-)  Get it while you can.


Yaml Grammar

The LinkedIn Engineering Team recently wrote about their experience implementing tool use with LLMs. They explain that they structure every tool call in YAML, not JSON because YAML requires fewer tokens:

Since the parameters to the call have to match the input schema, we ask the LLM to output them in a structured manner. Most LLMs are trained on YAML and JSON for structured output. We picked YAML because it is less verbose, and hence consumes fewer tokens than JSON.

This seems to be a very important reason to support structured YAML generation.
I found the grammar for YAML here and would love for Outlines to implement this.
Thoughts?

This should be possible with CFG-structured generation.  There's a lark grammar for YAML here, but it might need to be changed in order to properly support any parser restrictions the current CFG-structured generation may have (e.g. LALR(1) only).
In the meantime, we can leave this open for people to try and report any issues or necessary changes.

Duplicate of #923


Global CSS from SCSS

Hello,
I'm Angular2 beginner and I'm fighting with an issue for that last few days and still cant figure out how to do it. I've checked all issues and I couldn't find any information.
I've installed your app and everything is working well.
So, my issue is:

I'm trying to set global SCSS (in the root or /scss ) file outside of my components and tell Webpack to compile it. So how to do this?
Then how to load the compiled file? Should I specified somewhere? index.html?

Just to mention:
in app.component I've changed ViewEncapsulation to ViewEncapsulation.Emulated
Thanks you !

Solved by adding my global scss in app.component!


Update Codesnippet Build to Produce Artifacts for Release

This PR adds the missing Maven plugins that are needed to produce the artifacts needed for a release to Maven

/check-enforcer override


amf-headers: 1.4.30 -> 1.4.32

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/amf-headers/versions.
meta.description for amf-headers is: Headers for The Advanced Media Framework (AMF)
meta.homepage for amf-headers is: https://github.com/GPUOpen-LibrariesAndSDKs/AMF
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.4.32 in filename of file in /nix/store/45ibybkz5d4mclfvpz518qyjwma036ci-amf-headers-1.4.32

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
amf-headers
sunshine

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/45ibybkz5d4mclfvpz518qyjwma036ci-amf-headers-1.4.32 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A amf-headers https://github.com/r-ryantm/nixpkgs/archive/77b028c179c4e14cd7dfb1ac42c63887b8c4304d.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/77b028c179c4e14cd7dfb1ac42c63887b8c4304d#amf-headers

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/45ibybkz5d4mclfvpz518qyjwma036ci-amf-headers-1.4.32
ls -la /nix/store/45ibybkz5d4mclfvpz518qyjwma036ci-amf-headers-1.4.32/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

amf-headers
sunshine

Maintainer pings
cc @devusb for testing.

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

2 packages built:

amf-headers
sunshine

Tested Sunshine, works fine with bump.


[Bug]: Improve website logo animation

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
Features page website logo animation is different from all pages..
I want to Fixed this issue.
@mansiruhil13 please assign me this task.
https://github.com/user-attachments/assets/9f36e350-d6d0-4e23-b64f-fec51cba7e51
Add Screenshots
No response
What browsers are you seeing the problem on?
No response
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC contributor
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

@mansiruhil13 @4F24L


Scale out to between 0 and 1 before computing loss function in keras

Is there a way to scale the output of a CNN before computing the loss function in keras. It would have to work for batches as well. Specifically I am training images and the output is a probability map of each pixels for the entire batch. Then I compute the loss function with the ground truth data. The problem is that the predicted output during training at some intermediate stage lies between 0.02 to 1e-4 and the ground truth pixels are between 0 and 1 so the loss function doesnt penalize pixels which dont look similar to the ground truth. I get this by visualizing the squared error between the output at some intermediate stage and the ground truth data.

I would like the squared error between ground truth and prediction to look like this which i can get by scaling the prediction between 0 and 1 and then computing the squared difference of ground truth and prediction

@anorak94 Moving this issue to closed status as there has been no recent activity, in case you still face the error please create a new issue.Thanks!


Add change log file.

Hi, as I can see, you are carefully fill tags and labels for issues in your repo.
For such cases I create a github_changelog_generator, that generate change log file based on tags, issues and merged pull requests from :octocat: Issue Tracker.
This PR add change log file to your repo (generated by this script).
You can check, how it is look like here: Change Log
Some essential features, that has this script:

it exclude not-related to changelog issues (any issue, that has label question duplicate invalid wontfix )
Distinguish issues according labels:

Merged pull requests (all merged pull-requests)
Bug fixes (by label bug in issue)
Enhancements (by label enhancement in issue)
Issues (closed issues w/o any labels)

Generate neat Change Log file according basic change log guidelines.

You can easily update this file in future by simply run script: github_changelog_generator dhennessy/PAPreferences in your repo folder and it make your Change Log file up-to-date again!
Hope you find this commit as useful. :wink:

Maintaining a better changelog is probably worth considering, but I'm not convinced that a script-generated on adds value.


Fix: Travis configuration

This PR

[x] updates Composer itself in the before_install section
[x] installs dependencies with Composer in the install section
[x] consistently indents the configuration file with 4 spaces (the majority of it already is)

Can you rebase?

I'm closing this out as I've pulled in all the changes manually. Thanks!

@tedivm
:+1:


ctr/commands/images/push: don't show progress if it is debug mode

If user sets debug mode, the command push should only show the debug log
information. If the stdout is with flush by the progress status, it is
hard to see the debug log.
Signed-off-by: Wei Fu<EMAIL_ADDRESS>

LGTM


Static initialization

Currently it isn't possible to have a global spin lock because global vars must be statically initialized. Unfortunately the only solution at the moment is to make both fields public so they can be initialized by hand (for this exact reason value is public in anUnsafeCell).

hmm, really like the locks holding data, but I suppose Rust leaves us with no good choice. Static mutex without data does get the job done, so I'll close this.


Can't input Chinese in Linux system

Issue Type: Bug
As the title, I can't input the Chines character in linux system.
When I input it, the vscode will not reponse and crash.
My system is fedora 27. The input method have been tried are fcitx and hime. Locale settings is zh_TW.
By the way, before I change locale to zh_TW, I can't even open the file contents Chinese character.
Could anyone help me to solve this problem? Many thanks.
Really need to using chinese because I'm writing the website need!!
VS Code version: Code 1.21.1 (79b44aa704ce542d8ca4a3cc44cfca566e7720f1, 2018-03-14T14:46:30.761Z)
OS version: Linux x64 4.15.12-301.fc27.x86_64

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz (4 x 1188)

Load (avg)
1, 1, 1

Memory (System)
3.74GB (0.39GB free)

Process Argv
/usr/share/code/code --unity-launch

Screen Reader
no

VM
0%

Extensions (3)

Extension
Author (truncated)
Version

htmltagwrap
bra
0.0.7

python
ms-
2018.2.1

vscode-djaneiro
the
1.4.0

(1 theme extensions excluded)

Reproduces only with extensions

What happens when it crashes? Is there an error message?

By the way, before I change locale to zh_TW, I can't even open the file contents Chinese character.

What happened when you tried to open those files?

Thanks for reply.
I don't what happened when it crashes... I just input some chinese words, and a few seconds later, the vscode will not response, and a few seconds later(maybe 30s), vscode will popup a message box asking me what to do next(restart, waiting response, close)? There is no any error message in this message box. So, I don't know how to do next.
When I open the files content Chinese words, the result just like the above. As i mentioned this problem can be solved by changing locale to zh_TW. note: This issues also happen on windows version.

@sloanryuu do you still run into this issue with latest version?