Running TornadoVM with FPGAs on AWS F1 instances

Describe the bug
Following the documents on TornadoVM from This Link, I tried to run some examples of TornadoVM with FPGA on AWS F1 instances, However, it keeps showing the following error message:

How To Reproduce
Just like the document from the following link:
https://tornadovm.readthedocs.io/en/latest/cloud.html#running-on-aws-ec2-f1-xilinx-fpgas
Expected behavior
To completely generate the bitstream and run the code on FPGA.
Computing system setup (please complete the following information):

OS: Centos 7
TornadoVM commit id: 3d3d13d5553b16de2492121226c7818a3eb689a0 (Latest update on master branch)
AMI version: 1.12.2
Vitis version: 2021.2

Additional context
I also tried an older release of TornadoVM (v0.15.2) and the error message changed as:

I think in this case the compilation process completes since it takes around 2 hours to show me the error message.

Thank you @ShAlireza, I will have a look on that.

Thank you for reaching out! We will provide a patch for it as soon as possible.

hi @ShAlireza, we have just merged the PR that fixes the issue. Please try based on the updated documentation.
The requirement that we encountered for the FPGA DEV AMI: 1.12.2 is that Amazon users should install python3 (tested with Python 3.9.6) and OpenSSL 1.1.1 in CentOS 7. If those requirements are satisfied, you should be able to run the example:
tornado --jvm "-Ds0.t0.device=0:0 -Dtornado.fpga.conf.file=/home/centos/TornadoVM/bin/sdk/etc/aws-fpga.conf -Xmx20g -Xms20g" --printKernel --threadInfo -m tornado.examples/uk.ac.manchester.tornado.examples.dynamic.DFTMT --params="256 default 1"
WARNING: Using incubator modules: jdk.incubator.vector
WARNING: package org.graalvm.compiler.spi not in jdk.internal.vm.compiler
Initialization time:  681515436 ns

Version running: default !
__attribute__((reqd_work_group_size(64, 1, 1)))
__kernel void computeDFT(__global long *_kernel_context, __constant uchar *_constant_region, __local uchar *_local_region, __global int *_atomics, __global uchar *inreal, __global uchar *inimag, __global uchar *outreal, __global uchar *outimag, __global uchar *inputSize)
{
  int i_4, i_33, i_32, i_11, i_10, i_5, i_6, i_38;
  float f_9, f_7, f_8, f_31, f_25, f_26, f_23, f_24, f_29, f_30, f_27, f_28, f_17, f_18, f_15, f_21, f_22, f_19, f_20;
  ulong ul_14, ul_1, ul_2, ul_0, ul_16, ul_37, ul_3, ul_36;
  long l_35, l_34, l_13, l_12;

  // BLOCK 0
  ul_0  =  (ulong) inreal;
  ul_1  =  (ulong) inimag;
  ul_2  =  (ulong) outreal;
  ul_3  =  (ulong) outimag;
  i_4  =  get_global_size(0);
  i_5  =  get_global_id(0);
  // BLOCK 1 MERGES [0 5 ]
  i_6  =  i_5;
  // BLOCK 2
  f_7  =  (float) i_6;
  // BLOCK 3 MERGES [2 4 ]
  f_8  =  0.0F;
  f_9  =  0.0F;
  i_10  =  0;
  __attribute__((xcl_pipeline_loop(1)))
  for(;i_10 < 256;)
  {
    // BLOCK 4
    i_11  =  i_10 + 6;
    l_12  =  (long) i_11;
    l_13  =  l_12 << 2;
    ul_14  =  ul_0 + l_13;
    f_15  =  *((__global float *) ul_14);
    ul_16  =  ul_1 + l_13;
    f_17  =  *((__global float *) ul_16);
    f_18  =  *((__global float *) ul_14);
    f_19  =  *((__global float *) ul_16);
    f_20  =  (float) i_10;
    f_21  =  f_20 * 6.2831855F;
    f_22  =  f_21 * f_7;
    f_23  =  f_22 / 256.0F;
    f_24  =  native_sin(f_23);
    f_25  =  native_cos(f_23);
    f_26  =  f_25 * f_19;
    f_27  =  fma(f_24, f_18, f_26);
    f_28  =  f_9 - f_27;
    f_29  =  f_17 * f_24;
    f_30  =  fma(f_25, f_15, f_29);
    f_31  =  f_8 + f_30;
    i_32  =  i_10 + 1;
    f_8  =  f_31;
    f_9  =  f_28;
    i_10  =  i_32;
  }  // B4
  // BLOCK 5
  i_33  =  i_6 + 6;
  l_34  =  (long) i_33;
  l_35  =  l_34 << 2;
  ul_36  =  ul_2 + l_35;
  *((__global float *) ul_36)  =  f_8;
  ul_37  =  ul_3 + l_35;
  *((__global float *) ul_37)  =  f_9;
  i_38  =  i_4 + i_6;
  i_6  =  i_38;
  // BLOCK 6
  return;
}  //  kernel

Task info: s0.t0
	Backend           : OPENCL
	Device            : xilinx_aws-vu9p-f1_shell-v04261818_201920_3 CL_DEVICE_TYPE_ACCELERATOR (available)
	Dims              : 1
	Global work offset: [0]
	Global work size  : [256]
	Local  work size  : [64, 1, 1]
	Number of workgroups  : [4]

Total time:<PHONE_NUMBER> ns

Validation: SUCCESS

If you have any further issue, feel free to re-open this one, or open a new one.

I close this issue.


Add tests for Rust

Damn, I misclicked and merged it immediately. Sorry about that, this Merge button is far too big.


It's unclear what to name the "request wrappers" in the SDKs

In the SDKs, we construct "request wrappers" which include any information needed to send the request. This includes path parameters, query parameters, headers, and of course, the request body:
client.setUser({
  userId: "123", // path parameter
  body: {        // HTTP request body
    name: "Jane",
  }
}}

Right now, it's difficult in the SDKs to pick a name for that wrapper type, e.g. the ??? below
interface ??? {
    userId: string;
    body: SetUserRequest;
}

The ideal name is probably SetUserRequest, but that's already been taken (for the request body).

Done!


Optimize compilation phase for codec registration checker

Time measurement of compilation phases on Hydra (commercial) project, with -Ystatistics flag:
[info]   parser                      : 1 spans, ()473.728ms (0.2%)
[info]   namer                       : 1 spans, ()118.276ms (0.0%)
[info]   packageobjects              : 1 spans, ()1.863ms (0.0%)
[info]   typer                       : 1 spans, ()124027.494ms (52.1%)
[info]   semanticdb-typer            : 1 spans, ()10044.861ms (4.2%)
[info]   dump-persistence-schema     : 1 spans, ()844.721ms (0.4%)
[info]   superaccessors              : 1 spans, ()353.506ms (0.1%)
[info]   extmethods                  : 1 spans, ()74.814ms (0.0%)
[info]   pickler                     : 1 spans, ()150.427ms (0.1%)
[info]   xsbt-api                    : 1 spans, ()1645.657ms (0.7%)
[info]   xsbt-dependency             : 1 spans, ()1767.425ms (0.7%)
[info]   refchecks                   : 1 spans, ()7264.879ms (3.1%)
[info]   codec-registration-class-sweep: 1 spans, ()129.464ms (0.1%)
[info]   patmat                      : 1 spans, ()11113.825ms (4.7%)
[info]   serializability-checker     : 1 spans, ()662.502ms (0.3%)
[info]   codec-registration-serializer-check: 1 spans, ()38826.128ms (16.3%)
[info]   uncurry                     : 1 spans, ()7006.531ms (2.9%)
[info]   fields                      : 1 spans, ()5867.108ms (2.5%)
[info]   tailcalls                   : 1 spans, ()352.656ms (0.1%)
[info]   specialize                  : 1 spans, ()954.033ms (0.4%)
[info]   explicitouter               : 1 spans, ()1027.995ms (0.4%)
[info]   erasure                     : 1 spans, ()10823.126ms (4.6%)
[info]   posterasure                 : 1 spans, ()684.086ms (0.3%)
[info]   lambdalift                  : 1 spans, ()1444.621ms (0.6%)
[info]   constructors                : 1 spans, ()496.269ms (0.2%)
[info]   flatten                     : 1 spans, ()535.716ms (0.2%)
[info]   mixin                       : 1 spans, ()675.139ms (0.3%)
[info]   cleanup                     : 1 spans, ()589.357ms (0.2%)
[info]   delambdafy                  : 1 spans, ()1370.026ms (0.6%)
[info]   jvm                         : 1 spans, ()8177.186ms (3.4%)
[info]   semanticdb-jvm              : 1 spans, ()13.902ms (0.0%)
[info]   xsbt-analyzer               : 1 spans, ()168.936ms (0.1%)

or just including the phases added by ash:
[info]   dump-persistence-schema     : 1 spans, ()844.721ms (0.4%)
[info]   codec-registration-class-sweep: 1 spans, ()129.464ms (0.1%)
[info]   serializability-checker     : 1 spans, ()662.502ms (0.3%)
[info]   codec-registration-serializer-check: 1 spans, ()38826.128ms (16.3%)

To be researched what specifically in org.virtuslab.ash.SerializerCheckCompilerPluginComponent#newPhase makes it so slow...
probably b/c it checks for every combination of types discovered in the @Serializer-annotated class and the types detected in the preceding codec-registration-class-sweep phase

This problem will likely be solved by replacing some Lists with Sets.

