Spyder stops BLAS library from using multiple threads

From<EMAIL_ADDRESS>on 2013-02-18T17:25:31Z
Spyder Version:  2.1.10
Python Version:  2.7.3
Qt Version:      4.8.2, PyQt4 (API v1) 4.9.3 on Linux
Hi! I'm running Spyder 2.1.10 under Ubuntu 2.10, using NumPy 1.6.2. I'm using OpenBLAS as a BLAS library for numpy ( https://github.com/xianyi/OpenBLAS ). This library can use multiple threads to speed up vector operations. The maximal number of threads can be controlled via environment variables. If nothing is set, 4 threads are used.
However, no matter what I do, when I run my code from within Spyder, OpenBLAS will always only use 1 thread.
Here is a minimal example that I used:
from numpy import *
import time
x = random.random((5000,5000))
t1 = time.time()
foo = dot(x.T, x)
print time.time() - t1
This piece of code will run in ~6.9 seconds on my machine, using 4 threads (I can clearly see the CPU utilization going up to 400% in top).
Inside Spyder, the same piece of code will always only run on 1 CPU and takes considerably longer (~16 seconds). Here are the things that I've tried to get Spyder working, all of which (and combinations of which) failed:

Explicitly set the environmental variable that controls the number of threads via the "Environmental Variables" option in the console view.
Explicitly set the environmental variable via os.environ
start an IPython console instead of a Python console inside Spyder.
store the code in an external file, and do "%run filename.py" in an IPython console.
Explicitly start spyder via "OMP_NUM_THREADS=4 spyder" from a shell.

I checked the os.environ variable from within Python/IPython shells, and haven't found any environment variable that would stop OpenBLAS from using multiple threads.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1274

From<EMAIL_ADDRESS>on 2013-09-07T09:51:30Z
Detailed instructions to install OpenBLAS on Ubuntu 12.04. Might also work on Ubuntu 12.10.
See: http://osdf.github.io/blog/numpyscipy-with-openblas-for-ubuntu-1204-second-try.html sudo apt-get install git python-dev gfortran
cd ~
mkdir 00Software
cd 00Software
git clone git://github.com/xianyi/OpenBLAS
cd OpenBLAS
make -j4 FC=gfortran
sudo make PREFIX=/usr/local/ install
sudo pip uninstall numpy
cd ~/00Software
git clone https://github.com/numpy/numpy cd numpy
cp site.cfg.example site.cfg
Change the following lines:
[DEFAULT]
library_dirs = /usr/local/lib
include_dirs = /usr/local/include
[openblas]
libraries = openblas
library_dirs = /usr/local/lib
include_dirs = /usr/local/include
export BLAS=/usr/local/lib/libopenblas.a
export LAPACK=/usr/local/lib/libopenblas.a
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
python setup.py config
check the output !!!
python setup.py build
sudo python setup.py install
sudo ldconfig
Run the following test program:
import numpy
import sys
import timeit
try:
import numpy.core._dotblas
print 'FAST BLAS'
except ImportError:
print 'slow blas'
print "version:", numpy.version
print "maxint:", sys.maxint
print
x = numpy.random.random((1000,1000))
setup = "import numpy; x = numpy.random.random((1000,1000))"
count = 5
t = timeit.Timer("numpy.dot(x, x.T)", setup=setup)
print "dot:", t.timeit(count)/count, "sec"
Installing SciPy
sudo pip uninstall scipy
cd ~/00Software
git clone https://github.com/scipy/scipy cd scipy
python setup.py build
sudo python setup.py install
sudo ldconfig

From ccordoba12 on 2013-03-12T08:39:36Z
I tried OpenBlas on Ubuntu 12.10 and it gave me just segfaults, so I don't know how to test it.
Labels: Cat-Console

From ccordoba12 on 2015-01-02T18:41:59Z
Labels: MS-v2.4

Closing because we were never able to confirm this issue.


Add R.nth equivalent

Would be great to a safe alternative to Ramdas R.nth.
Should be able to submit a PR soon if there are no objections.

Oh jees we have S.at. So sorry

No problem. I don't recall why we chose a different name for this function.

Where did S.at go? It seems to have been removed...


Improve argmax of BatchedTensor(Seq)

Codecov Report
Patch coverage: 100.00% and no project coverage change.

Comparison is base (97be9d9) 100.00% compared to head (cd6af24) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #383   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           18        18
  Lines         1743      1751    +8
  Branches       181       182    +1
=========================================
+ Hits          1743      1751    +8

Files Changed
Coverage Δ

src/redcat/tensor.py
100.00% <100.00%> (ø)

src/redcat/tensorseq.py
100.00% <100.00%> (ø)

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


For dependencies under version control, should capture repository URL + branch

Currently we capture the revision id, but that is fairly useless on its own
Imported from Bitbucket issue 109,  created by apdavison on 10-20-2012 at 16:59, last modified: 12-17-2012 at 21:37

Capture of repository URL for dependencies implemented in r585. On reflection, capturing the branch doesn't seem to be strictly necessary - create a new ticket if you disagree ;-)
Trac comment by apdavison on 12-17-2012 at 21:37


debug: tracing: Remove unneeded abstraction

Various C and Assembly modules in the debug subsystem
make function calls to z_sys_trace_. These merely call
corresponding functions sys_trace_. This commit
is to simplify these by making direct function calls
to the sys_trace_* functions from these modules.
Subsequently, the z_sys_trace_* functions are removed.
Signed-off-by: Mrinal Sen<EMAIL_ADDRESS>

@nashif : Hi Anas, This part of the implementation builds on top of the previous one (PR19210). We wondered if this will be confusing for the reviewers to see the changes submitted in the previous PR is undone in this PR. For example, one file that was deleted in the previous PR would have reappeared in this one. If you would prefer, I can wait till the previous PR is merged before re-submitting this one. I believe the previous PR is ready to be merged subject to your final review. Many thanks!

@aescolar : Hi Alberto, the indentations are added by the uncrustify and only on the modules I have touched! It is best, that I revert this commit and resubmit when the first PR is merged. Thanks!

@msenOticon if you use uncrustify in some code, keep those changes separate from any functional changes, ie. put them in a different commit. Also, if you depend on some other PR, keep the original commits from the other PR intact, do not squash them in one some single commit. Thanks.

I have re-based in line with your comments with an appropriate commit message. Many thanks!

@nashif : Hi Anas, could you please give me the build command for this (board and samples options). I tried a few options but couldn't produce the same errors. Many thanks.

@nashif : Hi Anas, could you please give me the build command for this (board and samples options). I tried a few options but couldn't produce the same errors. Many thanks.

west  build -b nrf52840_pca10056 samples/synchronization/
with the above change to prj.conf

@nashif : Hi Anas, Thank you. I have tried this but get different results!
In my branch (msen/ctf_rm_z_sys_traces), I get the error "../soc/arm/nordic_nrf/nrf52/soc.h:17:10: fatal error: nrf.h: No such file or directory".
In master (with git pull, west update, etc.), I get "../soc/arm/nordic_nrf/nrf52/soc.h:16:10: fatal error: nrfx.h: No such file or directory".
I am using the command: west build -b nrf52840_pca10056 samples/synchronization --pristine
The .prj file as you suggested: samples/synchronization/prj.conf
CONFIG_STDOUT_CONSOLE=y
enable to use thread names
CONFIG_THREAD_NAME=y
CONFIG_SEGGER_SYSTEMVIEW=y
CONFIG_USE_SEGGER_RTT=y

@nashif : Hi Anas, I have fixed my build issue, now I can see the errors you have mentioned. Will investigate and fix the problem!

"west build -b nrf52840_pca10056 samples/synchronization" is now working with the last update.

"west build -b nrf52840_pca10056 samples/synchronization" is now working with the last update.

does it work with ```
diff --git a/samples/synchronization/prj.conf b/samples/synchronization/prj.conf
index fb9f4cdb23..7a1792ae40 100644
--- a/samples/synchronization/prj.conf
+++ b/samples/synchronization/prj.conf
@@ -1,3 +1,5 @@
CONFIG_STDOUT_CONSOLE=y
enable to use thread names
-#CONFIG_THREAD_NAME=y
+CONFIG_THREAD_NAME=y
+CONFIG_SEGGER_SYSTEMVIEW=y
+CONFIG_USE_SEGGER_RTT=y```

@nashif : I can build this as well as for native_posix, hello_world without any errors:
diff --git a/samples/synchronization/prj.conf b/samples/synchronization/prj.conf
index fb9f4cdb23..7a1792ae40 100644
--- a/samples/synchronization/prj.conf
+++ b/samples/synchronization/prj.conf
@@ -1,3 +1,5 @@
CONFIG_STDOUT_CONSOLE=y
enable to use thread names
-#CONFIG_THREAD_NAME=y
+CONFIG_THREAD_NAME=y
+CONFIG_SEGGER_SYSTEMVIEW=y
+CONFIG_USE_SEGGER_RTT=y
C7.5.1804 kbnuxaes02 [/scratch/zephyrproject/zephyr]
$ west build -b nrf52840_pca10056 samples/synchronization
-- west build: build configuration:
source directory: /scratch/zephyrproject/zephyr/samples/synchronization
build directory: /scratch/zephyrproject/zephyr/build
BOARD: nrf52840_pca10056 (origin: CMakeCache.txt)
-- west build: building application
[0/1] Re-running CMake...
Zephyr version: 2.0.99
-- Selected BOARD nrf52840_pca10056
-- Found west: /home/msen/.local/bin/west (found suitable version "0.6.2", minimum required is "0.6.0")
-- Loading /scratch/zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts as base
-- Overlaying /scratch/zephyrproject/zephyr/dts/common/common.dts
Device tree configuration written to /scratch/zephyrproject/zephyr/build/zephyr/include/generated/generated_dts_board.conf
warning: please put 'required: false' instead of 'category: optional' in 'properties: center-aligned: ...' in /scratch/zephyrproject/zephyr/dts/bindings/pwm/nordic,nrf-pwm.yaml - 'category' will be removed
Parsing Kconfig tree in /scratch/zephyrproject/zephyr/Kconfig
Loaded configuration '/scratch/zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056_defconfig'
Merged configuration '/scratch/zephyrproject/zephyr/samples/synchronization/prj.conf'
No change to '/scratch/zephyrproject/zephyr/build/zephyr/.config'
warning: please put 'required: false' instead of 'category: optional' in 'properties: center-aligned: ...' in /scratch/zephyrproject/zephyr/dts/bindings/pwm/nordic,nrf-pwm.yaml - 'category' will be removed
-- Cache files will be written to: /home/msen/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch/zephyrproject/zephyr/build
[97/101] Linking C executable zephyr/zephyr_prebuilt.elf

@nashif : Hi Anas, I just created a new branch from the master and applied this commit on top. I can build for nrf52840_pca10056 using the prj.conf as above. Best regards, Mrinal


replace automatic redirect with call to action overlay

Hello! I'm opening this PR to propose a feature that also fixes this bug #1464 (where the email prompt continuously opened in mobile with every new browser restart).
Current behavior: When re-opening an individual city page, the site currently automatically opens the default email client (or prompts to select an email client from a list).
New behavior: When re-opening an individual city page, the site will present an overlay with text & open email button. Visually there is a full/transparent overlay over the entire page and a white panel with info and a clickable "open draft email" button and an exit button. Clicking on the transparent overlay will dismiss the overlay.
Reasoning: This behavior creates a user friendly experience, giving a clear warning before redirecting into their email client and also presenting several easy ways to dismiss the warning.
100% open to feedback on functionality, copy, design and any other notes from contributors. My main goal is to fix the bug but also to enhance user experience.
Mobile:

Desktop/Tablet:

closing for now while the team works on migration and discusses the feature/goals 🙂


Log data not being written to disk

I've been running into a case where I am logging to an mcap sink, but even after logging sometimes the mcap file is empty. I'm not sure if the issue has something to do with how the program exits or what. I'm sure there's some amount of buffered data that must accumulate before it writes to disk so perhaps that's in play as well :man_shrugging:. Below is a simple example that produces the behavior reliably for me. Basically I just run this and when I ctrl+c it the log file is still empty.
#include <iostream>
#include <unistd.h>
#include <data_tamer/data_tamer.hpp>
#include <data_tamer/sinks/mcap_sink.hpp>

int main(int /*argc*/, char** /*argv*/)
{
    std::shared_ptr<DataTamer::LogChannel> channel = DataTamer::LogChannel::create("test");
    channel->addDataSink(std::make_shared<DataTamer::MCAPSink>("/tmp/test.mcap"));

    double log_val = 0.;
    channel->registerValue("test_val", &log_val);
    while (true)
    {
        log_val++;
        channel->takeSnapshot();
        usleep(10000);
    }

    return 0;
}

@jlack1987 Data is only written to disk once the buffer is full. I think you are not waiting long enough in your case.
For instance if you modify the end of the data_tamer_cpp/examples/T03_mcap_writer.cpp example like that:
for(size_t i = 0; i < 10000; i++)
  {
    channelA->takeSnapshot();
    if(i % 2 == 0)
    {
      channelB->takeSnapshot();
    }
    std::this_thread::sleep_for(std::chrono::milliseconds(1));
  }
  std::cout << "WAIT" << std::endl;
  std::this_thread::sleep_for(std::chrono::milliseconds(10000));
  std::cout << "DONE" << std::endl;

If you press Ctrl+C once you see WAIT, the log file will contain some data because the buffer was filled at least once during the loop.
However, in any case, pressing Ctrl+C will "break" the mcap log file and you won't be able to read it with data_tamer_cpp/examples/mcap_reader.cpp. You have to close the sink properly by intercepting the Ctrl+C signal.
#include "data_tamer/data_tamer.hpp"
#include "data_tamer/sinks/mcap_sink.hpp"
#include "geometry_types.hpp"
#include <iostream>
#include <thread>
#include <signal.h>

using namespace DataTamer;

auto mcap_sink = std::make_shared<MCAPSink>("test_sample.mcap");

void signal_callback_handler(int signum) {
   std::cout << "Caught signal " << signum << std::endl;

   mcap_sink->~MCAPSink();

   // Terminate program
   std::exit(signum);
}

int main()
{
  signal(SIGINT, signal_callback_handler);

  ChannelsRegistry::Global().addDefaultSink(mcap_sink);

  // Create (or get) a channel using the global registry (singleton)
  auto channelA = ChannelsRegistry::Global().getChannel("channelA");
  auto channelB = ChannelsRegistry::Global().getChannel("channelB");

  // logs in channelA
  std::vector<double> v1(10, 0);
  std::array<float, 4> v2 = { 1, 2, 3, 4 };
  int32_t v3 = 5;
  uint16_t v4 = 6;
  TestTypes::Pose pose;
  pose.pos = { 1, 2, 3 };
  pose.rot = { 0.4, 0.5, 0.6, 0.7 };

  channelA->registerValue("vector_10", &v1);
  channelA->registerValue("array_4", &v2);
  channelA->registerValue("val_int32", &v3);
  channelA->registerValue("val_int16", &v4);
  channelA->registerValue("pose", &pose);

  // logs in channelB
  double v5 = 10;
  uint16_t v6 = 11;
  std::vector<uint8_t> v7(4, 12);
  std::array<uint32_t, 3> v8 = { 13, 14, 15 };
  std::vector<TestTypes::Point3D> points(2);
  points[0] = { 1, 2, 3 };
  points[1] = { 4, 5, 6 };

  channelB->registerValue("real_value", &v5);
  channelB->registerValue("short_int", &v6);
  channelB->registerValue("vector_4", &v7);
  channelB->registerValue("array_3", &v8);
  channelB->registerValue("points", &points);

  for(size_t i = 0; i < 10000; i++)
  {
    channelA->takeSnapshot();
    if(i % 2 == 0)
    {
      channelB->takeSnapshot();
    }
    std::this_thread::sleep_for(std::chrono::milliseconds(1));
  }
  std::cout << "WAIT" << std::endl;
  std::this_thread::sleep_for(std::chrono::milliseconds(10000));
  std::cout << "DONE" << std::endl;
}

I don't know if there is a better way to do it...
If you don't do that, according to https://github.com/foxglove/mcap/discussions/1093, it seems possible to fix the mcap file but I have not tried it.

ah ok thanks I appreciate it @paLeziart! Do you know if it's possible to modify the buffer size or at least where I can find what the buffer size is so I know how much I need to fill before it writes?

@jlack1987 The buffer size seems to be defined in data_tamer_cpp/3rdparty/mcap/include/mcap/types.hpp with constexpr uint64_t DefaultChunkSize = 1024 * 768; (so a size of 768 KB)
In data_tamer_cpp/3rdparty/mcap/include/mcap/mcap.hpp there is a noChunking option which might remove this buffer behaviour if set to true. I have not tried.


Handle creating Component with invalid type_uri

I am using the Component class to encode strains. The constructor for the class allows me to modify type_uri to change the default value from http://sbols.org/v3#Component to http://sbols.org/v3#Module . However, if I want to pass in a invalid URI to type_uri, the library will accept it and update the field accordingly. I don't think this should be allowed  and request that the library should add extra check to ensure that the value provided for type_uri should correctly follow a URI format.
Here is sample code used for testing this feature:
    def test_create_component_with_invalid_uri(self):
        document = Document()
        strain_XOR_11 = 'UWBF_XOR_11'
        input_strain = Component(name=strain_XOR_11,
                                 component_type=sbol_constants.SBO_FUNCTIONAL_ENTITY,
                                 type_uri='MODULE')
        document.add(input_strain)
        output_strain = document.find(strain_XOR_11)
        self.assertEqual(input_strain, output_strain)
        self.assertEqual(sbol_constants.SBOL_COMPONENT, output_strain.type_uri)

    def test_create_component_with_valid_uri(self):
        document = Document()
        strain_XOR_11 = 'UWBF_XOR_11'
        input_strain = Component(name=strain_XOR_11,
                                 component_type=sbol_constants.SBO_FUNCTIONAL_ENTITY,
                                 type_uri='http://sbols.org/v3#Module')
        document.add(input_strain)
        output_strain = document.find(strain_XOR_11)
        self.assertEqual(input_strain, output_strain)
        self.assertEqual('http://sbols.org/v3#Module', output_strain.type_uri)

You shouldn't need to override the type_uri unless you are creating custom annotations or extensions. You are allowed to override the type_uri so that you can create custom annotations and extensions.
Both 'MODULE' and 'http://sbols.org/v3#Module' are valid URIs. The definition of a URI is really general and only a few characters are illegal.
>>> import rdflib
>>> uri1 = rdflib.URIRef('MODULE')
>>>
>>> rdflib.URIRef('foo"bar')
foo"bar does not look like a valid URI, trying to serialize this will break.
WARNING:rdflib.term:foo"bar does not look like a valid URI, trying to serialize this will break.
rdflib.term.URIRef('foo"bar')

Note that per my comment on https://github.com/SynBioDex/pySBOL3/issues/62, 'http://sbols.org/v3#Module' would not be allowed because it uses the SBOL namespace http://sbols.org/v3# for an entity that is not defined in the specification, namely Module. The library doesn't detect that, and probably won't. It's something you shouldn't do though. Other libraries might complain.

@tramyn I think you shouldn't be needing to make a Module in the first place, because that should just be a Component in SBOL3, where there is no longer a Component vs. Module distinction (see Section 10 of the spec on SBOL 2->3 mapping)

@tramyn can this issue be closed or are there things that still need to be fixed?

@tcmitchell Yes, I'm fine with closing.


changes to get everything building w/ cuda on WSL

These changes were the result of a heroic effort by Chris, Josh and Gregory helping me get TPLs and serac building + linking with cuda on WSL2.
https://github.com/LLNL/serac/pull/493 had some unrelated files that I mistakenly included in the PR.

Codecov Report

Merging #495 (6e3c49f) into develop (095a551) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #495   +/-   ##
========================================
  Coverage    94.86%   94.86%
========================================
  Files           66       66
  Lines         3561     3561
========================================
  Hits          3378     3378
  Misses         183      183

Continue to review full report at Codecov.

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

This is failing to build RAJA on rzansel.

I'll test these fixes on my GPU-less ubuntu build.

@white238 , is this ready to merge?


Add Instructions on how to use and turn off authentication for json rpc.

Add a section within developers that explains how to disable authentication for the json rpc.
Very useful during local development.
Also add a section on

how generate the authentication token,
important fields
and format to use when sending the request to the client.

This doesn't currently exist, the only reference to "authentication" is in the engine section of the doc's page which is less than sufficient.

@obasekiosa hi, is this issue aimed at those who already use the product and know the subject? Is there a source of information to rely on while writing the docs?

@obasekiosa hi, is this issue aimed at those who already use the product and know the subject? Is there a source of information to rely on while writing the docs?

Ideally, thats the case, as you'd need that knowledge to update the doc.
but you could always figure it out (e.g try it out yourself or ask on the discord) then make a pr when you do.


imxrt:Serial Preserve all but W1C bit in SR

Summary
ISR was corrupting SR settings.
Impact
Testing

please add a commit message describing the change

Done


Make ARM compilation possible.

Who would have thought! It was actually that easy...
Bugs were discovered, though. MP3 crashes during compression and corrupts data on decompression. All other data types appear to be making the roundtrip OK.
More details in an issue after merging.
I might have broken Windows compile according to AppVeyor... Can't test so I'm not sure

Fixes #107


ASPNETCORE 2.0 ClaimsPrincipal IsAuthenticated but SignInAsync is not IsAuthenticated (and user is null) using cookies

Hi
I had a ASPNETCORE application using Authentication cookie It was working perfectly with 1.1.
After the changes in 2.0 i have been reading up and down regarding the migration and have changed to:
services.AddAuthentication()
                .AddCookie(options =>
                {
                    options.LoginPath = new PathString("/Account/Login");
                    options.AccessDeniedPath = new PathString("/Account/Forbidden/");
                    //options.ExpireTimeSpan = TimeSpan.FromDays(60);
                    //options.SlidingExpiration = true;
                });

I have also changed the signin from the Authenticator to httpcontext signin.
await httpContext.SignInAsync(actual.ClaimsPrincipal)
i have also tried with the new:
await AuthenticationHttpContextExtensions.SignInAsync(httpContext, CookieAuthenticationDefaults.AuthenticationScheme, actual.ClaimsPrincipal)
Even though the ClaimsPrincipal IsAuthenticated, the roles andf claims are good. The SignIn does nothing!
The HttpCointext.User is null.
Something is wrong. I have tried every combination i can with the startup configuation. I have read ever stack overflow and github issue. Nothing helps.
The log file says:
2017-09-18 21:38:18.2931 | INFO | Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler | AuthenticationScheme: Identity.Application signed in. |
2017-09-18 21:38:45.7513 | INFO |
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler | AuthenticationScheme: Cookies signed in. |
the first message comes from the SignInManager.PasswordSignInAsync. The second from HttpContext.SignIn.
Does anybody know why the SignInManager.PasswordSignInAsync auth schema is "Identity.Application"
Does anybody know why HttpContext.User is null after the login?
This is a real issue for us!!! :-/

If you are using identity, you don't need to call AddAuthentication/AddCookie, and you need to sign in using the IdentityConstants.ApplicationCookie scheme
If you don't actually want to use identity, then you should remove the call to AddIdentity and then your direct SignIns would match the cookie you added

Wow. Fast answer. Thanks.!
A also just added this:
`option.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            option.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;

            option.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;

            option.DefaultSignOutScheme = CookieAuthenticationDefaults.AuthenticationScheme;

            option.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;

            option.DefaultForbidScheme = CookieAuthenticationDefaults.AuthenticationScheme;

`
It also seamed to help!

HI again
I have tried removing AddAuthentication/AddCookie and using IdentityConstants for the identity and signin etc. Doesn't appear to work...

When precisely is HttpContext.User null? Note that property should never return null but it may return an anonymous user. Are you checking it on this same request, on the next request, etc.?

Hi Chris
Thanks for re-openning. I did feel there was a little loose end here.
Forst i should mention that i have followed https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x from top to toe.
I am not using any 3rd party integrations (facebook, google, etc.) only pure identity.
What i am noticing in the ClaimsPrincipalFactory is that when the ClaimsIdentity is created and even though the default cookie schema is being used, the SignInManger.PasswordSignInAsync gets logged to use  "Identity.Application"schema.
This essentially means that:

When the HttpContext.SignInAsync uses the claimsIdentity the cookies are not the same.

If i do not override the option.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; the sign in with th identity does not pass to HttpContext.User. Even though HttpContext.SignIn does not throw or anything

In 2.0 If i do override the option.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; the HttpContext.User is null after successful login and a new http request.

In 2.0 If i do override the option.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;  the HttpContext.User is null after the HttpContext.SiginAsync**, e.g.

await httpContext.SignInAsync(DefaultCookiesNames.AuthorizationCookie, actual.ClaimsPrincipal).ConfigureAwait(false);                     var user = httpContext?.User;
In aspnetcore 1.1 there HttpContext.User was not null after HttpContext.SignInAsync maybe because of the: AutomaticAuthenticate = true, AutomaticChallenge = true, is no longer present?

Lastly why is the Identity cookie still being created when i have overwritten it everywhere possible?

Thanks, Rik

SignInManager always will sign in to IdentityConstants.ApplicationScheme.  What exactly are you trying to do?  Are you trying to sign in cookies yourself/not use SignInManager?
DefaultAuthenticateScheme is what controls which scheme's identity gets set to httpContext.User by default, AddIdentity() sets this to IdentityConstants.ApplicationScheme.
If you don't want the application cookie, you can't use any of SignInManager's SignIn methods.

Hi Hao
Thats fine that it always uses "IdentityConstants.ApplicationScheme".
However, as far as i could test without the "option.DefaultSchemeXxxx" changes to the service colleciton for AddAuthentication extension  the HttpContext SignIn does not work with the claimsPrincipal, and then there is nothing added to HttpConext.User
This was working in 1.1. And i do feel MS has broken something here.
Ofcause we should be able to use the signin manger together with the httpcontext signin. Without making schema changes in multiple places.
2.0 really broke something that was very simple here...

I'm not exactly sure what you are trying to do, but to clarify exactly what's going on.
SignInManager.SignInAsync(user) results in a call to httpContext.SignInAsync(IdentityConstants.ApplicationScheme, userClaimsPrincipal)
Calling httpContext.SignInAsync(claimsPrincipal) is using the AuthenticationOptions.DefaultSignInScheme as the scheme.
httpContext.User gets set by the middleware from UseAuthentication() to AuthenticationOptions.DefaultAuthenticateScheme

Hi
But why does SignInManager.SignInAsync(user), goto
(httpContext.SignInAsync(IdentityConstants.ApplicationScheme, userClaimsPrinciple)
It isn't supporting the claims principle factory anymore? that also makes the identity.
I guess this is the problem. I want to (as i did in aspnetcore1) generate the claims and identity in the claimsprinclpe factory., But the SignInManager.SignInAsync(user) does not user the factory :-/
Configuration:
services.AddIdentity<AppUser, AppRole>()                 .**AddClaimsPrincipalFactory<IClaimsPrincipalFactory>()**                 .AddUserStore<IUserStore>()                 .AddRoleStore<IRoleStore>()                 .AddUserManager<UserManager>()                 .AddRoleManager<RoleManager>()                 .AddSignInManager<SignInManager>()                 .AddDefaultTokenProviders();
Claims factory:
`public class ClaimsPrincipalFactory : IClaimsPrincipalFactory
{
public Task CreateAsync(AppUser appUser)
{
return Task.Run(() =>
{
if (appUser?.Roles == null)
{
return new ClaimsPrincipal();
}
var claims = new []{
CreateClaimIfValue(ClaimTypes.NameIdentifier, appUser.Id),
CreateClaimIfValue(ClaimTypes.Name, appUser.DisplayName),
CreateClaimIfValue(ClaimTypes.Email, appUser.Email),
CreateClaimIfValue(ClaimTypes.GivenName, appUser.FirstName),
CreateClaimIfValue(ClaimTypes.Surname, appUser.LastName)
}.Where(x=>x!=null).ToList();
if (appUser.Roles != null && appUser.Roles.Any())
{
claims.AddRange(appUser.Roles.Distinct().Select(role => new Claim(ClaimTypes.Role, role.Name)));
}
var identity = new ClaimsIdentity(DefaultCookiesNames.AuthorizationCookie);
identity.AddClaims(claims);
var claimsPrincipal = new ClaimsPrincipal(identity);
            return claimsPrincipal;
        });
    }

    private static Claim CreateClaimIfValue(string type, string value)
    {
        return !string.IsNullOrWhiteSpace(value) ? new Claim(type, value) : null;
    }`


Add bytes function to IPAddress

Add ByteArray.toIPAddress
Add ByteArray.toIPAddressOrNull
Add ByteArray.toIPAddressV4
Add ByteArray.toIPAddressV4OrNull
Add ByteArray.toIPAddressV6
Add ByteArray.toIPAddressV6OrNull

Within the IPAddress sealed class a bytes() function should be available which would produce a copy of the private field ByteArray.

This will also allow for expansion of the IPv6 addresses in order to produce uniformity such that the Address.value is always the same. Might even want to lift the final override for equals & hashCode such that IPAddress implementation can compare the underlying byte field.

Also will be able to add Jvm extension functions for toInetAddress using InetAddress.getByAddress

Will do this in future 2.x.0 release


[W4.4b][T16-A1] Chan Tiong Ley

Good attempt. Remember to update docs and tests as well. Tests will help you uncover bugs that you dont expect.
check out good commit style here

Close this PR if you have no other questions


fix lwansbrough/react-native-google-analytics#14

fix for issue #14

Great, was waiting for this fix. Can you merge this in to master ? :)

Ahh, that was easy! :) I can push this to npm later today.

