Error Passing mock from mocked interface

Not sure if this is exactly the same as what is being see in #67.
But I am hitting this problem, and its a real show stopper for mocking interfaces.
Given this simple relationship:
        interface ISomething{
        }

        class A{
            do():Promise<any>{
                return Promise.resolve({});
            }
        }

then this test passes:
        it('passes', done => {
            let something: TypeMoq.IMock<ISomething> = TypeMoq.Mock.ofType<ISomething>(); // mocking an interface

            let a:TypeMoq.IMock<A> = TypeMoq.Mock.ofType<A>();
            a.setup(x => x.do())
                .returns(() => Promise.resolve({}));

            a.object.do()
                .then(() => {
                    a.verifyAll();
                    done();
                })
        });

but this test fails:
        it('passes', done => {
            let something: TypeMoq.IMock<ISomething> = TypeMoq.Mock.ofType<ISomething>();

            let a:TypeMoq.IMock<A> = TypeMoq.Mock.ofType<A>();
            a.setup(x => x.do())
                .returns(() => Promise.resolve(something.object));

            a.object.do()
                .then(() => {
                    a.verifyAll();
                    done();
                })
        });

the only difference is that in the 2nd example we are returning an instance of mocked interface ISomething. Whereas in the first example we are returning an actual instance.

Just to be clear, the issue is only when mocking an interface, since this does work with a class:
Given:
        class ASomething{}

        class A{
            do():Promise<any>{
                return Promise.resolve({});
            }
        }

then this passes OK:
        it('', done => {
            let something: TypeMoq.IMock<ASomething> = TypeMoq.Mock.ofType(ASomething); // mocking a class this time

            let a:TypeMoq.IMock<A> = TypeMoq.Mock.ofType<A>();
            a.setup(x => x.do())
                .returns(() => Promise.resolve(something.object));

            a.object.do()
                .then(() => {
                    a.verifyAll();
                    done();
                })
        });

In the case of dynamic mocking, to make sure the Promise gets resolved properly, you need to turn the mock into a thenable by setting up .then:
let something: TypeMoq.IMock<ISomething> = TypeMoq.Mock.ofType<ISomething>();
something.setup((x: any) => x.then).returns(() => undefined);
...

This is necessary because of the way dynamic mocking works internally.
More specifically, intercepting method calls with the ES6 Proxy is a two step process and when Promise.resolve makes a call to something.object.then the process cannot get completed, which in turn leaves the Promise in a pending state.
Indeed it looks like a duplicate of #67, closing this.

OK, good to know. thanks. let me see how that feels in practice.


Incremental export sometimes detects global data changes when there are none

Sometimes the incremental export decides to update global data even when no global data was changed

This should be fixed in 1.8.0. Let me know if it still does not work as expected and reopen the issue. If you find any new issues please submit a new issue :)
Thanks!


service_name used in scheduling should be restricted to the project in which the services are being created.

Server version - Build from master - jun 04
Steps to reproduce the problem:
Create project1.
Create service1 with name "test"  and requestedHostId set to host1.
Create project2.
Create service1 with same name "test" and requestedHostId set to host2.
Create service2 with scale 2 and scheduling policy set to "host must have a service with name "test".
We see 1 container of service2 being launched in host1 and another 1 in host2.
Expected Behavior:
Both containers of service2 should be launched in host2.

Might be better to have UI automatically add the labels required to schedule against services of the same project.

There is no current label that works correctly for this for me to set.

Looks like this should be split into several separate issues.

In the UI, the dropdown for the list of services should be scoped to the environment ("project").  So within the API, something like: http://localhost:8080/v1/projects/1a5/environments/1e4/services

In terms of the labels generated, cattle currently generates:
"io.rancher.service.name": "s1"
"io.rancher.environment.name": "p1"

Unfortunately, this isn't enough for the "must not" and "should not" conditions for service name.  I can modify cattle so that it also generates:
"io.rancher.env_service.name": "s1_p1"
@vincent99 How does this sound?

Either that or we can create a new affinity rule specifically for service name.  Since a string concatenation of the environment name and service name isn't perfect.

A combined field makes sense to me... @ibuildthecloud?  For string concat it would have to be a separator character that isn't allowed in an environment name (which is I think the rules of a DNS label plus underscore?).  Maybe slash?

Yeah.  Looks like underscore might be allowed.  I'll switch it to a slash for now.

@sonchang We should support the following variables in the container labels:
foo=${project_name}blah${service_name}

project_name should be the current project (which is actually environment in the code) of the container.  And similarly service_name should resolve to the current service.

Cattle changes are in.  Reassigning to @vincent99 for UI changes

UI changed in https://github.com/rancherio/rancher/issues/1148

Tested with latest build from master:
In scheduling section, We now have the service name drop down show "environment_name/service_name".
When  creating service , I pick scheduling option for "host must have service name Test1/test1" where Test1 - is the project name and "test1" is the service name in this project.
When i start the service , containers fail to deploy because of not being able to find placement.
Following label set on the service  has "%2" instead of "/" -
io.rancher.project_service.name=Test1%2Ftest1

https://github.com/rancherio/ui/pull/207

Tested with latest UI changes from master.
Host1 with label - name1=value1
Host2 with label - name1=value2
Environment - Test1
Created a service - test1 with scheduling policy set to host must have host-label "name1=value1" , so all containers of this service land on Host1.
Environment - Test2
Created a service - test1 with scheduling policy set to host must have host-label "name1=value2", so all containers of this service land on Host2.
Created service in environment - Test1 .
Pick scheduling option for "host must have service name Test1/test1"
When i start the service , all containers of the service gets created on the Host1 as expected.
Created service in environment - Test1 .
Pick scheduling option for "host must have service name Test2/test1"
When i start the service , all containers of the service gets created on the Host2 as expected.


Abstract models

Feature request
Context
Currently defining an odmantic.Model or EmbeddedModel that is intended to be extended does not always work as expected.  For example, say we have a few common metadata fields such as created_on and created_by across several embedded models:
class Book(EmbeddedModel):
    created_on: datetime = Field(default_factory=datetime.utcnow)
    created_by: str = Field(default_factory=getpass.getuser)
    isin: str
    # more fields
    ....

class Game(EmbeddedModel):
    created_on: datetime = Field(default_factory=datetime.utcnow)
    created_by: str = Field(default_factory=getpass.getuser)
    title: str
    # more fields
    ....

# more embedded models
...

We could try factoring out the common fields to a Metadata common base embedded model:
class Metadata(EmbeddedModel):
    created_on: datetime = Field(default_factory=datetime.utcnow)
    created_by: str = Field(default_factory=getpass.getuser)

class Book(Metadata):
    isin: str
    # more fields
    ....

class Game(Metadata):
    title: str
    # more fields
    ....

These two definitions are not actually equivalent although they seem they are. That's because the BaseModelMetaclass injects special attributes (__odm_fields__, __mutable_fields__, __bson_serialized_fields__, etc.) directly to each class,  bypassing the regular subclassing mechanism.
Solution
Make the second definition equivalent to the first, either implicitly or (if not possible or desired) explicitly via an abstract=True Config attribute, similarly to Django's abstract base classes:
class Metadata(EmbeddedModel):
    # common fields
    ...

    class Config:
        abstract = True

Looks like this feature has already been suggested.


TypeError: init() should return None, not 'NoneType'

