fix: Prevent memory leak in FlameBlocListenable when adoption

Description
FlameBlocListenable has a memory leak between adoptions because the subscription didn't cancel.
Added canceling the StreamSubscription within the lifecycle: onMount.
Checklist

[x] I have followed the Contributor Guide when preparing my PR.
[ ] I have updated/added tests for ALL new/updated/fixed functionality.
[ ] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
[ ] I have updated/added relevant examples in examples or docs.

Breaking Change?

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

Related Issues

Hey, thanks for the PR!
Just wanted to understand this better, wdym about adoptions?
It would also help understanding the leak if you could add a test case?

Hey @erickzanardo,
I added the test code that only shows the subscription is changed.
I wish I could write a test code that StreamSubscription is canceled when _subscription.cancel() is called but the cancel() could only be caught by StreamController.onDone() and also, FlameBlocListenable._subscription is originally from the BlocBase._StateController which is private. So we cannot catch the subscription canceled directly.
The only one I can show temporally is the code snippet I wrote in the test code which indicates the subscription is changed while adoption(parent changed) and the previous one can be dangling if there is no cancel() call.
Initially, I thought this PR is very simple because the following two are known things

onMount() can be called multiple times
StreamSubscription would make a memory leak if cancel() is omitted

@Hwan-seok If my pr for dispose gets merged, there is a new event that can be hooked into for this as well. I have been looking at the bloc listeners that are not closing like they are supposed to and I figure if they are closing in dispose it may finally function correctly.

@spydon
Sorry for the late response.
The _subscription?.cancel(); in the onMount is definitely still needed because onMount executes multiple times.
But I will close this issue due to this PR cannot provide a way to test if it actually works because the bloc library doesn't provide some method for it.

Short review of this PR:

Current behavior:
1. First mount of the `FlameBlocListenable`, `StreamSubscription` is created within the `onMount`, and let's tag this subscription as (A).
2. Change the parent of the `FlameBlocListenable` => without canceling the (A), another `StreamSubscription` (B) is created as same as before within the `onMount`.

Here comes what I was trying to do.
- So I am adding `StreamSubscription(A).cancel` before creating (B).

Is cancel a no-op if it has already been cancelled?

As far as I know, Yes. You can see that at:
https://github.com/dart-lang/sdk/blob/8493e98bc42444af10cef30fe128b7bf2c3f9ea3/sdk/lib/async/stream_impl.dart#L192

Is it not possible to see if a subscription has been canceled?

We can see whether the subscription has been canceled or not from only StreamController.onCancel but unfortunately StreamController in the bloc library is private.

Maybe the subscription could be mocked to add a check for that in the test?
I am not sure... I still lack so much. do you have an idea?


REST service to create new Rasa forms

AS AN Architect
I WANT to have a REST service to create new Rasa forms
SO THAT there wouldn't be duplicate services for it
Acceptance Criteria

Temporary list of endpoints - https://github.com/buerokratt/Buerokratt-onboarding/issues/8
Proto to add new Rasa forms

[ ] Use POST endpoint /rasa/forms/add to create a new form
[ ] ~All form names in domain.yml must end with _form - apply automatically, if not provided in the input~
[ ] Apply changes on Rasa domain.yml

Example output
forms:
  restaurant_form:
    ignored_intents:
    - chitchat
    required_slots:
        - cuisine
        - num_people

https://rasa.com/docs/rasa/forms/#defining-a-form
entities:
- cuisine
- number
slots:
  cuisine:
    type: text
    mappings:
    - type: from_entity
      entity: cuisine
  num_people:
    type: any
    mappings:
    - type: from_entity
      entity: number
forms:
  restaurant_form:
    ignored_intents:
    - chitchat
    required_slots:
        - cuisine
        - num_people

sample input to /rasa/forms/add
{
  "form_name": "custom_fallback_form",
  "form": {
    "custom_fallback_form": {
      "required_slots": [
        "affirm_deny"
      ]
    }
  }
}

@janyprus please link this issue with an appropriate pull request.

Pull request #165

Pull request with new changes.

Seems to work as intended.


Divide Two Integers

The integer division should truncate toward zero, which means losing its fractional part. For example, 8.345 would be truncated to 8, and -2.7335 would be truncated to -2.
Return the quotient after dividing dividend by divisor.
Example 1:
Input: dividend = 10, divisor = 3
Output: 3
Explanation: 10/3 = 3.33333.. which is truncated to 3.
Example 2:
Input: dividend = 7, divisor = -3
Output: -2
Explanation: 7/-3 = -2.33333.. which is truncated to -2.

i would like to take up this problem
uit2022855


Feature Request: Disabled by Default?

I'm using copilot.lua and copilot-cmp.lua and find the workflow great, but prefer to start my sessions with copilot disabled, then enable it when desired/needed. Could there be an option added to change the initialized state from enabled to disabled?

Try:
return {
  {
    "zbirenbaum/copilot.lua",
    opts = {
      filetypes = {
        ["."] = false,
      },
    },
  },
}

Unfortunately, does not seem to change the behavior @nounderline.

+1 to this. I expected the enabled option in setup to do this, but it doesn't and if I turn off all filetypes with ["*"] = false, I can't manually enable it with Copilot enable. I get [Copilot] 'filetype' python rejected by config filetypes[*].
I can enable it using Copilot! attach, but I don't know if always using that command is a good idea.

I agree that an option like that is needed, copilot is for many people something that should be opt in and not opt out, using Copilot! attach is problematic because you might want to use it for a session or whatever and not have to do it for each buffer.
A workaround is just to have vim.cmd [[Copilot disable]] in init.lua, which i do since I rarely use copilot, but it unnecessarily load the plugin.

+1
It would be great to have a way for disabling copilot by default. I share my neovim between different devices with and without copilot access. Thus it pops up on every completion request to login to copilot, which initially let me drop the plugin.


v2.0.1

Codecov Report
Base: 69.58% // Head: 69.58% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (ef81bb2) compared to base (2f4811e).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1397   +/-   ##
=======================================
  Coverage   69.58%   69.58%
=======================================
  Files         195      195
  Lines        4843     4847    +4
  Branches     1009     1010    +1
=======================================
+ Hits         3370     3373    +3
- Misses       1445     1446    +1
  Partials       28       28

Impacted Files
Coverage Δ