Results from my compilation statistics for our phases (slightly different from PawelLipski's snippet):
[info]   dump-persistence-schema     : 1 spans, ()2651.299ms (2.4%) [info]   codec-registration-class-sweep: 1 spans, ()46.157ms (0.0%) [info]   serializability-checker     : 1 spans, ()255.628ms (0.2%) [info]   codec-registration-serializer-check: 1 spans, ()12359.217ms (11.4%)
And flamegraph generated by https://github.com/jvm-profiling-tools/async-profiler profiler on Hydra - in attachment. Potentially correlated fact is that:

for dump-persistence-schema phase's (2,4% compilation time)newPhase - there were 160 samples ddetected by profiler
for codec-registration-serializer-check (11,4% compilation time) phase's newPhase - there were 955 such samples
So, it might be possible, that this long time is not caused by some lack of optimization inside SerializerCheckCompilerPluginComponent#newPhase (tried a lot of things to optimize it more, but failed to shorten it's duration). The problem might be caused by the fact, that this SerializerCheckCompilerPluginComponent#newPhase method gets invoked round 6 * more times than similar method from dump-persistence-schema phase.

The problem might be caused by the fact, that this SerializerCheckCompilerPluginComponent#newPhase method gets invoked round 6 * more times than similar method from dump-persistence-schema phase.

Wow, that's a non-trivial discovery indeed 🤔

Sorry, in my last comment I was wrong - SerializerCheckCompilerPluginComponent#newPhase gets invoked only one time and creates one instance of StdPhase type, but - underlying StdPhase#apply method gets invoked hundreds of times - e.g. 541 times (from my last test).
For now, I do not know yet, why it gets invoked so many times.

Reopening as @LukaszKontowski's research is still ongoing

With https://github.com/VirtusLab/akka-serialization-helper/pull/155 managed to go down to 3,8% for the codec-registration-serializer-check phase. Now working on further improvement, which probably is possible by providing more optimization in the private def processSerializerClass

Small improvement for this phase in another PR: https://github.com/VirtusLab/akka-serialization-helper/pull/158 (down from 3,8% to 3,5%)

The heavy part of code that makes this phase slow is within https://github.com/VirtusLab/akka-serialization-helper/blob/main/codec-registration-checker-compiler-plugin/src/main/scala/org/virtuslab/ash/SerializerCheckCompilerPluginComponent.scala.
In particular:
val foundTypes = {
          try {
            serializerImplDef
              .collect {
                case x: Tree if x.tpe != null => x.tpe
              }
              .distinct
              .filter(_.toString.matches(filterRegex))

this _.toString from last line appears on lots of samples generated by the profiler (see attached snippet).

However, it might be possible to further improve performance for this block code - if we could somehow narrow down the number of Types that we get from Trees here:
.collect {
  case x: Tree if x.tpe != null => x.tpe
}

Because for now this collect returns all Types found within one AST (including things like package names, types from scala standard library etc.) - sometimes the number of types (after distinct) is more than 20000. And we need only a small subset from this collection - types pointed by user in his custom code that match regex. I tried to filter these types further before calling toString - by some methods from https://www.scala-lang.org/api/2.13.3/scala-reflect/scala/reflect/api/Trees$Tree.html and https://www.scala-lang.org/api/2.13.3/scala-reflect/scala/reflect/api/Types$Type.html in order to get only types that are "real candidates" for checking regex (for example - to remove package types and some other not needed types before calling toString) but failed to achieve anything.
I also tried to narrow down Trees that we are checking by changing this line of code:
case x: Tree if x.tpe != null => x.tpe

into something like this:
case x @ (_: Some_Subtype_1 | _: Some_Subtype_2) if x.tpe != null => x.tpe

with known subclasses of Tree:

but unfortunately failed to achieve better speed (and in most cases - it also did not work).
However, I think that it still might be possible to further improve this and we can leave this issue alive - probably I failed for now because of small knowledge of the scala reflection internals.

Possibly working improvement - to be tested / checked / discussed etc. - for now it's just an idea that worked on one project and improved performance of the phase by 25%
Replace
serializerImplDef
  .collect {
    case tree: Tree if tree.tpe != null => tree.tpe
  }

with
serializerImplDef
  .collect {
    case tree @ (_: TypTree | _: Select | _: GenericApply) if tree.tpe != null => tree.tpe
  }


crypto/tls: recent TLS 1.3 changes appear to break cases where client cert should be rejected

What version of Go are you using (go version)?

$ go version
go version devel +45e9c5538b Tue Nov 13 17:16:48 2018 +0000 linux/amd64

Does this issue reproduce with the latest release?
Nope, it's okay in release. It only repros with tip.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/travis/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GOPROXY=""
GORACE=""
GOROOT="/home/travis/.gimme/versions/go"
GOTMPDIR=""
GOTOOLDIR="/home/travis/.gimme/versions/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build882726140=/tmp/go-build -gno-record-gcc-switches"

What did you do?
I have a test case that is verifying that a TLS client that uses a bad cert (either no cert, when server requires one, or an expired cert or one issued by untrusted CA) gets rejected by the server during a TLS handshake.
I've distilled it down to this test: https://github.com/fullstorydev/grpcurl/pull/68
What did you expect to see?
Server should have rejected the client due to bad certificate.
This is what happens in every other Go version that I tested: https://travis-ci.org/fullstorydev/grpcurl/builds/454615565
What did you see instead?
Server accepted the client.
If I set MaxVersion on the server's tls.Config to tls.VersionTLS12 then things work as expected. So this appears to be related to the new TLS 1.3 work that landed yesterday.
FYI: @FiloSottile

The server is in fact rejecting the certificate here, but that error is being thrown out after being printed by your test. You can see the error logged in Travis.
https://github.com/fullstorydev/grpcurl/blob/a90ea9e114ebe5e570fea4fcf44f9351b58b98a5/tls13_bug_test.go#L111-L113
Bad handshake: tls: failed to verify client's certificate: x509: certificate has expired or is not yet valid
Bad handshake: tls: client didn't provide a certificate
--- FAIL: TestTLS13RejectsBadCerts (0.07s)
    tls13_bug_test.go:37: Expecting failure due to use of expired cert!
    tls13_bug_test.go:45: Expecting failure due to use of untrusted cert!
    tls13_bug_test.go:53: Expecting failure due to missing cert!
Bad handshake: tls: client didn't provide a certificate

Your test is checking the error on the client side instead of the server side. In TLS 1.2, there was a whole round-trip of handshake after sending the client cert, so the remote error was making it to the client in the form of an alert before Handshake had to return. In TLS 1.3, the client certificate is sent in the second and last client flight, meaning the client sends the client cert and then returns before hearing back from the server, so it can't return an error in Handshake.
The error will show up on the client first read. This is unavoidable, because the protocol is designed that way, but I can see it causing trouble. Hopefully relatively few users call Handshake directly. We should definitely mention it in the release notes.

@jhump BTW, thank you for that reproduction PR, it was extremely handy.

@FiloSottile, will the server simply close the connection after it sees the cert is bad? If so, does that mean there is no way to distinguish, in the client, between the server rejecting the client's credentials and the server simply being partitioned from the client between the handshake and first read?
I'm trying to figure out how to work around this: for command-line tools (such as grpcurl), it's nice to provide meaningful/useful error messages related to client identity in mutually-authenticated TLS. But it sounds like that may not be feasible with TLS 1.3. I understand the desire to reduce round trips, particularly for TLS over mobile networks, but this is an unfortunate side effect for debugging issues on the client.
One example: it means that using grpc.WithBlock, to dial a gRPC server, won't be useful if there are unrecoverable errors due to TLS certs. The gRPC client will block until the socket is established, the handshake complete, and think the channel is ready for use (just as in my code example). But then every RPC on it will fail due to the transport channel getting closed. IMO, that kind of defeats the purpose of grpc.WithBlock. With gRPC, I guess we can work-around it by sending an HTTP/2 PING frame immediately if we want to confirm the channel is good and the server accepted the cert. But that won't work, for example, with HTTP 1.1 communications.
Anyhow. Sorry for the long-winded comment. I guess, summing up, I'm wondering if you have recommendations for providing better client-side error messages with TLS 1.3 in these situations.

I do agree that it’s unfortunate, but I don’t have useful advice beyond what you already suggested.
Note though that the server won’t just close the connection but send an alert, so the first client read will fail with the same meaningful error as the Handshake used to.

so the first client read will fail with the same meaningful error as the Handshake used to.

Ok, that's useful actually. Thanks for the info.


Bump api client version to 14.0.0

It allows make_iter_method accept more than one model name. We need
this so we can upgrade the search-api to return documents instead of
just services.
The direct award lock_project view uses the search-api to fetch
service ids. We need to bump the api-client so this view doesn't break
when the search-api starts returning documents.

Cool I'll verify my functional tests pass against this.


July 2021 release update changes

Microsoft authors of articles need to make updates through the private repository so the updates can be staged and validated by the current validation rules. After you review staging and fix all validation issues, you can add the sign-off comment to let the PR reviewers know the updates are ready to be merged.It's easy to access the private repo version of your articles in GitHub. Just add -pr to the URL, as follows:
Public repo URL: https://github.com/MicrosoftDocs/azure-docs
Private repo URL: https://github.com/MicrosoftDocs/azure-docs-pr
We have closed this pull request. Please resubmit the updates through the private repo. For more information, [see the contributor guide].(https://docs.microsoft.com/en-us/contribute/)

Docs Build status updates of commit 837254b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-community-training/TOC.yml
:white_check_mark:Succeeded
View

microsoft-community-training/frequently-asked-questions/9_web-mobile-app.md
:white_check_mark:Succeeded
View

microsoft-community-training/infrastructure-management/configure-your-platform-infrastructure/set-up-custom-homepage-for-your-mct-instance.md
:white_check_mark:Succeeded
View

microsoft-community-training/learner-experience/2_web-app.md
:white_check_mark:Succeeded
View

microsoft-community-training/media/EL-1.png
:white_check_mark:Succeeded
View

microsoft-community-training/media/EL2.png
:white_check_mark:Succeeded
View

microsoft-community-training/media/EL3.png
:white_check_mark:Succeeded
View

microsoft-community-training/media/EL5.png
:white_check_mark:Succeeded
View

microsoft-community-training/media/EL6.png
:white_check_mark:Succeeded
View

microsoft-community-training/media/LearnerLanguage1.jpg
:white_check_mark:Succeeded
View

microsoft-community-training/media/LearnerLanguage2.jpg
:white_check_mark:Succeeded
View

microsoft-community-training/media/MCT Complete your profile.png
:white_check_mark:Succeeded
View

microsoft-community-training/media/el7.png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(460).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(461).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(462).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(463).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(464).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(465).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(483).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(484).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(486).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(490).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(491).png
:white_check_mark:Succeeded
View

microsoft-community-training/media/image(492).png
:white_check_mark:Succeeded
View

microsoft-community-training/settings/11_configurations-on-the-training-platform.md
:white_check_mark:Succeeded
View

microsoft-community-training/settings/5_customize-the-certificate-template.md
:white_check_mark:Succeeded
View

microsoft-community-training/settings/link-to-external-website-on-learner-Homepage.md
:white_check_mark:Succeeded
View

microsoft-community-training/user-management/manage-users/edit-user-profile-on-the-platform.md
:white_check_mark:Succeeded
View

microsoft-community-training/whats-new-in-microsoft-community-training/2021/2_what-new-in-march-2021.md
:white_check_mark:Succeeded
View

microsoft-community-training/whats-new-in-microsoft-community-training/2021/what-new-in-july-2021.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

PRMerger Results

Issue
Description

Added or Deleted File(s)
This PR contains added or deleted file(s).

Yaml File(s)
This PR contains a change to a .yml file.

Changed Files
This PR contains more than 10 changed files.

File Change Percent
This PR contains file(s) with more than 20% file change.

Image File
This PR contains an image file(s).


added sysouts for debugging CI

Signed-off-by: Lee Surprenant<EMAIL_ADDRESS>

problem is sufficiently debugged to open #3282


Backport "Add support for @deprecatedInheritance" to LTS

Backports #19082 to the LTS branch.
PR submitted by the release tooling.
[skip ci]

No regressions detected in the community build up to lts-19356.
Reference


Documentation?

I've been looking for a beanstalkd python engine, and yours seems to be the only one with Python 3.5+ support. However I don't really know how to use it due to the lack of documentation. If you could spin up some documentation on how to set up a basic implementation of it I'd greatly appreciate it. Especially because then I could use it, and possibly, contribute
Edit: I've been reading through the source code, and I understand how it works now. However having some documentation would still be very useful

Accidentally closed the issue there! Sorry.
I've been meaning to get some basic documentation up and running. Here's a basic quickstart for now:
Installation
Greenstalk supports Python 3.5 and later. It's available on the Python Package Index and can be installed by running::
$ pip3 install greenstalk

Quickstart
The first step is to import the library and create a Client, which immediately connects to beanstalkd:
>>> import greenstalk
>>> c = greenstalk.Client()

If beanstalkd isn't running locally on the default port you'll need to specify where it's running:
>>> c = greenstalk.Client(host='queue.example.com', port=4444)

You can add a job to the queue using put:
>>> c.put('Hello, world!')
1

The job ID is returned which means that the job was successfully enqueued. We can dequeue a job using reserve` which returns a tuple containing the job ID and job body.
>>> jid, body = c.reserve()
>>> jid
1
>>> print(body)
Hello, world!

When you're done with the job, use delete:
>>> c.delete(jid)

I hope that helps a bit! This library is basically a thin wrapper around the beanstalk protocol and doesn't provide much of any abstraction/DSL on top of it which makes https://github.com/kr/beanstalkd/blob/master/doc/protocol.txt and the tests the best resource if you're interested in learning more.
It's still an immature library with lots of work needed! Thanks for checking it out. Contributions are very welcome!

Initial documentation is now on Read the Docs: https://greenstalk.readthedocs.io/en/latest/
It's still a work in progress, but should definitely help people get up and running.


Cropland: Namibia North 2020

Start year: 2020
Start month: September

[x] Labeling project created (#138)
[x] Labeling completed
[x] Data added to repository (#178 )
[x] Model trained (#290)
[x] Generate stratified samples
[x] Set 1 Labeling: @MsPixels @hannah-rae @bhyeh Aninda @cnakalembe Isha Taryn Snehal
[x] Set 2 Labeling: @sbaber1 @Di-anaBF @Mirzyaaliii @mnthnx64
[ ] Map made

Low cropland amount, low metrics:
https://github.com/nasaharvest/crop-mask/blob/0b9c305ae71994b8d938ee34a77a295565ff7435/data/models.json#L19
Could be improved by NDVI stratification

Next step adding WFP data

@MsPixels now that you have some corrective points, the next step is to add them to the code base! Here's an example of me adding the the Namibia WFP data https://github.com/nasaharvest/crop-mask/pull/227
The main change is to datasets.py which you will have to update too!
More info here: https://github.com/nasaharvest/crop-mask#adding-new-labeled-data

The compute cost above actually also accounts for Zambia v2 so it is actually lower

Yeah, @ivanzvonkov, major improvement indeed. Just wondering why the f1 score is this low despite this result.

Additional data has been added in #243, now new model can be trained

Model being trained https://github.com/nasaharvest/crop-mask/pull/250

From Christina in meeting 1/19:

1500 crop type points with crop type and field boundary for season starting early 2023, use start month September still (collected Dec/Jan 2022-2023). Blake and Abena are cleaning that now.
Goal: make in-season cropland map starting September 2022 through January 2023 which includes the 1500 field labels from above ( @MsPixels can create this?)
Will be doing 2 more rounds of data collection in February (early season) and April/May (harvest stage) which can be used to evaluate the in-season map
Re: making more representative samples using information that we have from FAO etc, Christina suggested also looking at sampling to match proportions of production historically in admin1 zones (e.g. so we sample more from zones producing more); there is also historical information in Crop Monitors that we could consider using
@MsPixels can also look into making a map for WFP for cropland in 2021-2022 after the in-season map if time

Yes, @hannah-rae, I can create the in-season cropland map and hopefully the WFP map

Model being trained #250

Namibia_North_2020_v2
    "test_metrics":
        "accuracy": 0.9324,
        "f1_score": 0.0625,
        "precision_score": 0.037,
        "recall_score": 0.2,
        "roc_auc_score": 0.8661

Comparing V1 and V2 - Namibia_North
Although this model predicts more crop fields than normal, it is able to correctly predict crop fields in the big yellow squares

@MsPixels @ivanzvonkov  I was looking at the last comments on this issue but we don't have the "next steps" recorded for when it got picked back up. Are these the potential next steps?

[ ] Re-create map with new model trained w/ corrected NDVI ( @ivanzvonkov I think you are re-training all models?)
[ ] Have the ground truth data from Dec/Jan 2022-2023 already been added to the test set?
[ ] I have in an earlier comment that more ground data was to be collected in February 2023. @MsPixels have you heard from Christina or Blake if these new data are available?

Other things to try:

[ ] Create stratified reference sample for validation/test instead of current random uniform
[ ] Apply post-processing NDVI that @bhyeh is working on (may reduce false positives)
[ ] Re-train model with high-quality data
[ ] Data quality audit

Thanks Hannah for your feedback. Yes, these are potential next steps.

The ground truth data from Dec/Jan 2022 - 2023 has been added to the test set
Yes, February 2023 is being cleaned
I'll go ahead and generate a stratified sample for validation.

Stratified random points

Next steps:

CEO labeling project for stratified points ( specifically additional crop points)
Consider sampling crop points from field boundaries for validation set

Metrics for the model:
"Namibia_North_V3": {
"params": "https://wandb.ai/nasa-harvest/crop-mask/runs/qzfflhy8",
"test_metrics": {
"accuracy": 0.9635,
"f1_score": 0.1429,
"precision_score": 0.0833,
"recall_score": 0.5,
"roc_auc_score": 0.8404
},
"val_metrics": {
"accuracy": 0.9744,
"f1_score": 0.1053,
"precision_score": 0.0556,
"recall_score": 1.0,
"roc_auc_score": 0.9834
}
},

Namibia_North_2020_V3 Map

I also adjusted the threshold here. I think it removes some noise

@MsPixels initial evaluation: "I think the model does a good job at the west but over-predicts at the east, especially in the flood plains. Some built-up areas were captured as cropland. I'm not super confident about the South. Waiting for confirmation from Christina."
@MsPixels will try the post-classification filtering to see if that reduces some false positive areas (e.g. water/lake shorelines) and we will work with Christina to make final decision.

Post-classification filtering @hannah-rae.

Hello @hannah-rae, after further discussion with Christina and Blake, I generated an NDVI, water and built-up mask to remove most of the noise in the cropland map. The code is here


(WEB)cam use

I'm not able to get the code working with my webcam or external cam, is it possible to do it?
I tried the following without any results :
def main():
# Read TensorFlow graph
detection_graph = tf_utils.load_model(FROZEN_GRAPH_PATH)
# Read video from disk and count frames
cap = cv2.VideoCapture(0)

while(True):
# Capture frame-by-frame
ret, frame = cap.read()
fps = cap.get(cv2.CAP_PROP_FPS)

King in regards,

I'm really thankful for your reply, the code is working for me know.
kind regards,


Fix kernel version

Fixes the -dirty version issue.
Reference
https://github.com/smaeul/linux/blob/riscv/d1-wip/scripts/setlocalversion#L129-L143
# scm version string if not at a tagged commit
if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
	# full scm version string
	res="$res$(scm_version)"
elif [ "${LOCALVERSION+set}" != "set" ]; then
	# If the variable LOCALVERSION is not set, append a plus
	# sign if the repository is not in a clean annotated or
	# signed tagged state (as git describe only looks at signed
	# or annotated tags - git tag -a/-s).
	#
	# If the variable LOCALVERSION is set (including being set
	# to an empty string), we don't want to append a plus sign.
	scm=$(scm_version --short)
	res="$res${scm:++}"
fi

Thanks! I've cherry picked your commit locally and will push it once i get it working again with 4.19 (which isn't the case right now :roll_eyes: )


History display

Fixes display of history

MISSING: update to latest version of Uno once it's available.


Some apple-sys functions could not work well

Steps to Reproduce
Minimal example:
# ./native/hub/Cargo.toml
...
[dependencies]
apple-sys = { version = "0.2", features = ["CoreWLAN"] }

// ./native/hub/src/lib.rs
...
use apple_sys::CoreWLAN::*;
async fn main() {
    unsafe {
        let current_network = CWWiFiClient::sharedWiFiClient().interface();
        println!("Transmit Rate: {:?}Mbps", current_network.transmitRate());
        println!("RSSI: {:?}dBm", current_network.rssiValue());
        println!("Noise: {:?}dBm", current_network.noiseMeasurement());
    }
...
}

#[tokio::test]
async fn main_test() {
    main().await;
}

Report
Some apple-sys functions could work well standalone (purely rust), and get non-null data from corewlan:
cargo test -- --nocapture

Trasnmit Rate: 433.0Mbps
RSSI: -44dBm
Noise: -88dBm

but when the async fn main() compiled into flutter, only can get null data from corewlan:
flutter run -d macos

Trasnmit Rate: 0Mbps
RSSI: 0dBm
Noise: 0dBm

Maybe its related to the async fn main() how be called in the file ./native/hub/src/bridge/interface.rs.

Hmm, maybe this can be a network permission issue on iOS, though I'm not 100% sure.
Could you check if the info at this link solve the problem?

https://docs.flutter.dev/data-and-backend/networking

Hmm, maybe this can be a network permission issue on iOS, though I'm not 100% sure.
Could you check if the info at this link solve the problem?

https://docs.flutter.dev/data-and-backend/networking

Wow, thanks for your important tips for me.

Now detailed disucssions that might be related to this issue is at #280 , so I'll be closing this one now. If anyone faces similar problems, please head over to #280.
FYI, this problem was handled in a few pull requests before. Generally speaking, it should be possible to access Apple system now.


bug in the wordcount example

Hi,
I found a bug in the wordcount example.
in wordcount.py
instead of:
self.emit([word, self.counts[word]])
you should have (second argument should be a string):
self.emit([word, str(self.counts[word]))
it turns out that emitting a number will cause the system crash if another bolt is getting this tuple and try to access it...
BTW - you should document somewhere that one should emit only strings...
I just spent 2 hours to understand what is wrong here.
(or maybe it is allowed and the bug is in a different place?)
I am using java7 if this can explain this behaviour
Hope this helps...

Thanks for the quick reply. I'll post on Sunday.
On Thu, Mar 31, 2016 at 3:58 PM, Dan Blanchard<EMAIL_ADDRESS>wrote:

There's no reason you should only have to emit strings. Everything gets
serialized and deserialized as JSON, and that works fine with integers.
Could you please post whatever traceback you're seeing for the downstream
bolt?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/Parsely/streamparse/issues/233#issuecomment-203923115

--
Regards,
Ofer Eliassaf

Here is the closure (just adding one more step to the wordcount example):
(ns wordcount
  (:use     [streamparse.specs])
  (:gen-class))

(defn wordcount [options]
   [
    ;; spout configuration
    {"word-spout" (python-spout-spec
          options
          "spouts.words.WordSpout"
          ["word"]
          )
    }
    ;; bolt configuration
    {"count-bolt" (python-bolt-spec
          options
          {"word-spout" :shuffle}
          "bolts.wordcount.WordCounter"
          ["word" "count"]
          :p 2
          )

    "tryme-bolt" (python-bolt-spec
          options
          {"count-bolt" :shuffle}
          "bolts.tryme.WordPrinter"
          []
          :p 1
          )
    }

  ]
)

I also tried specifying an integer (i.g. 127) instead of the counter and got the same error.
I have the environment ready if you need anything else.
BTW, It's an amazing project!

I replicated your setup and I think I have an idea of what's going on here. It looks like the issue is indeed an integer-to-string conversion, but it's happening with this block of code in WordPrinter:
        word0 = tup.values[0]
        word1 = tup.values[1]
        self.log('in tryme: ' + word0 + ', ' + word1)

In the Clojure file, the input source of tryme-bolt is configured to be the output of count-bolt, so tup.values[1] is an int (and thus, so is word1). Concatenating word1 with a string causes Python to raise an exception. However, the message is not logged but instead output to stderr (on the VM), so it doesn't get back to the streamparse process.
Updating the process function to catch and print the exception will cause the message to log:
    def process(self, tup):

        word0 = tup.values[0]
        word1 = tup.values[1]
        try:
            self.log('in tryme: ' + word0 + ', ' + word1)
        except TypeError as e:
            self.log('\nlooks like a TypeError: %s' % str(e))

The fix, in this case, is to cast word1, or to just change the log statement to self.log('in tryme: %s, %d' % (word0, word1)).
Casting the value in WordCounter fixes your issue because now WordPrinter is getting two strings, but the root cause is a Python type casting error, not that you can't emit non-strings.
Hope this helps!

Actually, looking at it again, I think the exception message may have actually been logged to the console, but I missed it until I knew what I was looking for because it was above the Java exceptions (which makes sense).

Thanks!!
בתאריך 7 באפר׳ 2016 5:46, "David Cohen"<EMAIL_ADDRESS>כתב:

Actually, looking at it again, I think the exception message may have
actually been logged to the console, but I missed it until I knew what I
was looking for because it was above the Java exceptions (which makes
sense).
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/Parsely/streamparse/issues/233#issuecomment-206684454


Improve the tagging of resources in the elbv2 module

tags were not being added to every kind of resource (listener, listener rule, etc) which was causing certain expected responses to fail.

Thanks for the feedback. After spending some time learning the terraform tests repo (very interesting!) I'm getting an odd result where I'm not seeing the same results of the tests that ran after this PR was created. I seem to get a different set of errors each time.
Also, what parts of the PR would you like to see covered by tests that aren't already?

I was mostly looking at the error scenarios in add_tags:
if not balancer:
...
if not listener:
..

Ideally, every new line of code is covered. There's a overview on which lines are currently not covered here: https://codecov.io/gh/spulec/moto/compare/0f8da52196ec5b66cbaea4ab9cee4c1b5d6ee231...c54545a6b134db03664d32d8d41a1993bc81801a/diff

Thanks for the feedback. After spending some time learning the terraform tests repo (very interesting!) I'm getting an odd result where I'm not seeing the same results of the tests that ran after this PR was created. I seem to get a different set of errors each time.

Yeah, it looks like the failing TF test (TestAccAWSProvider) is a bit finicky - they'll fail one time, but work fine the next. Don't worry about it, as long as the other tests stil work it'll be OK 👍

This behaviour is now part of Moto already, as part of #4956 and #4964, so I'll close this PR. Thanks again for your work on this @jrauen :+1:


type"{"  in html appear "{}}"

When I type "{" in template, "{}}" will appear. I used the VScode extension "Start extexsion bisect" and found that Volar added it to me. Why is that?

If I have the value of the "Auto Closing Brackets" changed from "always" to "never" and I type "{" to get "{}",.it mean both Volar and VSCode to add "}" for me. But when I delete "{","}" will not be deleted, which means that Volar will not comply with "Auot Closing Delete".

only type in <></>, For example, there is a problem at 1. But it's fine at 2. Then I type "{" twice in 3 and get "{{}}}"

if I changed the  value of"Auto Closing Brackets" to default value--"languageDefined",its also have the problem.

Sorry, I know why. Volar conflicts with VUe-helper. If I disable all plug-ins and only turn on Volar, there is no error. This error occurs if I enable VUe-Helper together. Oddly enough, when I only start the VUe-helper, the VUe-helper does not actively add "}" for me. Why did they make this mistake when they were together? So I'm going to have to disable it, although I like some of its features, it's very useful. If possible, I hope the authors give these features to Volar.

@liweiook Thanks for the information, it seems from https://github.com/jiaolong1021/vue-helper/blob/f1c1e82f23bb5f3f227b17099c3118bfe6d881dc/src/app.ts#L1141-L1151.


test_simulation::test_box_with_zero_gravity generates NaNs in VelRepr.Inertial with 10N force

When defining the applied forces in https://github.com/ami-iit/jaxsim/blob/2056e707805d7281c48b19574bf1d588e3c88e93/tests/test_simulations.py#L118-L122
if I scale up the sampling range from $\verb |[-1, 1]| N$ to $\verb |[-10, 10]| N$, the base position result in an array of NaNs only in inertial velocity representation. The only solution in to avoid NaNs is to reduce the integration step size, yet this should not be necessary.

Luckily JAX provides great utilities to debug NaNs. You can easily debug this failure by running the following:
JAX_DEBUG_NANS=True pytest -vv -s tests/test_simulations.py -k "test_box_with_zero_gravity[inertial]"

It will fail in the integration step.

This being said, I gave a quick look to the test and it seems to me that, in VelRepr.Inertial, the body receives not only linear forces (like in Body and Mixed) but also torques. In fact, the pure linear force L_f (that I'd write with our notation as ${}_W \boldsymbol{f}_L$), when is inserted in the JaxSimModelReferences and applied to the link frame L, it is equivalent to the sum of a linear force and a torque in Mixed|Body. So the two systems are different in the sense that in Inertial, the body receives also a torque component.
With the large $\Delta t = 0.010$ used in this test, I suspect that such torque would produce large angular accelerations that lead to the emergence of simulated NaNs.
I fixed the test in #204.
So eventually there was no problem in JaxSim. The problem was how the test was designed. cc @DanielePucci @xela-95

Alright, it's good to know that there was no problem in JaxSim! Thanks a lot for the PR

Alright, it's good to know that there was no problem in JaxSim! Thanks a lot for the PR

Yep it was a concern I had, I didn't see any reason why the integrator would diverge in VelRepr.Inertial and not in the other representations. The only sources of differences would be the conversions among the representations used to pre-process or post-process the data of our RBDA, but those are thoroughly tested against iDynTree and also with self-consistency against other functions of JaxSim.
I'm relieved that the problem was a methodological mistake in the test.


Docs page hexfile download doesn't show blocks option nor the name

Couple of issues

Name doesn't appear.
Blocks conversion option doesn't appear.
Fixes https://github.com/Microsoft/pxt/issues/543

@pelikhan quick review?


Problems about D-Nerf test

When I used the test parameter to load the D-Nerf model for prediction, there was a shape mismatch problem. I didn't change any training parameters, and the error is as follows:
[INFO] Trainer: ngp | 2022-07-27_16-58-37 | cuda | fp16 | trial_dnerf_jumpingjacks_test2
[INFO] #parameters: 12731168
[INFO] Loading latest checkpoint ...
[INFO] Latest checkpoint is trial_dnerf_jumpingjacks_test2/checkpoints/ngp_ep0150.pth
Traceback (most recent call last):
  File "/home/daiyalun/torch-ngp-main/main_dnerf.py", line 97, in <module>
    trainer = Trainer('ngp', opt, model, device=device, workspace=opt.workspace, criterion=criterion, fp16=opt.fp16, metrics=[PSNRMeter()], use_checkpoint=opt.ckpt)
  File "/home/daiyalun/torch-ngp-main/dnerf/utils.py", line 34, in __init__
    super().__init__(name, opt, model, criterion, optimizer, ema_decay, lr_scheduler, metrics, local_rank, world_size, device, mute, fp16, eval_interval, max_keep_ckpt, workspace, best_mode, use_loss_as_metric, report_metric_at_train, use_checkpoint, use_tensorboardX, scheduler_update_every_step)
  File "/home/daiyalun/torch-ngp-main/nerf/utils.py", line 331, in __init__
    self.load_checkpoint()
  File "/home/daiyalun/torch-ngp-main/nerf/utils.py", line 1016, in load_checkpoint
    missing_keys, unexpected_keys = self.model.load_state_dict(checkpoint_dict['model'], strict=False)
  File "/home/daiyalun/anaconda3/envs/torch-ngp/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for NeRFNetwork:
        size mismatch for density_grid: copying a param with shape torch.Size([64, 4, 2097152]) from checkpoint, the shape in current model is torch.Size([64, 2, 2097152]).
        size mismatch for density_bitfield: copying a param with shape torch.Size([64, 1048576]) from checkpoint, the shape in current model is torch.Size([64, 524288]).
        size mismatch for encoder.embeddings: copying a param with shape torch.Size([6589272, 2]) from checkpoint, the shape in current model is torch.Size([6328848, 2]).

My test command is as follows.
python main_dnerf.py data/jumpingjacks --workspace trial_dnerf_jumpingjacks -O --test

I'm facing the same error with the most recent version of the code. Could this be a conflict with PyTorch version?

@collinabidi If it is the same error, it maybe caused by different configs. I fixed another bug (patch_size not found) for dnerf in the latest commit, and you can try now.


CBL-5894 : Update IndexUpdater API and sync illegal behavior

Updated IndexUpdater API to sync illegal behavior with the other platforms : If functions have out error, return out error; otherwise abort.

Added TestIndexUpdaterUseAfterFinished.

Used LiteCore 3.2.0-210

You really should branch if you are going to use the release/3.2 branch of Core

Will branch it very soon.


Fix implicit convertion from integer' to void *'

This should be changed. We will run into issues with 32/64bit systems where on some sizeof(int) == sizeof(void *), and some where they aren't...     Even though these might be edge-cases on where Saffire is likely to run, I'd rather we take some time and get this as right as we possibly can.  I'm currently having the same issues, and i'm already trying to find ways of converting a long or int to void *.
Casting the other way around is easy: a pointer can be cast into an integer (or long, or maybe even long long on 128bit systems??), using the intptr_t type:
  t_object *obj = ...
  printf("Address of this would be %X\n", (intptr_t)obj);

This would work on both 32 and 64 bit systems, one will cast to a int, and the other to a long.
One of the reasons I think we should really try and get rid of integer and long, is that we cannot know anything about it. Doesn't matter much confined in an application, but matters when we are saving data (like we do, since we are saving and loading bytecode from disk). This is already added as issue #203 .
For now, I just leave this one open, and see how on earth we can decently convert an unknown size to a pointer (Personally, I think this is not possible, unless we literally truncate data, but we are still never sure if our void * is even 32bit in size)..   More research is needed in this department...

I totally agree with you @jaytaph.
It took me a while to understand the reason for this mixture.
In this particular case the beast is the dll data structure, which handles the dangerous void *.
I don't think there is a valid way to deal with standard scalars (char, int, ... with all the unsigned variations + float and double) and void * in both ways. Maybe there is somethig that take case about the architecture (x68, x86, big and little endian guys) but I don't think it's gonna be scalable at all.
Said that I'd like to throw a crazy stone in the code base: move some components to c++0x
With c++0x we can just use some ::std lib such as list.
The idea is to refactor dll.c to dll.cpp, hack in some way the interface and use ::std::list under the hood.
Taking this way is an opportunity to convert all the codebase to c++0x so that we can use his awesome features!

I don't think moving to CPP will resolve the issue by itself.. I highly doubt we are the first to hit this problem, and I reckon using void * as a "don't care what it actually is datastructure" was absolutely the wrong choice (ever, actually :/), but I guess there are solutions. Let's discuss this over irc as a better channel for this atm..


Bump python protobuf dependency to 3.0.0

Thanks!
Your commit log message should make clear why requirements.txt, src/python/grpcio_health_checking/setup.py, and src/python/grpcio_tests/setup.py are left out of this change. Also the " (GA)" isn't quite working for me, since as much as we've used the term to refer to our 1.0.0 release, I don't think I've ever heard them use the term to refer to their 3.0.0 release.

I've updated the dependency in requirements.txt and src/python/grpcio_tests/setup.py.  grpcio_health_checking did not have a direct dependency on protobuf.

I think grpcio_health_checking should be given a direct dependency on protobuf; its code imports at least one _pb2 module and we know that that module will import from google.protobuf.

Added explicit protobuf dependency to grpcio_health_checking

Luhguhtum and thank you.


Javascript Interceptor

    let x = 1;
    ....

Implicit variables like exchange should be in scope. The Javascript engine should be the one from the Java SDK.

Added a basic Javascript interceptor

Added a basic Javascript interceptor

There is one last problem: The example runs without problems from the IDE ( ran with the IDEStarter ) but doesn't work when run from the distribution ( which is ran from the Starter ). When ran from the distribution some classes aren't found which results in a ScriptException. In the Example it happens at the "Outcome.CONTINUE;" line where the Outcome class isn't found. Any Javascript code before that runs without a problem. So there could be some classpath problem


please add presets for casino and adult_gaming_centre

We have the main two tags

amenity=casino
leisure=adult_gaming_centre

Thanks a lot for your work.

I took a look at those, and the accepted Gambling tag proposal, and unfortunately I'm at a loss for how to add presets for these tags in a way that is not confusing to normal users.
The difference as far as I can tell is - "Casinos" have table games and "Adult Gaming Centres" do not (but both commonly have the word "casino" in the name of the establishment)?

Also worth noting that the amenity=casino wiki page seems to have a wrong description in the template box.  iD pulls from here to display inline tag help.

Yes, that is the reason i only added amenity=casino and leisure=adult_gaming_centre to my list. These are IMO the most useful of the proposal.
Perhaps @math1985 can give some advice.
I just fixed the template box.


fix(curriculum): update solution to match seed

…ish.md
Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] All the files I changed are in the same world language, for example: only English changes, or only Chinese changes, etc.

Closes #38829

According to recent changes on site, the arrow function is not there. So, here's the updated solution for the updated challenge.

@vsasvipul0605 Congrats on your first pull request (PR)! 🎉
Thank you for your contribution to the page! 👍
We're happy to accept these changes, and look forward to future contributions. 📝

By the way, @vsasvipul0605, if you want to keep using your fork you'll need to get a new version of master from upstream, since it will be out of sync now this PR has been merged.

@ojeytonwilliams okay and thanks for merging the pull request. This will motivate me to contribute more and more.

and can anyone please tell me how can I become contributor in freecodecamp?
after how many PR's or any such criteria?

Well, you're already a contributor now that this PR has been merged.  As for anything beyond that, it's not really something I can talk about with any authority.  Personally I just contributed PRs and helped out a bit in Gitter, but I don't think there's a formal process.


chore(package): update karma-coverage to version 1.1.1

https://greenkeeper.io/

Coverage remained the same at 96.023% when pulling 33b908ed5d26022df70fcf34aaf165c01af73328 on greenkeeper-karma-coverage-1.1.1 into efb68cc041050276e30125c8673253afc2dd71df on master.


Go modules

Implements go modules and removes an excessive logging line.  Adds a .gitignore so that the vendor directory and binary do not end up in the codebase by accident.

hold off. i've done this wrong.


removed css files and changed to tailwind

Pull Request Checklist
Thank you for contributing to our project! Please ensure the following before submitting your pull request:
Description of Changes
Mode entire code from css to tailwind, removed css files and implemented tailwind throughout the site
Type of Change

[ ] Bug fix
[X] New feature
[ ] Documentation update
[X] Refactoring
[ ] Other (please describe):

Related Issue

Closes #172
Testing

Checklist

[X] I have tested my changes and ensured they work as expected.
[X] I have added necessary documentation (if applicable).
[X] I have reviewed my code for style and linting issues.
[X] I have ensured that any dependent changes are merged before this PR.

Additional Notes

Screen recording:
https://github.com/user-attachments/assets/c3543f9e-2276-4f23-9d68-ab37d22a0185
The recording is of after removing all the css files

Hey @Sourabh782 This is good, I have pushed this to level 3. This was more complicated than it looks and you have maintained the UI as it is even after the changes. Great Work!

Hey @Sourabh782 This is good, I have pushed this to level 3. This was more complicated than it looks and you have maintained the UI as it is even after the changes. Great Work!

Thanks @Vimall03 really appreciated 😊😊


Using of 'dita.specialization.catalog.relative' extension point does not override native DITA-OT XML catalogs.

Using of 'dita.specialization.catalog.relative' extension point does not override native DITA-OT catalogs.
It adds references to new catalogs below references to native DITA-OT catalogs. For example:
<nextCatalog catalog="plugins/org.dita.specialization.dita11/catalog.xml"/>
<nextCatalog catalog="plugins/org.oasis-open.dita.v1_2/catalog.xml"/>
<nextCatalog catalog="plugins/com.custom.plugin/catalog.xml"/>
<nextCatalog catalog="plugins/org.dita.specialization.eclipsemap/catalog.xml"/>

In this situation DITA-OT ignores customization in custom catalog (such as adding new attributes or custom elements). If references to the native DITA-OT catalogs are removed all work as expected and customized DITA files could be correctly resolved.
Was reproduced using DITA-OT 2.1; extending xhtml/html5 plugin; OS Windows 10.
Proposed solution: Add references to 'org.dita.specialization.dita11' and 'org.oasis-open.dita.v1_2' catalogs after custom catalogs.

Exactly what are you trying to override?

Hi,
I'm trying to add new attributes (for example @attr1 to  element).
I have a copy of native DITA-OT DTDs in my plugin (Yep, it is not a best idea, but I have such requirements). I've customized commonElements.mod and added new @attr1 to shortdesc definition.
Also I've added catalog.xml and 'dita.specialization.catalog.relative' extension point.
DITA-OT adds reference to my catalog into catalog-dita.xml. But resolver still uses native DITA-OT declarations and following error is displayed in log:
[gen-list] [DOTJ013E][ERROR] Failed to parse the referenced file 'file:/path/to/file.xml'.: file:/path/to/file.xml Line 3:Attribute "attr1" must be declared for element type "shortdesc".

DITA-OT deliberately gives the OASIS DTD's the highest priority in order to make sure people don't try to override the OASIS DTDs in a way that isn't intended by the DITA specialization system. You need to create a shell DTD that adds the custom attributes as a attribute specialization and then use the shell's public ID to use it.
If you want to override the OASIS provided shells and modules, you have to manually change the order in the catalog file.
@drmacro can probably give you a more verbose answer.

If you need to add attributes to specific elements, my recommendation is to implement it as a constraint module using the normal constraint module coding rules.
Adding attributes to individual elements is not allowed but if you need to do, constraint modules are the closest thing DITA does provide. If you need to, you can rationalize it as "I defined a global attribute and then constrained it away from all but one element type".
In any case, by making it a constraint module you can most easily remove it if you need to restore things to a conforming state.
There should NEVER be a reason to directly modify the OASIS-supplied declarations, or the declarations of any other third party. DITA provides ample mechanisms for overriding anything.
If you are modifying the OASIS-supplied declarations because you can't use local document type shells then the tool you're using is broken and needs to be fixed. At a minimum, if you need to modify anything OASIS-provided, it should be the shells and not the base declaration modules.


There is no examples in the example folder. Do add some example notebooks/code for the same for easy integration within our app.

Hey you can check out our API reference page with some details examples.
https://docs.retellai.com/api-references/create-phone-call
In the right code block, you can select different language.


custom nodes (color-coded)

nodetypes for gene, disease and drug

Node shows Abbreviation (? Abkürzung)
When hovering whole name


Wrong port indentity when forwarding sync messages

As defined in IEEE802.1AS-2020 ch. <IP_ADDRESS>.1, the port identity of an MDSyncSend structure sent from a port shall be set to the port identity of the sending port according to and ch. 8.5.2.
Currently, when using a switched end device with multiple ports as shown below (Dev-B), forwarded sync messages (from Dev-A) will keep the port identity of the origin. Therefore, a slave connected to the switched end device (Dev-C) will not accept the sync messages.

 ┌─────────┐                ┌─────────┐              ┌─────────┐
 │         │                │         │              │         │
 │  DEV-A  ├────────────────►  DEV-B  ├──────────────►  DEV-C  │
 │         │                │         │              │         │
 └─────────┘                └─────────┘              └─────────┘

Within the PortSyncSyncSend state machine, the forwading ports identity should be copied as shown in the patch below before sending it to the MD layer.
git a/subsys/net/l2/ethernet/gptp/gptp_mi.c b/subsys/net/l2/ethernet/gptp/gptp_mi.c
index 03c8ee3ef0..8baef1b15d 100644
--- a/subsys/net/l2/ethernet/gptp/gptp_mi.c
+++ b/subsys/net/l2/ethernet/gptp/gptp_mi.c
@@ -560,6 +560,14 @@ static void gptp_mi_pss_send_state_machine(int port)
                k_timer_start(&state->half_sync_itv_timer, duration,
                              K_NO_WAIT);

+               /* sourcePortIdentity is set to the portIdentity of this
+                * PTP Port (see ch. <IP_ADDRESS>.1 and 8.5.2). */
+               memcpy(&state->pss_sync_ptr->sync_info.src_port_id.clk_id,
+                       GPTP_DEFAULT_DS()->clk_id,
+                       GPTP_CLOCK_ID_LEN);
+               state->pss_sync_ptr->sync_info.src_port_id.port_number = port;
+
+
                gptp_mi_pss_send_md_sync_send(port);

                __fallthrough;

PR will follow.
`

PR #68387


Settings for loud speaker to use

Settings for the loud speaker to use:
always "usual" one, front lout speaker, auto (chooses front loudspeaker when the proximity sensor is triggered)

Can you provide an example of an app that implements this feature. I think this is more a system task than an app task.

I know no open-source app, but at least Threema implements it in their voice messages. For sending you need the "Voice Message Plugin" (download here or on Google Play).
There the sound automatically switched from back to front loudspeaker when you move the phone to your ear when listening to a voice message.
I think WhatsApp does it in a similar way.

Thank you.
I don't think this feature is worth the headache now or in near future, so I'll close the issue for now.


Make the component not dependent on jQuery

As the community slowly shifts away from jQuery, it'd be useful to not use jQuery here too. Would probably take a major version bump though due to selectors potentially needing to change?

Thanks, input on this appreciated:
https://github.com/amk221/ember-auto-focus/compare/nojquery

That looks reasonable.  I've been watching Miguel Camba as he sends in various PRs to remove jQuery and it looks like he also switches the test system away from jQuery completely, as it ensures that it doesn't accidentally get re-introduced 😀
Here's an example PR showing the steps it takes: https://github.com/DockYard/ember-changeset/pull/185

yeh, I'm going to wait for a proper migration path before starting anything like that. I've got too many other addons and work to do :)

👍 I hear you 😀

:) ok I got that merged as 2.0.1 (messed up the release)


Update version to 0.4.0 and improve error messages

Update version to 0.4.0 to reflect the new rollup build added in #136.
Right now if you try to use the latest tfjs-converter (0.3.1) with the latest tfjs-core (0.11.0) in a browser, you will get an error that io is undefined since tfc is not a global with the new rollup setup.
<script src="https://unpkg.com/@tensorflow/tfjs-core"></script>
<script src="https://unpkg.com/@tensorflow/tfjs-converter"></script>

After the release, due to the new rollup setup, <script src="https://unpkg.com/@tensorflow/tfjs-converter"></script> will result in appending methods to the global window.tf instead of to window.tf_converter.
Also:

improve the error message in model.execute(dict) when the dict has incompatible keys. I ran into this issue when importing mobilenet from tf-hub whose input placeholder is called images instead of input. A helpful message would have saved me some debug time.
remove unused dev dependencies.

Will release a new version after this PR is in.

This change is

Very nice improved error message


⚠ Avatar API Endpoint has degraded performance

In 062da02, Avatar API Endpoint (https://avatar.roblox.com/v1/avatar-rules) experienced degraded performance:

HTTP code: 200
Response time: 4416 ms

Resolved: Avatar API Endpoint performance has improved in 86daaf5 after 5 minutes.


RemoteTech and rewrite of Stock

Stock designed to replace RadioFreeKerbin.cfg
RT for RemoteTech support.
Cheers.

Merging with thanks!

Merging with thanks!


HTML Loader by potatojam

Due to lack of documentation, not sure what the purpose is. But it seems for sure some kind of HTML loader example is needed... is this it?

HTML Loader — HTML Loader.

@potatojam Hi! Could you please help sort this out?

@sergeysinyavsky Hi! Could you please help sort this out?

@astrochili Hi! This extension adds a loading percentage and a spinning circle in the corner.
We use it in all our projects. I didn't complete it as an extension because I didn't make it flexible.
It may not work properly if you have some special template with your styles.
Looks like:

The circle will be hided when the game is loaded.
You can show it again and add text with percentages. We use this when load resources with liveupdate.
function init(self)
    if html_loader then
        html_loader.show()
        html_loader.set_text("Loading")

        self.percent = 0
        timer.delay(0.2, true, function(self, handle, time_elapsed)
            self.percent = self.percent + 1
            html_loader.set_progress(self.percent)
            if self.percent == 100 then
                timer.cancel(handle)
                html_loader.hide()
            end
        end)
    end
end

Thank you for such a detailed response! It turns out to be some kind of example that might be useful.
It also would be useful add this comment to yout README 🙏. Anyway would like to add a link to the list 👍


Webpage is down

Hi,
It looks like something is wrong with the website aperisolve.fr. Actually it shows the server root directory.
Regards!

My bad, I used Aperisolve yesterday but I did a system upgrade si the server went down. It's back again ;).
I guess you're working on the TamuCTF? 🤔
Zeecka

From: SergioP3rez<EMAIL_ADDRESS>Sent: Saturday, March 21, 2020 1:13:13 PM
To: Zeecka/AperiSolve<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [Zeecka/AperiSolve] Webpage is down (#5)
Hi,
It looks like something is wrong with the website aperisolve.fr. Actually it shows the server root directory.
Regards!
[Screenshot]https://user-images.githubusercontent.com/10288984/77226065-a57d0100-6b75-11ea-8126-492dd42e7d3f.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/Zeecka/AperiSolve/issues/5, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF5YVDZET65ZFP4TA7ELLRLRISVNTANCNFSM4LQ4UILA.

No problem, thank you for get it back!
No, i am not working in this CTF, I am in a stego challenge uploaded in https://atenea.ccn-cert.cni.es/ a spanish webpage that hosts a lot of challenges, maybe you want to try it :)
Thanks again!

Good to know, I'll have a look :)


Add multi-select renames to terminalAction

part of #193380

I also feel that there is another purpose, so I didn't touch the color. Minor episode, this action takes 200 milliseconds when multiple instances are rename.

'TerminalGroupService' lastAccessedMenu may cause issues with some shortcut actions.
#196578

The refactor ended up being bigger than expected, but this is what I had in mind: https://github.com/microsoft/vscode/pull/196853


8187-investigate-ledger

added a prompt to the ledger modal if the ledger doesn't have contract data enabled.
You'll need a ledger to reproduce. Login with your ledger but make sure you have contract Data set to no on the ledger. Do something that will prompt you to sign a transaction. The ledger modal should have a message indicating that you need to enable contract data to use Augur.
Clubhouse Story
Submitter checklist

[x] Test covering functionality added/fixed in
Check the linked story includes the following:

[x] Steps to reproduce
[ ] Screenshot (If applicable)

Reviewer Checklist

[ ] Test/lint pass
[ ] Post merge, story marked complete

@stephensprinkle Can you take a look at this? I do not have a ledger.


Circleci: build_image_tarballs doesn't work on macOS release

Describe the bug
The generate_artifacts.sh script for CircleCI doesn't work if BUILD_IMAGE_TARBALLS==true, because it's assuming linux. See https://circleci.com/gh/drud/ddev/16491
For now, we can build without tarballs, but quicksprint uses those tarballs, so it will fail unless this is fixed.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Version and configuration information (please complete the following information):

Host computer OS and Version: [e.g. Windows 10, macOS High Sierra]
Docker version information (use docker version) and insert it here.
ddev version information (use ddev version)
config.yaml contents for the misbehaving project
Do you have any custom configuration (nginx, php, mysql) in the .ddev folder? If so, have you tried without them?

Additional context
Add any other context about the problem here. Thanks!

I guess we could manually create the image tarballs and upload them manually to the release and the world wouldn't end.


Typo fixed: Kuberentes -> Kubernetes

fix typo in line 134.

relates to https://github.com/kubernetes/website/pull/11035, https://github.com/kubernetes/website/pull/10935

/approve
@JoeWrightss In future, if you edit long lines can you please rewrap them to 80 cols? It helps with future reviews. I had to squint to see what you changed in this PR.


feat: allow for customized image widths

Alaska Airlines Pull Request
No longer set image width globally
Fixes: #13
Summary:
Image no longer globally gets set by baseline styles. Now img width can be set normally (e.g. <img width="500" />)
Type of change:

[x] Revision of an existing capability

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Orion Design System Team

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Zachary Newton seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

This is counter to standard responsive images. Don't set the width to the image element, set the width to the image container.

what if, instead of all images having 100% width, only images without a hardset width receive 100% treatment
img[width=""] {
    width: 100%;
}

A baseline for OWCSS is to be mobile-first. This requested update allows for a sizing technique using the image attr. This is counter to responsive UI development.

We got around the problems we were having by scoping the normalize and baseline styles to within our main .App component and setting width: auto where needed.
.PageWrapper {
  @import '~@alaskaairux/orion-web-core-style-sheets/dist/baseline';
  @import '~@alaskaairux/orion-web-core-style-sheets/dist/normalize';
  font-family: $font-family-base;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  z-index: 0;
  position: relative;
}

Worth noting this will not work in a project that doesn't have scoping capabilities (e.g. a project importing the raw CSS).
Closing the PR and #14


Create AWS provider branch for Jenkins build script, which doesn't assume artifacts are uploaded to GCS

The intention is that we would call build.sh and then e2e-simple.sh.

BTW, I'm not entirely sure whether I should instead try to merge this on into e2e.sh (perhaps with an env var that controls behaviour).  e2e-simple.sh is basically e2e, but instead of pulling from GCS, it assumes that build.sh has already been called.

Assigning to @zmerlynn since this touches on the jenkins script he wrote.
For the record, my vote is to consolidate the scripts so that they don't drift over time. It seems like the delta is relatively small between the existing script and what you are doing here.

I agree that they should be one script.  I have changed it (and Circle is testing it now)

Minor comments, needs rebase.

LGTM. Sorry this took so long, I'll watch Jenkins.


fix(artifacts): fix handling of directory stubs in azure sa

Description

Fixes https://github.com/wandb/wandb/issues/7867

This PR adds an extra check in the azure_handler to detect a directory stub in an azure storage account with hierarchical namespace enabled. When detected it handles it appropriately:

Using it as the prefix filter for the rest of the blobs
Using it to filter our deeper level directory stubs from the tracked references

[ ] I updated CHANGELOG.md, or it's not applicable

Testing
How was this PR tested?
I added a bit to the system test that covers the azure_handler but I was not able to run the test on my local machine with the following error:
python -m pytest tests/pytest_tests/system_tests/test_artifacts/test_wandb_artifacts.py
Running tests with wandb version: 0.17.4.dev1
Configuring wandb server...
/Users/marijncv/.pyenv/versions/3.10.13/lib/python3.10/subprocess.py:1072: ResourceWarning: subprocess 66424 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
docker: Error response from daemon: Head "https://us-central1-docker.pkg.dev/v2/wandb-production/images/local-testcontainer/manifests/master": denied: Unauthenticated request. Unauthenticated requests do not have permission "artifactregistry.repositories.downloadArtifacts" on resource "projects/wandb-production/locations/us-central1/repositories/images" (or it may not exist).
See 'docker run --help'.
Exit: Failed to connect to wandb server

Am I supposed to be able to run the test or is this only possible for W&B engineers? Any help is appreciated!

Thanks for the review @amusipatla-wandb! I've tried to address the comments in the latest commits

Thanks @amusipatla-wandb! Is there anything I can do to make the PR mergeable?

@amusipatla-wandb @marijncv could you rebase your branch and update the changelog? we already released version 0.17.5 but the changelog doesn't reflect these changes. After rebasing, just move the nice changelog comment to the unreleased section. Thanks

@amusipatla-wandb @marijncv could you rebase your branch and update the changelog? we already released version 0.17.5 but the changelog doesn't reflect these changes. After rebasing, just move the nice changelog comment to the unreleased section. Thanks

Sorry looks like we have some issue with the changelog, let me quickly address this

Thanks @kptkin! I moved the entry to the unreleased section

@kptkin @amusipatla-wandb can this PR please be merged? Thanks in advance!


PipTest: Update expected results for spdx-tools

Signed-off-by: Frank Viernau<EMAIL_ADDRESS>

This change is

This is already contained in https://github.com/heremaps/oss-review-toolkit/pull/1104/commits/021d68611e5ed3d754464cb94efcccd769ca9025, but will merge this one as PR #1104 still needs more work.


ARM: LDRHT instruction has incomplete/incorrect constructor

Describe the bug
The ldrht instruction is specified in the sleigh as follows:

However, addrmode3 does not support the combination of P24=0 and either of c2122=1 or c2122 = 3

To Reproduce
The (little endian) bytes b2 50 f4 e0 should disassemble to ldrht r5, [r4] #0x2 but fail to disassemble

I extended addrmode3 as follows:
addrmode3: [rn],-rm   is P24=0 & U23=0 & c2122=1 & rn & c0811=0 & c0707=1 & c0404=1 & rm
{
  local tmp=rn; rn=rn-rm; export tmp;
}

addrmode3: [rn],"#"^off8    is P24=0 & U23=1 & c2122=3 & rn & immedH & c0707=1 & c0404=1 & immedL
  [ off8=(immedH<<4)|immedL;]
{
  local tmp=rn; rn=rn + off8; export tmp;
}

It 'fixes' the LDRHT instruction, but I don't know enough about ARM to say if parking it in addrmode3 is appropriate

I think that it can be fixed without adding new constructors for addrmode3. Instead it is enough to tweak the constraints in constructors of post-indexed variations: https://github.com/NationalSecurityAgency/ghidra/blob/6842712129b8da45077bb8c5049e607d685f4dea/Ghidra/Processors/ARM/data/languages/ARMinstructions.sinc#L1024-L1044
In the first two constructors constraint c2122=2 can be changed to c2222=1 to allow for any value of bit 21, since it won't be checked. Similarly, in the next two constructors constraint c2122=0 can be changed to c2222=0.

I think that it can be fixed without adding new constructors for addrmode3. Instead it is enough to tweak the constraints in constructors of post-indexed variations:
https://github.com/NationalSecurityAgency/ghidra/blob/6842712129b8da45077bb8c5049e607d685f4dea/Ghidra/Processors/ARM/data/languages/ARMinstructions.sinc#L1024-L1044
In the first two constructors constraint c2122=2 can be changed to c2222=1 to allow for any value of bit 21, since it won't be checked. Similarly, in the next two constructors constraint c2122=0 can be changed to c2222=0.

That is correct (alternatively the P24=1 restriction on the c2122=1 and c2122=3 constructors can be dropped). I intentionally split them up as I'm not sure if extending the constructors like this is sound, in which case they would likely be moved to a new addrmodeX

Good find. Definitely an issue here. It impacts ldrht, ldrsbt, ldrsht and 'strht'. However ldrbtandstrbtare handled properly in addrmode2`, so they're fine.
Sleigh uses a syntax tree hierarchy to decide which constructors to use and resolves them from a top-down manner. Because these instructions have P24=0 & W21=1 set, relaxing the constraints on addrmode3 to use c2222={0,1}should be acceptable and not cause a disassembly conflict between the instructions. addrmode3 is only used for this subset of load/store instructions and the related encodings, the only instructions of concern here are ldrd and strd which define P=0, W=1as unpredictable. Depending on if we want to avoid unpredictable disassembly, we may go either way on it.


Multiple PowerRename entries on folders in quick access bar

Microsoft PowerToys version
0.74.0
Installation method
PowerToys auto-update
Running as admin
No
Area(s) with issue?
PowerRename
Steps to reproduce
Add folder to the Windows quick access bar. Right click on folders in Windows 11 Explorer which are added to the quick access menu
✔ Expected Behavior
One context menu entry
❌ Actual Behavior
3 context menu entries

Other Software
No response

/bugreport

Weird. Did you by any chance also install both a machine and user installation of PowerToys at the same time?

@jaimecbernardo No.
I can easily reproduce this on any PC I test, just tested on 2 other PCs and it happens there too, so it shouldnt be too hard or you to reproduce. I wont send in via report bug gui, I dont want to leak private information from my PC with no insight what will be send from my PC. This is easy to reproduce.

Just confirming that this issue continues to be a problem in v0.77.0 and that the PowerRename option can appear 3 times in three different sections of the quick access context menu.


Image files are not packaged?

Hi,
I'm using ionic. My markdown contains images, but they don't show. I have the impression they're not packaged (they're not in my public folder). I have more than 100 images. How can I make sure they're all packaged and which URL should I use in the markdown to reference them properly?
My images are in src/images folder. I've tried relative paths in markdown and absolute paths. Nothing is working.
e.g. [](./images/mass-iv-kyrie.jpg)
Best regards,
Vic

I'm not familiar with ionic. I guess it depends on your build pipeline/bundler. By specifying a transformImageUri function you might be able to work around it? With webpack and a URL loader, you might be able to require(url) and have it bundled - but I can't help you with the implementation details - that's outside the scope of this library.

Hi, yes, you're right. Here's the "Ionic" solution that I had figured out in the meanwhile, for rendering a collection of markdown files from a folder, on it's turn referring to a collection of images in another folder:
import React, { useState, useEffect } from 'react';
import { IonContent } from '@ionic/react';
import './Home.css';
import ReactMarkdown from 'react-markdown';

// utilitary function to create a dictionary of packaged files
// based on the output of require.context()
const importAll = (r: any, cache: {[key: string]: string}) => r.keys().forEach(
  (key: string) => cache[key] = r(key)
);

// create a dictionary of packaged markdownfiles, by './<source filename>'
const markdownFiles: {[key: string]: string} = {};
importAll(
  require.context('../data/markdown/', true, /\.markdown$/),
  markdownFiles
);
// create a dictionary of packaged image files, by './<source filename>'
const imageFiles: {[key: string]: string} = {};
importAll(
  require.context('../images/', true, /\.(png|gif|jpg)$/),
  imageFiles
);

// utilitary function to convert './<source filename>' to '<packaged filename>'
const transformImageUri = (uri: string) => imageFiles[uri];

function Home () {

  // state is a dictionary of the markdown content, by './<source filename>'
  const [markdownCache, setMarkdownCache] = useState<{[key: string]: string}>({});

  // fetch the content of the markdown files and store it as state
  useEffect(() => {
    let cache: {[key: string]: string} = {};
    function fetchMarkdown() {
      let promises = Object.keys(markdownFiles)
        .map(async (markdownFile: string) => {
          let markdownResponse = await fetch(markdownFiles[markdownFile]);
          return markdownResponse.text().then(text => {
            cache[markdownFile] = text;
          });
      });
      return Promise.all(promises);
    }
    fetchMarkdown().then(() => {
      setMarkdownCache(cache);
    });
  }, []);

  return (
    <IonContent>
      {/* render all markdown files; note that the image file
          uri's must be in the form './<source filename>',
          regardless the relative path in the source tree */}
      {Object.keys(markdownCache).map((markdownFile, index: number) => (
          <ReactMarkdown
            key={index}
            transformImageUri={transformImageUri}
            source={markdownCache[markdownFile].replace(/\\n/g, "\n")}
            escapeHtml={false}
          />
      ))}
    </IonContent>
  );
};

export default Home;


iOS: app crash on "cancel"

Every time I click a "Cancel" button on iOS my app crashes.
I am using these options:
    {
      date: someDateVariable,
      todayText: 'Today',
      androidTheme: 5,
    }

Log from XCode is here:
.....
2016-04-03 20:56:03.658 FXE[407:97335] 320.00
2016-04-03 20:56:03.659 FXE[407:97335] 480.00
2016-04-03 20:56:03.916 FXE[407:97335] THREAD WARNING: ['DatePicker'] took '998.524902' ms. Plugin should use a background thread.
2016-04-03 20:56:09.050 FXE[407:97335] JS Cancel is going to be executed
..... crash after a few seconds

iOS 9.2.1, iPhone 4S, Cordova plugins:
com.phonegap.plugins.facebookconnect <IP_ADDRESS> "Facebook"
cordova-plugin-ble-central 1.0.4 "BLE"
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-crosswalk-webview 1.5.0 "Crosswalk WebView Engine"
cordova-plugin-datepicker 0.9.3 "DatePicker"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-googleplus 4.0.8 "Google+"
cordova-plugin-inappbrowser 1.2.1 "InAppBrowser"
cordova-plugin-splashscreen 3.1.0 "Splashscreen"
cordova-plugin-statusbar 2.1.1 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
cordova-plugin-x-socialsharing 5.0.10 "SocialSharing"
cordova-plugin-x-toast 2.4.2 "Toast"
cordova-sqlite-storage 0.8.4-dev "Cordova sqlite storage plugin (core version)"
ionic-plugin-keyboard 1.0.8 "Keyboard"

Android 5.1 Nexus 5 works fine.

Okay, I am sorry for a false alarm, the issue was caused by my application, because I handled onSuccess callback as if it gets a date every time when called.
Maybe, it would be useful to highlight the callback system (especially the iOS onSuccess callback with no parameter) this in the docs, so other developers won't repeat the same error. What do you think?


Other letters

Something that would make this technique more awesome would be if the letter could be supplied as input!

Something that would make this technique more awesome would be if the letter could be supplied as input!

That would be OP 🤯


Load more feed items with form submit instead of click

Fixes #19.
Actually clicking the More button while the account switcher is open causes it to hide itself.

I have a couple bugs here:

const isDashboard = path === '/'; is too precise. https://github.com/dashboard/ and https://github.com/dashboard/index/2 count too
Submitting the form is a "real" submission and cause a full page change to the next page in your paginated notifications (also incurs the previous issue since it doesn't do anything on https://github.com/dashboard/index/2)
Submitting the form over and over doesn't work anyway. It keeps interrupting itself, so the page stalls out.

I don't think there's a way around using click() because that mimics user behavior enough to fool the existing event listener on the form, which is using .preventDefault() and AJAX to load in place.
My suggestion is to basically create an infinite scroll. Bind more() to page scroll and go back to using click(). This solves the UX issues too: You see everything when you scroll, and if you scroll far enough that organization switcher is out of sight so you can't click it only to have it close on you.
Thoughts?

Users would never manually go to https://github.com/dashboard/index/2 though.

Users would never manually go to https://github.com/dashboard/index/2 though.

True, nor do I know how to get to ~/dashboard manually. I do think it should accept ~/dashboard as being isDashboard at least.

@hkdobrev if you want, I can do a fix for this that uses the infinite scroll idea I suggested. Up to you.


MS1_scans and MS2_scans in .ms_data.hdf don't retain scan structure

Describe the bug
Looking at the structure of an .ms_data.hdf file, it seems the information on which peaks in MS1_scans or MS2_scans belong to which scan is lost.
To Reproduce
Example from my analysis
import tables
hdf = tables.open_file(my_output_file, 'r')
for x in myFile.root.Raw.MS1_scans._f_walknodes():
    print(x)

Output:
/Raw/MS1_scans/indices_ms1 (Array(1174,)) ''
/Raw/MS1_scans/int_list_ms1 (Array(1546349,)) ''
/Raw/MS1_scans/mass_list_ms1 (Array(1546349,)) ''
/Raw/MS1_scans/ms_list_ms1 (Array(1173,)) ''
/Raw/MS1_scans/rt_list_ms1 (Array(1173,)) ''
/Raw/MS1_scans/scan_list_ms1 (Array(1173,)) ''

And similarly for MS2_scans:
for x in myFile.root.Raw.MS2_scans._f_walknodes():
    print(x)

Output:
/Raw/MS2_scans/charge2 (Array(10700,)) ''
/Raw/MS2_scans/indices_ms2 (Array(10701,)) ''
/Raw/MS2_scans/int_list_ms2 (Array(2973805,)) ''
/Raw/MS2_scans/mass_list_ms2 (Array(2973805,)) ''
/Raw/MS2_scans/mono_mzs2 (Array(10700,)) ''
/Raw/MS2_scans/ms_list_ms2 (Array(10700,)) ''
/Raw/MS2_scans/prec_mass_list2 (Array(10700,)) ''
/Raw/MS2_scans/rt_list_ms2 (Array(10700,)) ''
/Raw/MS2_scans/scan_list_ms2 (Array(10700,)) ''

Having int_list_ms* and mass_list_ms* as simple arrays of mzs and intensity values does not allow to recognise in which scan they belong.
Expected behavior
int_list_ms* and mass_list_ms* could be reported as arrays of arrays, one for each scan.
Screenshots

Example of output when trying to build a dataframe from the HDF5 group to assign the peaks to each scan.
Version (please complete the following information):

OS: iOS 12.4
Version: 0.4.7
Installation Type: stable + gui-stable from command line

Hi,
Thanks for reporting. Indeed the array shapes to not match as we have multiple fragments for each scan. We use the indices to keep track of what belongs to what.
Often, we then use np.searchsorted to create a lookup index in the same size, like so:
np.searchsorted(indices_, np.arange(len(mass_data)), side='right') - 1.
Below is a code snipped to get from ms_data to a dataframe with scans.

One could potentially have this as a method for the ms_data.hdf to directly read as dataframe, e.g. .read_DDA_ms1_df(). Would this be what you are looking for?

Thanks for the quick reply. I hadn't realised the indices were structured this way, now the structure of the hdf is more clear.