Awesome! Thank you :+1:

:+1:

Done. :)


showing no cash (0.00) balance on Poloniex and BTC-e

Hello There,
I am having issues with both of my connected exchanges displaying a 0.00 balance even though I have $50 in each exchange.
--------------------------------------------
|   Blackbird Bitcoin Arbitrage Log File   |
--------------------------------------------

Blackbird started on 04/08/2017 01:33:39

Connected to database 'blackbird.db'

[ Targets ]
   Spread Entry:  0.80%
   Spread Target: 0.50%

[ Current balances ]
   BTC-e:       0.00 USD        0.000000 BTC
   Poloniex:    0.00 USD        0.000000 BTC

[ Cash exposure ]
   TEST cash used
   Value: $15.00

[ 04/08/2017 01:33:39 ]
   BTC-e:       1,183.36 / 1,181.12
   Poloniex:    1,196.51 / 1,196.76
   ----------------------------
   BTC-e/Poloniex:       1.30% [target  0.80%, min  1.30%, max  1.30%]  volat. n/a 1<600
   Poloniex/BTC-e:      -1.12% [target  0.80%, min -1.12%, max -1.12%]  volat. n/a 1<600

[ 04/08/2017 01:33:42 ]
   BTC-e:       1,183.36 / 1,181.12
   Poloniex:    1,196.51 / 1,196.76
   ----------------------------
   BTC-e/Poloniex:       1.30% [target  0.80%, min  1.30%, max  1.30%]  volat. n/a 2<600    trailing  1.22%  0/1
   Poloniex/BTC-e:      -1.12% [target  0.80%, min -1.12%, max -1.12%]  volat. n/a 2<600