src/terminal/sagas.ts
92.85% <83.33%> (-1.88%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Multiple materialized views on the same target distributed_table with a config possible?

Is your feature request related to a problem? Please describe.
When I defiend materialized_view like below,
{{ config(
       materialized='materialized_view',
       order_by=['stock_code', 'second'],
       sharding_key='cityHash64(stock_code)',
       engine='ReplicatedAggregatingMergeTree()',
       settings = { 'index_granularity': 8192, 'allow_nullable_key': 1 },
       ttl='toDateTime(second) + toIntervalHour(1)'
}}

SELECT
    stock_code,
    toStartOfSecond(__ts_ms) AS second,
    countState(*) AS pv
FROM {{ source("mydb", "stocks") }}
GROUP BY
    stock_code,
    second

I understood it created agg_pv table and agg_pv_mv view and I can query like below
SELECT stock_code, countMerge(pv) FROM analytics_dbt_dev.agg_pv GROUP BY 1 ORDER BY 2 desc

but I'd like to do more:

I'd like to create target materialized table as distributed table. If it worked, agg_pv, agg_pv_local would be created.
Related issue is https://github.com/ClickHouse/dbt-clickhouse/issues/302 and it closed as completed, but I can't fully understand how the answer work:

{{ config(materialized='view') }}

SELECT *
FROM clusterAllReplicas('cluster_name', {{ ref('local_table') }}) SETTINGS final = 1

Moreover, official docs said, it's kinda inefficient..

Using the cluster and clusterAllReplicas table functions are less efficient than creating a Distributed table because in this case, the server connection is re-established for every request. When processing a large number of queries, please always create the Distributed table ahead of time, and do not use the cluster and clusterAllReplicas table functions.

I wonder whether I can implement it with one model sql file with config first, but if can't, I'd like to know any other ways as well.

I'd like to set two materialized views, from differenet source, and targeting on the same table like below:

A --> target_t_mv --> target_t (distributed)
B --> target_t_mv --> target_t (distributed)

I wonder whether I can do this with config. If can't, I'd like to know any other ways as well.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

AFAIK there isn't a way to do this in dbt-clickhouse yet -- I was thinking that one solution could be to add some kind of flag in the config like create_target_table, so that only one of the MVs will create the target table
Other relevant issue: https://github.com/ClickHouse/dbt-clickhouse/issues/280

I was exploring this today, I've come up with a proposal which I think is fairly easy to implement. I will hopefully make a PR tomorrow to deomnstrate it clearly. I would appreciate your thoughts on this idea.


Improve the structure of the API docs

The current API docs are essentially just a sphinx-autogen dump with a bit of manual cleanup to address misfires like including the entire str, Sequence, Mapping, and dict APIs on types that implement those interfaces.
As parts of the API stabilise, their documentation should move away from relying on autosummary and towards regular toctree directives.
Public functions that are missing docstrings should have them added.
The TypedDict metadata is also incorrect (the mapping fields are listed as attributes, which is technically true of the class definition, but not true of the objects that a typechecker will classify as providing that interface).
Finally, while the one-page-per-entity layout is apparently more search-engine friendly, it makes it hard to see how the various interfaces relate to each other, so it's likely worth pushing at least the module level functions and the basic type definitions up to the relevant module pages.

As part of this, the docstrings should be reformatted to use a fully supported docstring syntax.
The default option is https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html, but that's pretty boilerplate heavy.
So instead, I'm leaning towards enabling the https://sphinxcontrib-napoleon.readthedocs.io/en/latest/index.html and using Google-style docstrings: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html#example-google (that's an aesthetic preference, as I genuinely don't like the way the NumPy syntax looks when reading code)
This will mean turning on the ruff lint settings to expect docstrings to be in Google format (see https://docs.astral.sh/ruff/settings/#lint_select and https://docs.astral.sh/ruff/settings/#lintpydocstyle )


use pinceau vite plugin theme must be passed through .vite/pinceau/flat.ts

When we use pinceau as the initialization condition, the variable values set without the theme computeStyles and variantStyle will be undefined
When we use it this way
app.use(Pinceau)

If we were to build a library based on pinceau, we might need to export flat.ts, but the code would duplicate the generated css style

Hey @SGAMERyu ; could you provide how would you see that differently implemented/acessible?

Hey @SGAMERyu ; could you provide how would you see that differently implemented/acessible?

I initially thought that app.use(pinceau, {theme}) would be similar to the way the current community ui component library is implemented  to extend or override design tokens in the default theme
example for nextui and mantine
https://nextui.org/docs/theme/customize-theme
https://mantine.dev/theming/mantine-provider/
But actually when I looked at the code
export function resolveReferences(property: string, value: string, $tokens: TokensFunction) {
  if (!(typeof value === 'string')) { return value }

  value = value.replace(
    referencesRegex,
    (...parts) => {
      const [, tokenPath] = parts

      const token = $tokens(tokenPath, { key: undefined }) as DesignToken

      const tokenValue = typeof token === 'string' ? token : token?.attributes?.variable || token?.value || token?.original?.value

      if (!tokenValue) { return '' }

      return tokenValue
    },
  )

  return value
}

When we use computedStyle and variant features, we need to pass in the theme object, otherwise it won't find the theme object.
When we used pinceau to build the ui component library, users might not pass in their own design tokens when using it, or they might just change a few token styles
Can we add a fallback that converts tokenValue to var mode instead of an empty string when no theme object is passed in
for example
     if (!tokenValue) { return var(--color-primary-500) }

Hey @SGAMERyu ;
That change (forcing the import and not allowing theme as option) has been reverted for 0.8.0.
I'm planning to publish that version tomorrow.

flat.ts does not exist anymore, very old issue but feel free to re-open if needed! 😄


build(rollup): Use rollup to build target formats

Added a new Rollup configuration file to manage building the source code into target module formats: ES, CommonJS & UMD. The package.json points to the different target formats. As part of the work, decided to also refactor compose to not have any third-party dependencies to lighten the bundle size. Also added tests to ensure that we're not passing along the composite event to the underlying component.

Coverage decreased (-1.08%) to 98.925% when pulling 5516a1f99016724c4cd78d497891c71527d8944e on implement-build-targets into dca1d8b9d126c31eadecc8b07aea14e2fafc48f7 on master.

Coverage decreased (-1.08%) to 98.925% when pulling 5516a1f99016724c4cd78d497891c71527d8944e on implement-build-targets into dca1d8b9d126c31eadecc8b07aea14e2fafc48f7 on master.

Coverage decreased (-1.08%) to 98.925% when pulling 5516a1f99016724c4cd78d497891c71527d8944e on implement-build-targets into dca1d8b9d126c31eadecc8b07aea14e2fafc48f7 on master.

Coverage remained the same at 100.0% when pulling 848e2c4f5063a3480f23a683480522bd9df2b60b on implement-build-targets into dca1d8b9d126c31eadecc8b07aea14e2fafc48f7 on master.


Error during inference

Hi,
Thanks for making the code of this awesome work public.
I faced this error when running
python nn/evaluation_scripts/on_test_set.py -st models/baseline/lstm_stitch_tags.yaml

Can you suggest me how to solve this. Thanks in advance

Hi @sauradip
Thank you for your interest in our work! Sorry for the late reply
The errors you see look like errors in the dataset -- the script can not find expected paths. Have downloaded the dataset and set up the paths in system.json correctly?
The path to the data in system.json should point to a root folder with per-garment-type subfolders

Thanks for the response. Also want to know if the garment pattern mask can be generated from the annotation sequence ?

I'm not quite sure what you mean by pattern mask and annotation sequence in this context. The dataset has a number of annotations, including segmentation masks that indicate parts of geometry corresponding to the individual panels (2D pieces of "fabric") of sewing patterns
The models only output the sewing patterns, but not the segmentation mask

Thanks for the response, it really helped me solve the doubts. A follow-up question to this , you have shown the unseen garment types inference in Table 1. I am curious to know if my understanding is correct -- I only have (1) Pointcloud of useen garment type (2) I know that the unseen garment type produces a few among the 23 patterns let say. If so then do i know any additional hint about the unseen garment type ? It is a bit complicated to understand this from the code so asking it for better clarity.

A point cloud is the only input that the network is given, for both seen and unseen garment types. Unseen garment types just fall into a design distribution outside of the training data. For the evaluation on unseen types, we use the garments from the "test" folder of our dataset (https://zenodo.org/record/5267549#.Yxr-g3Yza5d). You can find more details and examples of how the unseen garments were constructed in our dataset paper

Thanks for the response. It helped a lot. I also had another query regarding the panel classes.
Why is "top_front_right" merged in "top_right" class in https://github.com/maria-korosteleva/Garment-Pattern-Estimation/blob/master/nn/data_configs/panel_classes_condenced.json whereas https://github.com/maria-korosteleva/Garment-Pattern-Estimation/blob/master/nn/data_configs/panel_classes_plus_one.json has 24 classes. I saw in the implementation condensed.json is used. Any reason ?

Yes, there is: we experimented with different options for class grouping.
Please, refer to our paper, Section 7.5.1 for more details. The
condensed version was showing better performance.
пн, 17 окт. 2022 г. в 10:16, Sauradip Nag @.***>:

Thanks for the response. It helped a lot. I also had another query
regarding the panel classes.
Why is "top_front_right" merged in "top_right" class in
https://github.com/maria-korosteleva/Garment-Pattern-Estimation/blob/master/nn/data_configs/panel_classes_condenced.json
whereas
https://github.com/maria-korosteleva/Garment-Pattern-Estimation/blob/master/nn/data_configs/panel_classes_plus_one.json
has 24 classes. I saw in the implementation condensed.json is used. Any
reason ?
—
Reply to this email directly, view it on GitHub
https://github.com/maria-korosteleva/Garment-Pattern-Estimation/issues/1#issuecomment-1280463852,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABUFLA5PHXHQCRY4WOS24S3WDUDMNANCNFSM56JVWJQQ
.
You are receiving this because you commented.Message ID:
@.***
com>


ADO Extension: PR comments are missing 2 cases

We've identified the 2 following cases that are poorly represented in the PR comments that are created by ADO extension version 1.1.1:
Scenario 1: PR corrects some (but not all) violations
This occurs when:

A baseline file exists
The PR addresses some (but not all) of the violations in the baseline
No new violations are introduced

The current code generates the "no new failures" PR message, which makes no mention of changes or updating the baseline file. A more appropriate PR comment would include verbiage about updating the baseline file, as well as a summary of what violations have been removed. These comments should help the PR author understand if the actual results of the PR match the anticipated results of the PR.
Scenario 2: PR modifies some violations without fixing them
This occurs when:

A baseline file exists
The PR includes a change that removes some existing violations but creates new ones. Since violations are specific to both the URL and HTML, this could happen if the HTML around a violation changes or if a page containing violations gets a different URL.

The current code generates the "new failures found" PR message, with no comment about the comments that have been fixed. It tells the user to update the PR, but makes no mention of the violations that no longer exist.

Confirmed fixed in Canary build 0.1.121


Add emkrum's file

I am requesting these changes
git commit

this comment is for describing the pull request and should be populated

commenting here

complete!


feat(model): make Id<T> invariant for T

Keeps Id<T> Send & Sync when T: !Send & T: !Sync.

Requires Rust 1.61. Marking as draft until the MSRV is bumped.

I'm just curious, why did this require 1.61?

Required for const


Cannot get Async transcription result

Hello,
i'm using speech sdk 1.8.0 java for Windows in eclipes and have config pom.xml as required in this article.  Region is eastasia and locale is zh-cn.
But i always met below err when creating a remote Conversation Transcription client.  What else config did i miss ?
Thanks.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Poll response status : FAILED
Poll response status : null

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

ID: 160b2cf3-d4c4-8033-d01f-c9e35df389cc
Version Independent ID: bee5bbbe-9371-3a51-bbfc-4ad739865157
Content: Asynchronous Conversation Transcription (Preview) - Speech Service - Azure Cognitive Services
Content Source: articles/cognitive-services/Speech-Service/how-to-async-conversation-transcription.md
Service: cognitive-services
Sub-service: speech-service
GitHub Login: @markamos
Microsoft Alias: amishu

@wukun2015
Thanks for the feedback! We are currently investigating and will update you shortly.

Any update, please ?
Audio upload client can receive the transcription correctly in real-time, but with the same conversationID from audio upload client, the remote conversation client keeps receiving "Poll response status : FAILED" and "Poll response status : null".
btw:
By adding below dependencies, SLF4J err msg has gone.

org.slf4j
slf4j-nop
1.7.29

@wukun2015 Sorry for the delay. Are you still suffering from "Poll response status : FAILED" and "Poll response status : null" ? Or all the issues have gone? If you still have this issue, I would suggest you to open a support ticket for live trouble shooting since this forum is only for documentations. If you don't have any support plan, please let me know. Thanks.

All the support i received was here and not aware of the supporting mode you mentioned.
Where to raise ticket and what is the support plan ?

@wukun2015 Hi, you can open a support ticket by https://ms.portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest if you have a support plan. If you can not do it since you have no support plan, please send us an email at<EMAIL_ADDRESS>with your Azure subscription ID and URL of this thread. Thank.
I will close this for now. We will now proceed to close this thread. If there are further questions regarding this matter, please respond here and @YutongTie-MSFT and we will gladly continue the discussion.


cli setup improvements

cli: using fs::create_dir_all in create_migrations_directory
To recursively create a directory and all of its parent components if they are missing.

cli: writing the custom migration dir to the config file

@weiznich if you need me to rebase, just let me know

@weiznich I just found the reason for test errors: tests on windows are receiving an absolute path as migrations_dir and they crash on windows for that reason.
With this workaround I managed to solve the problem for tests, but a cleaner solution would be to pass a relative path when testing.
Any idea?

As this might also be a potential problem if someone passes an absolute path manually to the CI, I would prefer an solution that just converts the path to an path relative to the diesel.toml file instead. Maybe just call Path::strip_prefix?

Let's try with another solution, the problem could be that the string wrote in the .toml file must be escaped and I'm not doing that.
I'm trying with
        let migrations_dir_toml_string = format!(
            "dir = \"{}\"",
            migrations_dir.display().to_string().replace('\\', "\\\\")
        );

Workflow here: https://github.com/dennybiasiolli/diesel/actions/runs/8005969731
Fingers crossed!

Ok now it works! https://github.com/dennybiasiolli/diesel/actions/runs/8007224538
Let me use the same fix in this branch

"STDERR: Failed to execute a database query: Identifier name 'diesel_setup_writes_migration_dir_by_arg_to_config_file_escaping_windows_paths' is too long"
This should be an easy fix 😰

The only failing check error now is this one:
MBERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.31-winx64.zip'. Exception calling "Read" with "3" argument(s): "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
I think it shouldn't be. problem, but feel free to re-run the workflow just to be 100% sure 😉


Handle Argo CD Component Upgrades

The operator should support the ability to upgrade one or more of the components that make up an Argo CD cluster. For example, upgrade the version of Redis server. Currently, the version can be set on the ArgoCD CR but the operator does not support changing this value after the cluster has been deployed. Ideally, the operator would notice the version change and update the component.

This has been merged into master and will go out in the next release.


ExtentITestListenerClassAdapter throws error

I have added ExtentITestListenerClassAdapter listener (below line) to my testng-xml suite file and when i ran got error (last line)
listener class-name="com.aventstack.extentreports.adapter.listener.ExtentITestListenerClassAdapter"
i just added extentreports-testng-adapter dependency to pom file and placed both extent.properties and config.xm file in src/test/resources folder, am i missing anything ?
**Error : Listener com.aventstack.extentreports.adapter.listener.ExtentITestListenerClassAdapter was not found in project's classpath**

@sseenivasan89 Can you create a small repo and share?  There is an example here which you can refer to as well.

Hi Sir,
i was able to get report when i run test from class file since i used @Listeners in class file, but if i add @Listeners in testng.xml file and try to run, getting below error and here is the repo which i tried
Error : Listener Extent.Adapter.ExtentIReporterSuiteClassAdapter was not found in project's classpath

Thanks for pointing this one out,  I was able to reproduce and the path to the listener was invalid.  You can use any one of below (with the correct package name):
<listeners>
  <listener class-name="com.aventstack.extentreports.testng.listener.ExtentITestListenerClassAdapter" />
</listeners>

<listeners>
  <listener class-name="com.aventstack.extentreports.testng.listener.ExtentITestListenerAdapter" />
</listeners>

<listeners>
  <listener class-name="com.aventstack.extentreports.testng.listener.ExtentIReporterSuiteClassListenerAdapter" />
</listeners>

<listeners>
  <listener class-name="com.aventstack.extentreports.testng.listener.ExtentIReporterSuiteListenerAdapter" />
</listeners>

Thanks @anshooarora sir now i able to run successfully 👍


Bump version of stdweb-derive

The latest version of stdweb (0.4.9) requires stdweb-derive 0.5.0 or it creates build errors.

Thanks for the PR! Seems to be producing a ton of errors on travis though! 🤔

Huh, that it does. I thought it would actually fix those errors, which are happening on my project as well. I did notice that both 0.4 and 0.5 of stdweb-derive were compiled, which was the issue I was trying to fix.

Seems like that did it!

Ack yes! Sorry. Done in #465 - let me know if you have any other issues!

In future there's a patch part of the manifest format that can help you out between releases, but please continue to bug either me or @Diggsey for a release if it is needed! Can be easy for us to drop the ball sometimes. 😰

Thanks! 👍


Nested Conditional Properties for Local file references not working in python-jsonschema

My base.schema.json looks like below
{"$schema": "http://json-schema.org/draft-07/schema#" }
My defination.schema.json looks like below
{
  "$id": "defination.schema.json",
  "type": "object",
  "properties": {
    "remote_os": {
      "default": "Linux",
      "enum": [
        "Linux",
        "Windows"
      ]
    }
  },
  "required": [
    "remote_os"
  ]
}

Now referenced the definition in update.schema.json
{
  "$id": "update.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema",
  "if": {
    "type": "object",
    "required": [
      "common_data"
    ],
    "properties": {
      "common_data": {
        "$ref": "defination.schema.json",
        "properties": {
          "remote_os": {
            "const": "Linux"
          }
        }
      }
    }
  },
  "then": {
    "type": "object",
    "properties": {
      "dup_file": {
        "type": "string",
        "pattern": "^(.*.)(bin)$"
      }
    }
  },
  "else": {
    "type": "object",
    "properties": {
      "dup_file": {
        "type": "string",
        "pattern": "^(.*.)(exe)$"
      }
    }
  }
}

Basically added condition in JSON schema if {"common_data":{"remote_os":"Windows"}} then "dup_file" name should ended up with ".exe" else ".bin"
Now my RefResolver and Validator script is
from jsonschema import RefResolver
from jsonschema.validators import validator_for
from tests.automation.io.helpers.loader import load_schema

base = load_schema('base.schema.json') # {"$schema": "http://json-schema.org/draft-07/schema#" }
definitions = load_schema('defination.schema.json') # https://jsonschema.dev/s/FZDbO
schema = load_schema('update.schema.json') # https://jsonschema.dev/s/lvLFa

schema_store = {
  base.get('$id','base.schema.json') : base,
  definitions.get('$id','defination.schema.json') : definitions,
  schema.get('$id','update.schema.json') : schema,
}

resolver = RefResolver.from_schema(base, store=schema_store)
Validator = validator_for(base)
validator = Validator(schema, resolver=resolver)

data = {
    "common_data": {
        "remote_os": "Windows"
    },
    "dup_file": "ad7a.exe"
}
validator.validate(data)

Getting error : jsonschema.exceptions.ValidationError: 'ad7a.exe' does not match '^(.*.)(bin)$' ,which is wrong
Same thing I have tested https://json-schema.hyperjump.io/ it working perfectly fine , suspecting some issue with python-jsonschema only. Any help on this highly appreciated .

Hi there. Please share a self contained (ideally simplified) version that exhibits your issue.

@Julian I have updated the description and tried to simplify and self contain the issue.  Please let me know what you think of the issue.  I am trying something similar to https://jsonschema.dev/s/CEwMw but with local file references

Thanks, that's better, but in general a minimal example should be some small number of lines I can simply copy paste to run. In your example for instance, I can see quickly you're using some private helper load_schema. As another example of minimizing, does your issue still happen if you get rid of base schema? I suspect it does. So minimizing all the extra stuff is also a good way to get to the bottom of it.
If this is as far as you can go though I may at some point have some time to minimize it and diagnose.
It'd also be helpful for you to elaborate on why you think something's wrong -- I see your error says 'ad7a.exe' does not match '^(.*.)(bin)$' -- that string indeed does not match that regex (just try re.search('^(.*.)(bin)$', 'ad7a.exe')), so yeah saying something about why that's unexpected will also help.

@Julian I have figured out the issue
In my  update.schema.json below schema looks like not working
"properties": {
      "common_data": {
        "$ref": "defination.schema.json",
        "properties": {
          "remote_os": {
            "const": "Linux"
          }
        }
      }
    }

$ref if I include under "properties" then its working.
"properties": {
      "common_data": {
        "properties": {
          "$ref": "defination.schema.json",
          "remote_os": {
            "const": "Linux"
          }
        }
      }
     }

Not sure https://json-schema.hyperjump.io/ didn't complain about both .
But I see one more issue if add any other required filed in either of defination.schema.json or update.schema.json and don't add it to the validation data, it throws same error : jsonschema.exceptions.ValidationError: 'ad7a.exe' does not match '^(.*.)(bin)$' ,which is wrong. It should be different validation error message .

Thanks, that's better, but in general a minimal example should be some small number of lines I can simply copy paste to run. In your example for instance, I can see quickly you're using some private helper load_schema. As another example of minimizing, does your issue still happen if you get rid of base schema? I suspect it does. So minimizing all the extra stuff is also a good way to get to the bottom of it.
If this is as far as you can go though I may at some point have some time to minimize it and diagnose.
It'd also be helpful for you to elaborate on why you think something's wrong -- I see your error says 'ad7a.exe' does not match '^(.*.)(bin)$' -- that string indeed does not match that regex (just try re.search('^(.*.)(bin)$', 'ad7a.exe')), so yeah saying something about why that's unexpected will also help.

@Julian I have updated the issue description to make it more generic and explanation of 'ad7a.exe' does not match '^(.*.)(bin)$'  why wrong.

Thanks, that's better, but in general a minimal example should be some small number of lines I can simply copy paste to run. In your example for instance, I can see quickly you're using some private helper load_schema. As another example of minimizing, does your issue still happen if you get rid of base schema? I suspect it does. So minimizing all the extra stuff is also a good way to get to the bottom of it.
If this is as far as you can go though I may at some point have some time to minimize it and diagnose.
It'd also be helpful for you to elaborate on why you think something's wrong -- I see your error says 'ad7a.exe' does not match '^(.*.)(bin)$' -- that string indeed does not match that regex (just try re.search('^(.*.)(bin)$', 'ad7a.exe')), so yeah saying something about why that's unexpected will also help.

@Julian  I have made it more generic now and elaborated 'ad7a.exe' does not match '^(.*.)(bin)$' why wrong .

Thanks, for the future, here's an example of what a more minimal bug report looks like, which is super helpful to maintainers (and this isn't even fully minimal, but by the time I minimized to this point I see what your issue is):
from jsonschema import RefResolver
from jsonschema.validators import Draft7Validator

schema_store = {
  'defination.schema.json' : {
    "properties": {"remote_os": {"enum": ["Linux", "Windows"]}},
  },
  'update.schema.json' : {
  "if": {
    "properties": {
      "common_data": {
        "$ref": "defination.schema.json",
        "properties": {"remote_os": {"const": "Linux"}}
      }
    }
  },
  "then": {"properties": {"dup_file": {"pattern": "^(.*.)(bin)$"}}},
  "else": {"properties": {"dup_file": {"pattern": "^(.*.)(exe)$"}}}},
}

resolver = RefResolver.from_schema(
    schema_store["update.schema.json"], store=schema_store,
)
validator = Draft7Validator(schema_store["update.schema.json"], resolver=resolver)

data = {"common_data": {"remote_os": "Windows"}, "dup_file": "ad7a.exe"}
validator.validate(data)

Note that someone else (i.e. me) can copy paste that into a file and run it with no further work.
That being said, your issue is your use of $ref alongside remote_os in the update.schema.json file -- in the draft you're using, $ref causes all other keywords used alongside it to be ignored. The first draft that changed that was draft2019-09, so if some other validator you used has different behavior for your schema, it sounds like it has a bug perhaps.
The normal way to do this in previous drafts is to use allOf.


Add support for Huawei AppGallery

Thanks for the package, very useful.
can you please add support for Huawei Appgallary, as you know the new Huawei's phones are still on android but dose not have google play store, only appgallary is available.
It would be good if the plugin will check if google play is available, then it will redirect to google play, other wise it should direct to default app store, which is appgallary. in this case, the plugin should support adding app ID of appgallary.

Hello, are there any plans on adding this enhancement some time soon?

Hello, are there any plans on adding this enhancement some time soon?

Hello, are there any plans on adding this enhancement some time soon?

Not for the moment, but feel free to submit your pull requests !

Hello, are there any plans on adding this enhancement some time soon?

Not for the moment, but feel free to submit your pull requests !


Speed up pull request cloudbuild.

@morgante the policy-tool added a bunch of module changes which get re-downloaded each step.  This de-duplicates the download on the test step, but the docker build step is still going to download all modules.  We should probably talk about how we want to deal with that.


Create flood-maps.json

Create new file flood-maps.json in nominees folder

Ok will update

Sorry I didn't notice that. Looks like it is fixed now.


libsrtp2: fix compilation with GCC 10

Please refer the issue on the link https://github.com/openwrt/telephony/pull/546

Codecov Report

Merging #2397 (8c76fbd) into 4.0release (d526672) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           4.0release    #2397      +/-   ##
==============================================
- Coverage       38.73%   38.72%   -0.01%
==============================================
  Files             109      109
  Lines           39658    39658
==============================================
- Hits            15360    15359       -1
- Misses          24298    24299       +1

Impacted Files
Coverage Δ

trunk/src/protocol/srs_service_utility.cpp
72.43% <0.00%> (-0.55%)
:arrow_down:

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 d526672...8c76fbd. Read the comment docs.

感谢贡献。 👍
看起来这个是srtp的代码问题，是否可以考虑也给srtp提个PR？

我不知道srtp的repo在哪..libsrtp看起來不像

Merged as https://github.com/ossrs/srs/commit/cc99226ed5e5334a49e4eb1223baa15fa43d0a87
👍 Thanks a lot @HungMingWu


action rm  prints ok but does not delete

is action rm an alias for action delete?
it prints ok but the action is not deleted.

in order to avoid conflicts with the normal UNIX rm, we had to rename the openwhisk rm. currently, the previous rm is awkwardly named rimraf, as it supports recursive removal of packages. it still supports multi-delete and wildcards. you may change the name in a PR.
deeper: for openwhisk-oriented clients, the default command context is /wsk/action. this means that if we were to use rm for the name of the fancier openwhisk removal command, there would be no recourse for requesting the normal UNIX rm.
we could consider changing the default execution context to /. i think that if we were to do this, we could restore wsk xxx rm.

the "prints ok" part should be resolved now.


Transition.native not working on android

Describe the bug
Transition.native not working on android
To Reproduce
Steps to reproduce the behavior:

set defaultTransition to Transition.native on GetMaterialApp
Go to 'any route'

Expected behavior
Native transition for any route
Flutter Version:
1.17.5
Get Version:
3.2.2
Describe on which device you found the bug:
Pixel 3 API 25 (android-x86 emulator)
Minimal reproduce code
GetMaterialApp(
  defaultTransition: Transition.native,
  ...
)

or without defaultTransition
GetMaterialApp(
  ...
)

Fix on 3.3.0


Unexpected expected value for DeepPartial type

Summary
TSON will show the expected class type in the errors.expected if you use the wrong value. However, when using DeepPartial it shows some kind of internal type instead. See the Repl for more context.
Code occuring the bug
Repl to reproduce:
<EMAIL_ADDRESS>Output
> ts-node index.ts

correct expected: {
  success: false,
  errors: [
    {
      path: '$input.child',
      expected: 'Resolve<TestChildClass>',
      value: 'wrong'
    }
  ]
}
correct expected: {
  success: false,
  errors: [
    {
      path: '$input.child',
      expected: '(Resolve<TestChildClass> | undefined)',
      value: 'wrong'
    }
  ]
}
incorrect expected: {
  success: false,
  errors: [
    {
      path: '$input.child',
      expected: '(Resolve<__type.o1> | undefined)',
      value: 'wrong'
    }
  ]
}
/home/runner/TSON-Deep-Partial-Expected-Bug/index.ts:28
  throw new Error(`${res5.errors[0].expected} !== ${res6.errors[0].expected}`)
        ^
Error: (Resolve<TestChildClass> | undefined) !== (Resolve<__type.o1> | undefined)

Code
import TSON from "typescript-json";

type DeepPartial<T> = T extends object ? {
  [P in keyof T]?: DeepPartial<T[P]>;
} : T;

const invalidInput = { child: 'wrong' }

declare class TestChildClass {
  a: string;
}

declare class TestClass {
  child: TestChildClass;
}

const res4 = TSON.validateEquals<TestClass>(invalidInput);
console.log('correct expected:', res4)

const res5 = TSON.validateEquals<Partial<TestClass>>(invalidInput);
console.log('correct expected:', res5)

const res6 = TSON.validateEquals<DeepPartial<TestClass>>(invalidInput);
console.log('incorrect expected:', res6)

if (res5.errors[0]?.expected !== res6.errors[0]?.expected) {
  throw new Error(`${res5.errors[0].expected} !== ${res6.errors[0].expected}`)
}

correct expected: {
  success: false,
  errors: [
    {
      path: '$input.child',
      expected: 'Resolve<TestChildClass>',
      value: 'wrong'
    }
  ]
}
correct expected: {
  success: false,
  errors: [
    {
      path: '$input.child',
      expected: '(Resolve<TestChildClass> | undefined)',
      value: 'wrong'
    }
  ]
}
incorrect expected: {
  success: false,
  errors: [
    {
      path: '$input.child',
      expected: '(Resolve<__type.o1> | undefined)',
      value: 'wrong'
    }
  ]
}

Duplicated with - #224
In TypeScript compiler, type statement just be considered as only an alias feature and always be named as __type. Also, TypeScript compiler names internal meta types like Partial<T> and Required<T> as Resolve<T>.
I'm trying to find its original name, but I can't sure it would be possible.

@samchon was this actually completed? The repl test still fails on the latest version.

https://github.com/samchon/typescript-json/issues/328
I'd updated to tracing alias type name and though that succeeded. However, recursive TMP like above case was not
I'll reasearch more but I can't see the way because even TypeScript compiler can't trace such recursive type name.


problems with your example

Hey, guys good work. But I tried your example with docker compose, it does not work.
The errors are around worker_1 and api_1 ... Error: Cannot find module '/app/pm2-runtime'

Hello,
PR #63 should fix you problem.


add enabledWorlds config option

Wait, but disabledWorlds already exists. Won't this be super confusing? What if the list is empty, is it then enabled on all worlds? Or disabled on all worlds?


Logo for organization

Sorry, there isn't organization issues :/

Hmm...

I was thinking like a custom skin-looking thing with the ScratchCat face.

I'll work on it.

What do you think?

Nice!

It doesn't scale well, though. We need something that works as a favicon (as small as 16 x 16px)

Yeah.

Or as an org logo.

@Firedrake969 has been assigned, because he as the admin stuffs.

OK


chore: release 1.2.208

:robot: I have created a release *beep* *boop*
1.2.208 (2023-03-13)
Features

export: add --add-label option (46afee2)
multiarch: introduced ability to specify multiple platforms (f0efcb7)

Bug Fixes

docs/Gemfile & docs/Gemfile.lock to reduce vulnerabilities (aca4bd1)
playground/Dockerfile.ghost to reduce vulnerabilities (8d4cca9)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/werf/werf/releases/tag/v1.2.208 :sunflower:


Update website's branch

Notebook is still on /r/firebase branch, I guess it's is outdated.

Thanks - i deleted it


Unable to configure TLS

When we add to /etc/routinator/routinator.conf the following lines:
http-tls-listen = ["IPv4:8324", "[IPv6]:8324"]
http-tls-cert = "/etc/ssl/certificate.crt"
http-tls-key = "/etc/sss/private.key"
log = "file"
log-file = "/var/log/routinator.log"
log-level = "debug"
the service doesn't start and any debug log is written.
Could you tell us if we are configuring it wrong or if there is some mispell?
Both certificate and private key are in PEM format.

Those lines look fine – and should work.
If it doesn’t start, there should be some kind of output. It may, however, not be in the log file you specified but on stderr. This happens for instance if it can’t read your config file.
If you start the service via systemd, then this output should appear of you run journalctl -u routinator.

Hi, we see a similar problem, however with an error message:
$ sudo -u routinator routinator -v -c /etc/routinator/routinator.conf server
[ERROR] TLS key file '/etc/pki/tls/private/cert.key' does not contain any usable keys.

Config:
$ grep tls routinator.conf
http-tls-listen = [ "<IP_ADDRESS>:443" ]
http-tls-cert = "/etc/pki/tls/certs/cert.pem"
http-tls-key = "/etc/pki/tls/private/cert.key"

Cert and key look fine, however. They also work with our existing reverse proxy (stunnel).
Let me know if I can provide more input.

As it says, the key file doesn’t contain a key (yeah, it could be more helpful, but this is coming from a dependency). Is it perchance using a passphrase? We can’t deal with that.

We solved with this operations:

cleaned the certificate.crt removing the attribute inside the file, before the "-----BEGIN CERTIFICATE-----";
decrypted private,key and saved in plain text.

After this operation routinator started successsfully.

OK, got it working now, it does not like
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

Removing RSA did the trick.

Oh, interesting! That would explain why my tests all succeeded. My test key – generated with OpenSSL – only has the BEGIN PRIVATE KEY bit.
Can you share how you created your key?

Turns out I was “holding it wrong.”
We’ll sneak this one into the upcoming 0.12.1 with a new release candidate following soon.

Great, thanks! Glad that I wasn't holding it wrong and you already fixed it in no time :)
Will give the new version a try.


Is there a way to partially match response bodies?

Apologies if this was documented somewhere, I haven't found it.
It would be very useful, I think, if it were possible to match only some fields of a response body's properties, or only some elements of an array.
The motivation is that sometimes only a part of the data is known beforehand, so it is cumbersome to write tests for these endpoints, by having to manually look for array elements in the response body in a closure given to then.

I don't think it is something built-in, but might not be that hard to accomplish from your side using an utility from your assertion library such as chai's include assertion
describe('GET /user', function() {
  it('responds with json', function(done) {
    request(app)
      .get('/user')
      .expect((res) => expect(res.body).to.deep.include(subsetOfProperties))
      .end(done);
  });
});

Oh that's really helpful, thanks @jonathansamines!
Closed since I can now see this is not the job of supertest but rather that of the assertion library.

Found this from googling. If you're using jest rather than chai, you can tweak @jonathansamines 's code as follows:
describe('GET /user', function() {
  it('responds with json', function(done) {
    request(app)
      .get('/user')
      .expect((res) => expect(res.body).toEqual(expect.objectContaining(subsetOfProperties)))
      .end(done);
  });
});

To complement @davelopware-davea's comment, you can directly create a custom function that you add in the prototype of supertest's Test class (using Jest, Mocha or Vitest):
import { Test } from "supertest";

// Typescript supertest's module extension
declare module "supertest" {
  interface Test {
    expectPartial: (errorCode: number, body: object) => Test;
  }
}

(Test.prototype as Test).expectPartial = function (statusCode: number, body: object) {
  this._asserts.push((res: Response) => this._assertStatus(statusCode, res));
  this._asserts.push((res: Response) => expect(res.body).toMatchObject(body));

  return this;
}

You also may want to add some // @ts-ignores or some type casting to ignore ts errors about you accessing Test's private methods (_assertStatus, _asserts).
This file needs to be imported for each tests (e.g. using the setupFiles property in your testing framework config file).

Also, in reality, for DX I used the wrapAssertFn function (which I arranged to be typescript friendly) from here.
function wrapAssertFn(
  assertFn: (res: Response) => void | Error
): (res: Response) => void | Error {
  const savedStack = new Error().stack!.split("\n").slice(3);

  return function (res: Response) {
    let badStack;
    let err: void | Error;
    try {
      err = assertFn(res);
    } catch (e) {
      err = e as Error;
    }
    if (err instanceof Error && err.stack != null) {
      badStack = err.stack.replace(err.message, "").split("\n").slice(1);
      err.stack = [err.toString()]
        .concat(savedStack)
        .concat("----")
        .concat(badStack)
        .join("\n");
    }
    return err;
  };
}

Then you just have to wrap your assertion functions in it:
this._asserts.push(wrapAssertFn((res: Response) => this._assertStatus(statusCode, res)));


Add markers docs

@sampotts Could you please review this and publish the new changes? Thanks!

Thanks!


Partition for groupings

Enables partitioning of groupings of Boolean keys and other any 3 cases.
Tests are pending.
Sample 1
Partition a grouping where the key is a Boolean:
var q1 =
    Enumerable.Range(0, 10)
      .GroupBy(x => x % 2 == 0)
      .Partition((evens, odds) => new { odds, evens });

Console.WriteLine("odds  = " + q1.odds.ToDelimitedString(", "));
Console.WriteLine("evens = " + q1.evens.ToDelimitedString(", "));

Output:
odds  = 1, 3, 5, 7, 9
evens = 0, 2, 4, 6, 8

Sample 2
Partition a grouping where the key is a nullable Boolean:
var q2 =
    Enumerable.Range(0, 10)
      .Select(x => (int?) x)
      .Interleave(Enumerable.Repeat((int?) null, 3))
      .GroupBy(x => x != null ? x < 5 : (bool?) null)
      .Partition((lt5, gte5, nil) => new { lt5, gte5, nil });

Console.WriteLine("lt5  = " + q2.lt5.ToDelimitedString(", "));
Console.WriteLine("gte5 = " + q2.gte5.ToDelimitedString(", "));
Console.WriteLine("nil  = " + q2.nil.Select(_ => "?").ToDelimitedString(", "));

Output:
lt5  = 0, 1, 2, 3, 4
gte5 = 5, 6, 7, 8, 9
nil  = ?, ?, ?

Sample 3
Partition grouping into multiples of 3 and the rest:
var q3 =
    Enumerable.Range(0, 10)
      .GroupBy(x => x % 3)
      .Partition(0, (m3, etc) => new { m3, etc });

Console.WriteLine("m3  = " + q3.m3.ToDelimitedString(", "));
Console.WriteLine("etc = "
    + string.Join("; ",
        from g in q3.etc
        select new { k = g.Key, ms = g.ToDelimitedString(", ") }));

Output:
m3  = 0, 3, 6, 9
etc = { k = 1, ms = 1, 4, 7 }; { k = 2, ms = 2, 5, 8 }

Sample 4
Parition groupings by keys (remainders) matching 0, 1 & 2 (the non-matching groupings _ are ignored because they can never occur):
var q4 =
    Enumerable.Range(0, 10)
      .GroupBy(x => x % 3)
      .Partition(0, 1, 2, (ms, r1, r2, _) => new { ms, r1, r2 });

Console.WriteLine("ms  = " + q4.ms.ToDelimitedString(", "));
Console.WriteLine("r1  = " + q4.r1.ToDelimitedString(", "));
Console.WriteLine("r2  = " + q4.r2.ToDelimitedString(", "));

Output:
ms  = 0, 3, 6, 9
r1  = 1, 4, 7
r2  = 2, 5, 8

Sample 5
Partition of groupings using a key comparer:
var words =
    new[] { "foo", "bar", "FOO", "Bar", "baz", "quux", "bAz", "QuuX" };

var q5 =
    words
      .GroupBy(s => s, StringComparer.OrdinalIgnoreCase)
      .Partition("foo", "bar", StringComparer.OrdinalIgnoreCase,
                 (foos, bars, etc) => new { foos, bars, etc });

Console.WriteLine("foo = " + q5.foos.ToDelimitedString(", "));
Console.WriteLine("bar = " + q5.bars.ToDelimitedString(", "));
Console.WriteLine("etc = "
    + string.Join("; ",
        from g in q5.etc
        select new { k = g.Key, ms = g.ToDelimitedString(", ") }));

Output:
foo = foo, FOO
bar = bar, Bar
etc = { k = baz, ms = baz, bAz }; { k = quux, ms = quux, QuuX }

Sample 6
Cascaded partition of groupings:
var q6 =
    words
      .GroupBy(s => s, StringComparer.OrdinalIgnoreCase)
      .Partition("foo", "bar", StringComparer.OrdinalIgnoreCase,
                 (foo, bar, etc) =>
                    etc.Partition("quux", "baz", StringComparer.OrdinalIgnoreCase,
                        (quux, baz, _) => new { foo, bar, baz, quux }));

Console.WriteLine("foo  = " + q6.foo.ToDelimitedString(", "));
Console.WriteLine("bar  = " + q6.bar.ToDelimitedString(", "));
Console.WriteLine("baz  = " + q6.baz.ToDelimitedString(", "));
Console.WriteLine("quux = " + q6.quux.ToDelimitedString(", "));

Output:
foo  = foo, FOO
bar  = bar, Bar
baz  = baz, bAz
quux = quux, QuuX

In Sample 1 we have
odds  = 1, 3, 5, 7, 9
evens = 1, 3, 5, 7, 9

Is it right?

I like this. I have needed methods like this one before, and ended up using ToLookup. I'll take a look at the code later.
A few overall questions though:

Requiring a GroupBy before partition feels a bit strange to me. Why not do the grouping inside Partition itself? A possible answer is that one might want to filter the IGrouping prior to partitioning. Not sure which case is more common though.
The size of the collections is (can be) known at resultSelector invocation time. I think passing a readonly IList<T> (if the order is to be guaranteed) or ICollection<T> (if not guaranteed) would be a better choice. Since streaming is out of the question for this operator, the passed IEnumerables cannot possibly be lazy.

PS: It is unfortunate that c# does not have syntax that would allow making this truly generic over the number of possible buckets...

@leandromoh Obviously not. :) Looks like a copy & paste error (printing odds twice). I've fixed the sample now & thanks for spotting that. 👍
@fsateler Glad to hear you like it. I've needed this countless times too & just got tired & decided it was time to give it a go (and in a generalised way over groupings). Looking forward to your review.

Requiring a GroupBy before partition feels a bit strange to me.

To be honest, I wanted to start with simpler signatures and not having to deal with keySelector and resultSelector (of which there is already another for Partition). It would have also exploded the number of overloads and it can always be added later. Since we have IGrouping<TKey, TElement> given by LINQ, I thought it's best to extend on that interface. A separate version for IEnumerable<T> could be added later that does the grouping if this proves useful. And as you so rightly observed, these versions allow filtering & more on the groups before partitioning.

The size of the collections is…known at resultSelector invocation time…passing a readonly IList<T>…or ICollection<T>…would be a better choice.

Unless you're in a concurrent world? And how can you assume how the grouping was created? An IGrouping<TKey, TElement> only promises to be a sequence of group member by inheriting IEnumerable<TElement> so I can't assume more. I know it's frustrating and I'd rather be indexing into a list than calling ElementAt and hoping it is one.

Since we have IGrouping<TKey, TElement> given by LINQ, I thought it's best to extend on that interface. ... And as you so rightly observed, these versions allow filtering & more on the groups before partitioning.

I agree that using a type already given to us is good. OTOH, IGrouping is only provided as an interface, and no actual implementations, thus either forcing use of GroupBy or ToLookup to be able to consume this method.

A separate version for IEnumerable could be added later that does the grouping if this proves useful.

Ack.

The size of the collections is…known at resultSelector invocation time…passing a readonly IList…or ICollection…would be a better choice.

Unless you're in a concurrent world? And how can you assume how the grouping was created? An IGrouping<TKey, TElement> only promises to be a sequence of group member by inheriting IEnumerable so I can't assume more. I know it's frustrating and I'd rather be indexing into a list than calling ElementAt and hoping it is one.

That is the problem of relying on IGrouping 😉 . More seriously, though, if the IGrouping overload is preserved, there is no choice but to use IEnumerable<T> instead of a collection interface.

if the IGrouping overload is preserved, there is no choice but to use IEnumerable<T> instead of a collection interface.

Sorry, not sure if I'm following you here. Care to rephrase?

Sorry, not sure if I'm following you here. Care to rephrase?

I mean that as long as the implementation is based on top of IGrouping, it is somewhat restricted to having to return IEnumerables, because there is no guarantee the IGrouping is a collection.  The alternative would be calling ToList or similar before invoking the resultSelector, but that is potentially costly.

as long as the implementation is based on top of IGrouping

Actually, now that I think of this, why not pass the IGrouping directly instead of an IEnumerable ?
public static TResult Partition<T, TResult>(this IEnumerable<IGrouping<bool, T>> source,
            Func<IGrouping<bool, T>, IGrouping<bool, T>, TResult> resultSelector)
// ...

why not pass the IGrouping directly instead of an IEnumerable ?

With Partition, you're destructuring groupings via lambda arguments. Why would you want to keep the keys as it's going to be used for a small set of known keys? For non-matching cases, you get the groupings because you might still need the key (see sample 6 for how that's used for nested partitioning). For the case where keys are Boolean values (the signature you quoted), it's especially useless. It may have some value if you want to capture the original keys when using a custom comparer (e.g. the original case of a string key using a case-insensitive comparer). In the rare event that you really want to keep the keys for the destructured cases, you can attach it back.
Do you have a concrete example to demonstrate what the current design/signature would prevent?

why not pass the IGrouping directly instead of an IEnumerable ?

Do you have a concrete example to demonstrate what the current design/signature would prevent?

No. That was mostly thinking out loud, and your explanation makes a lot of sense. There is little value in preserving the IGrouping.

Alternative names to avoid collition with the already existing Partition (btw, the currently existing partition is not currently appearing on the api docs online):

Pivot: As in pivoting over the possible keys in the IGrouping collection
Deconstruct: as in tuple deconstruction.
Match: as in pattern matching (a very limited pattern, though).

Thanks for those names suggestions, @fsateler. I'll give them some thought.

…Partition (btw, the currently existing partition is not currently appearing on the api docs online)

If you look at the changes between the last beta and up to the release of 2.0, Partition was removed in 7a2c72bada4ba45343e44d5291084073ba91eecf for the reason given in the commit message.

We don't have an issue for this PR so let's pair it with #264.

@fsateler Let me know if I missed anything from your review/feedback.

Wonder if this is also not a good time to add an overload without any projection function that simply returns a tuple:
public static (IEnumerable<T> True, IEnumerable<T> False)
    Partition<T>(this IEnumerable<T> source, Func<T, bool> predicate) =>
    source.Partition(predicate, ValueTuple.Create);

The usage would then be:
var (evens, odds) = Enumerable.Range(0, 10).Partition(x => x % 2 == 0);

Here it is in action in a C# Interactive session:
Microsoft (R) Visual C# Interactive Compiler version <IP_ADDRESS>520
Copyright (C) Microsoft Corporation. All rights reserved.

Type "#help" for more information.
> #r "MoreLinq.dll"
> using MoreLinq;
> var res = Enumerable.Range(0, 10).Partition(x => x % 2 == 0);
> res.True
Lookup<bool, int>.Grouping { 0, 2, 4, 6, 8 }
> res.False
Lookup<bool, int>.Grouping { 1, 3, 5, 7, 9 }

Note tuple element names of True & False.

Wonder if this is also not a good time to add an overload without any projection function that simply returns a tuple

Oh, that sounds very useful.

Oh, that sounds very useful.

Added in 2a9fa5518595dff2a734df08f5ca244f59356825.

@fsateler We good to merge this? Did I miss anything from the changes you requested in your review?

@fsateler We good to merge this? Did I miss anything from the changes you requested in your review?

You did not comment on my comment on the key description. If you disagree the description is unclear (or you think the new description is worse than the original), then I'm fine to merge.


[Funimation] error getting file information and downloading it

Checklist

[X] I'm reporting a broken site
[X] I've verified that I'm running yt-dlp version 2021.12.27. (update instructions)
[X] I've checked that all provided URLs are alive and playable in a browser
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
US
Description
I was trying to see if the error was mostly mine but it seems to be a coding error, I think.
link: https://www.funimation.com/v/the-daily-life-of-the-immortal-king/wang-ling-wants-to-lead-a-quiet-life
Verbose log
C:\youtube-dl>yt-dlp -F --cookies cookies-funimation-com.txt https://www.funimation.com/v/the-daily-life-of-the-immortal-king/wang-ling-wants-to-lead-a-quiet-life --list-subs -Uv
[debug] Command-line config: ['-F', '--cookies', 'cookies-funimation-com.txt', 'https://www.funimation.com/v/the-daily-life-of-the-immortal-king/wang-ling-wants-to-lead-a-quiet-life', '--list-subs', '-Uv']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2021.12.27 [6223f67a8] (source)
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: f76ca2dd5
[debug] Python version 3.9.7 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] exe versions: ffmpeg N-105035-g617452ce2c-20211227 (setts), ffprobe N-105035-g617452ce2c-20211227
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2021.12.27, Current version: 2021.12.27
yt-dlp is up to date (2021.12.27)
[debug] [funimation:page] Extracting URL: https://www.funimation.com/v/the-daily-life-of-the-immortal-king/wang-ling-wants-to-lead-a-quiet-life
[funimation:page] the-daily-life-of-the-immortal-king_wang-ling-wants-to-lead-a-quiet-life: Downloading JSON metadata
[debug] [Funimation] Extracting URL: https://www.funimation.com/player/3905567
[Funimation] 3905567: Downloading player webpage for 3905567
ERROR: [Funimation] 3905567: Unable to extract show data; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
  File "C:\Program Files\youtube-dl\yt-dlp\yt_dlp\extractor\common.py", line 609, in extract
    ie_result = self._real_extract(url)
  File "C:\Program Files\youtube-dl\yt-dlp\yt_dlp\extractor\funimation.py", line 193, in _real_extract
    episode, season, show = self._get_episode(webpage, experience_id=int(initial_experience_id))
  File "C:\Program Files\youtube-dl\yt-dlp\yt_dlp\extractor\funimation.py", line 171, in _get_episode
    self._search_regex(
  File "C:\Program Files\youtube-dl\yt-dlp\yt_dlp\extractor\common.py", line 1183, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)

This show doesn't have a player page. It looks like Funimation want to move away from using the player page and start relying solely on apis.
        ''' Extract the episode, season and show objects given either episode/experience id '''
        show = self._parse_json(
            self._search_regex(
                r'show\s*=\s*({.+?})\s*;', webpage, 'show data', fatal=fatal),
            experience_id, transform_source=js_to_json, fatal=fatal) or []
        for season in show.get('seasons', []):
            for episode in season.get('episodes', []):
                if episode_id is not None:
                    if str(episode.get('episodePk')) == episode_id:
                        return episode, season, show
                    continue
                for _, _, f in self._get_experiences(episode):
                    if f.get('experienceId') == experience_id:
                        return episode, season, show
        if fatal:
            raise ExtractorError('Unable to find episode information')
        else:
            self.report_warning('Unable to find episode information')
        return {}, {}, {}``` Pretty sure this can all be done better using the apis anyway.

This show doesn't have a player page. It looks like Funimation want to move away from using the player page and start relying solely on apis.
        ''' Extract the episode, season and show objects given either episode/experience id '''
        show = self._parse_json(
            self._search_regex(
                r'show\s*=\s*({.+?})\s*;', webpage, 'show data', fatal=fatal),
            experience_id, transform_source=js_to_json, fatal=fatal) or []
        for season in show.get('seasons', []):
            for episode in season.get('episodes', []):
                if episode_id is not None:
                    if str(episode.get('episodePk')) == episode_id:
                        return episode, season, show
                    continue
                for _, _, f in self._get_experiences(episode):
                    if f.get('experienceId') == experience_id:
                        return episode, season, show
        if fatal:
            raise ExtractorError('Unable to find episode information')
        else:
            self.report_warning('Unable to find episode information')
        return {}, {}, {}

Pretty sure this can all be done better using the apis anyway.

But I found it strange because the chapters of the second season are the problem, the first season I can download normally.

Can we fix this error on our end or do we need to wait for an update?

You can get all the information needed using the api: https://prod-api-funimationnow.dadcdigital.com/api/source/catalog/episode/the-daily-life-of-the-immortal-king/wang-ling-wants-to-lead-a-quiet-life/
But I'm no good doing this stuff, I might give it a shot I guess but even if I get it working it would only be a workaround, someone experienced would need to do it.

i can explain how funimation works right now but i can not write anything in python so i can not fix the issue.
i don't know where Jules got that API url from but the desktop api url for a single episode is https://d33et77evd9bgg.cloudfront.net/data/v1/episodes/[Title].json
In the case of the video above the [Title] would be replaced with the episode title that is inside the url wang-ling-wants-to-lead-a-quiet-life
this gives us a json file with a bunch of information of which we directly only need the id which in this case would be TDI0016, there are other usefull things like the title of the episode with a more readable way and we also get the season/episode numbers and the Anime title.
this gives us everything we need to properly save the file exept the video/subtitle files we want.
To get that url there is an second api that is either with it simple "anonymous usecase" https://playback.prd.funimationsvc.com/v1/play/anonymous/[id]?deviceType=web or the advanced version https://playback.prd.funimationsvc.com/v1/play/[id]?deviceType=web which requires an Authorization http header with an Token which is just the value of the src_token cookie

The anonymous works fine for all free episodes as long there are not locked behind the mature content filter.
The second API repsond with an other json that contains all available streams and subtitles, which can depends on the location and account type.


can't display image chose from photo gallery for Android

This functionary is work well for IOS, but Android doesn't.
The relative code as below:
        if (Platform.OS === 'ios') {
           source = {uri: response.uri.replace('file://', ''), isStatic: true};
        } else {
           source = {uri: response.uri, isStatic: true};
        }

==============================

Code similar to the following ?
<ImageViewer visible={true} imageUrls={[{url: source}]}/>

Can you let me see error screenshot?
This is how i use source: https://github.com/ascoders/react-native-image-viewer/blob/master/image-viewer/image-viewer.component.tsx#L297

yes. Code is similar.
var imagesArr;
export default class BigImage extends Component {
componentWillMount(){
imagesArr = Array();
for(var i = 0; i < this.props.selectImgUrlArr.length; i++) {
imagesArr.push({url: this.props.selectImgUrlArr[i]});
}
}
render() {
return (

<NavHeader
nav = {this.props.nav}
title = {"图片查看"}
/>
<View style = {{flex: 1}}>

)
}
}
By the way: it work well if the image come from web for Android.

Have you solved the problem?


Check mod.zip file structure

Check if the file structure of a mods zip file is correct:

Structure
Mod ZIPs should have the structure shown below. The name of the ZIP is arbitrary.
yourmod.zip
├───.import
└───mods-unpacked
    └───Author-ModName
        ├───ModMain.gd
        └───_meta.json

It's a great idea in theory, but in practise would cause slowdown before the game loads. There's already an unavoidable delay when using mods, but adding further delays to account for potential mistakes made by mod developers might not be the most end-user-focused approach.
Poorly structured mods likely won't load anyway, and if they're close to the structure, we already have some stuff (eg. the required files check) to account for minor errors.
Building an external validator tool might be a good idea though, you could even bundle in your mod imports code to help creators package their mods, maybe with a meta.json editor too.
You could even use something like gdunzip to check an existing zip's paths, for diagnosing issues either as a mod creator or a mod end-user. The performance penalty for gdunzip wouldn't be noticeable if you're just running it on a single ZIP in an isolated case.

@KANAjetzt  Actually, we might be able to add some validation after a ZIP has been loaded, when we loop over res://mods-unpacked in _setup_mods. That'd save us needing to get the ZIP's contents etc prior to the load.
If we do it in _setup_mods, we could check if any folders other than .import and mods-unpacked are present. And we can stop badly formed mods from loading at this point, since the _setup_mods func is what triggers _init_mod_data.
It happens before the manifest.json stuff so we won't be able to tell if the named mod folder within res://mods-unpacked is correct. But we could check to ensure there's only a single folder there.

I don't know how much of an impact this would have on performance though, as we'd be looping over quite a few directories

Closing, I think this has been done


Fix DateTime with zero microseconds encoding bug

Hi, we've been adopting plausible's ch and ecto_ch packages and are super grateful for your open source work!
I noticed a bug where queries with elixir DateTime params that had microsecond precision with zero microseconds (e.g. ~U[2023-12-13 00:00:00.000000Z]) would fail because the ch driver would encode them with a value like 1.6095024e9 which Clickhouse cannot parse.
Float.to_string returns the "shortest representation" possible, which in some cases will be scientific notation [docs].
There are a few ways to solve this but I chose to use :erlang.float_to_binary to prevent the scientific notation encoding.
Without the patch, the test case I added fails with:
** (Ch.Error) Code: 457. DB::Exception: Value 1.6095024e9 cannot be parsed as DateTime64(6) for query parameter '$0' because it isn't parsed completely: only 9 of 11 bytes was parsed: 1.6095024.

I'm not an expert in clickhouse or elixir so please let me know if you have any feedback or concerns! I'm happy to make any changes. Or feel free to make any changes yourself.
Thanks!

👋 @vlymar
Thank you for the fix! I completely missed it!
The tests are failing due to formatting checks. I opened a PR to fix that and also to separate the new test: https://github.com/knocklabs/ch/pull/2

Maybe we can round when microseconds are zero?

Oops, the new test actually needs that long line.

Maybe we can round when microseconds are zero? That is, just return seconds instead of doing the float encoding.

That works too. I actually started with that approach, then found :erlang.float_to_binary. It doesn't make much of a difference to me, I'm happy with either approach.
Your new encoding approach is pretty cool too, though it did take me a few minutes to wrap my head around what unix = DateTime.to_unix(dt, size) was doing because calling that func with a positive int size isn't well documented.

Seems like we'll need to round to zero as ClickHouse cannot parse 0.0 as DateTime64
     ** (Ch.Error) Code: 457. DB::Exception: Value 0.0 cannot be parsed as DateTime64 for query parameter '$0' because it isn't parsed completely: only 1 of 3 bytes was parsed: 0. (BAD_QUERY_PARAMETER) (version <IP_ADDRESS> (official build))

     code: assert TestRepo.one!(where(q, d: ^~U[1970-01-01 00:00:00.000Z])) == ~N[1970-01-01 00:00:00]

Seems like we'll need to round to seconds when microseconds are zero as ClickHouse cannot parse 0.0 as DateTime64

Nice find. I've updated this PR with your proposed implementation. It may be worth filing a bug report with Clickhouse?

Thank you! https://github.com/knocklabs/ch/pull/3 should fix the CI. I'll check if the latest ClickHouse version also fails to parse 0.xxx timestamps.

The latest ClickHouse doesn't have that problem.
$ docker run -d -p 8123:8123 clickhouse/clickhouse-server
$ iex

iex(1)> {:ok, pid} = Ch.start_link
{:ok, #PID<0.210.0>}
iex(2)> Ch.query(pid, "select {dt:DateTime64}", %{"dt" => 0.123})
{:ok,
 %Ch.Result{
   command: :select,
   num_rows: 1,
   rows: [[~N[1970-01-01 00:00:00.123000]]],
   headers: [
     {"date", "Tue, 19 Dec 2023 11:20:57 GMT"},
     {"connection", "Keep-Alive"},
     {"content-type", "application/octet-stream"},
     {"x-clickhouse-server-display-name", "b04e56581aa5"},
     {"transfer-encoding", "chunked"},
     {"x-clickhouse-query-id", "71dec570-ffea-4030-bc50-f27960232263"},
     {"x-clickhouse-format", "RowBinaryWithNamesAndTypes"},
     {"x-clickhouse-timezone", "UTC"},
     {"keep-alive", "timeout=10"},
     {"x-clickhouse-summary",
      "{\"read_rows\":\"1\",\"read_bytes\":\"1\",\"written_rows\":\"0\",\"written_bytes\":\"0\",\"total_rows_to_read\":\"0\",\"result_rows\":\"0\",\"result_bytes\":\"0\",\"elapsed_ns\":\"7337875\"}"}
   ]
 }}

@ruslandoga any other feedback on this PR?

@vlymar no :) All's good! I just forgot to merge it...

I've published the fix in v0.2.2

thanks @ruslandoga, happy new year!


Set list-files input parameter as not required

There is a default value provided in the action metadata file so the input parameter should be specified as not required. Leaving it marked as required causes workflow validation errors when leaving out this parameter.

Thanks, @tlinhart, you are right.


add cask for SqueezePlay

desktop player for Logitech Media Server, previously known as SlimDevices SqueezeBox Server
Note: after acquiring SlimDevices, Logitech made some changes to the SqueezeBox product lineup, but the software remains open-source and fully functional.

Closing for no reply, and the prevalence of the googlecode link. If you wish to resubmit with the fixes, we’ll be happy to take a look again.


Commit Message : Initial WIP commit to get code into VCS.

From @antonio-eggberg on June 12, 2016 1:34
Hi,
For my local repo can I delete all the files from "Initial WIP commit to get code into VCS."? will it be ok? I just want to remove files that are not being used at all.
thanks.
Copied from original issue: firebase/friendlypix#18

From @nicolasgarnier on June 16, 2016 10:29
Yes the blobserver directory is not used at this point you can remove it.

From @nicolasgarnier on June 16, 2016 10:30
Hey @gkaldevrel is it OK to delete the blobserver directory? Not sure what it's used for but it seems it;s not needed?

Yeah, it's safe to delete. I was just using it before we incorporated storage. I was going to delete it in my next commit, but feel free to do it earlier if you want.

Ps: this was deleted. You can close.


Mqa gqa bugfix

Fix KV head index calculation for MQA / GQA.
Also made HQ and HK constexprs to increase performance by a bit.

I ran the forward test on our MI300 machine and I get this. Is this expected?

That is odd. I am unable to reproduce this. I'll try a different container....

This looks like some kind on instability in the compiler. It only happens if this autotune config is picked:
triton.Config({'BLOCK_M': 128, 'BLOCK_N': 64, 'waves_per_eu': 3, 'PRE_LOAD_V': False}, num_stages=1, num_warps=4),
And even then only on some input shapes where the head_size is not a multiple of 64 (both fails here are 65) but not all cases with head_size 65 and this autotune config. I will investigate more...

Ok it's fixed. Appreciate the scrutiny Michael!


Fix lint errors

@eriknelson are you ok with the function renames? Lint was complaining that Transform.TransformRunner was a stutter and suggested changing it to Transform.Runner, etc.

@jmontleon I was often guilty of lint problems for this very reason with the broker. It still feels unnatural to me but I understand and agree with the reasoning.

Think it should be fixed now.

Fixed for me.


networks.enable_ipv6: make it optional

This field isn't marked as required in the compose-spec, but it's implemented as a basic bool in this package. This means it automatically defaults to false when not specified.
A recent change was made to Docker Engine to allow users to define a daemon-wide default value for the equivalent API field. Without this change, Compose would always send a value to the Engine API, preventing it from defining its own default value.
See https://github.com/moby/moby/pull/47867.

LGTM as this reflects change in the API https://github.com/moby/moby/pull/47867/files#diff-28bc7f6688f2249afb33f1c3b4558c3bf1bfcda87f1b8e385bc8a5f04b8bdfeaL454-R454


Need an example on how to checkin an existing file without knowing enconding or file type (just file path)

Hi there,
i tried to follow the example on how to create a changeset with multiple files.
Although i am a bit stuck at the TFVCItem and ItemContent stage where i don't know how to extract the content and enconding of my file.
Im trying to write some code in order to checkin a file given to me by a filePath and check it in at a given location.
Would anyone care to help me out on how to do this?
This is what i came up so far:
`
Public Function CreateChangeset(ByVal projectName As String,
                                      ByVal files As Dictionary(Of String, String),
                                      ByVal comment As String) As TfvcChangesetRef

    Dim c = TFSConnection.GetClient(Of TfvcHttpClient)
    Dim newChangetset = New TfvcChangeset

    Dim changes = New List(Of TfvcChange)

    For Each fKP In files
        Dim fileSource = fKP.Key
        Dim fileTarget = fKP.Value

        Dim newChange = New TfvcChange

        newChange.ChangeType = VersionControlChangeType.Add

        Dim newItem = New TfvcItem
        newItem.Path = $"&/{projectName}/{fileTarget}"
        newItem.ContentMetadata = New FileContentMetadata

        ' TODO: How to extract the correct encoding, and type?...
        newItem.ContentMetadata.Encoding = GetFileEncoding(fileSource)
        newItem.ContentMetadata.ContentType = "text/plain"
        newChange.Item = newItem

        ' TODO: How to extract the correct content, and type?...
        Dim newContent = New ItemContent
        newContent.Content = "Blabla"
        newContent.ContentType = ItemContentType.RawText
        newChange.NewContent = newContent

        changes.Add(newChange)
    Next
    newChangetset.Changes = changes
    newChangetset.Comment = comment

    Dim changesetRef = c.CreateChangesetAsync(newChangetset).Result

    Return changesetRef
End Function

`

Here is the updated version i have. I think i have most of it, but still missing how to set the content type... (throws an error)
` Public Function CreateChangeset(ByVal projectName As String,
ByVal files As Dictionary(Of String, String),
ByVal comment As String) As TfvcChangesetRef
    Dim c = TFSConnection.GetClient(Of TfvcHttpClient)
    Dim newChangetset = New TfvcChangeset

    Dim changes = New List(Of TfvcChange)

    For Each fKP In files
        Dim fileSource = fKP.Key
        Dim fileTarget = fKP.Value

        Dim fileName = IO.Path.GetFileName(fileSource)

        Dim newChange = New TfvcChange

        newChange.ChangeType = VersionControlChangeType.Add

        Dim newItem = New TfvcItem
        newItem.Path = $"$/{projectName}/{fileTarget}/{fileName}"
        newItem.ContentMetadata = New FileContentMetadata

        Using reader = New StreamReader(fileSource, Text.Encoding.Default, True)
            Dim fileContent As String = String.Empty

            If reader.Peek() >= 0 Then
                fileContent = reader.ReadToEnd
            End If

            ' Set the file enconding and MIME Type.
            newItem.ContentMetadata.Encoding = reader.CurrentEncoding.WindowsCodePage
            newItem.ContentMetadata.ContentType = System.Web.MimeMapping.GetMimeMapping(fileSource)
            newChange.Item = newItem

            ' Set the file content.
            Dim newContent = New ItemContent
            newContent.Content = fileContent

            ' TODO: What should be the logic to set the Content Type? Not too sure...
            ' If newItem.ContentMetadata.ContentType.StartsWith("text/") Then
            newContent.ContentType = ItemContentType.RawText
            '  Else
            '  newContent.ContentType = ItemContentType.Base64Encoded
            '  End If

            newChange.NewContent = newContent
        End Using

        changes.Add(newChange)
    Next
    newChangetset.Changes = changes
    newChangetset.Comment = comment

    Dim changesetRef = c.CreateChangesetAsync(newChangetset).Result

    Return changesetRef
End Function`


Create indices with disabled analysis

fixes #90
fixes #89

@VladVega @demmer

I'd like to see tests that validate the behavior we want, which prompted this whole thing:
Write points with string value containing spaces or other non-word characters, such as msg = 'hello world!'. Then 1) read with matching filter, and 2) read | reduce by msg. And validate that FTS on full 'hello world!' and individual 'hello' and 'world' still works (this part may be already covered by existing test).

Note, you need to say something like "fixes #91" in the description, otherwise the issue won't close when you merge. Also makes it easier for the reviewers who can then click on the issue link for context (can't click from the title).

I added the suggested tests.

+1 on the positive tests. The test for writing a big field that's not too big still needs to be added, but orthogonal to this PR, let's add to the list in #88.

So what are the implications of no-analyzing?

Let me see if i can channel my inner dave: No implications whatsoever, in our case!
Generally using not_analyzed fields means you cannot do terms queries (full text search, in juttle terminology) on those individual fields; however juttle doesn't currently support FTS on a specific field, so this is a moot point.
We can still do FTS across all fields as that's implemented using a magic _all field in ES which combines the values of all string fields (at the cost of storage).

+1 once the client dichotomy is resolved (even if that means opening a ticket to fix it) while merging this.

Opened https://github.com/juttle/juttle-elastic-adapter/issues/96.


Precisely half of the jobs get processed.

I'm using the latest kue in node.js. Right now precisely half of the jobs are picked up by polarr_jobs.process() although all request can be seen as active/completed in the Kue UI.
For example, the first time a job is submitted to kue, it shows up and stuck in Active
the second job is submitted to kue, it shows up in Active, then completed
the third job is submitted to kue, it shows up and stuck in Active
the forth job is submitted to kue, it shows up in Active, then completed
so on and so forth..
What might be the issue?

There should be some error in your process callback which occasionally prevents done to be called, so job get's stuck in active. those stuck active jobs keep your concurrency bandwidth and process will not accept new jobs a bit later...

IS there a solution to this? This is constantly happening to me where something is going wrong in the jobs and then they just sit their in an active state and no new jobs can be picked up. This seems like a massive issue.

this will seem a massive issue unless you are properly handling errors in your code @micahlmartin
You can use

domains
promises error handling
process uncaught error handlers

please read https://github.com/LearnBoost/kue/issues/391 and https://github.com/LearnBoost/kue/pull/403 or even https://github.com/LearnBoost/kue/issues/130#issuecomment-42478711

This issue can be closed now. It happened that we had another "left-over" server listening to the Kue and that server is running old, bad code.  The kue accepts the jobs correctly. Apologize for not figuring out by ourselves.


feat: Added no underline for visited

Removing underlined link for visited state.

Codecov Report

Merging #384 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #384   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          42     42
  Lines         481    481
=====================================
  Hits          481    481

Impacted Files
Coverage Δ

src/Link.js
100% <ø> (ø)
: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 f0c091b...0490a60. Read the comment docs.

Thanks for the PR! Would you mind adding a little more context around this change? I'm not sure I understand why we'd want this to be the default behavior for links. Maybe someone from the design team can chime in

Would like to have design rep. to review to weigh in the visited state of link & approve. cc Isaiah Miller.

I agree with Jackson, I need a little more understanding around the need for this and what brought about this request. In general I don’t think we should make this the default behavior.

Well right now you have to write styles so the visited stated is not underlined. If everyone wants to write extra code all the time cool!

Per design team, the underline shouldn’t be there for visited links. only active and possibly hover if needed.

So from my understanding, the behavior that @lauradhahn mentioned is the current behavior without this change. (see https://pricelinelabs.github.io/design-system/Link/)
@jon06712 are you sure there isn't some other CSS that's affecting how links are styled in your app?

Well right now you have to write styles so the visited stated is not underlined. If everyone wants to write extra code all the time cool!

As for this comment, since it's a React component, you should only need to do this once in your application. I'm not sure I understand the issue?

I've had to add this class more than once as the default behavior gives an underline. Maybe this isnt the exact cause, I would have to dig further but I think I'll drop this though because its too much effort. its easier to overwrite when needed.


Add area for inserting the news preview text

Due to the truncation of the text after 50 words, there may be problems in the view on the website.
@kMutagene

Done. @CMR248 i put the first sentence of each item in the preview frontmatter, but ideally the preview should be more like a really short summary so it may be necessary to adjust those.


Performance of MODNet is poor when trained on 1024x1024

Hey, I read your paper and its awesome!, I trained it on 512x512 resolution, it is really good, but when i trained the same data on higher resolution like 1024x1024 (ofcourse by using resizing by short and randomcropping), but the performace difference is very noticeable. Any sugesstions on changes that i need to make the model better on higher resolution?

Hi, thanks for your attention.
Based on my experience:

It may help to get better results to train the model with the input image of size 640x640
If you want to handle high-resolution images, you may try using the refinement module. You can choose:
a) Deep Guided Filter
b) The fine-tuning sub-network proposed in Background Matting V2

Thannks for your reply, I tested your Model with a different backbone and seems like the model is performing really good in high resolution network module where as the fusion result is comparetively poor in semantic module. Is it because of the Squeeze and Excitation block being used instead of E-ASPP module. if not  E-ASPP can you please share how to use ASPP module? And is the poor performance in Semantic module due to very low level decoder results?

@hackkhai I'm getting getting same issue in training for high resolution images. Can please suggest me which backbone model you used for training of high resolution images which gives you better results ?

try larger backbones like HRNet or efficientnet

@hackkhai Thank you so much for your reply !

@hackkhai I'm trying to load HRNet module at backbone but in wrapper function i'm getting error in reducing layers. AttributeError: 'HighResolutionNet' object has no attribute 'features'
Can you please help me out in solving this issue ?
Can you share your backbone architecture and weights with me. Thank you!

Hi, thanks for your attention. Training with 1024 resolution images doesn't seem like a good idea, because it requires a lot of training/testing resources and leads to an insufficient receptive field in the latent space. Based on my experience:

It may help to get better results to train the model with the input image of size 640x640
If you want to handle high-resolution images, you may try using the refinement module. You can choose:
a) Deep Guided Filter
b) The fine-tuning sub-network proposed in Background Matting V2

The Receptive field for MobilenetV2 when using 1024 input layer is 1483, where as RF when the input layer is 512 is 683. This happens due the Avg pool kernel becomes 16 when the input layer is 1024 and it is 7 when the input layer is 512.
Considering the RF change it should be possible to train the 1024.
But when I train using 1024 with out changes to hyperparameters there is no quality improvement over 512 input.

@hackkhai
Hi, as I'm having some problems with the training process, which is causing this loss to barely go down, and very presumptuously, could you please share your training script and the dataloader part of the code?


Fixed bug regarding the display of Wayland's on-screen keyboard

I fixed the following bug.
See: https://github.com/sony/flutter-embedded-linux/issues/108#issuecomment-845544970

Some additional observations:
If the user switches from the Flutter Wayland application with the onscreen keyboard opened, the keyboard will behave as expected (close or remain opened).
However when the user returns back to the Flutter app, the text field appears to have the focus (cursor is blinking) but the onscreen keyboard will be closed.
To bring the onscreen keyboard again - lose focus from the input field and tap on it again or focus on a different input field.

@taka-okayama Can you review the PR?


message_thread_id in sendmessenger

I can't send messenger to some topic in supoergroup by add message_thread_id.  Anyone have solution for this

The last update of the library was almost 2 years ago. Therefore, this package does not support topics. Alternatively, you can switch to node-telegram-bot-api, the syntax is similar to telebot and is constantly updated.

after I reply to topic ID, everything is ok


I have a suggestion.

This might not be the best place for this but not sure where else to put it.
https://angular-ui.github.io/bootstrap/
on this page could you list what version each property or option was created in?

@Ansrala, we here on the Angular UI Bootstrap team like to think of ourselves as pretty brilliant individuals but sadly, we are not omniscient, nor can we read minds.  Thus, we must ask you to tell us your suggestion.

@Ansrala, not on that page, no.  But, you can look at the CHANGELOG to see that information.
In fact, it's a really good idea to view the CHANGELOG when upgrading - taking an especially good look at the Breaking Changes section.


Add quotes around response statuses in standalone 3.0 examples

According to the 3.0 Specification, response status codes must be quoted. This PR fixes the examples in the examples\v3.0 folder.
Single vs double quotes: Some examples use " for quoting and others use '. I used the same quote character as in the rest of each file.

@hkosova - for consistency, can you change it all to single quotes?

@webron - Done.

Thanks @hkosova


overload in(x, o::Py) to call o.__contains__(x)

I just noticed that PyCall was missing an overload of in for PyObject, and I figured you might want the same for Py.

There are a few other such methods that might be worth implementing as well: https://docs.python.org/3/library/operator.html


Project Stability

Hi @smurfix.  Great work here on this project.  I have a few questions as to the stability and level of effort you are willing to put into this project.  I am building a new full stack async python web, api and cli framework and will be using this async click implementation if stable.
Questions

There seems to be a few repos involved.  If you look on pypi the 'Homepage' link points to http://github.com/python-trio/asyncclick which is a broken URL.  Is this smurfix/trio-click the correct repo?  Or is python-trio/trio-click a better place.  Which is the correct and updated repo?
The project is not keeping up with upstream pallets/click which is now at version 7.1.x.
I think an async version of click is a must have these days with more and more python code being async.  This seems to be an invaluable project that should be maintained with an energy injection.  Thoughts?

Yes I need to clean up my repositories. On the TODO list.
Keeping up with upstream should not be a problem. Upstream did take up my suggestion to add a context stack, which will simplify things a bit, except that they also renamed it. :-/
The problem is that anyio is about to release version 2.0. I am waiting for a release of that.


PWX-37961: In unlock don't write to the channel

What this PR does / why we need it:
Which issue(s) this PR fixes (optional)
Closes #
Special notes for your reviewer:

Can we remove the comment about double unlock ?
Can we unconditionally close the channel ? that way we automatically expire the locks even if CAD fails with connection issues ?


Add a new Friend

Your pull request needs further work because of the following reason(s):

Your filename must be leofls.html

Once you have resolved the issues, comment on this request to be re-judged
This is an automated response, beep boop.
if you think there is a mistake, contact a maintainer

58cbacee5e876bfbbde64f79883a7949b8847a02

This PR has been idle for more than 24 hours, and will now be closed. Feel free to re-open.
This is an automated response, beep boop.
if you think there is a mistake, contact a maintainer

2d020b173e09116b4db668956e9e6cf79700d361