Error:
(football-env) ➜  football git:(master) python -m gfootball.play_game --action_set=full
Traceback (most recent call last):
File "/Users/xxx/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/xxx/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/xxx/dev/football/gfootball/play_game.py", line 70, in
app.run(main)
File "/Users/xxx/dev/football/football-env/lib/python3.8/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/Users/xxx/dev/football/football-env/lib/python3.8/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/Users/xxx/dev/football/gfootball/play_game.py", line 46, in main
cfg = config.Config({
File "/Users/xxx/dev/football/gfootball/env/config.py", line 98, in init
self.NewScenario()
File "/Users/xxx/dev/football/gfootball/env/config.py", line 153, in NewScenario
self._scenario_cfg = scenario_builder.Scenario(self).ScenarioConfig()
File "/Users/xxx/dev/football/gfootball/env/scenario_builder.py", line 62, in init
scenario.build_scenario(self)
File "/Users/xxx/dev/football/gfootball/scenarios/11_vs_11_stochastic.py", line 33, in build_scenario
builder.AddPlayer(-1.000000, 0.000000, e_PlayerRole_GK)
File "/Users/xxx/dev/football/gfootball/env/scenario_builder.py", line 108, in AddPlayer
player = Player(x, y, role, lazy, controllable)
TypeError: init() should return None, not 'NoneType'
Step to reproduce:
brew install git python3 cmake sdl2 sdl2_image sdl2_ttf sdl2_gfx boost boost-python3
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
cd dev
git clone https://github.com/google-research/football.git
cd football
python3 -m venv football-env
source football-env/bin/activate
pip3 install .
python3 -m gfootball.play_game --action_set=full
Env:
MacOs Catalina 10.15.7
Use of pyenv in place

Your error is very similar to one that other folks have when using Anaconda (e.g. #156). Did your try using brew's version of Python 3.8 instead of pyenv to create a virtual environment as I noted here:
$(brew --prefix python3)/bin/python3.8 -m venv football-env

Runnnig $(brew --prefix python3)/bin/python3.8 -m venv football-env gives "syntax error near unexpected token `/bin/python3.8"

What version of python do you have? What is the result of command python3 -V?

I have version 3.8.6.

I have deleted Anaconda, reinstalled everything with reboot and tried with python 3.7.5 too. Tried with and without the virtual environments. My error message is identical to the one "asappia" get

It's quite hard to give any advice without knowing the whole picture. If you uninstalled Anaconda, you should've installed python3 using brew? I'm wondering how you can get python 3.7.5 if the default major version in brew is 3.8. As I explained earlier, in my opinion, the error TypeError: __init__() should return None, not 'NoneType' happens when someone installs boost-python3 with brew, but for installing football uses python3 that doesn't come from brew.

Ah ok, that is probably the case then. Just thought the packages had to be installed with brew not Python it self. Thanks for your help, I really appreciate it.

I get the same error after following the instructions with Catalina 10.15.7 and python3 version 3.8.5. I have deleted and reinstalled all of the modules to create the environment but I still get the same errors as "asappia". Anaconda is not installed. I have used brew to install boost ( version 1.73.0 ) and boost-python3 ( version 1.73.0 ).  Do I need to install python3 using brew ?

@dtinblack Yes, as per instruction in readme.

It's been resolved for me now. Uninstalling the python3 versions that where installed from other sources did the trick.  Thank you so much @vi3itor

Thanks @vi3itor for your help. Like @audunae I deleted all of the packages that were installed from other sources and the package is now working.

Could you propose a note to the readme to address this problem (and make a pull request)?

Your error is very similar to one that other folks have when using Anaconda (e.g. #156). Did your try using brew's version of Python 3.8 instead of pyenv to create a virtual environment as I noted here:
$(brew --prefix python3)/bin/python3.8 -m venv football-env

@vi3itor Hi, I create a virtual env through $(brew --prefix python3)/bin/python3.8 -m venv football-env , and how can I list and revisit this env?

Hi @yanxue7, the command you executed created football-env directory inside the directory where you ran the command in the Terminal. To revisit (reactivate) the environment after you closed the Terminal window or rebooted Mac, open Terminal window again, navigate to the same directory (where football-env is located) and run source football-env\bin\activate to activate the environment.

Hi @yanxue7, the command you executed created football-env directory inside the directory where you ran the command in the Terminal. To revisit (reactivate) the environment after you closed the Terminal window or rebooted Mac, open Terminal window again, navigate to the same directory (where football-env is located) and run source football-env\bin\activate to activate the environment.

Thanks for your help, I learn it.


[Bug]: Login failed

ODC version
odc431
OB version

What happened?

What did you expect to happen?
Login successful
How can we reproduce it (as minimally and precisely as possible)?
Login to shilin/aaAA11__
Anything else we need to know?
No response

pass


Metadata file support

Currently, docs-gen can only generate asciidoc files based on the existing source code files.
To make this project more useful, also as raised in #80, it should support metadata files.
docs-gen project(or else) should do two things:

Generate metadata for the current project source-code
Generate documentation from metadata

For metadata, it would be something like this:
{
  "name": "spring-framework",
  "spans": [...]
  "metrics": [...]
}

The creation of documentation should be able to specify what groups of metadata to be included/excluded.
For example, a doc is created with all metadata or specific metadata files in the classpath or file system.
Things to consider:

Define metadata format
This could be based on the current model classes(SpanEntry, MetricEntry, ObservationConventionEntry)

Hookup the docs-gen to maven and gradle lifecycle
In order to include the metadata files in the generating jar, the metadata generation needs to happen before jar creation.

Allow manual metadata
Similar to additional-spring-configuration-metadata in Spring Boot, allows users to provide a manual metadata file.

Resolve model classes from metadata
When the' ObservationConvention' class references classes in dependent jars, those jars may have metadata files.
The referenced model resolution needs to be extended to consider the metadata files in jars in addition to the source files within the project.

Metadata inclusion/exclusion
When generating documents, provide filtering(include/exclude) by jar files(?), metadata name, package, etc.

cc @marcingrzejszczak @jonatan-ivanov

@ttddyy , thats a great idea, I like it more than what I proposed in #80.
During @jonatan-ivanov @shakuzen session in Spring IO Barcelona someone asked something about dashboards generation. If we have the metadata defined it could also be used in this context.

I think we're all in agreement this would be a really neat feature with a lot of possible benefits/use. I've marked it as help wanted to indicate we'd be happy to receive help in designing/implementing this. The description talks about a lot of parts, but if someone wants to work on this, it will likely be easier to contribute portions of this at a time so it is easier to review and integrate rather than all at once.


Support grouping rules such that rules within a group are executed sequentially

Introduce a mechanism to wrap a set of rules into a group in such a way that all rules within that group are executed sequentially (vs. in parallel). This allows dependent rules to work deterministically.
Historical note: See also discussions on https://github.com/prometheus/prometheus/issues/1088 and https://github.com/prometheus/prometheus/issues/17.

As an additional note, we'll also likely want to use such groups to indicate which rules are allowed to access remote storage. Generally remote storage should be avoided for reliability reasons, and only be used for human trending.

Is there any timeline for this feature?

It's not a super-trivial one so it will take a bit. But it's high up on the list of next features to work on.

Are there any thoughts on how these groupings will be expressed syntactically? It occurred to me that it can be inferred automatically by comparing (lhs) rule names+labelsets with (rhs) metric selectors, and grouping all possibly-matching rules together. However, this is a bit automagic, so it's not necessarily the obvious solution.
I'm considering making an unpublished patch to implement this, just to stay on top of mounting technical debt. I would prefer not to diverge too far from whatever plans you have without good reason, so I'm asking what those plans are.

@aecolley That was my initial idea early on, but that isn't as unproblematic as it sounds: https://github.com/prometheus/prometheus/issues/17

A proposal for fixing this with backward compatibility is here: https://docs.google.com/document/d/1AgRT1sJyvxwVx6ZLffUKFZ3yYFt01LSz_ohLQbA2yc4/edit

Added in 2.0.


Unbounded LP problem reported as infeasible

What version of OR-tools and what language are you using?
Version: (from Anaconda)
$ conda list ortools
# Name                    Version                   Build  Channel
ortools                   7.5.7466                 pypi_0    pypi

Language: Python
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
GLOP
What operating system (Linux, Windows, ...) and version?
MacOS 10.14.6
What did you do?
from ortools.linear_solver import pywraplp
solver = pywraplp.Solver('Test', pywraplp.Solver.GLOP_LINEAR_PROGRAMMING)

x1 = solver.NumVar(0, solver.infinity(), 'x1')
x2 = solver.NumVar(0, 10, 'x2')

# no upper constraint on x1

objective = solver.Objective()
objective.SetCoefficient(x1, 1.0)
objective.SetCoefficient(x2, 1.0)
objective.SetMaximization()

result = solver.Solve()
print("result", result)

What did you expect to see
result == solver.UNBOUNDED # 3
What did you see instead?
result == solver.INFEASIBLE # 2
Anything else we should know about your project / environment
I have also tried it in C++, using examples/cpp/linear_programming.cc as an example, and it also gives INFEASIBLE.

Could be reproduced with version 8.0
[0]─[~]
[^v^]─mizux@nuc10i7 %python -m pip install --user ortools
Collecting ortools
  Downloading ortools-8.0.8283-cp38-cp38-manylinux1_x86_64.whl (13.7 MB)
     |████████████████████████████████| 13.7 MB 2.0 MB/s
Collecting protobuf>=3.13.0
  Using cached protobuf-3.13.0-cp38-cp38-manylinux1_x86_64.whl (1.3 MB)
Requirement already satisfied: six>=1.10 in /usr/lib/python3.8/site-packages (from ortools) (1.15.0)
Requirement already satisfied: setuptools in /usr/lib/python3.8/site-packages (from protobuf>=3.13.0->ortools) (50.3.0)
Installing collected packages: protobuf, ortools
  Attempting uninstall: protobuf
    Found existing installation: protobuf 3.12.2
    Uninstalling protobuf-3.12.2:
      Successfully uninstalled protobuf-3.12.2
Successfully installed ortools-8.0.8283 protobuf-3.13.0

[^v^]─mizux@nuc10i7 %cat issue_2198.py
#!/usr/bin/env python3
from ortools.linear_solver import pywraplp
solver = pywraplp.Solver('Test', pywraplp.Solver.GLOP_LINEAR_PROGRAMMING)

x1 = solver.NumVar(0, solver.infinity(), 'x1')
x2 = solver.NumVar(0, 10, 'x2')

# no upper constraint on x1

# objectif maximize x1 + x2
objective = solver.Objective()
objective.SetCoefficient(x1, 1.0)
objective.SetCoefficient(x2, 1.0)
objective.SetMaximization()

result = solver.Solve()
print("result", result)
[0]─[~]
[^v^]─mizux@nuc10i7 %./issue_2198.py
result 2
[0]─[~]


Check this out for how to do turn-based multiplayer

https://github.com/jcarolus/android-chess/
This is what I based the single player on: https://github.com/jamestaylr/android-chess

bump


StarRocks supports querying Hive tables with encrypted ORC file format

Why I'm doing:

Spark 2.4.x uses the Java version of the Apache OCR project to enable encryption and decryption of ORC format Hive tables.

StarRocks uses the C++ version of the Apache OCR project for reading and writing OCR files, but the C++ version does not implement encryption and decryption functionality. When performing ad-hoc analysis on Hive tables with encrypted columns, StarRocks is unable to query the Hive table. Therefore, modifications need to be made to StarRocks' Apache OCR module to support reading encrypted Hive table data in ORC format.

What I'm doing:

StarRocks' Apache OCR module to support reading encrypted Hive table data in ORC format.
Fixes #issue
https://github.com/StarRocks/starrocks/issues/45777

What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[x ] This pr needs user documentation (for new or modified features or behaviors)
[ ] I have added documentation for my new feature or new function
[ ] This is a backport pr

Bugfix cherry-pick branch check:

[ ] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.3
[ ] 3.2
[ ] 3.1
[ ] 3.0
[ ] 2.5

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

let me have a review

Ping .
Is the CLA/DCO sign necessary or optional?


Can we use this package in an Electron-Vue project?

Not sure if this is the right place to ask but wondering if this package can be used from within -Electron-Vue(https://simulatedgreg.gitbooks.io/electron-vue/en/) to communicate to a Apollo server?

Yes you can it will work like charm! 👍

@Samuell1  Oh good to know... I am using Electron-Vue boilerplate and i don't seem to understand where i need to add the packages related to Apollo i.e inside the Main process or inside the Renderer? I have tried both ways but none work. May i ask what was your approach and how you got this working? a code snippet would be brillant

Main process is only for Electron, you need to put Apollo in Renderer and bind in on Vue :)

@Samuell1 thanks for the information. I am able to get a simple project running. There were couple of errors but none related to Vue-Apollo.


RuntimeError: list changed size during iteration

Hello Team,
Currently getting the following error(RuntimeError: list changed size during iteration) when trying to use the batched API for large amounts of documents(greater than 10K).  Tested this with mixedbread-ai/mxbai-embed-xsmall-v1 model. Here is the code being used.
`import uvicorn
import batched
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from sentence_transformers import SentenceTransformer
from pydantic import BaseModel
app = FastAPI()
model = SentenceTransformer('mixedbread-ai/mxbai-embed-xsmall-v1')
model.encode = batched.aio.dynamically(model.encode)
class EmbeddingsRequest(BaseModel):
input: str | list[str]
async def embeddings(request: EmbeddingsRequest):
return ORJSONResponse({"embeddings": await model.encode(request.input)})
if name == "main":
uvicorn.run(app, host="<IP_ADDRESS>", port=8000)`

Thank you! Could you check if this also happens for you without fastapi?

Confirmed this today without fastapi.

The following code-snippet works for me (4194304 inputs). Could you share a snippet to reproduce?
from batched.aio import dynamically

@dynamically(batch_size=32, timeout_ms=10.0)
def test(items: list[str]):
    return items

 await test([". " * 512] * 2048 * 2048)

Here's a quick example that immediately produces the error message I saw:
from angle_emb import AnglE
import batched
from datasets import load_dataset

model = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1', pooling_strategy = 'cls').cuda()

model.encode = batched.dynamically(model.encode, batch_size = 64)

dataset = load_dataset("McAuley-Lab/Amazon-Reviews-2023", "raw_review_All_Beauty", trust_remote_code=True)

embeddings1 = model.encode(dataset["full"][:100]['text'])   # works
embeddings2 = model.encode(dataset["full"][:500]['text'])   # works
embeddings3 = model.encode(dataset["full"][:50000]['text']) # fails (RuntimeError: list changed size during iteration)

With this example and a fresh kernel, the issue crops up pretty quickly (<20s). Without a fresh kernel, it seems one needs to adjust the exact number of items to get the error to reliably occur:
Exception in thread Thread-5 (_process_batches):
Traceback (most recent call last):
  File "/home/daved/miniforge3/envs/bert/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/home/daved/miniforge3/envs/bert/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 766, in run_closure
    _threading_Thread_run(self)
  File "/home/daved/miniforge3/envs/bert/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/daved/miniforge3/envs/bert/lib/python3.10/site-packages/batched/batch_processor.py", line 124, in _process_batches
    for batch in self.batch_queue.optimal_batches():
  File "/home/daved/miniforge3/envs/bert/lib/python3.10/site-packages/batched/batch_generator.py", line 154, in optimal_batches
    batch_items = [self._queue._get() for _ in range(size_batches)]  # noqa: SLF001
  File "/home/daved/miniforge3/envs/bert/lib/python3.10/site-packages/batched/batch_generator.py", line 154, in <listcomp>
    batch_items = [self._queue._get() for _ in range(size_batches)]  # noqa: SLF001
  File "/home/daved/miniforge3/envs/bert/lib/python3.10/queue.py", line 239, in _get
    return heappop(self.queue)
RuntimeError: list changed size during iteration

@davedgd Thanks for letting us know :) - #15 should fix the issue.

Awesome, thank you!


[linux] http://www.nbc.com/ (https protocol not found)

http://www.nbc.com/nightly-news/video/nbc-nightly-news-apr-27-2016/3022231
https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.
https://nbcmpx-vh.akamaihd.net/i/video/800/163/160419_3022231_NBC_Nightly_News__Apr_27__2016_mpx_,1696,1296,896,696,496,306,150,240,64,.mp4.csmil/index_0_av.m3u8?null=0&id=AgAXadVVYAYtXcQHIlfZXGDaUXPGOWI1UxJD6C%2FtAwPky5vLJe4WquVsFSin%2FAhTfuf+x+wYUd5CnA%3D%3D&hdntl=exp=1461934404~acl=%2Fi%2Fvideo%2F800%2F163%2F160419_3022231_NBC_Nightly_News__Apr_27__2016_mpx_*~data=hdntl~hmac=f8c4553f875b7b562939291150bd470bf916f091ce28e6ed465f26c29a745305: Protocol not found
ERROR: ffmpeg exited with code 1

It seems like your reply has the answer in it (note: "recompile FFmpeg with openssl").
Read this: http://stackoverflow.com/questions/31514949/ffmpeg-over-https-fails

Thanks @EnginePod. Don't forget to enable HLS, too.


Is this usable yet?

I have to achieve 45 minutes by tomorrow, and I'm wondering if this is ready to be utilized yet?

Hey there, while unstable, this package is indeed usable. It's currently at a state where everything works the intended way, but I haven't documented a README yet.
I'm planning to make a README in the coming week, and from there, usage instructions will be much simpler.

Can you provide some simple instructions for me just to be able to use it for today?

This framework is meant to be extensible and allow users to build their own systems. There isn't a one-size-fits-all answer. If you just want a robot to do your membean for you, then a layout would look like this:
// Import the MemBeanTrainingSession class
import MemBeanTrainingSession from './MemBeanTrainingSession.js';

// Define your Membean session ID and authentication token
const sessionId = 'YOUR_SESSION_ID';
const authToken = 'YOUR_AUTH_TOKEN';

// Create a new instance of MemBeanTrainingSession
const session = new MemBeanTrainingSession(sessionId, authToken);
const sleep = ms => new Promise(r => setTimeout(r, ms))

// Listen for events emitted by the session
session.on('new_word', async data => {
    console.log('New Word:', data.word);
    await sleep(120 * 1000); // 2 minutes
    session.advance(data.nav["Next"]);
});

session.on('restudy', async data => {
    console.log('Restudy:', data.word);
    await sleep(120 * 1000); // 2 minutes
    session.advance(data.nav["Next"]);
});

session.on('quiz', async data => {
    console.log('Quiz');
    await sleep(20 * 1000); // 20 seconds
    session.advance(data.answer.pass);
});

session.on('spelltest', async data => {
    console.log('Spell Test');
    await sleep(20 * 1000); // 20 seconds
    session.advance(data.answer.pass);
});

session.on('take_a_break', () => {
    console.log('Take a Break');
});

(async () => {
    try {
        await session.parseUserState();
    } catch (error) {
        console.error('Error:', error);
    }
})();

Keep in mind that this project isn't meant to just be a robot for cheating, its meant to extend the membean API. Also, I did not test the code above, as I literally just wrote it up, so it may not work as intended.

so the chances of it getting detected and me getting dubious minutes are high?

No, not quite. If it works, then they are quite low, if it doesn't work, then nothing will happen.

How do I get it to work? I really need something to just do minutes for me

I've given you the code that I believe may work, but other than that, there is not much I can do. I'm sorry for the trouble, but this library may not suit your needs.

If you need any more help, feel free to reach out to me at<EMAIL_ADDRESS>


Array of entities in request body

Related issue: https://github.com/ruby-grape/grape-entity/issues/252
As for example above, we want request body to be:
{
  "accounts": [
    {
      "cma": 0,
      "name": "string",
      "environment": "string",
      "sites": 0,
      "username": "string",
      "password": "string"
    }
  ]
}

But actually:
[
    {
      "cma": 0,
      "name": "string",
      "environment": "string",
      "sites": 0,
      "username": "string",
      "password": "string"
    }
]

Grape also wants the array to be in the key of top level JSON object.
( Top level array data cannot be handled by Grape out of the box ( cf. https://github.com/ruby-grape/grape/issues/1730 ). )
So it seems the generated specification is broken.
A workaround is to adding dummy optional parameter.
It forces the request body to be a JSON object.
I've found that making MoveParams#build_definition to always use object_type fixes the issue.
Is this reasonable fix?

I just ran into the same bug.  Really don't want to go the dummy parameter route, but looks like it's not possible right now.

The issue seems to be with the correct_array_param/should_correct_array? method in move_params.b
I have this param contract.
requires :members, type: Array, documentation: {param_type: 'body'} do
  requires :user_id, type: Integer, desc: 'User ID'
  requires :role, type: Symbol, values: [:viewer, :user, :manager, :remove], desc: 'Role for the user.'
end

And it yields incorrect swagger docs expecting this.
[
  {
    "members": [
      {
        "user_id": 0,
        "role": "string"
      }
    ]
  }
]

When it should be like this.
  {
    "members": [
      {
        "user_id": 0,
        "role": "string"
      }
    ]
  }

Hey, did you guys find out a workaround for the problem mentioned in this issue?

@swistaczek what I have been doing to work around this issue is the following.
params do
  requires :members, type: Array, documentation: {param_type: 'body'} do
    requires :user_id, type: Integer, desc: 'User ID'
    requires :role, type: Symbol, values: [:viewer, :user, :manager, :remove], desc: 'Role for the user.'
   end
   optional :ignored, type: Boolean, desc: 'Workaround for https://github.com/ruby-grape/grape-swagger/issues/666'
end

not the most elegant solution at the moment.  Note that I am in the middle of doing an upgrade to grape-swagger 1.0/grape 1.3.x and have not verified this yet against that version.

So.. I just tested on grape 1.3.x/ grape-swagger 1.1.0 and this issue appears to be resolved now.

@swistaczek I'm using a similar workaround:
params do
  requires :contacts, type: Array[API::V2::Entities::Contact], documentation:
    { desc: 'Contacts', is_array: true, in: 'body' }
  optional :hack, documentation: { in: 'body', desc: 'Hack to bypass Grape bug' }
end

@urkle I just tried (quickly) to upgrade to grape 1.3.3 and grape-swagger1.1.0 and still see the problem. 😢
With the "hack" the expected JSON is:
{
  "contacts": [
    {
      "id": "d67197dd-3a5b-403a-8876-899f2e9468b6",
      "name": "John"
    }
  ],
  "hack": "string"
}

Without the "hack" it (still) becomes:
[
  {
    "id": "5abd4d34-45c2-45ab-94a6-3bfbd0b335a9",
    "name": "John"
  }
]

So, this issue is fixed when the nested is an object, but when the nested is a scalar it still occurs.
thus
params do
  requires :members, type: Array, documentation: {param_type: 'body'} do
    requires :user_id, type: Integer, desc: 'User ID'
    requires :role, type: Symbol, values: [:viewer, :user, :manager, :remove], desc: 'Role for the user.'
   end
end

works, but this does not work and instead creates a completely unusable expected input of [1,2,3] (with no key name).
params do
   requires :rule_ids, type: Array[Integer], desc: 'blah', documentation: {param_type: 'body'}
end

Also, using in: 'body' does not work ANYWHERE For me, I have to use param_type: 'body'

Related bug #725

Hi there, I have read the solutions provided by different guys but my scenario is about filters. Which means there could be array of users like 1,4 or 10 or so on etc. How can i manage this?


Bonding UI improvements

@jolesbi brought up the idea of alternate input methods for bonding. I've been thinking about for quite some time. I've come up with the idea of sliders as the primary input method for bonding. I made a concept in sketch:

Sliders is an intuitive way of splitting up resources between multiple competing options. It makes more sense and it's way easier to visualize than simply entering in numbers.
I have an idea for how to show unbonding and a previous bond "diff" too, like with git. I'll work on this sketch tomorrow.

[x] recreate the sketch mockup in html/css
[x] investigate dragging library for the slider
[x] implement dragging library wtih html/css mockup
[x] make the bar slide from 0% to 100% with an offsetWidth equal to scrubber width
[x] set up reactive variables for the percent and absolute atoms changed
[x] make sure setting atom allocations with the input[type=number] affects the slider
[x] make sure atom allocation works with this new interface
[x] implement a red bar for reducing atom allocation
[x] implement a green bar for increasing atom allocation
[x] implement a yellow bar for unbonding atoms
[x] implement field validation so that user cannot go below 0 unbonded atoms
[x] checkbox for confirmation
[x] attempting to unbond & bond in the same transaction should not result in the "Unbonded Atoms" bar increasing in size, unbonding atoms should go into the "Unbonding..." bar
[x] update unit tests

closed by #331


LIFX protocol v2

By the looks this doesn't implement the v2 proto documented here?

This does support the v2 lifx but was written before those docs were released.
I plan to sit down with one of the devs from lifx and do a new version possibly using code generation to make it easier to modify.
Cheers

Ah, gotcha.  I'll have a bit of a closer read.  I'd just started writing a lib myself before I found this, my thinking was along the lines of splitting the protocol stuff out to separate namespaces, with the client abstracting them away and allowing the user to select a protocol version when instantiating the client.
Code generation would definitely be optimal, in that respect it's a shame they decided against protobuf in the end, but that might have been a perf thing.  I thought most of the LIFX guys were in the States now?
In the mean time, I've done a little testing, and I don't seem to be getting good reliability out of this lib right now - discovery finds all the 'gateways' (which are actually bulbs now), but the bulbs don't get populated on the client unless some other packet happens to arrive (I've not looked at this yet).  The result is that bulbs take a long time to show up, if they show up at all - I get about 50% of mine showing up after a few minutes.

So, I went ahead and wrote a lib based on the docs.  The protocol implementation still needs documentation and testing, but it's not in bad shape, and it's abstracted from the client so that if there's another protocol version released, that can be implemented with minimal effect on the public interface, and the user can choose which protocol version to use at run-time.  Currently the lib only exposes a synchronous API (with timeouts), I may add an event-based API at a later date (this would clean up a couple of loops in the client too).

Yeah cool hopefully i will get some time soon to do something similar.


Promote release-service from development to staging

Included PRs:

https://github.com/redhat-appstudio/release-service/pull/299
https://github.com/redhat-appstudio/release-service/pull/302
https://github.com/redhat-appstudio/release-service/pull/296
https://github.com/redhat-appstudio/release-service/pull/292

/lgtm

/retest

/retest

@scoheb https://status.quay.io/

/retest

/retest


Category menu item selection when in PostDetail view while menu only shows categories

@yakky Initial menu implementation had a NavigationModifier which selected category menu item according to post's categories which solved this particular use case. After menu redesign it's gone and proper category is only selected if posts are shown in menu as well (which is not a viable option in my case since I have ~1000 blog posts).

You can set 'Categories only' as menu type and this only loads categories into the menu

@yakky Yes, but when you go into post, no category will be selected in menu. This is because toolbar object is set to Post, not category, also category menu item urls don't match up with the beginning of post urls even if you use category based permalink. So the only way is a NavigationModifier AFAIK.

I see. Check if #206 fixes your issue
I reintroduced the menu modifier with changes with respect to the old one

@yakky Terrific! Works as expected.

Great. Waiting for the tests to pass before merging


fix: tune Besu options to work with tx_spammer

At startup Besu does not return a good gas price estimation (WIP to fix this) and the default number of accepted connection is not enough to sustain the tx_spammer, so this PR tune some options to allow to use the tx_spammer wth Besu.

@pk910 could you please review?

Yea, our testing workflow is currently broken for branches that are not part of this repository.
Right now it tries to find branch tune-besu-for-tx-spammer within this repository, but it's part of your fork, so it can't find it.
We'll get that fixed :)

PR workflow issue with assertoor got fixed with #616
Sorry for the delay ;)


Title theming

Could you please consider using the standard Home Assistant title element(s) so I don't have to create a new card-mod card class just to theme the title in your card to match everything else?

Yes, this should be part of the styles changes/fixes that are coming in next versions

Could it also be possible to specify the colors for the SVG generated as part of a custom theme? (or card-mod)


fix(keep-alive): should successfully set ref with async comp

fix #4999

Can it also fix #4999 ?It seems i did repeated work...


Azure partner center product feature availability PUT method is not working.

Azure partner center product feature availability PUT method is not working.
When I try to update the custom meters by using this API https://api.partner.microsoft.com/v1.0/ingestion/products/:productID/featureavailabilities/:featureAvailabilityID (PUT Method), I'm facing an issue with updating product feature data.
The API response is the below message.
"Value cannot be null.\r\nParameter name: IfMatch"
I've followed this swagger documentation
https://ingestionapi-swagger.azureedge.net
Also I've attached the  request body below
{
"resourceType": "FeatureAvailability",
"visibility": "Public",
"properties": [
{
"type": "ApplicableClouds",
"value": "PublicAzure"
}
],
"priceSchedules": [
{
"isBaseSchedule": true,
"friendlyName": "Default",
"schedules": [
{
"retailPrice": {
"openPrice": 1.0,
"currencyCode": "USD"
},
"pricingModel": "Recurring",
"priceCadence": {
"type": "Month",
"value": 1
}
}
]
},
{
"isBaseSchedule": false,
"marketCodes": [
"IN"
],
"friendlyName": "India",
"schedules": [
{
"retailPrice": {
"openPrice": 91.25721,
"currencyCode": "INR"
},
"pricingModel": "Recurring",
"priceCadence": {
"type": "Month",
"value": 1
},
"pricingUnits": []
}
]
},
{
"isBaseSchedule": false,
"marketCodes": [
"US"
],
"friendlyName": "United States",
"schedules": [
{
"retailPrice": {
"openPrice": 1.0,
"currencyCode": "USD"
},
"pricingModel": "Recurring",
"priceCadence": {
"type": "Month",
"value": 1
},
"pricingUnits": []
}
]
}
],
"customMeters": [
{
"isEnabled": true,
"id": "123",
"uniqueID": "xxxf",
"displayName": "xxxf",
"unitOfMeasure": "xxxUM",
"priceInUsd": 2.0,
"includedBaseQuantities": []
}
],
"id": "21323",
<EMAIL_ADDRESS>""8303b26c-0000-0200-0000-6385a0c20000"",
}

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

ID: 99cfee8b-895e-7947-a146-3668d4c330ce
Version Independent ID: c905ca30-38f5-e563-26d0-0686cb841de0
Content: Partner Center submission API to onboard Azure apps in the Microsoft commercial marketplace
Content Source: articles/marketplace/azure-app-apis.md
Service: marketplace
Sub-service: partnercenter-marketplace-publisher
GitHub Login: @mingshen-ms
Microsoft Alias: mingshen

@sidharthk123
Thanks for your feedback! We will investigate and update as appropriate.
Since this channel is for driving improvements towards MS Docs, could you provide the URL of the specific documentation that your feedback is applicable to? That way, we are able to make sure your feedback is addressed by the right team

Hi @SaibabaBalapur-MSFT ,
thank you for your quick response, here I've mentioned two URLs, both of them are the same but if you want to jump the exact API then you can open the 1st  URL. if you click the 2nd one then you can see a collection of azure marketplace APIs.

feature availability https://ingestionapi-swagger.azureedge.net/#/FeatureAvailability/put_products__productID__featureavailabilities__featureAvailabilityID.

https://ingestionapi-swagger.azureedge.net/

Hi @sidharthk123 those are third party links, please help us with Microsoft URL of the specific documentation that your feedback is applicable to? That way, we are able to make sure your feedback is addressed by the right team

if you open this link
https://learn.microsoft.com/en-us/azure/marketplace/azure-app-apis
then you can see the swagger link.
Please check out the below image this will help you to open the swagger documentation.

Thanks @sidharthk123

Hi @SaibabaBalapur-MSFT, any update on this, when we talk about the API, that is not working, it could be an API issue.
Please feel free to respond to me.

@KrishnaG-MSFT
Please review it

@SaibabaBalapur-MSFT I address the issue, we should configure the eTag and If-match on the HTTP header.

@sidharthk123 Glad to know you have self-resolved the issue. If there are further questions regarding this topic, please do let us know and we will gladly continue the discussion.


Nested dicts inside configuration file do not get replaced with their configuration objects

This maybe only related to the CnnCtrnn brain.
Consider this example config:
{
  "environment": "Qbert-v0",
  "random_seed": 0,
  "number_generations": 20,
  "optimizer": {
    "type": "MU_ES",
    "initial_gene_range": 2,
    "mu": 30,
    "lambda_": 600,
    "mutpb": 0.8
  },
  "brain": {
    "type": "CNN_CTRNN",
    "use_bias": true,
    "ctrnn_conf": {
      "number_neurons": 10,
      "neuron_activation": "relu",
      "use_bias": true,
      "delta_t": 0.5,
      "optimize_state_boundaries": "global",
      "clipping_range_max": 1.0,
      "clipping_range_min": -1.0,
      "optimize_initial_neuron_state": false
    },
    "cnn_conf": {
      "conv_size1": 3,
      "conv_feat1": 5,
      "maxp_size1": 1,
      "maxp_stride1": 1,
      "conv_size2": 3,
      "conv_feat2": 5,
      "maxp_size2": 1,
      "maxp_stride2": 1
    }
  },
  "episode_runner": {
    "number_fitness_runs": 3
  }
}

When running this (with default CLI arguments) I get the error AttributeError: 'dict' object has no attribute 'conv_size1'. This is because the cnn_conf dict did not get replaced with a configurations.ConvolutionalNNCfg object.
I guess somewhere in the recursion in ConfigReader._replace_dicts_with_types() something goes wrong

Okay I am stupid, I forgot the type parameters inside the nested dicts. If I add "type": "CTRNN" to ctrnn_conf and "type": "CNN" to cnn_conf it works as expected, the nested dicts are transformed into objects.
Its unfortunate that no error is thrown. Would it be possible to always throw an error if the "type" parameter is missing @bjuergens ?

Would it be possible to always throw an error if the "type" parameter is missing @bjuergens ?

hm... yes. but if we wanted to intentionally pass a dict, than how would we need to handle that?
Maybe a cleaner solution would check if all expected sub-objects are present? Like in your example when parsing the config for "brain", there should be an exception, that says, that no expected sub-brains have been found.
Then again: When in #77 we will change everything about config-reading anyways. So anything we do here would be meaningless anyway in a couple of weeks (months? years?)

Then again: When in #77 we will change everything about config-reading anyways. So anything we do here would be meaningless anyway in a couple of weeks (months? years?)

Yeah I agree, lets leave it like it is for the moment and #77 will fix it somehow


Corsair Crystal 570X RGB

Hi,
I would like to know if your software is able to pilot/manage led (SP120 RGB Fan) on a Tower Corsair Crystal 570X RGB.
By advance thanks for your answer.

@benburkhart1
Having no response from you, I guess the controller of my box sp120 RGB is not the Lighting Node Pro. Also,I close this issue.

Just for people wondering (like me) what they have to manage the fans in their corsair case this is the RGB Fan Led Hub that you can connect to the Lighting Node Pro or better to the Commander Pro.


create reg_loop_series function that has a list of file inputs instead of a single 3d image data

made it work, but files are still loaded all at once, since the median image is calculated for reference. Need to implement reference image as previous sequence iteration to avoid this


update to MIP61 with GovAlpha suggestions

Main additions:
line 98
line 113
line 141

This is @patrick-j-govalpha's pull. Do you want me to edit it?

@jpritikin I'm happy for you to make changes, I'll add you as a collaborator on the repo

@blimpa This looks ready to merge.


Unable to serve file without extension .well-known/apple-app-site-association

Using serve to deliver a static pre-built create-react-app.
serve -s /web/build --listen 5000 --no-clipboard
The file .well-known/apple-app-site-association is part of the served directory but user receives the contents of index.html instead of the static file.
$ curl -v frontend:5000/.well-known/apple-app-site-association
*   Trying <IP_ADDRESS>...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x55d399370f50)
* Connected to frontend (<IP_ADDRESS>) port 5000 (#0)
> GET /.well-known/apple-app-site-association HTTP/1.1
> Host: frontend:5000
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 3668
< Content-Disposition: inline; filename="index.html"
< Accept-Ranges: bytes
< ETag: "5f5cc5f26a26ca0e5c724317646b36fa5c9f84f5"
< Content-Type: text/html; charset=utf-8
< Vary: Accept-Encoding
< Date: Tue, 16 Feb 2021 09:51:45 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
<!doctype html>...

A file just next to it .well-known/assetlinks.json is being resolved correctly.
$ curl -v frontend:5000/.well-known/assetlinks.json
*   Trying <IP_ADDRESS>...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x557f10cd4f50)
* Connected to frontend (<IP_ADDRESS>) port 5000 (#0)
> GET /.well-known/assetlinks.json HTTP/1.1
> Host: frontend:5000
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 647
< Content-Disposition: inline; filename="assetlinks.json"
< Accept-Ranges: bytes
< ETag: "dd82311f2234ea4637b771ce3f7a4be2a5253fd5"
< Content-Type: application/json; charset=utf-8
< Vary: Accept-Encoding
< Date: Tue, 16 Feb 2021 09:55:17 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
[
  {
    "relation"....

I've tried defining a serve.json config with excluded directory in cleanUrls but did not solve it.
{
    "cleanUrls": [
      "/**",
      "/!.well-known/**"
    ]
}

Universal Links documentation: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html
Any help would be appreciated!

shameless self-promotion alert:this feature is fixed in my @warren-bank/serve fork of serve

This fix for this is to create the apple-app-site-association as apple-app-site-association.json and then create a rewrite rule inside of a file in your public directory called serve.json. The contents of that file should look like this.
{
  "rewrites": [
    {
      "source": "!.well-known/**",
      "destination": "index.html"
    },
    {
      "source": ".well-known/apple-app-site-association",
      "destination": ".well-known/apple-app-site-association.json"
    }
  ]
}

Then when you start your static file server, you don't use the -s or --single argument. You start it using the following command.
serve -c serve.json
The first item will send all requests that don't exist inside of .well-known to index.html, and the second rewrite will send requests for that specific URL to the apple-app-site-association.json file and assign a content-type: application/json header to it. All other files with file extensions should be served as normal, ignoring any rewrite rules.

I am having this same issue


koord-scheduler: optimize ElasticQuota preemption performance

Ⅰ. Describe what this PR does
Reduce the calculation amount of QuotaInfo DeepCopy during preemption to optimize performance.

Ⅱ. Does this pull request fix one issue?
fix #1194

Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist

[x] I have written necessary docs and comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in make test

LGTM


Add files via upload

Adding Institution domain to repository

@Santoshmiracle This domain does not belong to a particular school. It seems to belong to an umbrella institution (such as Ministry of Education or similar). We cannot add umbrella institutions domain to this repository. Please apply for free educational license with an official document that proves your student status. You can do it using "OFFICIAL DOCUMENT" tab at https://www.jetbrains.com/shop/eform/students. Thank you for your understanding!

Hi Philip.
As the email contains the umbrella of Institutions, rather there is only
one institution under it. The domain they used as they may open school or
other institutions in future.
Regards
Santosh.
On Wed, 23 Jun, 2021, 5:14 pm Philip Torchinsky, @.***>
wrote:

@Santoshmiracle https://github.com/Santoshmiracle This domain does not
belong to a particular school. It seems to belong to an umbrella
institution (such as Ministry of Education or similar). We cannot add
umbrella institutions domain to this repository. Please apply for free
educational license with an official document that proves your student
status. You can do it using "OFFICIAL DOCUMENT" tab at
https://www.jetbrains.com/shop/eform/students. Thank you for your
understanding!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JetBrains/swot/pull/11845#issuecomment-866766160, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AUSPPF6UZD2T3R7FUE7T5ALTUHCLLANCNFSM47D3OIIA
.


Wrong indent of attributes in custom html element

What steps will reproduce the problem?
1. open html file with custom directive
2. gg=G

What is the expected output? What do you see instead?
<custom
  attr="true"
  attr="true" />

instead getting this:
<custom
attr="true"
attr="true" />

What version of the product are you using? On what operating system?
osx (macvim VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May  9 2014 11:52:58))
win (VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 14:38:33)  )

Please provide any additional information below.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 9 May 2014 at 2:30

I tried this with the latest indent/html.vim (Last Change:	2018 Mar 28) and it looks like indentation works as expected now. Can anyone confirm?

seems to be working. Closing.


cln: update to v23.08 to allow self payments

This include the recent version of core lightning to
allow self-payments.

This should be relatively straightforward if you want to take a shot at writing a test. See test_gateway_pay_valid_invoice in gateway/ln_gateway/src/ng/tests.rs as an example of a test that uses fedimint to pay an invoice.
The main thing that you'll need to change, is that instead of generating an invoice with other_lightning_client, you'll need to generate the invoice with CLN and then try to pay it with fedimint when CLN is set as the lightning gateway.

This breaks our CI, probably some CLN command that changed.

This should be relatively straightforward if you want to take a shot at writing a test. See test_gateway_pay_valid_invoice in gateway/ln_gateway/src/ng/tests.rs as an example of a test that uses fedimint to pay an invoice.

Thanks to point me in the correct file, but test_gateway_pay_valid_invoice is not there.

The main thing that you'll need to change, is that instead of generating an invoice with other_lightning_client, you'll need to generate the invoice with CLN and then try to pay it with fedimint when CLN is set as the lightning gateway.

I see, I assume that CLN in this case is the user_client?
The use case that I would like to test is generate an invoice with fedi -> pay with user client

This breaks our CI, probably some CLN command that changed.

Yeah, I am not able to reproduce on my machine because my remote build machine apparently will OOM :/

I think you can reproduce one (of potentially more) problems in just mprocs. It takes a ridiculous time to get read, apparently because the LND node doesn't return any route hints and lnd-gw keeps retrying.
2023-08-25T09:46:53.870439Z  INFO connect_fed: ln_gateway: LN node returned no route hints, trying again in 2s num_retries=16

After 30 retries it starts without route hints, leading to the user shell becoming read after over 160s. When checking the output of fedimint-cli list-gateways one of them doesn't have any route hints as predicted by this theory.
On master both the CLN and the LND gateway register quickly and have route hints. Is it possible that some CLN change lead to LND not recognizing a channel as active? The route hint filtering for LND is implemented here:
https://github.com/fedimint/fedimint/blob/290472841f38f8ad165d0d5906fc5625840d499b/gateway/ln-gateway/src/lnd.rs#L292-L357
If you are running out of memory when compiling for just mprocs you can limit cargo's parallelism by applying the following patch:
diff --git a/scripts/build.sh b/scripts/build.sh
index 2dfae4e581..374e43f06f 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -38,6 +38,6 @@ cd $SRC_DIR || exit 1
 # Note: Respect 'CARGO_PROFILE' that crane uses

 if [ -z "${SKIP_CARGO_BUILD:-}" ]; then
-  cargo build --workspace --all-targets ${CARGO_PROFILE:+--profile ${CARGO_PROFILE}}
+  cargo build -j 2 --workspace --all-targets ${CARGO_PROFILE:+--profile ${CARGO_PROFILE}}
 fi
 export PATH="$PWD/target/${CARGO_PROFILE:-debug}:$PATH"

@vincenzopalazzo @elsirion There's also CARGO_BUILD_JOBS

Ok this should be ready now!

Thx a lot, great job! CI is currently a bit flaky and also broken from the GitHub side.

Just saw that the changes were single fixup commits, could you squash them please?

When I run this I get:
lightningd: Config file /var/folders/19/h_y32l8s1lxfrpxctd1673p00000gn/T/nix-shell.wNptoj/fm-INjH/cln/config line 2: bitcoin-rpcuser=bitcoin: unknown option

Also, I notice that flake.nix is trying to pin the lightningd version to 23.08 but in the terminal I'm seeing:
$ lightningd --version
v23.05

Perhaps this change isn't having the desired effect ...

Yeah, this was something that I was looking into.
We could drop https://github.com/fedimint/fedimint/pull/2960/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0R66-R73 because cln nix package get updated, I will try to drop it and made a rebase now

@dpc could you look into this issue? https://github.com/fedimint/fedimint/pull/2960#issuecomment-1743490693. It doesn't seem like the patch lightningd is actually showing up at all. We expect lightningd --version to say v23.08 but it says v23.05.

When I run just mprocs on this branch I get the following in the cln tab:
lightningd: Config file /var/folders/19/h_y32l8s1lxfrpxctd1673p00000gn/T/nix-shell.wNptoj/fm-INjH/cln/config line 2: bitcoin-rpcuser=bitcoin: unknown option

Also, I notice that flake.nix is trying to pin the lightningd version to 23.08 but in the terminal I'm seeing:
$ lightningd --version
v23.05

Perhaps this change isn't having the desired effect ...

Instead of having it as a separate package, try overwriting the existing one in pkgs. to make sure all clightnings everywhere will be patched.
It could be that where you're trying it is actually using pkgs.clightning and not this variable.

https://github.com/fedimint/fedimint/pull/3336

Thanks, when it is merged https://github.com/fedimint/fedimint/pull/3336#pullrequestreview-1662639160 I will rebase on it

Please @ me in case of issue, or even ping me on Discord.

Rebased now to see what the CI tell us, thanks for the fix

just format it

Last time I tried updating tests were failing. I also remember manmeet pinning cln-rpc because it was introducing backward-incompat changes.
What do we do about it?
I'm closing as it just lags in the PR backlog. If anyone feels like moving it forward, feel free to reopen.


authenticate & authorize

https://docs.nestjs.com/security/authentication
https://docs.nestjs.com/security/authorization#integrating-casl
with roles:
Admin -> Manger + manage connections + usermanagement and change roles
Manager -> can change BSB values
Viewer -> only view
[x] - create basic login page
[] - add e2e tests

[ ] simple login page
[ ] e2e tests

[ ] simple login page
[ ] e2e tests


fix: fixed for the issue (#94)

1. Description

1.1. Checklist

[x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
[x] I have read the Contributor Guide and followed the process outlined for submitting PRs.
[x] I have updated/added tests for ALL new/updated/fixed functionality.
[x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
[x] I have updated/added relevant examples in examples.

1.2. Breaking Change

[ ] Yes, this is a breaking change.
[x] No, this is not a breaking change.

1.3. Related Issues

Hi @alevinetx , thanks for your contribution! :)

bors merge

Codecov Report

Merging #97 (c3832d8) into main (7bc636f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #97   +/-   ##
=======================================
  Coverage   69.41%   69.41%
=======================================
  Files          92       92
  Lines         899      899
=======================================
  Hits          624      624
  Misses        275      275

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@all-contributors please add @alevinetx for code, question, bug


[DOC]: Guidance on Setting DFP Alert Thresholds and Improving Alert Quality

How would you describe the priority of this documentation request
Low (would be nice)
Describe the future/missing documentation
It would be helpful to have some documentation that provides guidance on what to do after training a DFP model. The documentation could include:

Checks to ensure that the training has been set up to yield the best possible results
Insights into how to set thresholds for alerting based on the model's outputs
Possible post-processing steps to prioritize the alerts more effectively

Where have you looked?
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I have searched the open documentation issues and have found no duplicates for this bug report

Some past materials that could be helpful for this documentation:

Training checkups

Are we using enough data for training? For instance, if it takes a month for the baseline behavior to be learned, and we only use a day of data to train, the model may not be able to properly identify anomalies.
Are we overfitting on the training set? It's important to use a validation set during training to obtain a validation loss. (The validation set here means a hold-out set that is not used for training, but used in each epoch to obtain an unbiased loss measurement. This helps to understand how well the model is generalizing to new data and avoid overfitting. This is different from a test set, which contains malicious behavior, used to evaluate the fidelity of the model after it is trained.)
Are we using a validation set to collect loss statistics for z-score calculation? By default, dfencoder uses the train dataset to calculate the loss statistics (mean and standard deviation) for z-score, which can result in a lower standard deviation, leading to higher z-scores. To avoid this, using a validation set can be helpful.
Remember that a validation set can be fed into the fit() function in dfencoder, and it will take care of validation automatically. Don't forget to set arguments run_validation and use_val_for_loss_stats to true to enable this functionality.

Grouping by and setting thresholds:

Tying alerts to a permanent (or semi-permanent) identity can reduce the volume of alerts and help with threat investigation.
The entity used for grouping (e.g. user account, ARN of processes, AWS role, IP) should be stable and exhibit behavior patterns we want to detect deviations from.
To set a threshold:

Collect inference results for the past month (or another suitable timespan that gives low variance).
Group by (entity, date) and find the max/mean/sum anomaly score (z score) for each tuple.
Plot the distribution of alert volume (tuple count) over threshold to see how volume changes.
If there's an ideal volume in mind, choose the threshold that results in that amount.
If there isn't a target volume, look for a steep drop in volume at any threshold and use that as the alerting threshold.

Collecting results from all models and setting a universal threshold is a good starting point:

Using early stopping (a feature provided in dfencoder through the patience model argument) ensures that all models share the same convergence criteria. By further scaling the losses with z-scores, the anomaly score output of each model should be on the same scale and comparable.

If the alerts are dominated by a few models after analysis and we want more coverage for the more stable models (with lower z-loss), we can consider setting individual thresholds for each model.

An automatic way to set thresholds for each model is to set a volume budget for each model and follow the steps above to choose the threshold that will produce the desired volume.

Improving alert quality and post-processing

Once the threshold is defined, we can start analyzing and understanding the set of alerts generated. If there are obvious false positives, we can prioritize alerts by redefining the way the anomaly score is calculated.
Z-score is an unbounded metric, and sometimes taking the mean of the scores can result in extreme values dominating the final anomaly score. We can normalize individual z-scores before averaging them. Here are some ways to normalize them:

Set a maximum z-score cap and linearly map the z-score range from [0, max z-score] to [0, 1] (or any range that makes sense).
To maintain continuity, we can use a tuned sigmoid function to map the range from [0, infinity] to [0, 1]. The sigmoid function can be tuned so that the middle region with a steep slope matches the desired [0, max z-score] range.

After normalization, we can take a mean of the features' z-scores or do a weighted sum. We can tune the weights to reflect the importance of each feature for our specific use case.


feat(storybook): allow local preview of chromatic snapshots

Description
As we expand our Chromatic test coverage leveraging the isChromatic flag, there's a larger need to be able to preview the "kitchen sink" set-up without having to take a snapshot. Enter, the global "Testing preview" setting!
https://github.com/adobe/spectrum-css/assets/1840295/b9ec5c75-38f8-48bf-8335-935e61033118
With the global setting, you can activate "Testing preview" mode and see all storybook stories the way Chromatic will see them. It persists as you navigate through components until you deactivate it in the global toolbar.
Going forward, all use of the isChromatic function should be sourced from window.isChromatic rather than imported manually into each story.
How and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps

Open the storybook for the accordion component:

[ ] Activate the "Testing preview" from the top toolbar as demonstrated in the video above
[ ] Click over to the alert banner, calendar, and status light stories to validate the setting persists; confirm each component is showing the snapshot view
[ ] Toggle the "Testing preview" off (Default mode)
[ ] Confirm that accordion, alert banner, calendar, and status light are now showing their developer mode

Regression testing
Validate:

The documentation pages for at least two other components are still loading, including:

[ ] The pages render correctly, are accessible, and are responsive.

If components have been modified, VRTs have been run on this branch:

[ ] VRTs have been run and looked at.
[ ] Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

To-do list

[x] I have read the contribution guidelines.
[x] I have updated relevant storybook stories and templates.
[ ] I have tested these changes in Windows High Contrast mode.
[x] If my change impacts other components, I have tested to make sure they don't break.
[x] If my change impacts documentation, I have updated the documentation accordingly.
[x] ✨ This pull request is ready to merge. ✨

This is really awesome. I think my only note is: should we change the commit message so that it's a docs rather than a feat? I think the feat will end up minor-bumping all of these packages when we release.

Since it's a storybook feature - wouldn't it only minor bump packages that depend on storybook?  Either way, yes, can do!


Plot updates are slow and are fetching information that is not needed

(video is too large to embed, sorry about that)
https://www.dropbox.com/s/1nhipdskbnzchyn/Screen Recording 2022-10-12 at 2.19.43 PM.mov?dl=0
Two things:

When we start a new experiment it keeps showing old plots for a while. Can we grey out / force remove if we know that update is coming? (need to do some research there, e.g. resume an experiment mode means that we should just continue a line in the same color)
Plots update command takes too much time
Plots update command runs with extra arguments for no reason. When workspace is selected it runs with:

dvc plots diff workspace 7a43153 46bd8b3 9a83545 -o .dvc/tmp/plots --split --json - COMPLETED (100245ms)

where 7a43153, 46bd8b3, 9a83545 the HEAD of the branch and two previous commits.

The last item can be narrowed down to this:
https://github.com/iterative/vscode-dvc/blob/c83e76367f7ea3159acd9adfc5474b33b7269a01/extension/src/plots/model/index.ts#L204-L206
and this PR:
https://github.com/iterative/vscode-dvc/pull/1949/files
One the issue is fixed now.
Btw, using the workspace revision alone gives me an error (I would expect this, since workspace is not an actual Git revision):
plots,diff,workspace,-o,.dvc/tmp/plots,--split,--json failed with ERROR: unknown Git revision 'workspace' retrying...

When we start a new experiment it keeps showing old plots for a while. Can we grey out / force remove if we know that update is coming? (need to do some research there, e.g. resume an experiment mode means that we should just continue a line in the same color)
Plots update command takes too much time

This should all be fixed when we come back around to do errors.

This should all be fixed when we come back around to do errors.

@mattseddon could you clarify please? Not sure how this is related to the errors tbh.

This should all be fixed when we come back around to do errors.

@mattseddon could you clarify please? Not sure how this is related to the errors tbh.

We need to redesign the way that we are interacting with the CLI to get the plots data in order to get errors. When we do this we can start to optimise the code.

I think those things are related, but probably we can reset things on our end also forcefully when new experiments starts in the workspace to mitigate this?

One more complaint by @alex000kim https://www.loom.com/share/9923ce77de6f4d11bc0aca03387ff438 ... I'm experiencing delays usually as well.
Also related with some investigation - https://github.com/iterative/vscode-dvc-demo/pull/7#issuecomment-1315854742

Related to https://github.com/iterative/dvc/issues/8786

Closing this as per https://github.com/iterative/dvc/issues/8786#issuecomment-1474498465


feat: add sqlcommenter comment to mysql2 queries

Which problem is this PR solving?
This PR adds support for inserting sqlcommenter comments in the mysql2 instrumentation the same way #1286 did for pg.
Short description of the changes
The common logic for detecting and writing SQL comments has been extracted to a sql-common package which is now depended on by both the mysql2 and pg instrumentations. I'm not super confident about the way new packages should be created (versioning, dependencies, etc etc) so let me know if anything there needs to be changed.
I'm also planning to also add support to the mysql instrumentation at some point after this is merged, and potentially improve the comment detection logic to reduce false positives.
The new config option essentially works the exact same way as the existing one for pg. It's not enabled for prepared queries for fairly obvious reasons.
I had to change some of the MySQL options used for the local and CI containers to be able to check the comments are successfully added by looking at the log. The CI variant feels a little dirty but GitHub apparently doesn't support passing arguments to service containers so it's the best way I could think of.

Is there anything blocking this PR at the moment given the coverage regressions aren't coming from the patch ?

Yes. there is a conflict in .release-please-manifest.json. Can you take a look at this please?


Change pip install commands with the correct PyPI package name

Modulus Pull Request
Description

Updates the README.md with correct PyPI packages and closes #297
Checklist

[x] I am familiar with the Contributing Guidelines.
[x] New or existing tests cover these changes.
[x] The documentation is up to date with these changes.
[x] The CHANGELOG.md is up to date with these changes.
[x] An issue is linked to this pull request.

Dependencies
None

/blossom-ci

/blossom-ci


Best approach to store image to moor

Everytime when I retrieve data from server, I will delete all the data in local  before store to database.
Future<List<ABC>> getList() async {
    Response response;
    var list = List<ABC>();
    var imageList = List<ImageABC>();
    try {
      response = await _service.getList(authToken);
      var abcResponse = ABCResponse.fromJson(response.body);

      print('=== Delete all before store to database ===');
      await _dao.deleteAllList();
      await _dao.deleteAllImages();

      for (var i in abcResponse.list_data) {     // store data to Table data
        list.add(ABCData(
          .......));

        var response = await http.get(i.image.url);
        String path = base64.encode(response.bodyBytes);    // convert url to base64

        imageList
            .add(ImageData(....));    // store base64 to Image table
     }
      await _dao.batch((b) {
        b.insertAll(_dao.list, list);
        b.insertAll(_dao.image, imageList);
      });

      list = await _dao.getList();
      return list;
    } catch (e) {
               .......
    }
  }

The server will return a json, where there is a url in json element. I will convert the image url
to base64 so I can view it when there has no network connection, but the problem is it takes time to store the image to database.

I don't recommend storing the image in a database if you're fetching it from a server. I recommend saving the url in the database and using something like https://pub.dev/packages/cached_network_image to cache the image for you for offline use.

@North101
thanks, but what if I want to display a file image path as below ?
/data/user/0/com.xxx/cache/image_picker3680473140637486255.jpg

thanks, but what if I want to display a file image path as below,I cannot use this plugin ?

If you store the image url in the database, you could also store file:// uris in there. I'm not sure if cached_network_image picks that up automatically - if not, you could use something like
if (uri.scheme == 'file') {
  return FileImage(File(uri.path));
} else {
  return CachedNetworkImage(imageUrl: uri.toString());
}

Thank guys, work like a charm.


Mostly cleaning up W_MarkerMode

AJ,
I removed those autosave file and this is what I hope to be the final clean up of the Marker widget.
In the future I want to create separate branches for different issues that I am working on - e.g. one for makers and one to fix bugs.  Unfortunately, this branch is all mixed up in that regard.
The most important thing to apply your mind to are the changes at line 380 of InterfaceHub.pde. Those are the changes relating to the duplicate sdCardStart(sdSetting).  These changes resolved many of the issues with the SD card and the board freezing for me.  I cannot see how sending multiple sdCardStart(sdSetting) would adversely impact the board but it seemed to.  (Is the Electron Hub possibly 'stateful' in a way that gets messed up by multiple sdCardStart(sdSetting) commands?)
If you can pull what you feel valuable from this into your development branch then I can close this branch down.

BTW what causes this " //<>//"  in the files?

Hey so i think a big problem you are having is not merging in code correctly. If you look at my development branch, most of the code changes you have made have already been resolved. For example sdCardStart is called one time, but when you merged in the code, it looked as if sdCardStart was called twice and caused you a bunch of problems.

I tried to resolve these conflicts but idk why it's not working

To help me understand ....
The sdCardStart  was originally at position A
I forked the code with sdCardStart in A
You changed  sdCardStart to position B
I merged you new code which brought the code into position B while it was
already in position A?
This would also explain the other things (like changing your W_Digitalxxx
files) you were frustrated about when I was pretty sure I did no such thing.
So, how do I fix it?
Was the problem that I started with OpenBCI/OpenBCI_GUI/development?
Sounds like I should start with aj-ptw/OpenBCI_GUI/development?
Thanks for helping me here........
On Fri, Nov 3, 2017 at 11:43 AM, AJ Keller<EMAIL_ADDRESS>wrote:

Merged #11 https://github.com/aj-ptw/OpenBCI_GUI/pull/11.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/aj-ptw/OpenBCI_GUI/pull/11#event-1325126304, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AOSh_6dSHQC8J2d578GWIDtvUi2ogdbiks5syzSmgaJpZM4QRJxS
.

So, I deleted my features/UDPmarkers branch
To get the latest, must I

fork your aj-ptw/OpenBCI_GUI/development
try to merge (pull) your  aj-ptw/OpenBCI_GUI/development into
gerrievanzyl/OpenBCI/development
something else?

On Fri, Nov 3, 2017 at 2:43 PM, Gerrie van Zyl<EMAIL_ADDRESS>wrote:

To help me understand ....
The sdCardStart  was originally at position A
I forked the code with sdCardStart in A
You changed  sdCardStart to position B
I merged you new code which brought the code into position B while it was
already in position A?
This would also explain the other things (like changing your W_Digitalxxx
files) you were frustrated about when I was pretty sure I did no such thing.
So, how do I fix it?
Was the problem that I started with OpenBCI/OpenBCI_GUI/development?
Sounds like I should start with aj-ptw/OpenBCI_GUI/development?
Thanks for helping me here........
On Fri, Nov 3, 2017 at 11:43 AM, AJ Keller<EMAIL_ADDRESS>wrote:

Merged #11 https://github.com/aj-ptw/OpenBCI_GUI/pull/11.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/aj-ptw/OpenBCI_GUI/pull/11#event-1325126304, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AOSh_6dSHQC8J2d578GWIDtvUi2ogdbiks5syzSmgaJpZM4QRJxS
.

The sdCardStart  was originally at position A
I forked the code with sdCardStart in A

You changed the code of sdCardStart in A

You changed  sdCardStart to position B
I removed A and added B

I merged you new code which brought the code into position B while it was
already in position A?

Yes!

So, how do I fix it?

I will generally commit the files I want, and then if i need to merge in code that may mess up the code i have that's not committed, I will stash the changes, which cleans the stray code, then i do a pull of the changes which I will resolve any merge conflicts at that point. Let me know which part of this is confusing and I can talk more about it.


Create new function StartAsync and point to an existing one

This is a simple one, create a new function called StartAsync and point to StartWithoutWait
https://github.com/celestiaorg/knuu/blob/main/pkg/knuu/instance.go#L972
We will deprecate StartWithoutWait in the newer versions.

func StartAsync(){
    StartWithoutWait()
}

Like this?


New fusion recipe

Updated fusion recipe for AIOps 4.6 release

Will be replaced by https://github.com/IBM/cp4waiops-samples/pull/246


Bootsrap not executing

On php artisan serve, the application runs without bootsrap

Same problem here.

Thanks for reporting. This should be fixed.


deposit form: double subjects label

double subjects label

Fixed in https://github.com/inveniosoftware/invenio-app-rdm/pull/925


Change event not working on ngx-select2

I am working with this component and need the select2 for populating another select2 i need change value event
<l-select2
                                        formControlName="data"
                                        [data]="data"
                                        [options]="{placeholder: 'Select something','val':0}"
                                        [disabled]="false"
                                        (valueChanged)="getAnotherData($event)"
                                        >

                                        </l-select2>

but
(valueChanged) and (change) event is not working
please help to resovle the issue i tiried but not resolving

Try this (ngModelChange)="getAnotherData($event)"

I have added valueChange on version 0.2.0. And it's support angular6. Please try this.
https://stackblitz.com/edit/angular-3oqqmt?file=src%2Fapp%2Fapp.component.ts