[ 04/08/2017 01:33:45 ]
   BTC-e:       1,184.32 / 1,181.12
   Poloniex:    1,196.51 / 1,196.76
   ----------------------------
   BTC-e/Poloniex:       1.30% [target  0.80%, min  1.30%, max  1.30%]  volat. n/a 3<600    trailing  1.22%  0/1
   Poloniex/BTC-e:      -1.04% [target  0.80%, min -1.12%, max -1.04%]  volat. n/a 3<600

[ 04/08/2017 01:45:57 ]
   BTC-e:       1,182.01 / 1,180.01
   Poloniex:    1,195.48 / 1,197.96
   ----------------------------
   BTC-e/Poloniex:       1.31% [target  0.80%, min  0.00%, max  1.52%]  volat. n/a 225<600    trailing  1.44%  1/1
WARNING: Opportunity found but no cash available. Trade canceled
   Poloniex/BTC-e:      -1.33% [target  0.80%, min -1.58%, max  0.00%]  volat. n/a 225<600

[ 04/08/2017 01:46:00 ]
   BTC-e:       1,182.01 / 1,180.01
   Poloniex:    1,195.48 / 1,197.96
   ----------------------------
   BTC-e/Poloniex:       1.31% [target  0.80%, min  0.00%, max  1.52%]  volat. n/a 226<600    trailing  1.44%  0/1
   Poloniex/BTC-e:      -1.33% [target  0.80%, min -1.58%, max  0.00%]  volat. n/a 226<600

[ 04/08/2017 01:46:03 ]
   BTC-e:       1,182.01 / 1,180.01
   Poloniex:    1,195.48 / 1,197.96
   ----------------------------
   BTC-e/Poloniex:       1.31% [target  0.80%, min  0.00%, max  1.52%]  volat. n/a 227<600    trailing  1.44%  1/1
WARNING: Opportunity found but no cash available. Trade canceled
   Poloniex/BTC-e:      -1.33% [target  0.80%, min -1.58%, max  0.00%]  volat. n/a 227<600

[ 04/08/2017 01:46:06 ]
   BTC-e:       1,182.01 / 1,180.01
   Poloniex:    1,195.48 / 1,197.96
   ----------------------------
   BTC-e/Poloniex:       1.31% [target  0.80%, min  0.00%, max  1.52%]  volat. n/a 228<600    trailing  1.44%  0/1
   Poloniex/BTC-e:      -1.33% [target  0.80%, min -1.58%, max  0.00%]  volat. n/a 228<600

Thank you in advance

BTC-e and Poloniex currently doesn't have an implementation to authenticate properly. You're getting a 0.0 balance because that's what the stubbed out functions return.

Has this issue been fixed yet?

This is not an actual issue, but as @greatwolf mentioned the connections to BTC-e and Poloniex simply haven't been implemented yet.


Update daops to interrogated Fixes index for dataset fixes

Pre-requisites:

Fix index exists and has public read-only access

which implies:  other indexes exists and are working with dachar.

Task:

Update daops so that normalise will look up whether fixes need to applied to each dataset and will then apply them.
Requires integration with "Fixer" class, and updating that class to query the Fix Index by dataset id.

Done! Merged.


add sorting of updates so migration ones run last

closes #1065

LGTM. Many thanks, @manuelcueto!

This is a small change but it already resulted in over a dozen new PRs by @scala-steward that were previously blocked by failing Scalafix migrations. So thanks again @manuelcueto!


Has a mistake :"agg_metrics" in val_log AssertionError: No agg_metrics found in validation log.

val_log is {}. I don't know why

Because val_log  is eval by lavis/tasks/vqa.py(or other tests project), So you have to rewrite the VQATask Class method, origin code following:
    def after_evaluation(self, val_result, split_name, **kwargs):
        result_file = self.save_result(
            val_result,
            result_dir=registry.get_path("result_dir"),
            filename=f"{split_name}_vqa_result",
            remove_duplicate="question_id",
        )

        metrics = self._report_metrics(result_file=result_file, split=split_name)

        return metrics

    @dist_utils.main_process
    def _report_metrics(self, result_file, split):
        """
        Use official VQA evaluation script to report metrics.
        """
        metrics = {}
        print("ques_files: ", self.ques_files)
        print("anno_files: ", self.anno_files)

        if split in self.ques_files and split in self.anno_files:
            vqa = VQA(self.anno_files[split], self.ques_files[split])
            vqa_result = vqa.loadRes(
                resFile=result_file, quesFile=self.ques_files[split]
            )

            # create vqaEval object by taking vqa and vqaRes
            # n is precision of accuracy (number of places after decimal), default is 2
            vqa_scorer = VQAEval(vqa, vqa_result, n=2)
            logging.info("Start VQA evaluation.")
            vqa_scorer.evaluate()

            # print accuracies
            overall_acc = vqa_scorer.accuracy["overall"]
            metrics["agg_metrics"] = overall_acc

            logging.info("Overall Accuracy is: %.02f\n" % overall_acc)
            logging.info("Per Answer Type Accuracy is the following:")

            for ans_type in vqa_scorer.accuracy["perAnswerType"]:
                logging.info(
                    "%s : %.02f"
                    % (ans_type, vqa_scorer.accuracy["perAnswerType"][ans_type])
                )
                metrics[ans_type] = vqa_scorer.accuracy["perAnswerType"][ans_type]

            with open(
                os.path.join(registry.get_path("output_dir"), "evaluate.txt"), "a"
            ) as f:
                f.write(json.dumps(metrics) + "\n")

        return metrics


Update change_from_in_df plugin for Tekton

Change the FROM lines in each per-platform Dockerfile.
Slight change in behavior: the plugin now checks for unresolved parents
before checking for mismatched base image. Both of those would be code
bugs, it shouldn't matter which we check first.
Signed-off-by: Adam Cmiel<EMAIL_ADDRESS>Maintainers will complete the following section

[ ] Commit messages are descriptive enough
[ ] Code coverage from testing does not decrease and new code is covered
[ ] JSON/YAML configuration changes are updated in the relevant schema
[ ] Changes to metadata also update the documentation for the metadata
[ ] Pull request has a link to an osbs-docs PR for user documentation updates
[ ] New feature can be disabled from a configuration file

PTAL, this and #1799 are the last remaining things that need to be updated in prebuild plugins
(that I'm aware of, there will be unexpected problems I'm sure)


Improve footer component

Codecov Report

Merging #1099 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1099      +/-   ##
==========================================
+ Coverage   99.75%   99.76%   +0.01%
==========================================
  Files         331      331
  Lines        8210     8209       -1
  Branches     1963     1963
==========================================
  Hits         8190     8190
+ Misses         20       19       -1

Impacted Files
Coverage Δ

src/hoc/withEditing/withEditing.tsx
100% <100%> (ø)
:arrow_up:

src/components/drop/DropPod.tsx
98.64% <0%> (+1.35%)
:arrow_up:

Continue to review full report at Codecov.

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


error because of the port number.

I appreciate for your amazing work.
I would like to explain the error which was already issued(#4) for you to catch up easily.
You can face the error the stage, 'Scenario example 1' in the 'Flask project set up Part3'
As far as I understand, the error is started from the line.
https://github.com/lgiordani/flask_project_setup/blob/9d9601508cfa7dc5d718d76cd0827396069035fd/manage.py#L188
and, it counter the error in here because web service run the flask application.
https://github.com/lgiordani/flask_project_setup/blob/9d9601508cfa7dc5d718d76cd0827396069035fd/application/config.py#L12
when the web service container run, it needs port number for postgresql, but there is no information for port number at that time.
I'm looking forward to your reply
Again, huge thanks for your work.

@jihobak Thanks a lot for the analysis. I recently run through the posts again and I found out that there are other things that have to be changed. I will soon review them and I will keep in mind what you wrote here. Thanks again. I'll keep this issue open until we are sure that everything works


How to improve recognition speed

Why is it that when I perform  hand landmarks detection , the sensitivity of recognition is not high and the speed is slow?
Is it because of. Net? I am using the Python version with fast speed.

You will need to lower the resolution input for Mediapipe, if you put it anything above 640x480, tracking slows down to a crawling halt.

You will need to lower the resolution input for Mediapipe, if you put it anything above 640x480, tracking slows down to a crawling halt.

@sr229 I have tried to reduce the resolution to 320 * 240, but the problem still exists. It seems that the recognition effect on the back of the hand is relatively poor. When I extend the palm part, the effect is relatively good. Didn't I add a model of the back of the hand?

@sr229 The recognition effect seems to be related to the proportion of my palms exposed. For example, when I gesture with the number 1, the recognition effect is poor due to the less palms exposed. However, when I gesture with the number 5 or 4, the recognition speed is very fast.

Have you tried performing a benchmark against native mediapipe to see if the speed is comparable? There's nothing I can do mostly about if it's an upstream problem.


HDDS-11138. Remove version from compose files

What changes were proposed in this pull request?
Compose file element version is obsolete, results in warnings, e.g.:
level=warning msg="/home/runner/work/ozone/ozone/hadoop-ozone/dist/target/ozone-1.5.0-SNAPSHOT/compose/ozone/docker-compose.yaml: `version` is obsolete"

Remove version to avoid the warnings.
https://issues.apache.org/jira/browse/HDDS-11138
How was this patch tested?

SCM is out of safe mode.

v2 is tested in CI:
https://github.com/adoroszlai/ozone/actions/runs/9884575792
No warnings seen, e.g.:
https://github.com/adoroszlai/ozone/actions/runs/9884575792/job/27301600919#step:5:49

Thanks @kerneltime for reviewing and merging this.


Error during evaluation step when fine-tuning bert-base-uncased

tested versions: optimum-neuron versions 0.0.8 and 0.0.9
I'm training a bert-base-uncased as a binary text classifier with spam/not spam dataset (Deysi/spam-detection-dataset).
The training works perfectly on an trn1.2xlarge, however the evaluation step raises an exception which complains about the line:
input_names = inspect.signature(model.forward).parameters.keys()
ValueError: invalid method signature
Notebooks used to reproduce the error:
01 data prep
02 model training
aws-neuronx-runtime-discovery 2.9
libneuronxla                  0.5.391
neuron-cc                     <IP_ADDRESS>+1810fd7ed
neuronx-cc                    <IP_ADDRESS>+a3ad0f342
neuronx-distributed           0.2.0
neuronx-hwm                   <IP_ADDRESS>+2b7c6da39
torch-neuronx                 <IP_ADDRESS>.9.0
torch-xla                     1.13.1+torchneuron8
transformers-neuronx          0.5.58
Traceback (most recent call last):
  File "/opt/ml/code/train.py", line 127, in <module>
    trainer.train()
  File "/usr/local/lib/python3.10/site-packages/transformers/trainer.py", line 1645, in train
    return inner_training_loop(
  File "/usr/local/lib/python3.10/site-packages/optimum/neuron/utils/patching.py", line 180, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/optimum/neuron/trainers.py", line 457, in _inner_training_loop
    return super()._inner_training_loop(
  File "/usr/local/lib/python3.10/site-packages/transformers/trainer.py", line 2026, in _inner_training_loop
    self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
  File "/usr/local/lib/python3.10/site-packages/transformers/trainer.py", line 2312, in _maybe_log_save_evaluate
    metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
  File "/usr/local/lib/python3.10/site-packages/transformers/trainer.py", line 3043, in evaluate
    output = eval_loop(
  File "/usr/local/lib/python3.10/site-packages/transformers/trainer.py", line 3235, in evaluation_loop
    loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
  File "/usr/local/lib/python3.10/site-packages/optimum/neuron/trainers.py", line 289, in prediction_step
    self.trigger_on_step_middle_for_neuron_cache_callback(model)
  File "/usr/local/lib/python3.10/site-packages/optimum/neuron/trainers.py", line 243, in trigger_on_step_middle_for_neuron_cache_callback
    callback.on_step_middle(self.args, self.state, self.control, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/optimum/neuron/trainer_callback.py", line 288, in on_step_middle
    self.neuron_hash_for_model(args, model, state.last_inputs, try_to_fetch_cached_model=True)
  File "/usr/local/lib/python3.10/site-packages/optimum/neuron/trainer_callback.py", line 198, in neuron_hash_for_model
    input_names = inspect.signature(model.forward).parameters.keys()
  File "/usr/local/lib/python3.10/inspect.py", line 3254, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
  File "/usr/local/lib/python3.10/inspect.py", line 3002, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
  File "/usr/local/lib/python3.10/inspect.py", line 2404, in _signature_from_callable
    return _signature_bound_method(sig)
  File "/usr/local/lib/python3.10/inspect.py", line 1967, in _signature_bound_method
    raise ValueError('invalid method signature')
ValueError: invalid method signature

Hi @samir-souza,
Are you able to reproduce this from the main branch?
Also could you provide a command line to reproduce it please?
I dont observe it myself when running a text-classification example.

@michaelbenayoun Just tested with main and it is working well now. I'll close this ticket, given this issue is fixed. (FYI, I used the linked notebooks to run the experiments)


use HHS level data from AUS QLD

AUS QLD have added a table, woohoo! Now they're reporting total confirmed to date instead of just new additions.
TODO

[ ] Fix the total for QLD, it goes to 794 for some reason (double the total). Not sure why its doing this, hopefully someone can enlighten me.
[ ] Figure out what is supposed to happen for "overseas" as a reporting area 😬 .
[ ] How to map these HHS regions onto the geo map

@camjc the total is double because it counts summed data and individual regions data

@lazd so this is intended behaviour or I should fix something?

@camjc intended behavior -- those totals are double counted.

@camjc you're seeing that in the build log output, not data, right?


'from' errors as a VariableDeclaration name

Parser errors on this line in Zeppelin's ERC20.sol
function transferFrom(address from, address to, uint256 value);

Triggered by the Identifier rule?
(I'm installing directly from the repo).

Thanks for the report. I have a fix for this in the works. Will update soon.

Fixed in 47f594ce508532280bbb76b695cd971c30d98868.


Does it work with flutter

I'm unable to use this plugin with flutter
the app just hangs when I added the code from the example

Flutter has hotreload already, you don't need this.

@tejainece I want the file watcher feature. ie: Reloading application on file modification


Catching routes based on path parameter types

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
class SubType(Enum):
    thriller = "thriller"
    horror = "horror"

@router.get("/{id}-{subType}")
async def article_func_a(id: int, subType: SubType):
    return "show article with subtype"

@router.get("/{id}-{subId}")
async def article_func_b(id: int, subId: int):
    return "show article with subId"

Description
TL;DR
Is there a way to perform routing based on the data types of the path parameters? Instead of just the pattern of the path?
Explanation
Hi,
I am designing an application which will have two different types of routes:

{id}-{subType}

Such as /1129-horror

{id}-{subId}

Such as /1129-32

When I use the code above, the first given route catches both types of URLs, and throws validation error. Because routing is based on the parameter, and doesn't care about the type of those parameters.
I am currently porting a Flask application, and it is doable in Flask by specifying types in routes such as: /<int:id>-<string:subType>. But apparently this isn't possible in FastAPI.
I can convert enums into saperate routes, but I have dozens of subTypes, and that won't be the most optimal solution. Especially when I am generating OpenAPI schema.
Operating System
Linux, Windows, macOS
Operating System Details
No response
FastAPI Version
0.79.0
Python Version
3.10.0
Additional Context
No response

Switch the endpoints around. An integer can be casted to a string, but a string (or in your case, your enum values) cannot be casted to ints. They are evaluated in order, so when a request fits a signature, it will execute that path function.
(note, I haven't tested it, can do that when I get home, but it should work).

Here is an implementation with only one route and with query parameters:
from enum import Enum
from typing import Optional

import uvicorn
from fastapi import FastAPI, APIRouter, Query

app = FastAPI()
router = APIRouter()

class SubType(Enum):
    thriller = "thriller"
    horror = "horror"

@router.get("/article")
async def article(
    id: int,
    subId: Optional[int] = Query(default=None),
    subType: Optional[SubType] = Query(default=None),
):
    if bool(subId) == bool(subType):
        raise Exception()  # can not query subId and subType in the same time
    if subId:
        # implementation...
        return "show article with subId"
    else:
        # implementation...
        return "show article with subtype"

app.include_router(router)

if __name__ == "__main__":
    uvicorn.run(app)

There are better designs and in my opinion you should avoid doing /{something}-{somethingElse} because route is defining the resource

My answer was incomplete. You do have to switch them around (as integers can and will be tried to be casted to strings) so it will first try to parse the integers and if that fails, it will parse it as enum (and throws an error if that fails as well). However, you need to provide the type of your path parameters like so (this is a fully working example, you can run this as-is):
from fastapi import FastAPI
from enum import Enum
app = FastAPI()

class SubType(Enum):
    thriller = "thriller"
    horror = "horror"

@app.get("/{id}-{subId:int}")
async def article_func_b(id: int, subId: int):
    return "show article with subId"

@app.get("/{id}-{subType:str}")
async def article_func_a(id: int, subType: SubType):
    return "show article with subtype"

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="<IP_ADDRESS>", port=8000,  )

going to "/1-1" will respond with show article with subId, while going to "/1-horror" will result in show article with subtype. When providing anything that doesn't match, it will result in a validation error on the Enum. Going to "1-Foo" will result in:
{
    "detail": [
        {
            "loc": [
                "path",
                "subType",
            ],
            "msg": "value is not a valid enumeration member; permitted: 'thriller', 'horror'",
            "type": "type_error.enum",
            "ctx": {
                "enum_values": [
                    "thriller",
                    "horror",
                ]
            }
        }
    ]
}

Thanks for the working examples @zoliknemet and @JarroVGIT . These are good workarounds but will it also generate the appropriate OpenAPI schema? With enums and everything?

My solution is not a workaround, it is the proper implementation of your requirements. But to answer your question; yes it results in the correct schema (otherwise it would be a workaround). You can try and see for your self in the generated /docs:

Thanks for the solution. It really works 🚀


Minikube popup too many times fix - Proposal. ☕👨🚒

Solution space & proposal:
Thank you so much in advance for reading this, and sharing further thoughts and ideas fyi: @squillace, @itowlson, @lstocchi  and @gambtho ☕❤🙏💡
Below is a proposal as well as how currently we can disable too Minikube upgrade popups for kubernetes extension because Minikube releases too frequently.
Proposal: Possible other solution:
Update popup appears every x-days (for example: 15 days).

We could also add extension level cache where we can store the date of last popup and then we can repeat not everyday or every time vscode is open and only repeat in a week or every 15 days.

If this sounds like one approach I could try and POC and share something for quick eyeballing.

How to disable Minikube popup?
If you are looking for disabling Minikube upgrade available to ... pop up then this thread will help. This might also help folks who have recently reported that Minikube popup hapens too many times.

Currently Minikube does a release every month and sometime twice. for example:   https://github.com/kubernetes/minikube/releases

There is  checkForMinikubeUpgrade setting for kuberentes extension which can be set to false if folks don't want too many popup  https://github.com/vscode-kubernetes-tools/vscode-kubernetes-tools#extension-settings

Here are some screenshots which might help

ctrl + shift + P will get the quick pick below.

Thanks heaps

I <3 it. However, I want to lay out a pattern we built, and see if we can't fix it.

I now move from machine to machine, and/or use remote containers which are new machines. Helm, Minikube are often not there. As a result, I either get popups asking me if I want to update (minikube) or install (helm) far, far too often. Both the minikube functionality and helm are a result of the original implementation, and while "good" we now have cloud providers and minikube should DEFINITELY be a cloud provider and not core to the extension. Is there a way the user can turn off any prompts, and not recheck after 15 days?
If that's too much work, then I'd propose an enum: never bother me again, bother me again after 15 days, always check/bother. BUT I'd also argue that on the first popup, we mention that you can set the setting to your choice "here" and point to this enum.

I guess the easy way would be to make this a setting for minikube and for helm. Those are the two that drive me nuts.

Thank you so much for this, this is perfect, ❤☕🙏 Sorry for delay, I wanted to make sure I have some small screenshot with POC like change to show idea. From above I gave idea-2 a try:
Please share your thoughts/guidance/idea for option change and I will try and land a PR by next week for it (If no impediments)
💡☕ Reason it provides clear option for user to when to be like to bothered.

Based on options we can prompt them with whatever mechanism they have chosen for this data cache for this information for k8s extension.


Installed maven 3.3.9 cause jdk issue.

Hello, I'm using zsh and sdkman 5.0.0+51, after I installed maven 3.3.9 and run it. it tells me Unsupported major.minor version 51.0, but I have added JAVA_HOME 1.8 in .zshrc file.
I have a manual downloaded maven 3.3.9, I can run it correctly, but the sdkman downloaded maven 3.3.9 can't. I don't know what I missed?

Sorry, I found the issue.. I'm not sure what I did, but there's a old JDK version was linked as a CurrentJDK folder in /System/Library/Frameworks/JavaVM.framework/Versions.


Use console for logging instead of mx.logger

Use console for logging instead of mx.logger to get rid of message: DEPRECATED: mx.logger, use console.debug instead -- will be removed in version: 11.0

merge pull request to fix logging deprecations

Thanks for this - I have now (finally) merged this and submitted new version to the marketplace


phantom.create( is not running  it is not displaying "phantom" in console.log

I am using phantom to generate pdf . phantom.create( is not running  it is not displaying "phantom" in console.log
phantom.create(function(ph) {
console.log("phantom");
ph.createPage(function(page) {
page.open("http://www.google.com", function(status) {
console.log("opened google? ", status);
page.evaluate((function() {
return document.title;
}), function(result) {
console.log('Page title is ' + result);
ph.exit();
});
});
});
});
Environment

OS: ubuntu 14.04
Node version (node -v): 5.5
package version:

Your question is not very clear. I don't know what you are asking and I find it every confusing. The code your provided won't work because it is not using Promises like the README suggests. Please ask better questions so that others can help you. I am closing.

Issues are for bugs, where expected behavior is different than actual. For questions or best practices please use other sources like stackoverflow.com.
Please review the guidelines for creating issues before opening new issues in the future.
This message is a saved reply and was posted automatically.


Moving gh-pages to own repo

@lirantal @ilanbiala
Could we move the gh-pages branch to it's own repo meanjs.github.io to make it easier to work on and submit PRs? It's pretty hidden where it's at now.

I like the idea, but I think having docs updates will be harder since it's in a different repo and keeping track of 2 PRs on different repos will be tougher. Any thoughts on that?

@ilanbiala I think it will be easier for people to submit PRs, but I also see your point keeping track of PRs on two different repos. However, the generator does are buried in the gh-pages repo of the mean project which was my biggest reasoning for suggesting to move it.
I hosted an open source hackathon today and that was the piece of feedback that I received that the docs for the generator are hard to find.

@codydaig let's get some more feedback on it, because I'm not opposed to it, but I don't want the docs to take a step back because they end up in a separate repo.

@codydaig what do you mean by the docs are hard to find?
It's quite common that repositories have gh-pages branch for documentation.
Maybe we should make it more obvious in the website docs or in the wiki/README of where to find the docs and how to work with them? That seems like a much easier approach.

@lirantal The issue they had was they were looking for a gh-pages branch in the generator, which doesn't exist. There's just the gh-pages in the mean repo. I'm fine with either, I just figured I'd bring it up too see what other people's thought were. If stick to the same method, we need to put something about where the docs are located in the generator repo readme.md.

In this case I think a much quicker and easier approach is simply to make the information more available if it is through the README or on the main sections of the website itself.
Moving around repos and all that just seems some overhead that we don't want to start focusing on.

Fair. I'll find a way to make that more clear and submit a PR.
@ilanbiala @lirantal Thanks for the feedback! :-D

Welcome :)

@lirantal @ilanbiala Can one of you guys create a repo meanjs.github.io for me too move the documentation over too?

@codydaig do we want to call the repo meanjs? or be more specific?
currently these are the existing repositories under meanjs organization: https://github.com/meanjs

the repo should be called meanjs.github.io That's the common practice and preferred method of creating a github pages website for an organization.

Got it.
Have fun: https://github.com/meanjs/meanjs.github.io

@lirantal Thanks!

@codydaig @lirantal has everything been moved? If so, can we make whatever else changes regarding Heroku that are necessary so we can delete gh-pages from this repo?

@ilanbiala Everything has been moved. The new repo is live on github pages. I believe that it is safe to delete the gh-pages branch from this (meanjs/mean) repo. I made a small change to the docs (the updated date) only in the other meanjs.github.io repo and that change is displayed on the website.

We're using github pages, not heroku.

Yeah I noticed the gh-pages is up, so we should be good. @lirantal any reason not to?

yep, @codydaig go for it.


Deep Link on game example expects "launch_id" parameter from platform, but the platform never has that information

Hi Martin,
I am trying to implement the Deep Linking on a platform. From the IMS Global specification it looks like there is no need for a oidc_login, https://www.imsglobal.org/spec/lti-dl/v2p0#workflow . As far as I can tell to start the DeepLink process off the platform needs to shape a LtiDeepLinkingRequest message and pass it to the provider.
The Game example's configure.php expects "launch_id" parameter from platform, but the platform never has that information.
Am I missing something or mis-interpreting something in the Deep Link 2.0 Specification?
Do we need a OIDC Login for Deep Links? If so, I still don't see where the Tool passes the launch_id back to the Platform for a Deep Link launch.
Any help would be very much appreciated.

Actually I think I see my problem, for a deep link launch, I should still do a oidc_login  then redirect to the game.php in this case with the message type being a LtiDeepLinkingRequest, which then shows a screen to set the difficulty, which then redirects to configure.php which then sends the LtiDeepLinkingResponse message.
Is that correct?
Is this standard behavior? i.e the workflow doesn't for the deep linking doesn't show the oidc_login process.

Hello Mark,
yes I think you have it right. The request for Deep Linking launch follows the same pattern as the standard LTI launch - you have the OIDC dance and then launch to the registered DL URL. I'm not too terribly familiar with the PHP code in this project, but in the Cert suite we have two endpoints. There is an OIDC third-party endpoint (for starting the OIDC parameter dance), and then a DL launch endpoint that should be called to start the Deep Link launch. The DL Response is then returned in the same window/iframe as in this launch call.
Dereck

@mumitr0ll Thanks, the specifications can be quite obtuse at times.

Yes, you will need to do the whole OIDC login flow for any message launch, both standard and deep linking. If the docs aren't showing this we should update the docs to make it clearer


fix: filter out #9d chars from input

This PR fixes a crash in the validator when the input API document contains a x9d character.  This problem was revealed by the open-service-broker API doc.
The fix is to simply replace these characters with space characters before calling the JSON/YAML parser.

:tada: This PR is included in version 0.13.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[OpenAI] Edit Whisper deployment name in samples and tests

To match the new resource used in testing.

API change check
API changes are not detected in this pull request.


stream chaining methods

Right now, streams (e.g. file streams from downloads) can be wrapped to define what operations need to happen to process the data, e.g.,:
Cache(TarExtract(dlc['collectionandqueries'], 'qrels.dev.small.tsv'), base_path/'dev/small/qrels')

This is flexible, but not very readable, especially when multiple operations are wrapped. I think a more readable way of doing this would be method chaining. Like so:
dlc['collectionandqueries'].tar_extract('qrels.dev.small.tsv').cache(base_path/'dev/small/qrels')

This solution could just build up the same wrapped structure (so it'd be backward compatible; no need to update all existing datasets on the introduction of this), but I think it ends up being more readable. As an extra benefit, it would mean that the dataset implementations would not need to import the wrapper classes (or use longer identifiers).
An alternative could be a piping approach, e.g.,
dlc['collectionandqueries'] | TarExtract('qrels.dev.small.tsv') | Cache(base_path/'dev/small/qrels')
# or
dlc['collectionandqueries'] >> TarExtract('qrels.dev.small.tsv') >> Cache(base_path/'dev/small/qrels')

But I think that's overkill here, less clear what's happening, and still means those classes would need to be imported.

I like the fluid API most (second example).
That's also similar to the Torch data pipes.


Undefined properties are rendered into snapshot

Not sure if this is a bug or a feature but after updating to the latest version all my snapshots contains someProp={undefined} for all props that are not defined in the test.

Thanks for reporting! I'll have a look as soon as I can.

@adriantoine it looks like this was changed with switchover to use enzyme's utils,
before:
https://github.com/adriantoine/enzyme-to-json/commit/0e06c679#diff-1fdf421c05c1140f6d71444ea2b27638L14
after:
https://github.com/adriantoine/enzyme-to-json/blob/master/src/shallow.js#L34
I pushed a PR with a test!


Can not open file after opened folder

VSCode Version: Code - Insiders 1.8.0-insider (6155c3cd1d983ba6029420d75400d8fcb132e588, 2016-11-09T07:12:28.915Z)
OS Version: Windows_NT ia32 10.0.14393
Extensions:

Extension
Author
Version

Bookmarks
alefragnani
0.10.0

tortoise-svn
fantasytyx
0.1.1

cpptools
ms-vscode
0.9.2

vscode-icons
robertohuertasm
4.0.1

Steps to Reproduce:

firstly,open any folder
open any file lonely ( not in VSCode )

The file can not be opened with VSCode.
https://github.com/ZCShou/Docs/blob/master/Errors/4.gif

@ZCShou can you try with updating insiders to latest? I could reproduce once with your build, but not anymore. I think we fixed this yesterday 👍

@bpasero The latest works well,thanks!


Fix typo

Closes #1873
Tested with repro in bug

wonder if this needs to be in a major version - thoughts @brentschmaltz ?

wonder if this needs to be in a major version - thoughts @brentschmaltz ?

Does it work currently at all? Like xsi:Type? If yes, I suppose this could be a breaking change, since folks rely on this behavior.

Does it work currently at all? Like xsi:Type? If yes, I suppose this could be a breaking change, since folks rely on this behavior.

This works because xsi:type is what's expected. It's a runtime change, which I think should be fine to bring in.


use a button on the page to jump to another tab page

Three is three tab items in my app, I want to jump to the second one on pressing the button in the first page, but if I use the navigator to jump to the page that contains the tab navigator, the tab page will be unmounted, and every time I press will lead to the whole page remount.I want to make the effect that when I press the button on the page, I will jump to the second page just like pressing the tab bar icon, how can I do that?

Ok, that is how I do it.
I have a function like this in "app.js" (the file where you set up tab navigator).
    changeTab = (key, value) => {         this.setState({[key]: value})     }
You can then add the function to the screen/view (how ever you call it) like below
    <Whatever changeTab={this.changeTab} />
In the Whatever component you can link like below
    <..... onPress={() => this.props.changeTab('selectedTab', 'TabYouWantToSelect')}
Hope that helps

Glad you fixed it @JackGzj


"Country code" for WMO and Partner Organisations

(from @golfvert; manually moved from https://github.com/wmo-cop/wis2-topic-hierarchy/issues/1)
According to https://www.iso.org/glossary-for-iso-3166.html
User-assigned codes - If users need code elements to represent country names not included in ISO 3166-1, the series of letters AA, QM to QZ, XA to XZ, and ZZ, and the series AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ respectively, and the series of numbers 900 to 999 are available.
NOTE: Please be advised that the above series of codes are not universal, those code elements are not compatible between different entities.

for Partner Organisation without a Country Code (eg. ECMWF, EUMETSAT, ESA,...) we can choose a 3-letter acronym in the list of user-assigned.
XPO seems to be used by Interpol (XPO is used for Interpol travel documents) so, what do we choose APO ? AAA ? ZZZ ? and then that would mean (eg) ZZZ.ECMWF in the topic tree.

cc @efucile
We could also use numbers (999, so 999.ecmwf).

Perhaps we could recall the part closest to this from the Manual on the GTS:
Country, organization and the production centre; the country shall be represented by the official ISO 3166 standard 2-letter code.
Example: . Each field shall be separated by the symbol “-” . The ISO 3166 standard 2-letter code xx shall be used for international organizations and shall therefore be the two first characters of the location indicator of international organizations,
for example, “xx-eumetsat-darmstadt”, “xx-ecmwf-reading”.
In fact we us "XX-EUMETSAT-Darmstadt" for all files we send in the WIS

Wikipedia says
XXX is used to represent a person of unspecified nationality

We saw that... However, xXx has another meaning that our colleagues from supra-nationals organisations may not like :)
The wikipedia pages says:
User-assigned code elements
User-assigned code elements are codes at the disposal of users who need to add further names of countries, territories, or other geographical entities to their in-house application of ISO 3166-1, and the ISO 3166/MA will never use these codes in the updating process of the standard. The following alpha-3 codes can be user-assigned: AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ.[5]
So, as for RFC1918 we can use and manage private designation.
Option 1. : all centers (ECMWF, EUMETSAT,...) are under the same country code - we thought about XXA (avoiding the triple X...)
Option 2. : each center has its own three letters code AAA, AAB,...
Or a mix between 1. and 2. Each RA in WMO has a code XXA, XXB,... and all centers within that region use the same.
I would avoid 2. has it creates an unnecessary (IMHO) management hassle. The mix mode one per RA has some merits...

Noting that I would be very careful about relying on Wikipedia as a source of truth, either of the two options proposed by Remy would work fine. I slightly prefer the second option, but one choice for all would also (continue to) work.

Proposal:

create a "global" code

xxa

create a code foreach WMO RA

xxb: RA I
xxc: RA II
xxd: RA III
xxe: RA IV
xxf: RA V
xxg: RA VI

Examples:

ECMWF and EUMETSAT would use xxg (RA VI)
Global services would use xxa

PR in #28


issue in running docker container

ubuntu@ip-172-31-22-208:~/gol$ docker container run -d -p 8081:8080 gol:task
c4ccf79afd2ecc803953ae801ce8472f169de9eaaacf36981ea91cee64f17238
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: "exec": executable file not found in $PATH": unknown.

once restart the docker and then check

Hi Sohan,
Can you please post what is operating system you are using and docker version

please check CMD in dockerfile


Change "Household" to "Dwelling" throughout

Ben - quick question who would normally verify this, I will reassign to them. Would it be Brenda?

We cannot reassign the story for testing until this feature is deployed on the test server so that it can be accessed by Brenda or others. Usually this deployment  is done shortly before the Sprint review, which is when the story would be marked as ready for testing and reassigned. So hold off for a bit.
Ben
Sent from my iPhone

On Aug 30, 2015, at 5:08 AM, sean-wood<EMAIL_ADDRESS>wrote:
Ben - quick question who would normally verify this, I will reassign to them. Would it be Brenda?
—
Reply to this email directly or view it on GitHub.

I will do Ben
Sent from my iPad

On 30 Aug 2015, at 17:59, Ben W. Brumfield<EMAIL_ADDRESS>wrote:
We cannot reassign the story for testing until this feature is deployed on the test server so that it can be accessed by Brenda or others. Usually this deployment is done shortly before the Sprint review, which is when the story would be marked as ready for testing and reassigned. So hold off for a bit.
Ben
Sent from my iPhone

On Aug 30, 2015, at 5:08 AM, sean-wood<EMAIL_ADDRESS>wrote:
Ben - quick question who would normally verify this, I will reassign to them. Would it be Brenda?
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.


Add Binomial distribution

Based on Multinomial distribution code, I implement Binomial distribution. I also change the code of Multinomial distribution a little bit to fix bugs when parameter n is an int (e.g. in expanded_sample() function, we can not get self.n.data.dim().

My mistake, I delete the wrong branch.

It seems that travis failed because of exceeding time.


ci: optimize GitHub Actions by making use of matrices

Thank you! Nice syntax. I wish I had found that myself earlier. Saves a lot of duplicate code (especially having to list all the build jobs specifically in the upload job is really annoying). Let's wait for the build to finish just to make sure.

Thanks @TheAssassin :)

pyuploadtool might fail because this is a PR and the secret isn't available (the variable seems to be set, but empty). Might need to improve handling of PRs a bit. Let's merge this and see what happens.


VMAgent supports auto scaling for shardCount

One of the great features of VM is that vmagent can support to scrape a big number of targets. With VM operator, one can easily achieve this by adjusting the value of shardCount in the VMAgent spec. However, in our use case, the number of targets is not only big but also varied significantly during peak hours and off-peak hours. Thus, if VM operator can support auto-scaling for shardCount, it will help us to save costs. Please consider to support this feature that shall be beneficial for a number of users.

Was added at the v0.30.0 release

@f41gh7

Why the vmagent pods are getting rotated whenever we are increasing the replica-count ?
Command used: kubectl scale vmagent-shard-ha --replicas=3

How should we configure hpa to scale based on cpu/memory utilisation ?
`apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
labels:
app.kubernetes.io/instance: vmagent-shard-ha
app.kubernetes.io/name: vmagent-shard-ha
name: vmagent-shard-ha
namespace: victoria-metrics
spec:
maxReplicas: 3
metrics:

resource:
name: cpu
target:
averageUtilization: 80
type: Utilization
type: Resource
minReplicas: 3
scaleTargetRef:
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAgent
name: vmagent-shard-ha`
What the above hpa scaling metric is showing unknow
NAME                    REFERENCE                       TARGETS         MINPODS   MAXPODS   REPLICAS   AGE monitoring-vmagent-ha   VMAgent/ vmagent-shard-ha /80%   3         3         3          14m`


Writing to BigQuery raises a TypeError "GlobalWindow -> ._IntervalWindowBase"

I have a pipeline that reads from a PubSub topic, does some transforms and then writes to BigQuery. The exception message is this: Cannot convert GlobalWindow to apache_beam.utils.windowed_value._IntervalWindowBase
You can find the main part of the pipeline here https://gist.github.com/PlugaruT/4666406bd8792b7b196dc1519c8885a2
The first part is basically reading from Pub/Sub and then I apply this PTranform.
And here is the gigantic stack trace: https://gist.github.com/PlugaruT/52bf3834eec95fd5cc5779d3332e1433

I've tried to downgrade to 2.24.0 version but this is still happening.
Also, I can't reproduce the exception locally when I run the pipeline with DirectRunner. It's happening only when running on Dataflow.

Imported from Jira BEAM-11252. Original Jira may contain additional context.
Reported by: PlugaruT.

Having the same issue with the v2.41.0 SDK. Also, as mentioned in the Jira ticket BEAM-11252, dead-letter pattern cannot be used.
I'm using DataflowRunner.

I'm having same problem. And here's what I've investigated so far.
As PlugaruT mentioned, I think the problem occurs because BigQueryWriteFn returns error as GlobalWindows.windowed_value
...
    return itertools.chain([
        pvalue.TaggedOutput(
            BigQueryWriteFn.FAILED_ROWS_WITH_ERRORS,
            GlobalWindows.windowed_value((destination, row, err))) for row,
        err in failed_rows
    ],
                           [
                               pvalue.TaggedOutput(
                                   BigQueryWriteFn.FAILED_ROWS,
                                   GlobalWindows.windowed_value(
                                       (destination, row))) for row,
                               unused_err in failed_rows
                           ])

and pipeline thinks its output windowing as fixed size window.
Test Code
If you added certain logging code at dataflow_runner.py:924 like below,
def run_ParDo(self, transform_node, options):
    transform = transform_node.transform
    input_tag = transform_node.inputs[0].tag
    input_step = self._cache.get_pvalue(transform_node.inputs[0])

    # Logging code start #
    for i in transform_node.outputs:
      _LOGGER.debug("transform_node.output: %s windowing: %s", transform_node.outputs[i], transform_node.outputs[i].windowing)
    # Logging code ends #
...

And add and execute test code to DataflowRunnerTest below in dataflow_runner_test.py
class DataflowRunnerTest(unittest.TestCase, ExtraAssertionsMixin):
...
  def test_bigquery_dead_letter(self):
    runner = DataflowRunner()

    self.default_properties.append("--streaming")

    with beam.Pipeline(runner=runner, options=PipelineOptions(self.default_properties)) as p:

      (
        p
        | beam.io.ReadFromPubSub(topic='projects/project/topics/topic')
        | beam.WindowInto(beam.window.FixedWindows(2))
        | beam.GroupBy(lambda x: x.attributes['table'])
        | beam.FlatMap(lambda x: x)
        | beam.io.WriteToBigQuery('some.table')

      )

It will print like below
pytest apache_beam/runners/dataflow/dataflow_runner_test.py::DataflowRunnerTest::test_bigquery_dead_letter --log-cli-level=DEBUG --full-trace
================================================================ test session starts ================================================================
platform linux -- Python 3.8.14, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/heegwan/repositories/beam/sdks/python, configfile: pytest.ini
collected 1 item

apache_beam/runners/dataflow/dataflow_runner_test.py::DataflowRunnerTest::test_bigquery_dead_letter
------------------------------------------------------------------- live log call -------------------------------------------------------------------
...

DEBUG    apache_beam.runners.dataflow.dataflow_runner:dataflow_runner.py:930 transform_node.output: PCollection[WriteToBigQuery/_StreamToBigQuery/StreamInsertRows/ParDo(BigQueryWriteFn).None] windowing: Windowing(<apache_beam.transforms.window.FixedWindows object at 0x7fb4ee236ac0>, DefaultTrigger(), 1, 1, None)
DEBUG    apache_beam.runners.dataflow.dataflow_runner:dataflow_runner.py:930 transform_node.output: PCollection[WriteToBigQuery/_StreamToBigQuery/StreamInsertRows/ParDo(BigQueryWriteFn).FailedRows] windowing: Windowing(<apache_beam.transforms.window.FixedWindows object at 0x7fb4ee236ac0>, DefaultTrigger(), 1, 1, None)
DEBUG    apache_beam.runners.dataflow.dataflow_runner:dataflow_runner.py:930 transform_node.output: PCollection[WriteToBigQuery/_StreamToBigQuery/StreamInsertRows/ParDo(BigQueryWriteFn).FailedRowsWithErrors] windowing: Windowing(<apache_beam.transforms.window.FixedWindows object at 0x7fb4ee236ac0>, DefaultTrigger(), 1, 1, None)
PASSED

As you can see, FixedWindows object printed out.
Maybe it is normal behavior, then perhaps only dataflow runner having trouble to code GlobalWindow as _IntervalWindowBase coder.

So if you're having same trouble and want to bypass it, insert beam.WindowInto(beam.window.GlobalWindows()) somewhere between beam.WindowInto(beam.window.FixedWindows()) and beam.io.WriteToBigQuery()
For example, for test code I wrote above..
class DataflowRunnerTest(unittest.TestCase, ExtraAssertionsMixin):
...
  def test_bigquery_dead_letter(self):
    runner = DataflowRunner()

    self.default_properties.append("--streaming")

    with beam.Pipeline(runner=runner, options=PipelineOptions(self.default_properties)) as p:

      (
        p
        | beam.io.ReadFromPubSub(topic='projects/project/topics/topic')
        | beam.WindowInto(beam.window.FixedWindows(2))
        | beam.GroupBy(lambda x: x.attributes['table'])
        | "global window" >> beam.WindowInto(beam.window.GlobalWindows()) # Insert this!
        # | beam.FlatMap(lambda x: x) # I think you can't use FlatMap on globalwindowed value
        | beam.Map(lambda x: x)
        | beam.io.WriteToBigQuery('some.table')

      )


Error: listen EADDRINUSE :::3000

Hello, when i tried to setup bootbot with Adonis and Apache, site is working, but when Verify call back url, it's showing this error. I've tested with ngrok and it's working fine.

That error message means there's some other process running on port 3000. You should either run Bootbot on a different port, or kill the process that's currently running on 3000.

Thank for reply, i've tried to run Bootbot on different port
First time i saw the message "Facebook Webhook running on localhost:3000/webhook", but can't verify, then try to click again then it show error.
Pls check attachments.


SCAT2GRIDGAUSS_*

Reported by Jonathan S Callahan on 11 Jul 2005 21:08 UTC
The "YCUTOFF" variable should be more clearly identified as not supported as
of Ferret version ???
Here's the current wording:
"YCUTOFF
(There is only one cutoff value used by the algorighm. This argument will be
removed in future releases. For now set YCUTOFF to the same value as cutoff)"
Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1277

Comment by<EMAIL_ADDRESS>on 12 Jul 2005 15:36 UTC
This change will be made in the release of v5.81; it is in the release notes for
5.81 and in the updated Users Guide which I'll post when we make the release.


C++ subproject

This PR moves the C++ files from the project root to the cpp/ directory, such that the project repo may be shared by multiple C++ projects in the future.  It also moves the clean, lint and fix C++ tasks to node.js scripts in the scripts/ folder, such that they may be easily parameterized by project.

@texodus clang-format is not consistent, mine says this is a problem but if I fix it then the test says its a problem


Update redirect-known-folders.md

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@adeejoseph PR has been copyedited and is ready for final review, could you please check and merge? Thanks!

Approved and merged.


Add default configuration files for v22.4

This is a same patch as #30 (cherry-picked).

Add default configuration files

The default configuration files are Common.txt, TrustedDomains.txt, UnsafeDomains.txt and UnsafeFiles.txt in {app}\DefaultConfig. Those files are installed when they are located in the "DefaultConfig" folder that exits in the same folder to installer like below.
│  FlexConfirmMailSetup-22.4.0.exe
│
└─DefaultConfig
        Common.txt
        TrustedDomains.txt
        UnsafeDomains.txt

The configurations in the policy configuration and the default configuration files for trusted domains, unsafe domains and unsafe files are fixed, they can't modified by user configuration files. The priority of common configurations is as following.
User file configurations > Default file configurations > Policy configurations
Tests
Prerequisites:

Default Config:  C:\Program Files\FlexConfirmMail\DefaultConfig\*.txt
User Config: %UserAppData%\FlexConfirmMail\*.txt
Registry Config: Config specified by GPO
"Merge" means:

For Trusted Domains, Unsafe Domains, Unsafe Files

All configurations of the policy configuration, the default configuration and the user configuration are used.
The configurations in the policy configuration and the default configuration files are fixed, they can't modified by user

For Common Config

If a setting is modified from default value, the highest priority config are used. The priority is as following.
User file configurations > Default file configurations > Policy configurations.

Test:

[x] Confirm that DefaultConfig/*.txt is installed to C:\Program Files\FlexConfirmMail\DefaultConfig\*.txt.
[x] Confirm that default config is used if there is only default config (remove other settings if exists).
[x] Confirm that registry config is used if there is only registry config  (remove other settings if exists).
[x] Confirm that user config is used if there is only user config  (remove other settings if exists).
[x] Confirm that registry config and default config are merged if they are specified.
[x] Confirm that default config and user config are merged if they are specified.
[x] Confirm that registry config and user config are merged if they are specified.
[x] Confirm that all configs are merged if they are specified.

I don't test this yet.
I will do test this.

I have tested and it worked fine.


Livekit agent RAG not working with 0.8.5

hi, iam facing an issue with livekit agent version 0.8.4 and 0.8.5, it works well in 0.8.2, in this method _will_synthesize_assistant_answer() as per this example(we have a modified version of this code using a vector DB but issue is same) https://github.com/livekit/agents/blob/main/examples/voice-assistant/simple-rag/assistant.py the text that user speaks is not getting commited as individual message to chat_ctx's messages list,(so that i get reply from assistant), but rather even if i stop speaking for 2-3 seconds and than i start speaking again it will still get appended to last message i sent in chat_ctx's messages list, but in 0.8.2 moment i stopped speaking it would make assistant to answer me and all my messages will get appended as new entry instead of adding to CONTENT of same old user message(LAST message).ANY HELP shall be highly appreciated.
I even tried appending the message like on this example, but still next time i speak it appends mine new STT message to mine last message and assistant never speaks.https://github.com/livekit/agents/blob/main/examples/voice-assistant/minimal_assistant.py

Solved in 0.8.6, thanks @mike-r-mclaughlin


Support canary builds

Similar to bun upgrade --canary, brew install bun@canary should install from the last successful build on the main branch.

It looks like Homebrew doesn't like when a version is "canary".
Expected to find class Bun@canary, but only found: BunATCanar

That's not possible to do in Ruby, since the class needs to be defined as:
class Bun@canary < Formula # invalid
end


Use storagestate for authentification?

Hello!
Is it possible to simply use the storagestate and reuse my token-data of my user.json as described here?
In case of "yes" I would be glad about how to this :)

I don't think this is specifically related to playwright-lighthouse, but playwright itself.
But to answer your specific question, I found this video demo to be really helpful in visualizing how to use storage state


Stateless scheduler

This is the biggest change derived from #5.
In that branch I was previously using a standard Python dataclass and a dict to manage the scheduler state, and I converted between them when needed. I have now adopted flax.struct.dataclass, which is essentially the same but:

It's frozen so it enforces functional updates.
Can be easily replicated across devices.

I'm not super happy with the result for these reasons:

Invoking scheduler.set_timesteps() requires more information to initialize the state, such as the shape of the expected inputs. This makes the code a bit uglier because you need to prepare that in advance.
The dataclass has many state vars. In PyTorch we initialized the instance with just the betas and the number of training steps, and then added a few items when setting the inference timesteps. If we try to do the same here by providing defaults to most attributes, then Python synthesizes an initializer with just the betas and the num_training_steps, and then the replace method doesn't work. I had to create a specific class method to simplify the initial creation of the instance.
The updates in step are harder to follow than the PyTorch logic.

Note also that the initial PRK steps have not been implemented yet (since we are skipping them by default). If we go with this approach they should be easy to add.

That's a great PR @pcuenca! Think some clean-ups are left to make it functional, but overall the design seems like the correct design to me

@patrickvonplaten You are right! I stashed my changes to apply them in a new branch and messed up somehow. I have just pushed the correct version, I hope. Sorry about that!


Builder dataset view "duplicate dataset from query" errors out

Steps to Reproduce:

Open random dataset in new "/dataset/" viewer. (The dataset's not important, I'm trying to create a new table using Data Observatory so just need a SQL pane that works)

Type in SQL:

INSERT INTO nj_boundary (the_geom, name)
SELECT *
FROM OBS_GetBoundariesByGeometry(
 ST_MakeEnvelope(-76.04736328125,38.764256548069305,-73.10302734375,41.6169823542308),
 'us.census.tiger.state'
) As m(the_geom, geoid)

Or, you could try this SQL which should also work (but currently also errors):
SELECT *
FROM OBS_GetBoundariesByGeometry(
 ST_MakeEnvelope(-76.04736328125,38.764256548069305,-73.10302734375,41.6169823542308),
 'us.census.tiger.state'
) As m(the_geom, geoid)

(I would additionally like to add ; select cdb_cartodbfytable('athompson','nj_boundary') but multiple SQL instructions with a semicolon is also currently rejected by new Builder SQL editor)

The Dataset refreshes to have a "the_geom" and "geoid" columns in the table view, though oddly these are greyed out and there are no rows/results below them.

Try "Duplicate dataset from query" button

See "red bug" error screen that says "There was an error duplicating applied query: Error creating table from SQL query"

Hey @andrewbt, that
SELECT *
FROM OBS_GetBoundariesByGeometry(
 ST_MakeEnvelope(-76.04736328125,38.764256548069305,-73.10302734375,41.6169823542308),
 'us.census.tiger.state'
) As m(the_geom, geoid)

fails for me, works for you?

Woah, this is a really weird use case, but the query applied worked (retreiving the query schema) but then trying to get rows data, it fails 😱 . Fixing it right now!

The behaviour with the duplication is correct, because there is an error duplicating it, so the problem is related with the data fetching.


Can't build locally anymore

I get the following exception when building locally using npm run gulp vscode-win32-x64. Reason is that for some Search features a tag 1.25.0 is expected but we upgraded already to insider 1.26 and 1.25 isn't tag yet. We should at least not fail the build completely in this case.
[15:22:05] Error: Failed to find git tag for base version, 1.25.0
    at getLatestTagFromBase (C:\Users\dirkb\Projects\mseng\VSCode\vscode\build\lib\util.js:234:19)
    at Object.getPreviousVersion (C:\Users\dirkb\Projects\mseng\VSCode\vscode\build\lib\util.js:254:16)
    at getSettingsSearchBuildId (C:\Users\dirkb\Projects\mseng\VSCode\vscode\build\gulpfile.vscode.js:492:24)
    at Gulp.<anonymous> (C:\Users\dirkb\Projects\mseng\VSCode\vscode\build\gulpfile.vscode.js:268:33)
    at module.exports (C:\Users\dirkb\Projects\mseng\VSCode\vscode\node_modules\orchestrator\lib\runTask.js:34:7)
    at Gulp.Orchestrator._runTask (C:\Users\dirkb\Projects\mseng\VSCode\vscode\node_modules\orchestrator\index.js:273:3)
    at Gulp.Orchestrator._runStep (C:\Users\dirkb\Projects\mseng\VSCode\vscode\node_modules\orchestrator\index.js:214:10)
    at C:\Users\dirkb\Projects\mseng\VSCode\vscode\node_modules\orchestrator\index.js:279:18
    at finish (C:\Users\dirkb\Projects\mseng\VSCode\vscode\node_modules\orchestrator\lib\runTask.js:21:8)
    at C:\Users\dirkb\Projects\mseng\VSCode\vscode\node_modules\orchestrator\lib\runTask.js:52:4

@roblourens We've also hit this when building forks for VS Code on branches other than master. Can you make this a little bit more fault tolerant?

I had to push this in order to get a build running: https://github.com/Microsoft/vscode/commit/87668839f3f2941c6b5f6e097171bd643c697e3d

It should break the build for real builds that we will release. But it can be skipped for others. How can I tell the difference?

I could change it to count from the release branch, instead of the tag.

Actually I'll just check for process.env.BUILD_SOURCEBRANCH like I already do for the upload step.

Oh, I see that this is really about the gap between incrementing the package.json and tagging, not local builds.

I have a better fix which simplifies this whole process, but makes the generated build id longer. First I need to test it with my Bing counterpart to make sure it's handled ok on their end.

Mac builds are failing now: https://monacotools.visualstudio.com/Monaco/_build/results?buildId=40052&view=logs


Get data from nested json and display using Multiselect

Hi all,
Basically what I want to achieve is GET data from server and display the data in the nested json to display in Multiselect.
I'm able to get the objects from the nested json to display in multiselect, but I'm not sure how to customize it to only show the name.
Current behaviour:

So expected behaviour would be, only Sofa, Table and Chair should be shown in the multiselect:

Is there a way for me to only display "subCategoryName"?
Thank you for your help!

For people who have encountered the same problem, here is the solution: https://stackoverflow.com/questions/45273964/get-data-from-nested-json-and-display-using-vue-multiselect

nested objects should still be a nice touch to vue-multiselect so we don't have to fill our computed object.

@sofuxro Please either see the accepted answer on Stack Overflow or docs: https://vue-multiselect.js.org/#sub-single-select-object
You can use objects with vue-multiselect. It doesn’t matter if it has more objects nested inside as long as those are able to be serialized.


Feature/datepicker

Rebrand of DatePicker - Ticket : IGL-70

Good job,
there's just one small detail left, which is the date selection in a disabled range that shouldn't have a hover effect. Example here on September 23
Default

Hover


[C++][Parquet] Add support for LZO compression

Reporter: Aliaksei Sandryhaila / @asandryh
Assignee: Wes McKinney](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=wesm) / @wesm
Note: This issue was originally created as PARQUET-530. Please see the migration documentation for further details.

Ryan Blue / @rdblue:
We've been testing compression codecs lately and I think it makes more sense to add LZ4 and Zstd instead of LZO. LZO has licensing difficulties and is unlikely to outperform LZ4. Zstd and brotli are far better options than even LZ4, so I think we'd be needlessly expanding the spec to add LZO. @asandryh, is that okay with you?

Ryan Blue / @rdblue:
Sorry, I didn't realize we already have LZO in the spec. I thought this was suggesting we add it. Please ignore my other comment. Thanks, Deepak.

Wes McKinney / @wesm:
This should be resolved with PARQUET-457

Wes McKinney / @wesm:
Spoke too soon. This is a can of worms as we are going to need to add run-time shared-library loading (e.g. dlopen) for LZO to work around GPL issues. I will implement the other compression types in PARQUET-457 and raise an exception for LZO.

Deepak Majeti / @majetideepak:
@rdblue Is the plan to deprecate/remove LZO compression from parquet format?

Wes McKinney / @wesm:
There isn't that much LZO in the wild anymore. Suggest we close this and revisit if someone has old files that use LZO that they want to read with parquet-cpp