Generate @resultbuilder with SwiftSyntaxBuilder

Depends on

[x]  #480
[x] #485

This is still WIP, and there is still some way to go!
With gyb
@resultBuilder
public struct CodeBlockItemListBuilder {

  /// The type of individual statement expressions in the transformed function,
  /// which defaults to Component if buildExpression() is not provided.
  public typealias Expression = ExpressibleAsCodeBlockItem

  /// The type of a partial result, which will be carried through all of the
  /// build methods.
  public typealias Component = [ExpressibleAsCodeBlockItem]

  /// The type of the final returned result, which defaults to Component if
  /// buildFinalResult() is not provided.
  public typealias FinalResult = CodeBlockItemList

  /// Required by every result builder to build combined results from
  /// statement blocks.
  public static func buildBlock(_ components: Component...) -> Component {
    return components.flatMap { $0 }
  }

  /// If declared, provides contextual type information for statement
  /// expressions to translate them into partial results.
  public static func buildExpression(_ expression: Expression) -> Component {
    return [expression]
  }

  /// Add all the elements of `expression` to this result builder, effectively flattening them.
  public static func buildExpression(_ expression: ExpressibleAsCodeBlockItemList) -> Component {
    return expression.createCodeBlockItemList().elements
  }

  /// Enables support for `if` statements that do not have an `else`.
  public static func buildOptional(_ component: Component?) -> Component {
    return component ?? []
  }

  /// With buildEither(second:), enables support for 'if-else' and 'switch'
  /// statements by folding conditional results into a single result.
  public static func buildEither(first component: Component) -> Component {
    return component
  }

  /// With buildEither(first:), enables support for 'if-else' and 'switch'
  /// statements by folding conditional results into a single result.
  public static func buildEither(second component: Component) -> Component {
    return component
  }

  /// Enables support for 'for..in' loops by combining the
  /// results of all iterations into a single result.
  public static func buildArray(_ components: [Component]) -> Component {
    return components.flatMap { $0 }
  }

  /// If declared, this will be called on the partial result of an 'if
  /// #available' block to allow the result builder to erase type
  /// information.
  public static func buildLimitedAvailability(_ component: Component) -> Component {
    return component
  }

  /// If declared, this will be called on the partial result from the outermost
  /// block statement to produce the final returned result.
  public static func buildFinalResult(_ component: Component) -> FinalResult {
    return .init(component.map { $0.createCodeBlockItem() })
  }
}

With SwiftSyntaxBuilderGeneration
@resultBuilder
public struct CodeBlockItemListBuilder{

/// Required by every result builder to build combined results from
/// statement blocks.
public static func buildBlock(_ components: Component...)-> Component{
    return components.flatMap()
  }

/// If declared, provides contextual type information for statement
/// expressions to translate them into partial results.
public static func buildExpression(_ expression: Expression)-> Component{
    return [expression]
  }

/// Add all the elements of `expression` to this result builder, effectively flattening them.
public static func buildExpression(_ expression: ExpressibleAsCodeBlockItemList)-> Component{
    return components.flatMap()
  }

/// Enables support for `if` statements that do not have an `else`.
public static func buildOptional(_ component: Component?)-> Component{
    return component??[]
  }

/// With buildEither(second:), enables support for 'if-else' and 'switch'
/// statements by folding conditional results into a single result.
public static func buildEither(firstcomponent: Component)-> Component{
    return component
  }

/// With buildEither(first:), enables support for 'if-else' and 'switch'
/// statements by folding conditional results into a single result.
public static func buildEither(secondcomponent: Component)-> Component{
    return component
  }

/// Enables support for 'for..in' loops by combining the
/// results of all iterations into a single result.
public static func buildArray(_ components: [Component])-> Component{
    return .component
  }

/// If declared, this will be called on the partial result of an 'if'
/// #available' block to allow the result builder to erase type
/// information.
public static func buildLimitedAvailability(_ component: Component)-> Component{
    return component
  }

/// If declared, this will be called on the partial result from the outermost
/// block statement to produce the final returned result.
public static func buildFinalResult(_ component: Component)-> Component{
  }
}

rdar://99492975

@swift-ci please test

@swift-ci Please test

@swift-ci please test


screengrab appending weird characters in the beginning and at end of commands executed

New Issue Checklist

[ Y] Updated fastlane to the latest version
[Y ] I have read the Contribution Guidelines

Issue Description
Running ScreenGrab on Jenkins : While executing 'screengrab" command some weird characters are getting appended at both beginning and at the end of the all command executed by screengrab which is not letting the tool run, when i execute the same command over shell it is working fine

Complete output when running fastlane, including the stack trace and command used
/usr/bin/env bash /var/folders/g8/m6nw30110094mk5nh8pj991c0000gn/T/hudson1344588153603882317.sh
+-----------------------------+--------------------------------------------------------------------+
|                                   Summary for screengrab 0.3.2                                   |
+-----------------------------+--------------------------------------------------------------------+
| app_apk_path                | /Users/BuildBot/Desktop/Android-Screenshot/app-devGoogle-debug.apk |
| tests_apk_path              | /Users/BuildBot/Desktop/Android-Screenshot/app-devGoogle-debug-... |
| output_directory            | /Users/BuildBot/Desktop/Android-Screenshot                         |
| app_package_name            | com.test.android                                         |
| android_home                | /Users/BuildBot/Library/Android/sdk                                |
| clear_previous_screenshots  | true                                                               |
| device_type                 | phone                                                              |
| tests_package_name          | com.test.android.test                                    |
| locales                     | ["en-US"]                                                          |
| skip_open_summary           | false                                                              |
| test_instrumentation_runner | android.support.test.runner.AndroidJUnitRunner                     |
| ending_locale               | en-US                                                              |
+-----------------------------+--------------------------------------------------------------------+

[10:44:27]: Limiting the test classes run by `screengrab` to just those that generate screenshots can make runs faster.
[10:44:27]: Consider using the :use_tests_in_classes or :use_tests_in_packages option, and organize your tests accordingly.
[10:44:27]: Clearing phoneScreenshots within /Users/BuildBot/Desktop/Android-Screenshot
[10:44:27]: $ adb devices -l
No such file or directory - fork failed
-------------------------------------------------------------------------------------------
😨  An error occured. Please enable crash reports using `fastlane enable_crash_reporting`.
👍  This makes resolving issues much easier and helps improve fastlane.
🔒  The reports will be stored securely on getsentry.com.
🙊  More information about privacy: https://github.com/fastlane/fastlane/releases/tag/1.33.3
-------------------------------------------------------------------------------------------
/Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.39.1/lib/fastlane_core/command_executor.rb:46:in `spawn': [!] No such file or directory - fork failed (Errno::ENOENT)
    from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.39.1/lib/fastlane_core/command_executor.rb:46:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/screengrab-0.3.2/lib/screengrab/runner.rb:80:in `select_device'
    from /Library/Ruby/Gems/2.0.0/gems/screengrab-0.3.2/lib/screengrab/runner.rb:52:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/screengrab-0.3.2/bin/screengrab:39:in `block (2 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.39.1/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/screengrab-0.3.2/bin/screengrab:56:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/screengrab-0.3.2/bin/screengrab:62:in `<main>'
/var/folders/g8/m6nw30110094mk5nh8pj991c0000gn/T/hudson1344588153603882317.sh: line 15: adb: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Configuration Files
screengrab -k '/Users/BuildBot/Desktop/Android-Screenshot/app-devGoogle-debug.apk' -b '/Users/BuildBot/Desktop/Android-Screenshot/app-devGoogle-debug-androidTest-unaligned.apk' -o '/Users/BuildBot/Desktop/Android-Screenshot' -a 'com.test.android' -n '/Users/BuildBot/Library/Android/sdk' --clear_previous_screenshots true -d phone
Fastfile:
# INSERT CONTENT HERE : Not using fastfile , writing everyhing in screengrab script file pasted above

Environment
fastlane version (run fastlane -v): 0.3.2
Do you use bundler to execute fastlane (i.e. bundle exec fastlane)? no
Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? rbenv

Can someone please respond and let me know if you consider it a issue in Screengrab  tool ?

Does it run fine locally?

yes it runs absolutely fine locally , infact i tried running it on jenkins machine with same command/script and it worked flawlessly

You're not getting "weird characters" anymore?

No , what i am saying here is that I am running the same command on jenkins machine as well as on my local machine flawlessly
but when coming to execute the same command through jenkins Job , the above is the outcome.

any idea about it ?

I'm not sure, but the adb: command not found error sounds like it can't find it in in the PATH var.

It looks like there hasn’t been any recent activity on this issue in some time, so I’m closing it. If this is still a problem, feel free to re-open a new issue and I’d be happy to help :+1:

You can try: apt-get install android-tools-adb =)

@kpuneet I'm having the exact same issue. Did you solve it?

try to add adb path in your environment:something like "your_path_to_sdk\Android\sdk\platform-tools\adb") or install android adb tools from repository

@BadPitt I've added adb path in my environment, but apparently it got altered due a misconfiguration. This is no longer an issue. Thanks


Map overlaps potentially misleading

Big improvement on the page. Great work. And thank you for making the page's code available on GitHub.
Possible issue; If you tab from countries to regions to councils, the overlapping colours could imply there are more case from one to the next, which isn't true.

Maps are hard, but just thought I would say.
Keep up the great work!

 Make Blobs on map more intuitive

 Base circle radius scales at 0 cases and 0 pixels


Postgres setup only works when DB_PORT specified explicitly

Tried to setup using docker-compose.postgres.yml. Initialization seems to work but then login is impossible. Looking into log one can find that koel is trying to connect using port 3306 instead of 5432.
Long story short: One has to add env var DB_PORT=5432 to docker-compose.postgres.yml in order to make it work.

I can confirm this, report from laravel
SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "database" (<IP_ADDRESS>) and accepting
TCP/IP connections on port 3306? (SQL: select * from "personal_access_tokens" where "token" = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 limit 1)

after doing php artisan koel:init --no-assets i hade to run php artisan serve and then i could login

hm I'm trying to install koel once again and now I'm getting this..
koel@via:~/docker$ docker compose -f ./docker-compose.postgres.yml up
[+] Running 2/0
 ✔ Container docker-database-1  Created                                                                                0.0s
 ✔ Container docker-koel-1      Created                                                                                0.0s
Attaching to docker-database-1, docker-koel-1
docker-database-1  |
docker-database-1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
docker-database-1  |
docker-database-1  | 2023-11-11 17:37:40.892 UTC [1] LOG:  starting PostgreSQL 13.12 (Debian 13.12-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
docker-database-1  | 2023-11-11 17:37:40.893 UTC [1] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
docker-database-1  | 2023-11-11 17:37:40.893 UTC [1] LOG:  listening on IPv6 address "::", port 5432
docker-database-1  | 2023-11-11 17:37:40.895 UTC [1] LOG:  could not create Unix socket for address "/var/run/postgresql/.s.PGSQL.5432": Permission denied
docker-database-1  | 2023-11-11 17:37:40.895 UTC [1] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
docker-database-1  | 2023-11-11 17:37:40.895 UTC [1] FATAL:  could not create any Unix-domain sockets
docker-database-1  | 2023-11-11 17:37:40.898 UTC [1] LOG:  database system is shut down
docker-database-1 exited with code 1

Lets get a PR out to update the documentation for the docker compose file to include this environment variable.


Cluster prepare proceeds when a configured login already exists

We shouldn't allow cluster prepare to overwrite an existing cluster login for a fully configured cluster,

FIXED: We detect this situation and throw an exception now.


refactor: move acos() to function crate

Which issue does this PR close?
Part of #9285
Rationale for this change
What changes are included in this PR?
Move math function acos() to the function crate
Are these changes tested?
Let's try this in CI:<
Are there any user-facing changes?
I guess no

Thanks @SteveLauC  -- it appears there are some CI failuers

Hi @alamb, I think I might need some help on the sqllogictest CI error, with the acos() function implemented in this PR:

select(acos(NULL) would return a column of type ? rather than R
select(acos(0), acos(1)) would return columns of type II rather than RR

Honestly, I have no idea about the above behavios...

Hi @alamb, I think I might need some help on the sqllogictest CI error, with the acos() function implemented in this PR:

select(acos(NULL) would return a column of type ? rather than R
select(acos(0), acos(1)) would return columns of type II rather than RR

Honestly, I have no idea about the above behavios...

Update: I just realized that it is a mistake that I made in <AsocFunc as ScalarUDFImpl>::return_type()

It feels that when we do select(acos(NULL)), AsocFunc::return_type() can see the passed DataType::Null, but AsocFunc::invoke() cannot because I didn't see a following panic message:
Unsupported data type DataType::Null for function asoc

It seems that DataFusion will handle those special values for you.

select acos() will panic, but I think it should be checked at a higher level, before the implementation of acos.
DataFusion CLI v36.0.0
❯ select acos();
thread 'main' panicked at datafusion/functions/src/math/acos.rs:57:25:
index out of bounds: the len is 0 but the index is 0

select acos() will panic, but I think it should be checked at a higher level, before the implementation of acos.

Huge thanks for catching it!
Just realized isnan() also has this issue, cc @alamb:
$ ./target/debug/datafusion-cli
DataFusion CLI v36.0.0
❯ select isnan();
thread 'main' panicked at /home/steve/Documents/workspace/GitHub/arrow-datafusion/datafusion/functions/src/math/nans.rs:67:39:
index out of bounds: the len is 0 but the index is 0

select acos() will panic, but I think it should be checked at a higher level, before the implementation of acos.

Huge thanks for catching it!
Just realized isnan() also has this issue, cc @alamb:
$ ./target/debug/datafusion-cli
DataFusion CLI v36.0.0
❯ select isnan();
thread 'main' panicked at /home/steve/Documents/workspace/GitHub/arrow-datafusion/datafusion/functions/src/math/nans.rs:67:39:
index out of bounds: the len is 0 but the index is 0

And cc @yyy1000, abs() also suffers from this.

but I think it should be checked at a higher level, before the implementation of acos.

Yeah, we should do it before invoking the function

Yeah, thanks for telling me @SteveLauC
I added the logic just now. :)

I took the liberty of merging up from main and resolving a conflict on this OR

Thanks again @SteveLauC


Unable to Delete Records from CosmosDB

Package Name:
Package Version:
Operating system:
[ ] nodejs

version:

[ ] browser

name/version:

[ ] typescript

version:

Is the bug related to documentation in

[ ] README.md
[ ] source code documentation
[ ] SDK API docs on https://docs.microsoft.com

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
1.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Hi Team,
Iam using @azure/cosmosdb to perform bulk delete also iam handling thorttling but still it is not delteting the records.
Below is the code.
  operations.push({
                operationType: "Delete",
                id: superItem.id,
                partitionKey: superItem.partitionKey
            })
  if (i % 100 === 0 || i === 1) {
                try {
                    var response = await createdContainer.items.bulk(operations);
                     throttledCount = response.filter((r) => r.statusCode === 429).length;
                     while (throttledCount !== 0) {
                         response = await createdContainer.items.bulk(operations);
                                                throttledCount = response.filter((r) => r.statusCode === 429).length;
                     }
                     let successCount =response.filter((r) => r.statusCode === 201).length;
                } catch (error) {
                    console.log("Error Occured in Bulk Operation" + error);
                }

In the above code iam passing the id and partitionKey key to delete the records but if i  push 100 records to operations every time its deleting 42 records only and skipping remaining records.
Could anyone please help me to resolve the issue

May i know the status on this?

@harikapampatti  Thanks for reporting the issue, We are investigating it now and will update you soon!

@sajeetharan - Any update on this issue?

@harikapampatti We are trying to replicate the Issue, can you provide more details in order to replicate this on our side. While we are looking at it, can you also try to delete the items sequentially without doing an iteration?

@harikapampatti please reopen if needed. Issue stale.


Enable configuration files to "extend" other configuration files

This PR implements an extends keyword in the pyproject.toml schema. When provided, we resolve a pyproject.toml file by first loading the file pointed to by extends, then overriding it with any properties defined in the current file.
Configuration files are resolved recursively, such that the file you extends can also have an extends (and we error if you introduce a cycle).
In implementing this feature, I had to shift around some of the responsibilities that are split between Options, Configuration, and Settings (which are all bad names). As of this PR, they are as follows:

Options is the simplest: it's the exact schema implemented in TOML. It's the thing we read from a pyproject.toml file. Every field is Option.
Settings is the fully resolved, internal settings for the linter. It doesn't have to look like the user-facing representation in the TOML file. For example, it includes a single FxHashSet of enabled check codes, rather than an ignore and select list. None of the fields are Option, and Settings is responsible for translating each field from None to defaults.
Configuration is the intermediate representation that results from taking Options and resolving them relative to a given file system path. For example, Options can include excludes, which are relative paths. When we transform Options to Configuration, we have to provide a "project root" relative to which it's resolved. From there, we transform any paths into absolute paths based on that project root. All of the fields on Configuration are also Option. (This changed in this PR.)

When creating a Settings, we load the final pyproject.toml file from disk into Options, then into Configuration. We then look at the extends keyword and iteratively collect all of the Configuration structs. When we're done, we go through and merge them into a single Configuration. (This is why I had to make all fields on Configuration optional -- so that we can tell what's defined, and what's not.) Finally, we take the Configuration and transform it into Settings.
Closes #1055. Closes #1215. #552 is also relevant.

@smackesey - This, combined with the changes on main, will let you apply this patch to https://github.com/dagster-io/dagster/pull/10901:
diff --git a/examples/docs_snippets/pyproject.toml b/examples/docs_snippets/pyproject.toml
index 13f6920c45..70bc2806fe 100644
--- a/examples/docs_snippets/pyproject.toml
+++ b/examples/docs_snippets/pyproject.toml
@@ -9,3 +9,14 @@ line-length = 88
 preview = true
 required-version = "22.10.0"
 target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
+
+[tool.ruff]
+extend = "../../pyproject.toml"
+
+extend-ignore = [
+
+  # (local variable assigned but never used): This happens a lot in the docs snippets for didactic
+  # purposes.
+  "F841",
+
+]
diff --git a/pyproject.toml b/pyproject.toml
index 4012d47c3e..2c62a258d5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -117,11 +117,6 @@ ignore = [
   "T201",  # (no print call)
   "T203",  # (no pprint call)

-  # (local variable assigned but never used): This happens a lot in the docs snippets for didactic
-  # purposes. We are putting it in the global rather than file-specific ignore pending resolution of
-  # a bug with file-specific ignores.
-  "F841",
-
 ]

 # Match black. Note that this also checks comment line length, but black does not format comments.

@andersk - Since you brought up overrides in #552, wondering what your stance is on how the "extends" semantics should work here. (If you're busy, all good, no worries.)
Right now, if you extends, we don't do any merging of any fields. It's effectively equivalent to {**parent, **child} (assuming that any fields omitted in the pyproject.toml are considered absent from the dicts rather than None, in the Python analogy).
I think ESLint merges the fields between parent and child. So, like, if one field is a list of plugins, I believe ESLint will just concatenate the lists when merging a parent into a child.
I think I'd prefer something more explicit? I've considered using the extend-select (and related) fields for this purpose. So if the child sets a select, it would totally ignore the parent select. If a child sets extend-select, we actually wouldn't override the parent extend-select, and instead we'd effectively apply the parents settings, then the child's. This would enable children to always tweak the parent configurations.

One question with that strategy is what should happen if the parent sets select = ["F4"] and ignore = ["F401"] and the child sets extend-select = ["F401"]? Within the same configuration, ignore would ordinarily preside over select, but perhaps a child should always preside over its parent? What if the child sets extend-select = ["F40"] instead?

@andersk - Yeah, my instinct is that the child should always preside over the parent.
So the algorithm would be, roughly:

Generate the base set of codes from select and ignore.
Apply the parent's extend-select + extend-ignore.
Apply the child's extend-select + extend-ignore.
(Apply the command-line-provided extend-select and extend-ignore?)

On that last point: as an example, this today doesn't enable F407, but I kind of think it should?
flake8 resources/test/fixtures/pyflakes/F407.py --ignore F407 --extend-select F407

(Ok, all STOPSHIP directives are removed. But this needs tests.)


Add Cart model

Move Cart from session-based to model-based. Fixes #468

Current coverage is 47.99% (diff: 48.98%)

Merging #540 into master will decrease coverage by 1.88%

@@             master       #540   diff @@
==========================================
  Files            91         94     +3
  Lines          4154       4332   +178
  Methods           0          0
  Messages          0          0
  Branches        430        448    +18
==========================================
+ Hits           2072       2079     +7
- Misses         2025       2196   +171
  Partials         57         57

Powered by Codecov. Last update 9e2482b...f4d1a4e

Decorators need test coverage. Same for add to cart view.
Files that contain strings need the unicode_literals import to get same behaviour under Python 2 and 3.

Closing in favour of #562


Winget List - support for version filtering

Description of the new feature / enhancement
#1155
Hi.
I often need to check if a specific package version is installed, or what version of a specific package is installed.
Currently I have to parse text output, which is not fun, given the variable column names/widths etc.
Proposal: Add a --version argument to the list command similar to search / install / uninstall. Only show matches to that version.
Optionally --version-min and -- version-max and differentiation between "not installed" and "wrong version"
Thanks!
Proposed technical implementation details
winget list <query> [--version <string>]
Only return packages if matching the version
Optional:
winget list <query> [--version-min <string1>] [--version-max <string2>]
Only show if installed version >= min version and/or <= max-version (should support one argument or both together)
Alphanumeric Dot-Version string comparison
Not compatible with --version. Alternatively, make --version support '>', '<', '>=', '<=' and some character for "in between" that is not usually used in versions ('*','~', '<>' etc.) Ex: --version '<=1.2.3a' or --version '1.2.6<>1.3.9a'
Optional: different messages / exit codes for "no package" vs "different version is present"

You can already do this with the PowerShell cmdlets for winget, for example:
Get-WinGetPackage -Id Git.Git -Source winget | Where-Object Version -like '2.32.*'

doing a comparison like 1.2.6<>1.3.9a is trickier because not all version numbers are purely numeric. In the simple cases you can do:
Get-WinGetPackage -Id Git.Git -Source winget | Where-Object {
    [Version]$_.Version -gt '2.30' -and [Version]$_.Version -lt '2.40'
}

[Policy] Command-List

I think the other useful scenario here is to help clarify when the current installed version is "Unknown".


Fix code scanning alert - Inclusion of functionality from an untrusted source

Tracking issue for:

[ ] https://github.com/N3v1/Calculator/security/code-scanning/2

Yes @chavi362, if you want you can work on it
Thank you kindly
Best regards
NH

@N3v1 , thank you for assigning.
I would like to solve it, but first please merge my previous pull requet.
lot of thanks

@N3v1 , thank you for assigning. I would like to solve it, but first please merge my previous pull request. a lot of thanks

See #26 - there lots of other conflicts

@N3v1 , please explain me the bug, the link you add brings me into 404 not found, so I don't understand the bug.

@chavi36, see https://github.com/N3v1/Calculator/security/code-scanning/2
If it doesn’t work, it’s about the script in index.html in l.37. CodeQL says:

Note
Script loaded from content delivery >network with no integrity check.
CodeQL

Inclusion of functionality from an untrusted source

Severity: Medium

Affected branches: main

Tags: security

Weaknesses: CWE-830

Tool
CodeQL
Rule ID
js/functionality-from-untrusted-source
Query
View source
Including a resource from an untrusted source or using an untrusted channel may allow an attacker to include arbitrary code in the response. When including an external resource (for example, a script element or an iframe element) on a page, it is important to ensure that the received data is not malicious.
When including external resources, it is possible to verify that the responding server is the intended one by using an https URL. This prevents a MITM (man-in-the-middle) attack where an attacker might have been able to spoof a server response.
Even when https is used, an attacker might still compromise the server. When you use a script element, you can check for subresource integrity - that is, you can check the contents of the data received by supplying a cryptographic digest of the expected sources to the script element. The script will only load sources that match the digest and an attacker will be unable to modify the script even when the server is compromised.
Subresource integrity checking is commonly recommended when importing a fixed version of a library - for example, from a CDN (content-delivery network). Then, the fixed digest of that version of the library can easily be added to the script element's integrity attribute.
Recommendation
When an iframe element is used to embed a page, it is important to use an https URL.
When using a script element to load a script, it is important to use an https URL and to consider checking subresource integrity.
Example
The following example loads the jQuery library from the jQuery CDN without using https and without checking subresource integrity.
<html>
    <head>
        <title>jQuery demo</title>
        <script src="http://code.jquery.com/jquery-3.6.0.slim.min.js" crossorigin="anonymous"></script>
    </head>
    <body>
        ...
    </body>
</html>

Instead, loading jQuery from the same domain using https and checking subresource integrity is recommended, as in the next example.
<html>
    <head>
        <title>jQuery demo</title>
        <script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script>
    </head>
    <body>
        ...
    </body>
</html>

References
MDN: Subresource Integrity
Smashing Magazine: Understanding Subresource Integrity
Common Weakness Enumeration: CWE-830.

@N3v1 , I succeded to solve it!
I made a pull request, and I will be happy to see it merged
Thank you!

Thank you for your work @chavi362


Thank you for your help! And there is another problem.

Thank you for your updating your code sincerely! It really worked. But there is another bug: "ImportError: No module named Leap". I guess it comes from an old version of LeapSDK that you used. My LeapSDK is 2.3.1+31549 win. So if I want to run this code, what changes should I make? Again and sincerely thank you for your help!

I'm not an expert in Windows, but for both my Mac and Linux machine I had to import the Python libraries into the program. I think this may help.


Sizeof fails on GeoDataFrame when passing kwarg to map_partitions

Almost definitely related to #3972 and #3976, but I'm not too sure since the technical details there are above me.
I found this bug when passing a GeoDataFrame as a keyword argument to dataframe.map_partitions. Interestingly enough, this only happened after I updated to Dask 1.1 from Dask 0.17. I suspect this is related to the changes in https://github.com/dask/dask/pull/3998
Weirdly enough, Dask seems to manage Dataframes containing shapely objects just fine, but once a GeoDataFrame is passed, Dask is unable to determine its sizeof and fails.
Here's a reproducible example with two cases:

Case 1: Make a Pandas DF with a Shapely geometry column, convert to Dask DF and pass to map_partitions to buffer geometries. Specify geometry as str in the meta.
Case 2: Same, but use map_partitions with a different function that takes a polygon GeoDataFrame and keeps only the point inside the polygon.

df = pd.DataFrame({
    'id': [0, 1],
    'geometry': [Point(0,0), Point(2,2)]
})
ddf = dd.from_pandas(df, npartitions=2).copy()

# CASE 1
## This works fine
def buffer_points(d):
    gdf = gpd.GeoDataFrame(d)
    gdf['geometry'] = gdf.buffer(0.1)
    return gdf

ddf.map_partitions(
    buffer_points,
    meta=[('id', str), ('geometry', str)]
).compute()

# CASE 2
def intersect_points(d, other_gdf):
    gdf = gpd.GeoDataFrame(d)
    sjoin = gpd.sjoin(gdf, other_gdf, op='within')
    sjoin.rename(index=str, columns={'id_left': 'id'}, inplace=True)

    return sjoin[['id', 'geometry']]

p1_buffered = gpd.GeoDataFrame({
    'id': [0],
    'geometry': [Point(0,0).buffer(0.1)]
})

# Only Pandas works fine
print(intersect_points(df, p1_buffered))

# Using Dask fails
ddf.map_partitions(
    intersect_points,
    other_gdf=p1_buffered,
    meta=[('id', str), ('geometry', str)]
)

# Error is `ValueError: 'values' must be a NumPy array.`

This issue is easy to work around (just pass a Pandas' (not GeoPandas') DF as kwarg and convert to GeoPandas inside the map_partitions function), but it may help to solve #3972 and #3976 or other users.
The full stack trace is:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-79-a27b715cad40> in <module>
      2     intersect_points,
      3     other_gdf=p1_buffered,
----> 4     meta=[('id', str), ('geometry', str)]
      5 )

/usr/local/lib/python3.6/site-packages/dask/dataframe/core.py in map_partitions(self, func, *args, **kwargs)
    558         >>> ddf.map_partitions(func).clear_divisions()  # doctest: +SKIP
    559         """
--> 560         return map_partitions(func, self, *args, **kwargs)
    561
    562     @insert_meta_param_description(pad=12)

/usr/local/lib/python3.6/site-packages/dask/dataframe/core.py in map_partitions(func, *args, **kwargs)
   3705
   3706     # Normalize keyword arguments
-> 3707     kwargs2 = {k: normalize_arg(v) for k, v in kwargs.items()}
   3708
   3709     assert callable(func)

/usr/local/lib/python3.6/site-packages/dask/dataframe/core.py in <dictcomp>(.0)
   3705
   3706     # Normalize keyword arguments
-> 3707     kwargs2 = {k: normalize_arg(v) for k, v in kwargs.items()}
   3708
   3709     assert callable(func)

/usr/local/lib/python3.6/site-packages/dask/array/core.py in normalize_arg(x)
    301     elif isinstance(x, str) and re.match(r'_\d+', x):
    302         return delayed(x)
--> 303     elif sizeof(x) > 1e6:
    304         return delayed(x)
    305     else:

/usr/local/lib/python3.6/site-packages/dask/utils.py in __call__(self, arg, *args, **kwargs)
    411         """
    412         meth = self.dispatch(type(arg))
--> 413         return meth(arg, *args, **kwargs)
    414
    415     @property

/usr/local/lib/python3.6/site-packages/dask/sizeof.py in sizeof_default(o)
     18 @sizeof.register(object)
     19 def sizeof_default(o):
---> 20     return getsizeof(o)
     21
     22

/usr/local/lib/python3.6/site-packages/pandas/core/base.py in __sizeof__(self)
    115         """
    116         if hasattr(self, 'memory_usage'):
--> 117             mem = self.memory_usage(deep=True)
    118             if not is_scalar(mem):
    119                 mem = mem.sum()

/usr/local/lib/python3.6/site-packages/pandas/core/frame.py in memory_usage(self, index, deep)
   2584         """
   2585         result = Series([c.memory_usage(index=False, deep=deep)
-> 2586                          for col, c in self.iteritems()], index=self.columns)
   2587         if index:
   2588             result = Series(self.index.memory_usage(deep=deep),

/usr/local/lib/python3.6/site-packages/pandas/core/frame.py in <listcomp>(.0)
   2584         """
   2585         result = Series([c.memory_usage(index=False, deep=deep)
-> 2586                          for col, c in self.iteritems()], index=self.columns)
   2587         if index:
   2588             result = Series(self.index.memory_usage(deep=deep),

/usr/local/lib/python3.6/site-packages/pandas/core/series.py in memory_usage(self, index, deep)
   3911         212
   3912         """
-> 3913         v = super(Series, self).memory_usage(deep=deep)
   3914         if index:
   3915             v += self.index.memory_usage(deep=deep)

/usr/local/lib/python3.6/site-packages/pandas/core/base.py in memory_usage(self, deep)
   1408         v = self.array.nbytes
   1409         if deep and is_object_dtype(self) and not PYPY:
-> 1410             v += lib.memory_usage_of_objects(self.array)
   1411         return v
   1412

pandas/_libs/lib.pyx in pandas._libs.lib.memory_usage_of_objects()

/usr/local/lib/python3.6/site-packages/pandas/core/arrays/numpy_.py in __getitem__(self, item)
    224         result = self._ndarray[item]
    225         if not lib.is_scalar(result):
--> 226             result = type(self)(result)
    227         return result
    228

/usr/local/lib/python3.6/site-packages/pandas/core/arrays/numpy_.py in __init__(self, values, copy)
    129             values = values._ndarray
    130         if not isinstance(values, np.ndarray):
--> 131             raise ValueError("'values' must be a NumPy array.")
    132
    133         if values.ndim != 1:

ValueError: 'values' must be a NumPy array.

Looking at the stack trace it looks like this might be reproducible by just
calling sys.getsizeof on a geopandas dataframe.  Can you see if this is the
case and, if so, raise upstream at geopandas?
On Fri, Feb 1, 2019 at 7:32 AM arredond<EMAIL_ADDRESS>wrote:

Almost definitely related to #3972
https://github.com/dask/dask/issues/3972 and #3976
https://github.com/dask/dask/issues/3976, but I'm not too sure since
the technical details there are above me.
I found this bug when passing a GeoDataFrame as a keyword argument to
dataframe.map_partitions. Interestingly enough, this only happened after
I updated to Dask 1.1 from Dask 0.17. I suspect this is related to the
changes in #3998 https://github.com/dask/dask/pull/3998
Weirdly enough, Dask seems to manage Dataframes containing shapely objects
just fine, but once a GeoDataFrame is passed, Dask is unable to determine
its sizeof and fails.
Here's a reproducible example with two cases:

Case 1: Make a Pandas DF with a Shapely geometry column, convert to
Dask DF and pass to map_partitions to buffer geometries. Specify
geometry as str in the meta.
Case 2: Same, but use map_partitions with a different function
that takes a polygon GeoDataFrame and keeps only the point inside the
polygon.

df = pd.DataFrame({
'id': [0, 1],
'geometry': [Point(0,0), Point(2,2)]
})
ddf = dd.from_pandas(df, npartitions=2).copy()
CASE 1## This works finedef buffer_points(d):
gdf = gpd.GeoDataFrame(d)
gdf['geometry'] = gdf.buffer(0.1)
return gdf

ddf.map_partitions(
buffer_points,
meta=[('id', str), ('geometry', str)]
).compute()
CASE 2def intersect_points(d, other_gdf):
gdf = gpd.GeoDataFrame(d)
sjoin = gpd.sjoin(gdf, other_gdf, op='within')
sjoin.rename(index=str, columns={'id_left': 'id'}, inplace=True)

return sjoin[['id', 'geometry']]

p1_buffered = gpd.GeoDataFrame({
'id': [0],
'geometry': [Point(0,0).buffer(0.1)]
})
Only Pandas works fineprint(intersect_points(df, p1_buffered))
Using Dask fails
ddf.map_partitions(
intersect_points,
other_gdf=p1_buffered,
meta=[('id', str), ('geometry', str)]
)
Error is ValueError: 'values' must be a NumPy array.
This issue is easy to work around (just pass a Pandas' (not GeoPandas') as
kwarg and convert to GeoPandas inside the map_partitions function), but
it may help to solve #3972 https://github.com/dask/dask/issues/3972 and
#3976 https://github.com/dask/dask/issues/3976 or other users.
The full stack trace is:

ValueError                                Traceback (most recent call last)
 in
2     intersect_points,
3     other_gdf=p1_buffered,
----> 4     meta=[('id', str), ('geometry', str)]
5 )
/usr/local/lib/python3.6/site-packages/dask/dataframe/core.py in map_partitions(self, func, *args, **kwargs)
558         >>> ddf.map_partitions(func).clear_divisions()  # doctest: +SKIP
559         """
--> 560         return map_partitions(func, self, *args, **kwargs)
561
562     @insert_meta_param_description(pad=12)
/usr/local/lib/python3.6/site-packages/dask/dataframe/core.py in map_partitions(func, *args, **kwargs)
3705
3706     # Normalize keyword arguments
-> 3707     kwargs2 = {k: normalize_arg(v) for k, v in kwargs.items()}
3708
3709     assert callable(func)
/usr/local/lib/python3.6/site-packages/dask/dataframe/core.py in (.0)
3705
3706     # Normalize keyword arguments
-> 3707     kwargs2 = {k: normalize_arg(v) for k, v in kwargs.items()}
3708
3709     assert callable(func)
/usr/local/lib/python3.6/site-packages/dask/array/core.py in normalize_arg(x)
301     elif isinstance(x, str) and re.match(r'_\d+', x):
302         return delayed(x)
--> 303     elif sizeof(x) > 1e6:
304         return delayed(x)
305     else:
/usr/local/lib/python3.6/site-packages/dask/utils.py in call(self, arg, *args, **kwargs)
411         """
412         meth = self.dispatch(type(arg))
--> 413         return meth(arg, *args, **kwargs)
414
415     @property
/usr/local/lib/python3.6/site-packages/dask/sizeof.py in sizeof_default(o)
18 @sizeof.register(object)
19 def sizeof_default(o):
---> 20     return getsizeof(o)
21
22
/usr/local/lib/python3.6/site-packages/pandas/core/base.py in sizeof(self)
115         """
116         if hasattr(self, 'memory_usage'):
--> 117             mem = self.memory_usage(deep=True)
118             if not is_scalar(mem):
119                 mem = mem.sum()
/usr/local/lib/python3.6/site-packages/pandas/core/frame.py in memory_usage(self, index, deep)
2584         """
2585         result = Series([c.memory_usage(index=False, deep=deep)
-> 2586                          for col, c in self.iteritems()], index=self.columns)
2587         if index:
2588             result = Series(self.index.memory_usage(deep=deep),
/usr/local/lib/python3.6/site-packages/pandas/core/frame.py in (.0)
2584         """
2585         result = Series([c.memory_usage(index=False, deep=deep)
-> 2586                          for col, c in self.iteritems()], index=self.columns)
2587         if index:
2588             result = Series(self.index.memory_usage(deep=deep),
/usr/local/lib/python3.6/site-packages/pandas/core/series.py in memory_usage(self, index, deep)
3911         212
3912         """
-> 3913         v = super(Series, self).memory_usage(deep=deep)
3914         if index:
3915             v += self.index.memory_usage(deep=deep)
/usr/local/lib/python3.6/site-packages/pandas/core/base.py in memory_usage(self, deep)
1408         v = self.array.nbytes
1409         if deep and is_object_dtype(self) and not PYPY:
-> 1410             v += lib.memory_usage_of_objects(self.array)
1411         return v
1412
pandas/_libs/lib.pyx in pandas._libs.lib.memory_usage_of_objects()
/usr/local/lib/python3.6/site-packages/pandas/core/arrays/numpy_.py in getitem(self, item)
224         result = self._ndarray[item]
225         if not lib.is_scalar(result):
--> 226             result = type(self)(result)
227         return result
228
/usr/local/lib/python3.6/site-packages/pandas/core/arrays/numpy_.py in init(self, values, copy)
129             values = values._ndarray
130         if not isinstance(values, np.ndarray):
--> 131             raise ValueError("'values' must be a NumPy array.")
132
133         if values.ndim != 1:
ValueError: 'values' must be a NumPy array.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/4449, or mute the thread
https://github.com/notifications/unsubscribe-auth/AASszM3a1-S6Owri0JCE6MukxOXRVmtIks5vJF30gaJpZM4aeiPQ
.

Thanks for the swift response.
I tried that, and am not sure it's a GeoPandas' issue, actually. Any DF/GDF with complex data types seem to fail:
# Both of these work
df = pd.DataFrame({'id': [0,1,2]})
gdf = gpd.GeoDataFrame({'id': [0,1,2]})

getsizeof(df) # 128
getsizeof(gdf) # 128

# Scalars seem to be alright
df = pd.DataFrame({'id': [0], 'a_string': ['hola']})
gdf = gpd.GeoDataFrame({'id': [0], 'a_string': ['que_tal']})

getsizeof(df)
getsizeof(gdf)

# Both of these fail
df = pd.DataFrame({'id': [0], 'geometry': [Point(0,0)]})
gdf = gpd.GeoDataFrame({'id': [0], 'geometry': [Point(0,0)]})

getsizeof(df)
getsizeof(gdf)

# Also fail
df = pd.DataFrame({'id': [0], 'inner_list': [[1,2,3,4]]})
gdf = gpd.GeoDataFrame({'id': [0], 'inner_list': [[1,2,3,4]]})

getsizeof(df)
getsizeof(gdf)

Regardless, I suspect that the right place to address this is upstream.  Might want to raise in Pandas given that you can reproduce it with only Pandas and Shapely.

Sorry for insisting on this, but while I agree that Pandas' seems to be responsible for not having implemented sys.getsizeof for cases when the DF contains non-Numpy types, it's clear that Dask itself is working around this with the custom sizeof module.
This fix on Dask's behalf is working for both Pandas' DataFrames and GeoPandas' GeoDataFrames, so something else is going on in the specific groupby/apply case.
# Using Dask's `sizeof` function, not `sys.getsizeof`
df = pd.DataFrame({'id': [0], 'geometry': [Point(0,0)]})
gdf = gpd.GeoDataFrame({'id': [0], 'geometry': [Point(0,0)]})

sizeof(df) # 2152
sizeof(gdf) # 2152

df = pd.DataFrame({'id': [0], 'inner_list': [[1,2,3,4]]})
gdf = gpd.GeoDataFrame({'id': [0], 'inner_list': [[1,2,3,4]]})

sizeof(df) # 2304
sizeof(gdf) # 2304

It's clear that Dask's sizeof is working well here, but for some reason was failing on my use case when called in the groupby/apply block. I'll keep on investigating why.
To make that reproducible example I had to grab some Dask methods/classes/functions from dask/utils.py and dask/sizeof.py:

```python
from __future__ import print_function, division, absolute_import
import inspect
import sys
try:  # PyPy does not support sys.getsizeof
sys.getsizeof(1)
getsizeof = sys.getsizeof
except (AttributeError, TypeError):  # Monkey patch
def getsizeof(x):
return 100
class Dispatch(object):
"""Simple single dispatch."""
def init(self, name=None):
self._lookup = {}
self._lazy = {}
if name:
self.name = name
def register(self, type, func=None):
    """Register dispatch of `func` on arguments of type `type`"""
    def wrapper(func):
        if isinstance(type, tuple):
            for t in type:
                self.register(t, func)
        else:
            self._lookup[type] = func
        return func

    return wrapper(func) if func is not None else wrapper

def register_lazy(self, toplevel, func=None):
    """
    Register a registration function which will be called if the
    *toplevel* module (e.g. 'pandas') is ever loaded.
    """
    def wrapper(func):
        self._lazy[toplevel] = func
        return func

    return wrapper(func) if func is not None else wrapper

def dispatch(self, cls):
    """Return the function implementation for the given ``cls``"""
    # Fast path with direct lookup on cls
    lk = self._lookup
    try:
        impl = lk[cls]
    except KeyError:
        pass
    else:
        return impl
    # Is a lazy registration function present?
    toplevel, _, _ = cls.__module__.partition('.')
    try:
        register = self._lazy.pop(toplevel)
    except KeyError:
        pass
    else:
        register()
        return self.dispatch(cls) # recurse
    # Walk the MRO and cache the lookup result
    for cls2 in inspect.getmro(cls)[1:]:
        if cls2 in lk:
            lk[cls] = lk[cls2]
            return lk[cls2]
    raise TypeError("No dispatch for {0}".format(cls))

def __call__(self, arg, *args, **kwargs):
    """
    Call the corresponding method based on type of argument.
    """
    meth = self.dispatch(type(arg))
    return meth(arg, *args, **kwargs)

@property
def __doc__(self):
    try:
        func = self.dispatch(object)
        return func.__doc__
    except TypeError:
        return "Single Dispatch for %s" % self.__name__

sizeof = Dispatch(name='sizeof')
@sizeof.register(object)
def sizeof_default(o):
return getsizeof(o)
@sizeof.register(list)
@sizeof.register(tuple)
@sizeof.register(set)
@sizeof.register(frozenset)
def sizeof_python_collection(seq):
return getsizeof(seq) + sum(map(sizeof, seq))
@sizeof.register_lazy("numpy")
def register_numpy():
import numpy as np
@sizeof.register(np.ndarray)
def sizeof_numpy_ndarray(x):
    return int(x.nbytes)

@sizeof.register_lazy("pandas")
def register_pandas():
import pandas as pd
import numpy as np
def object_size(x):
    if not len(x):
        return 0
    sample = np.random.choice(x, size=20, replace=True)
    sample = list(map(sizeof, sample))
    return sum(sample) / 20 * len(x)

@sizeof.register(pd.DataFrame)
def sizeof_pandas_dataframe(df):
    p = sizeof(df.index)
    for name, col in df.iteritems():
        p += col.memory_usage(index=False)
        if col.dtype == object:
            p += object_size(col._values)
    return int(p) + 1000

@sizeof.register(pd.Series)
def sizeof_pandas_series(s):
    p = int(s.memory_usage(index=True))
    if s.dtype == object:
        p += object_size(s._values)
    if s.index.dtype == object:
        p += object_size(s.index)
    return int(p) + 1000

@sizeof.register(pd.Index)
def sizeof_pandas_index(i):
    p = int(i.memory_usage())
    if i.dtype == object:
        p += object_size(i)
    return int(p) + 1000

@sizeof.register_lazy("scipy")
def register_spmatrix():
from scipy import sparse
@sizeof.register(sparse.dok_matrix)
def sizeof_spmatrix_dok(s):
    return s.__sizeof__()

@sizeof.register(sparse.spmatrix)
def sizeof_spmatrix(s):
    return sum(
        sizeof(v) for v in s.__dict__.values()
    )

Looking further into how the Dispatch class and its lazy_register method works, it seems that an object can only be registered as, for example, a Pandas DataFrame object, if pandas has been loaded as a top-level module.
In the case of GeoPandas', when pandas is loaded Dask's sizeof correctly calculates both a Pandas' DF size and a GeoPandas' GDF size (see above).
However, if pandas is not loaded as a top-level module, the lazy registration is never called and the GeoDataFrame/GeoSeries object is evaluated with the default object register, which invokes plain sys.getsizeof and fails.
If this is the case, simply adding the equivalent decorator for geopandas (@sizeof.register_lazy("geopandas")) to the register_pandas function should fix this issue:
@sizeof.register_lazy("pandas")
@sizeof.register_lazy("geopandas")
def register_pandas():
    import pandas as pd
    import numpy as np

    def object_size(x):
        if not len(x):
            return 0
        sample = np.random.choice(x, size=20, replace=True)
        sample = list(map(sizeof, sample))
        return sum(sample) / 20 * len(x)

    @sizeof.register(pd.DataFrame)
    def sizeof_pandas_dataframe(df):
        p = sizeof(df.index)
        for name, col in df.iteritems():
            p += col.memory_usage(index=False)
            if col.dtype == object:
                p += object_size(col._values)
return int(p) + 1000

Does this make sense to you, @mrocklin ?

Can you reproduce the failure with pandas master?

@TomAugspurger just tried that and it worked fine, thanks :)
However, (and my understanding here might be poor, sorry in advance) I still think that if Dask is going to override Pandas' __sizeof__ it should do so consistently for GeoPandas. Does that make any sense?

@TomAugspurger any response to the comment above?


Use hdf5 for data storage

It seems good to use hdf5 to store measurement data (instead of json).
Pymodaq offers a package to store and visualize such a file: https://github.com/PyMoDAQ/pydatamanager

Or just pandas to hdf5


Failed to find a main class in...

System information:
Mac OSX 10.14
DBeaver 6.0.0
Connection specification:
N/A
Describe the problem you're observing:
Trying to open DBeaver, immediately hit with this error:

Happens on older version too.

What dbeaver distr do you use (pkg, dmg or zip archive)?

Dmg. Gave up on it
Sent from my iPhone

On Apr 3, 2019, at 12:42 PM, Serge Rider<EMAIL_ADDRESS>wrote:
What dbeaver distr do you use (pkg, dmg or zip archive)?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

This looks like a corrupted installation (dbeaver.ini contents doesn't match the version of actually installed produce).
Could you try to reinstall 6.0.1 (the most recent version of DBeaver)? Put existing DBeaver in trash before that.

This error could occur when dbeaver can't find a java version. For example if you use sdkman to manage java versions dbeaver can't find the installation. On mac you can getting into the installed dbeaver version and edit the Info.plist file and add the full path at the bottom:
<key>Eclipse</key>
	<array>
		<string>-vm</string>
		<string>/Users/<username>/.sdkman/candidates/java/current/jre/bin</string>
		<string>-keyring</string><string>~/.eclipse_keyring</string>
	</array>

Source: https://askubuntu.com/questions/1014157/dbeaver-with-sdkman-jre-jdk-location

Reproduced in DBeaver 6.1.4 from .dmg on macOS 10.13.6. Neonchen's workaround above did not help (did not change error message, which remained as in screenshot below). I tried using '/usr/bin/java', and '/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java' as the value of my 'vm' argument.  Note the line I added varied slightly from Neonchen's suggestion, in that I followed the example provided in the 6.1.4 Info.plist and included a dash before 'vm', e.g.:
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java</string>
Would like to figure out what's going on -- let me know if I can answer any questions about my environment.
srq4399:~ kgreenwell$ which java
/usr/bin/java
srq4399:~ kgreenwell$ ls -l /usr/bin/java
lrwxr-xr-x  1 root  wheel  74 Jun 21  2018 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
srq4399:~ kgreenwell$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions
total 0
drwxr-xr-x  11 root  wheel  352 Nov  7  2018 A
lrwxr-xr-x   1 root  wheel    1 Jun 21  2018 Current -> A
srq4399:~ kgreenwell$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions/A/
total 80
drwxr-xr-x  52 root  wheel    1664 May 29  2018 Commands
drwxr-xr-x   4 root  wheel     128 May 29  2018 Frameworks
drwxr-xr-x  14 root  wheel     448 Nov  7  2018 Headers
drwxr-xr-x   3 root  wheel      96 Oct  7  2017 JavaPluginCocoa.bundle
-rwxr-xr-x   1 root  wheel  107872 May 29  2018 JavaVM
-rw-r--r--   1 root  wheel    2529 Jul 25  2018 JavaVM.tbd
drwxr-xr-x   3 root  wheel      96 Nov  7  2018 Modules
drwxr-xr-x  46 root  wheel    1472 Jun 21  2018 Resources
drwxr-xr-x   3 root  wheel      96 Dec  7  2017 _CodeSignature
srq4399:~ kgreenwell$ /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
srq4399:~ kgreenwell$

DBeaver require Java 8 at least.
Please use pkg installer - it is already bundled with proper Java.

Thanks @serge-rider , appreciate the quick reply, will give it a shot

DBeaver require Java 8 at least.
Please use pkg installer - it is already bundled with proper Java.

Worked like a charm, thank you very much!


New features

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 55.452%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
178

Relevant Lines:
321

💛  - Coveralls


libraries/Profiler.php

Im running on PHP  8.2.18 and getting this error.
Maybe add #[\AllowDynamicProperties] can solve this
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_Profiler::$_compile_get is deprecated
Filename: libraries/Profiler.php
Line Number: 110
Backtrace:
File: C:\Users\msejc\Documents\NetBeansProjects\Horus\index.php
Line: 315
Function: require_once

This has been resolved by #12, which is now merged and will be included in the next release.


support reading nacos config with no suffix dataid &  enhance NacosConfigProperties

Describe what this PR does / why we need it
Currently, it is rather rigid, I've done compatibility, and it's going to be dynamic
and the subsequent nacos can support the optimization of suffix reading into dynamic
Does this pull request fix one issue?
#921
Describe how you did it
Describe how to verify it
Special notes for reviews

The test cases run error because SimpleReactiveDiscoveryClientAutoConfiguration was added yesterday.
Refer https://github.com/spring-cloud/spring-cloud-commons/blob/master/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/reactive/SimpleReactiveDiscoveryClientAutoConfiguration.java.

Need new test cases.


DataGrid virtualization broken when grouping activated

Hi,
Can someone explain me why MahApps has this trigger in MetroDataGrid style (Controls.DataGrid.xaml)?
        <Style.Triggers>             <Trigger Property="IsGrouping" Value="True">                 <Setter Property="ScrollViewer.CanContentScroll" Value="False" />             </Trigger>         </Style.Triggers>
This is breaking virtualization when grouping is activated. From framework 4.5 I think virtualization is supported with grouping! (that said it was not the case before)
But even with framework 4.0 (where virtualization is not working when grouping activated), I don't understand what this trigger is doing.
Thanks for any help.
For now I have a style which overrides this trigger:
            <Style TargetType="{x:Type DataGrid}" BasedOn="{StaticResource MetroDataGrid}">                 <Setter Property="ScrollViewer.CanContentScroll" Value="True" />                 <Style.Triggers>                     <Trigger Property="IsGrouping" Value="True">                         <Setter Property="ScrollViewer.CanContentScroll" Value="True" />                     </Trigger>                 </Style.Triggers>             </Style>
Environment

MahApps.Metro 1.5.0
Windows OS 10
Visual Studio 2017
.NET Framework 4.6.2

@bplatypus I'll changes this in v2.0

I got a similar issue using Listview...virtualization  does not work when i am using a collectionview aka grouping.
I tried to adapt bplatypus override but somehow it is not really working.
            <Style TargetType="{x:Type ListView}" BasedOn="{StaticResource MetroListView}">
                <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
                <Style.Triggers>
                    <Trigger Property="IsGrouping" Value="True">
                        <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
                    </Trigger>
                </Style.Triggers>
            </Style>

 <ListView
                    x:Name="ListView_DownloadItems"
                    Style="{StaticResource VirtualisedMetroListView}"
                    VirtualizingPanel.IsVirtualizingWhenGrouping="True"
                    MinHeight="250"
                    dng:DropBehavior.PreviewDropCommand="{Binding PreviewDropCommand}"
                    ItemsSource="{Binding DownloadItems}"
                    PreviewKeyUp="OnGridKeyUp"
                    SelectionMode="Extended"
                    BorderThickness="0,0,0,0"
                    Margin="6,0">

    Private Sub CreateView()

        view = DirectCast(CollectionViewSource.GetDefaultView(DownloadItems), CollectionView)

        Dim groupDescription As PropertyGroupDescription

        groupDescription = New PropertyGroupDescription("GroupDescriptionIdentifier")
        view.GroupDescriptions.Add(groupDescription)

        groupDescription = New PropertyGroupDescription("PackageName")
        view.GroupDescriptions.Add(groupDescription)

        If _settings.InstantVideo = True Then
            view.SortDescriptions.Add(New SortDescription("RequiredForInstantVideo", ListSortDirection.Descending))
        End If

    End Sub

Any idea?

Hi, suddenly found that if u make grouping in xaml on DataGrid, then Virtualisation enables by just setting ScrollViewer.CanContentScroll ="True" in DataGrid


fix(editor): Create new icon for TileMap Rectangle

Rationale: https://github.com/godotengine/godot/pull/42972#issuecomment-714346313

Could you squash the two commits together? So that the PR only has one?

@groud I squashed them

@groud I squashed them

You likely did a mistake somewhere then, it looks like your PR includes changes from another change. You might have to amend your commit and eventually rebase it on master. (or start eventually a new branch if you don't want to bother).

Hmm, I see that it is screwed up now. Must have been because it was a merge commit.... I should just do rebase in the future...


Bug with pgp encrypting and signing from website

When you use the keybase website form to encrypt a message for another user and click the checkbox to sign that the message is from you, the website erroneously encrypts the message with your own public key, rather than using the public key of the intended recipient.
This appears to be a relatively new bug that I haven't encountered before.

If you are logged in it encrypts for both you and the recipient.  It had
been this way for a long time!
On Thu, Aug 24, 2017 at 7:30 PM Mark Engelberg<EMAIL_ADDRESS>wrote:

When you use the keybase website form to encrypt a message for another
user and click the checkbox to sign that the message is from you, the
website erroneously encrypts the message with your own public key, rather
than using the public key of the intended recipient.
This appears to be a relatively new bug that I haven't encountered before.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/8216, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA05_zVd3s2Jee6-sDtpKIpE0uJU2J3Xks5sbgedgaJpZM4PCDsJ
.

When I didn't check the "sign" box, the recipient was able to decrypt the message, but when I did check the "sign" box and used "encrypt and sign", the recipient said the message did not decrypt, and he received an error message that the signature was not on file with keybase.
In the first case, I was not able to decrypt my own message, but in the second case I was able to decrypt my message, which is why I assumed that the problem was that had been encrypted for me and not the intended recipient.

Thanks for the feedback. @zapu can you take a look?

I tried it again, and this time it worked.
I think that, possibly, when I used my password manager to fill in the password for signing the message, it treated the recipient field as "username" and filled that in as well with my name.
So, user error (me).  Closing.

phew! thanks for the follow up.  yeah, that would be a bad bug if true.


chore: Add shortcut for Firefox Private Browsing

Closes #10777

[x] I have read the Contributing Guide.

/verify

I'm aware that the existing shortcut works. The reason that I opened this issue is because the shortcut gets stored in the root of the Start Menu versus being contained within the Scoop Apps folder along with the existing Firefox and Firefox Profile Manager shortcuts. Implementing the linked PR fixes this issue. It's only really aesthetic, but it's helpful to have all of my Scoop programs stored in a single location in the Start Menu.

I'm aware that the existing shortcut works. The reason that I opened this issue is because the shortcut gets stored in the root of the Start Menu versus being contained within the Scoop Apps folder along with the existing Firefox and Firefox Profile Manager shortcuts. Implementing the linked PR fixes this issue. It's only really aesthetic, but it's helpful to have all of my Scoop programs stored in a single location in the Start Menu.

In that case, I leave the decision to the maintainers to approve or deny this merge.
Assuming it will be approved, there's a need to add this shortcut to firefox-esr and firefox-eme-free manifests.

Sounds good; thank you! I've already tested the firefox-eme-free and firefox-esr manifests, but these versions don't seem to include a Private Browsing shortcut at all (most likely because this was only recently added as a feature). The firefox-eme-free manifest hasn't received an update in quite some time, but it looks like there's a Pull Request open to fix that (see #10759). If this gets merged, I'll be sure to submit a similar patch for it. With regards to firefox-esr, the Private Browsing shortcut hasn't been upstreamed yet, presumably because the ESR release is basing itself off an older version of Firefox that doesn't yet have this feature. If this changes, I will be sure to submit patches for it as well.

I support this change as it mimics the behaviour of the official installer and it does improve the user experience when using Scoop to manage Firefox installations. Of course, I would also suggest that since there are now two shortcuts, consider creating a folder called Firefox and putting the shortcuts underneath. See the LibreOffice manifest for details.

Sounds good; I'll have a look at the LibreOffice manifest shortly and will submit a new patch to account for this. Thanks for the suggestion!

Thank you for your work. Also please consider renaming the title of the pull request. You can make good use of the Github site search function, for example, https://github.com/ScoopInstaller/Extras/search?q=shortcut&type=commits, to find past commit title specifications/habits, and a correctly/well named pull request will help the maintainer faster merges.
A possible title would be: firefox: add private browsing shortcut


Added support for CSR1000v in topomachine

Basic support for CSR1000v in topomachine, ugly hack for weird interface mappings, this is probably something that can easily be improved upon.

I don't want that remapping done here.. if we're going to do a hack it belongs in the csr1000v launch script. Fix that separately please.

I assumed that the documentation was not correct but when I tested they are in order when I tested so I have removed the interface remapping hack.

Too many negations? Please update csr1kv docs with what version you tested with. I suspect it might be differences between versions.

Yes, obviously too many negations. I will update the docs.

LGTM


cannot set any breakpoint in Polyglot vscode extension

cannot set any breakpoint neither click nor F9 in any type of notebook in vscode
Version: 1.0.510102+2c9feb8daff54c194b638d355d18b5428480a786
Library version: 1.0.0-beta.24101.2+2c9feb8daff54c194b638d355d18b5428480a786
Build date: 2024-02-09T07:14:54.0100803Z

OS

[ x] Windows 11

Browser

[ x] Edge

Frontend

[ x] Visual Studio Code
[ x] Polyglot

repro:
fresh install of vscode, .NET8 and Polyglott extension in Win11 Sandbox
any tips on debug msgs?!

Polyglot Notebooks doesn't currently support the use of a debugger within a notebook.

That's currently for all supported languages.
Support would likely arrive language by language and not all at once.

@jonsequitur is there any timeline to share? It's quite a useful feature. See also #2099


Feat/initial hooks support

Initial hook implementation for #302.
I don't think I'm finished with this quite yet, but this should give an idea of how I see a first pass going.
This doesn't include the plugin support you suggested quite yet, but aims to prove out the structure and usage patterns which are probably a good first step.
At the core of it there is two levels of hooks that will be supported - template & resource.

Template level hooks will be evaluated at (TODO) and will look like (TODO)
Resource level hooks will be evaluated at the point of the stack creation and are expected to take a single parameter of the type ResourceHookContext, which contains:

logical_id: str
resource_definition: Resource
stack: Stack
template: Template

Resource level hooks are configured on a template like this:
    template = Template.from_yaml(template_path)

    # Add in locally defined hooks
    template.hooks.resources = {
        "AWS::S3::Bucket": [my_s3_naming_hook, my_s3_encryption_hook]
    }

Hooks can be suppressed (in a similar fashion to other tools like cfn-lint and cfn-nag) at either the template or resource level by adding Metadata like the following, where the items in the list are the function names of the configured hooks.
Metadata:
      Cloud-Radar:
        ignore-hooks:
          - my_s3_encryption_hook

I think it is time for a review of this functionality with the aim to getting a release out, even as a stepping stone to the full vision. The documentation/explanation is contained in the examples/unit/hooks/README.md file in the PR.
This adds the support for hooks without the plugin scanning functionality. It's a starting point where you can rely on at least using a fixture in a conftest.py file for configuring the hooks from functions defined in external libraries. Not quite where you were hoping to get to, but a starting point. I've got a branch in this repo with code that should support scanning plugins, but I've not had time to test it.
Figured it was more worth while documenting this piece before going on to that side of testing.

@shadycuz congratulations! Just a slightly more important thing to be thinking about 😂


New General Introduction

Introduction to improve the flow of the text, and an image to keep it engaging and colorful.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[ ] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Hi @lilhumza, thank you for opening this pull request.
This is a standard message notifying you that we’ve reviewed your pull request and have decided not to merge it. We would welcome future pull requests from you.
Thank you and happy coding.


Thanks for saving this!

Any idea why @mkleehammer removed the original repo?

Because I switched back to Emacs and really wanted someone dedicated to maintain it.

Gotcha - sad to see you go, dired is a hellofa plugin, but glad you passed it to someone!
@kublaios the package in Sublime Package Control is out of date, we should get an updated package up there... @wbond Is there a process of handing control of a package over to someone else?

Hi, as today it doesn't even show in package control, i'm forced to add the repo itself to the package control repos list in order to install, current install proces is like:

Ctrl + Shift + P
Type add repo and accept the one from package control (i doubt there's any other add repo)
Copy paste this and hit enter: https://github.com/kublaios/dired
Now it will be listed in package control, install normal from here on.


[BUG] Backtest with n_jobs > 1 fails if there is MRMRFeatureSelectionTransform in a pipeilne.

🐛 Bug Report
Backtest with n_jobs > 1 fails if there is MRMRFeatureSelectionTransform in a pipeilne.
Expected behavior
No fail.
How To Reproduce
Fails on MacOS
Script:
from etna.datasets import generate_ar_df
from etna.pipeline import Pipeline
from etna.transforms.feature_selection.feature_importance import MRMRFeatureSelectionTransform
from etna.models import CatBoostMultiSegmentModel
from etna.analysis import StatisticsRelevanceTable
from etna.metrics import MAE
from etna.datasets import TSDataset
import numpy as np

def main():
    df = generate_ar_df(start_time="2020-01-01", periods=100, freq="D", n_segments=1)
    df["feature1"] = np.random.uniform(10, 0, size=100)
    df["feature2"] = np.random.uniform(10, 0, size=100)
    df["feature3"] = np.random.uniform(10, 0, size=100)
    df["target"] = np.random.uniform(10, 0, size=100)
    df = TSDataset.to_dataset(df)
    ts = TSDataset(df, freq="D")

    pipeline = Pipeline(model=CatBoostMultiSegmentModel(), transforms=[
        MRMRFeatureSelectionTransform(relevance_table=StatisticsRelevanceTable(), top_k=2, fast_redundancy=True,
                                      redundancy_aggregation_mode="mean")])

    _, _, _ = pipeline.backtest(ts=ts, metrics=[MAE()], n_folds=5, n_jobs=5)

if __name__ == "__main__":
    main()

Environment
MacBook Pro Intel Core i9
MacOS 13.6 (22G120)
Additional context
No response
Checklist

[X] Bug appears at the latest library version

This bug is also present on:

Hardware: MacBook Pro 16 M3 Pro
OS: macOS Sonoma 14.1

For my running the modified version with joblib_params=dict(verbose=11, backend="loky", mmap_mode="c") fixes the problem:
from etna.datasets import generate_ar_df
from etna.pipeline import Pipeline
from etna.transforms.feature_selection.feature_importance import MRMRFeatureSelectionTransform
from etna.models import CatBoostMultiSegmentModel
from etna.analysis import StatisticsRelevanceTable
from etna.metrics import MAE
from etna.datasets import TSDataset
import numpy as np

def main():
    df = generate_ar_df(start_time="2020-01-01", periods=100, freq="D", n_segments=1)
    df["feature1"] = np.random.uniform(10, 0, size=100)
    df["feature2"] = np.random.uniform(10, 0, size=100)
    df["feature3"] = np.random.uniform(10, 0, size=100)
    df["target"] = np.random.uniform(10, 0, size=100)
    df = TSDataset.to_dataset(df)
    ts = TSDataset(df, freq="D")

    pipeline = Pipeline(model = CatBoostMultiSegmentModel(), transforms = [MRMRFeatureSelectionTransform(relevance_table = StatisticsRelevanceTable(), top_k = 2, fast_redundancy = True, redundancy_aggregation_mode = "mean")])

    joblib_params = dict(verbose=11, backend="loky", mmap_mode="c")
    _, _, _ = pipeline.backtest(ts=ts, metrics=[MAE()], n_folds = 5, n_jobs = 5, joblib_params=joblib_params)

if __name__ == "__main__":
    main()


Update intro wording, OAS definition [file] fixup

Borrows wording from https://www.openapis.org/specification/repo
Changes definition of OpenAPI Definition File ("a file or set of files") to OpenAPI Definition

Updated so references to files -> documents except where relating to file uploads.

Changes LGTM, but they got me thinking about lines 13 and 70 and how "description" may be more appropriate than "definition", since description is a superset of definition (possible truth vs truth). I'll make a separate PR after discussion once this PR is merged.

#TDC: @earth2marsh should do a separate PR for description vs. definition


Use minimumDuration.

Right now, the keyboard feels a bit slow when long pressing a button to see their secondary callouts.
This PR introduces:
overriding minimumDuration and maximumDistance and using 0.25 as a starting point.  Otherwise, please adjust the PR and I'll merge it.

@danielsaidi You may proceed with your suggested values


[TwitterV2Bridge] New Bridge for Twitter v2 API

A re-write of the currently in-progress v1.1 API re-write of the existing TwitterBridge.
This TwitterV2Bridge leverages the Twitter v2 API. I noticed the v1.1 API endpoints were sometimes excluding tweets that contained "Sensitive Content".
As explained in the top comment block, usage of the v2 API requires creation of a Twitter developer account, along with a Project and App. The Bearer Token from that App is used by this Bridge, rather than the public dummy Bearer Token used by the current TwitterBridge.

That last commit should take care of #2449

Please fix linting issues first.

Can you add old filter from TwitterBridge file in master branch?

Can you add old filter from TwitterBridge file in master branch?

If you're referring to the "By list" feed creation option, then I'm not sure if I can. The v2 API endpoints do not appear to allow for querying of lists by name, only by id #. I suppose it might be possible to chain several queries: query the /users/by/username/ endpoint to get user id#, then query the /owned_lists/ endpoint with the user id# to get the user's lists and try to find a match to the provided list name, then query the /lists/ endpoint with the list id#.
If you meant something else, please elaborate.

@csisoap I don't think it's worth the effort to re-implement the "By list" feed generator. If you're looking at a list in Twitter, the list ID is right there in the URL. It's easier to copy-paste that into the List ID field then it is to enter a username and list name. If you can describe a scenario where it makes more sense/is easier to generate a feed by username & list name instead of list ID, then I will look at implementing "By list".
Also, sorry about merging master into the branch and kicking off the workflows again. This is my first time making pull requests on someone else's repo, I'm still figuring things out. I just noticed my fork was one commit behind, figured it made sense to get it up to date.

Can you add old filter from TwitterBridge file in master branch?

If you're referring to the "By list" feed creation option, then I'm not sure if I can. The v2 API endpoints do not appear to allow for querying of lists by name, only by id #. I suppose it might be possible to chain several queries: query the /users/by/username/ endpoint to get user id#, then query the /owned_lists/ endpoint with the user id# to get the user's lists and try to find a match to the provided list name, then query the /lists/ endpoint with the list id#.
If you meant something else, please elaborate.

What i mean is can you add old filter for tweet? Old TwitterBridge did a great job filtering this, after I used it, i realize i'm only need user tweet, self-replies tweet, anything else is unnecessarity.

What i mean is can you add old filter for tweet? Old TwitterBridge did a great job filtering this, after I used it, i realize i'm only need user tweet, self-replies tweet, anything else is unnecessarity.

I'm sorry, I don't understand what you're asking for. What is "old filter for tweet"? I'm looking at the TwitterBridge from master, and it has all the same options for each of the feed generators. Plus the new "Maximum results" option I added.

What i mean is can you add old filter for tweet? Old TwitterBridge did a great job filtering this, after I used it, i realize i'm only need user tweet, self-replies tweet, anything else is unnecessarity.

I'm sorry, I don't understand what you're asking for. What is "old filter for tweet"? I'm looking at the TwitterBridge from master, and it has all the same options for each of the feed generators. Plus the new "Maximum results" option I added.

I see you add all of it but is missing "Skip promoted tweets" on line 311 and "Skip spurious retweets" on line 306 from TwitterBridge on master. Can you add it to v2, please? Thank you.

I see you add all of it but is missing "Skip promoted tweets" on line 311 and "Skip spurious retweets" on line 306 from TwitterBridge on master. Can you add it to v2, please? Thank you.

Please provide an example of a feed query (username, list, keyword/hashtag) that shows "spurious retweets" or "promoted tweets" using this TwitterV2Bridge. I have performed numerous tests of TwitterV2Bridge, as well as following ~50 twitter users with it, and I have seen neither of those things.

I see you add all of it but is missing "Skip promoted tweets" on line 311 and "Skip spurious retweets" on line 306 from TwitterBridge on master. Can you add it to v2, please? Thank you.

Please provide an example of a feed query (username, list, keyword/hashtag) that shows "spurious retweets" or "promoted tweets" using this TwitterV2Bridge. I have performed numerous tests of TwitterV2Bridge, as well as following ~50 twitter users with it, and I have seen neither of those things.

I think you right, i don't have example for that. Sorry for bothering you, thank for creating this bridge.

Hi,
Great job! A few small requests:

Please put in examplevalues/defaultvalues that would actually generate a result if you would just hit "go". I saw that you used 'rss-bridge, #rss-bridge' as one examplevalue and I assume that both together wouldnt work (ignore this if all values actually generate something ;D, I didnt test the bridge, just read through it).
Please put a max limit on the amount of items retrieved. There is no need to pull 300 tweets every few minutes. Many bridges limit at 50 for example.

Please put in examplevalues/defaultvalues that would actually generate a result if you would just hit "go". I saw that you used 'rss-bridge, #rss-bridge' as one examplevalue and I assume that both together wouldnt work (ignore this if all values actually generate something ;D, I didnt test the bridge, just read through it).

These were actually example values inherited from the previous Twitter Bridge I based this one on. And you're right, that particular example value was invalid. While testing example values, I realized that the (also inherited) error handling within the Bridge was effectively non-functional, so I fixed that up too. Nice bonus.

Please put a max limit on the amount of items retrieved. There is no need to pull 300 tweets every few minutes. Many bridges limit at 50 for example.

I set the max limit to 100, because that's the most the Bridge can handle without error. I assume pagination kicks in with the API response after 100 results, and would require different parsing. Didn't even bother checking that to confirm, setting the limit at 100 was an easy two birds, one stone kind of deal (avoid the error, make you happy).

Tweets are by design pretty light, so I assume 100 is not going to be a problem. I'm just saying that because there are bridges that pull 300+ full sized articles on every update.
Thanks

I have an idea.
What about we caching API data on the first run and then every time it refresh, it will check for one recent tweet from the API and then check its ID with tweet ID have their timestamp larger than other tweet (sorry, i don't know what word to describe it) are different or not. If it different that mean that tweet is new and then we have to go fetch it and refresh the cache.
I see TwitterBridge.php file has used CacheFactory for caching API key or Guest-Token. Maybe can we do with this?

What about we caching API data on the first run and then every time it refresh, it will check for one recent tweet from the API and then check its ID with tweet ID from the cache that have their timestamp larger than other tweet (sorry, i don't know what word to describe it) are different or not. If it different meaning that tweet is new and then we have to go fetch it and refresh the cache.
I see TwitterBridge.php file has used CacheFactory for caching API key or Guest-Token. Maybe we can do with this?

What would be the benefit, exactly? The data being pulled down via the API call is a handful of KB per feed. The Bridge would need to make an API call to get the most recent tweet. Then, if the latest tweet is different than the latest cached tweet, it would need to make yet another API call to get all the recent tweets. Twitter tends to be a busy place, so it seems likely that it will have to do the full tweets request more often than not. Your suggested change would increase the number of API calls and the amount of data transferred.
If you're following a less-active user/search query, maybe just reduce the update frequency for that feed in your feed reader? I have my feed reader set to update my twitter feeds once every 8 hours, that's more than sufficient for my needs.

I cant test this since it needs a twitter api key. Can anyone post a screenshot of the html output of this bridge?

I cant test this since it needs a twitter api key. Can anyone post a screenshot of the html output of this bridge?

Like this?

I think I can generate a new twitter app/api key for you to use temporarily for testing the bridge. How can I send that to you privately?

All good, you dont need to send me one, it's okay for me if you test.
I'm still wrapping my head around all the twitter and facebook issues, so I'll get back when I've done that.

@Bockiii In another PR, I saw you request the actual HTML code output from the Bridge (if I understood correctly). I made one for this bridge:
https://pastebin.com/eKnhSfN2
Let me know if there's a specific query you want to see, or if I misunderstood.

I'm at a point where I would merge this @dvikan @em92 . Any complaints? The documentation looks good, its in addition to the current twitter bridge, I dont see a downside here.
If one of you agrees, just merge it.

The code is not rock solid and quickwick says he was learning php while doing this. But if it works it works. We can try it out and see what happens? Not much negative impact. Worst case we rewrite it.

Ah maybe add a (beta) to the bridge title?

I was just thinking if it needs large modifications it might break for people. But if you have done lots of testing I agree it's not necessary to label beta. It's more like a way to prepare users for breakage hehe.

I was just thinking if it needs large modifications it might break for people. But if you have done lots of testing I agree it's not necessary to label beta. It's more like a way to prepare users for breakage hehe.

Ok, makes sense. I plan now to go through the Twitter Feature Requests under Issues and incorporate some into this bridge, but they should all be non-breaking.
It will be a bit awkward having two different Twitter bridges for a while, with parallel development efforts. I'm selfishly just doing this Bridge for myself, because the restrictions Twitter is placing on the public dummy Bearer token (used by the primary Twitter bridge) makes that bridge effectively useless for me. Hopefully the effort will be worthwhile for others as well, for anyone willing to sign up for a Twitter dev account.


feat: Updated Branding for bc wallet

Changed image locations to fetch from this repo instead of bc wallet repo
Added pilot invitation branding
Rename lawyer-person folder to person

There are a bunch of .DS_Store files. Are they supposed to be added?

just removed them, not sure where they came from


backup script disregards web dashboard credentials

OrientDB Version, operating system, or hardware.
2.2.8
Operating System
Linux
Expected behavior and actual behavior
Web dashboard and backup script should accept the same credentials. root user works only for the web dashboard.
Steps to reproduce the problem

Set root password.
Login via dashboard - works.
Make sure you have a database to backup.
Backup DB - Error: com.orientechnologies.orient.core.exception.OSecurityAccessException: User or password not valid for database: somedatabase

hi @rmoog,
The user and password depends on the connection url, if you are using "plocal" to connect the database, it means you are not using the server but opening the database in embedded mode, and this do not support server authentication and the relative server user "root".
Hope this help.
Regards


Fix for NaN duration values for 'looping' fix

That fix is for animations that change ik constraints, and its certainly working :)

:+1: Are either of you interested in #1591 ?

Maybe, I just started with my client, so <<< total noob more or less. However, if things work out I would be working with both spine and pixi on the reg. So I'd be happy lend a comment here and there.


CASMINST-5230 CASMINST-5229 LiveCD and CSI Path

Description

This uses more specific tar and bsdtar arguments to get the LiveCD and PIT into a more reliable path.
The user is expected NOT to change directories between extracting the RPMs and using the USB path.
Checklist Before Merging

[ ] If I added any command snippets, the steps they belong to follow the prompt conventions (see example).
[ ] If I added a new directory, I also updated .github/CODEOWNERS with the corresponding team in Cray-HPE.
[x] My commits or Pull-Request Title contain my JIRA information, or I don't have a JIRA.

Will fix the spelling before making a backport.

/backport main


python3-adafruit-blinka: Make it available only for 32bit rpi machines

It has prebuilt binary libgpiod_pulsein for rpi machines and these binary is 32bit
therefore we can not include it for 64bit machines even if they are rpi
based unless they have multilib enabled.
This patch makes it visible only on rpi-32bit
Fixes QA errors like
ERROR: QA Issue: Architecture did not match (ARM, expected AArch64) in /usr/lib/python3.9/site-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/.debug/libgpiod_pulsein [arch]

@agherzan you were in right direction, we needed additional fix since some of the microcontroller implementations have prebuilt binaries for rpi 32bit. This patch here should fix it for good finally.


Collections.bulkImport_json() won't accept JSON objects

When trying to use the function Collections.bulkImport_json to upload a JSON structure built from pytest-json-report, I continually receive

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/site-packages/pyArango/collection.py", line 777, in bulkImport_json
TypeError: string indices must be integers

Why is this?  It matters now how I attempt to reformat the JSON data, I still see this error.  The JSON itself is properly formatted because the following works just fine:
import json
data = json.load(open('/path/to/json'))

I am also seeing the same issue. Curious if you had the solution.

I didn't and as a group, my work colleagues, we've moved to MongoDB over ArangoDB.


Could have other/original licence

It's now under GNU LESSER GENERAL PUBLIC LICENSE.

There're some reasons for why I have to choose this

This is the license of the compiler itself, and I just note you can choose any license for it, even if you would link statically to LGPL (but not for GPL, that's the point of the lesser/library GPL).
For the code you emit, there's the https://en.wikipedia.org/wiki/GPL_linking_exception for linking to GPL (but not needed for LGPL).
So if you really didn't want this license (I'm not saying it's bad), then you may have limited time to go back. I only noticed two commits since from others, and one was trivial, so I think can be ignored, and the other maybe, and even if it isn't it's only for tests and they could keep LGPL (or you could ask that person).

You mean it's okay to change the license to even MIT if I got the permission of @Hong-Xiang ?
Besides, thanks a lot for telling me this!

@PallHaraldsson ❤

@Hong-Xiang Would you mind changing this repo's license to MIT?

Not at all. I'm 😄 with this change.


Disregard non problem activity trials count when calculate grade

[PROBLEM]
is described in ticket AD-81
[SOLUTION]
exclude activities with is_problem=True in BaseGradingPolicy._get_points_earned_trials_count

@kunanit what do you think about this change?

I think this looks good as a base policy. For those activities that have is_problem=False, is the score always 'null'?

@kunanit I answered to your question in ticket  AD-81


Add control for audio tracks (for streaming libraries and possibly external audio files)

I've video with different translates. How can I choose between different vioce-overs, like I can do that with subtitles?

It's not supported in HTML5 video, but the streaming libraries can do it. https://github.com/sampotts/plyr/wiki/FAQ#1-does-plyr-work-with--

Changed to a feature since it would be nice with a control for it in cases where it's supported. This is not a high prio however, and it's a long way to go.

This feature would be greatly appreciated. I need to have a youtube live stream on my website with a different audio track/voiceover. I believe this would be the first player to support such feature. Thanks

This is most important hls setting in any player. For this reason most people have to use jwplayer. I want to use and support this player but our all items has mutl audio settings.
If ur ideas will change any time about multi audio menu support, i will be using and supporting this project in out systems.

Any update on this?

Good evening, are there any plans to implement the multi-track audio feature? Especially important in content with simultaneous translation. Thanks.

+1

Any update on this?

Any update on this?

+1

+1

If anyone is interested, I managed to implement a simple interface that will add the audio tracks to settings. I used @Ponywka 's PR and added support for basic HTML5 video. The changing track itself in settings does not change media that is played (until you are not using DASH) but you are able to add onChange function as with quality and implement changing media track yourself (for example with HLS.js).
Available as npm i @antik-web/plyr
All you need to do is add these to plyr's config:
new Plyr(videoHtmlElement, {
    audioTrack: {
        options: ['sk', 'en', 'us'] // array of strings,
        selected: 'sk',
        onChange: (e: any) => updateAudio(e), // e is value of the selected label (string)
        showUnrecognizedLabel: true, // if you want to show 'Unrecognized (en)' (if not defined in i18n) instead of 'en'
    },
    i18n: {
        'audioTrack': 'Language',
        audioTrackLabel: {
            'en': 'English'
        }
    }
});

@frankykubo Can you provide me the script please? I'm not familiar with npm or node.js. I'm using plyr in html only. So I need the script file. Thanks in Advance!

@frankykubo Can you provide me the script please? I'm not familiar with npm or node.js. I'm using plyr in html only. So I need the script file. Thanks in Advance!

You can download artifacts HERE. I tested it only in Vue using JS, but I hope you can make it work your way too! Good lock.

@frankykubo Is'nt The Provided Release is same as the Your Modified repo? Maybe I didn't make it clear. I want something like: <script src="https://cdn.plyr.io/3.7.8/plyr.polyfilled.js"></script> This. The Plyr.Plyfilled.js file which can be directly run in browser.

@flixadmin I don't have it on any CDN. You have to download build-artifacts.zip and then open the ZIP, get the file you need (in your case plyr.polyfilled.js and store it on your web's. Then, you can use it as <script src="your-web-location/plyr.polyfilled.js"></script>.

Thanks a lot! I found it. I'm putting a like to the file here for anyone who needs it: https://gist.github.com/flixadmin/8052ef992a44543596129886a89dbe9a

@flixadmin GitHub Pages may be better

If anyone is interested, I managed to implement a simple interface that will add the audio tracks to settings. I used @Ponywka 's PR and added support for basic HTML5 video. The changing track itself in settings does not change media that is played (until you are not using DASH) but you are able to add onChange function as with quality and implement changing media track yourself (for example with HLS.js).
Available as npm i @antik-web/plyr
All you need to do is add these to plyr's config:
new Plyr(videoHtmlElement, {
    audioTrack: {
        options: ['sk', 'en', 'us'] // array of strings,
        selected: 'sk',
        onChange: (e: any) => updateAudio(e), // e is value of the selected label (string)
        showUnrecognizedLabel: true, // if you want to show 'Unrecognized (en)' (if not defined in i18n) instead of 'en'
    },
    i18n: {
        'audioTrack': 'Language',
        audioTrackLabel: {
            'en': 'English'
        }
    }
});

I have video and audio in separate .mp4 files. I haven't found a way to easily synchronize them with the player. Is it possible to do this with this fork?

I have video and audio in separate .mp4 files. I haven't found a way to easily synchronize them with the player. Is it possible to do this with this fork?

@micaelsgarcez I used something like you want before in my own video-player. That's not good idea. It works a little bit ugly. The better way it's split your videos via mkvdemux or ffmpeg; or use MPEG-DASH.
https://github.com/Ponywka/Multitrack.JS/blob/a8e09ef0e030741096ff37f2ca20e9888307af1e/src/internal/playback.js#L1-L46 (example in use you can got here: https://магиядружбы.рф/стафф/видео/MLP-ANG/)

I have video and audio in separate .mp4 files. I haven't found a way to easily synchronize them with the player. Is it possible to do this with this fork?

This fork only provides audio track switching interface. You need to feed data of audio and video tracks to player using third-party library. For example, you can extract (demux) chunks of video and audio (for example, using ffmpeg.wasm, then feed them to HLS.js or similar muxing framework that can piece them together and playback the result via MediaSource's SourceBuffer API.


Fix the CI tests taking too long

The CI tests take 5h total because each test downloads the mssql packages again each time.

Yay, it worked! @richm try looking at some of the CI ansible logs for PLAY RECAP, under each play Ansible prints time taken by the play task in descending order. The task that installs the mssql-server package sometimes takes 74.72s, sometimes 300s, sometimes 703.34s (e.g. in centos-7/ansible-2.8). Also Ansible sometimes prints not all tasks, sounds like from tests_idempotency it does not print time for all imported roles, which is weird.
That proves that packages download takes the most time, so setting up the proxy is the correct way forward.

Also, the time measurements after each PLAY RECAP only display results for the latest inclusion of the role, so in the cases where tests input the role several times, e.g. in tests_idempotency, the time measurements do not show the long-taking tasks.

That proves that packages download takes the most time, so setting up the proxy is the correct way forward.

Not exactly.  It proves that the package module can take up to 700 seconds.  The package module is doing

downloading rpm metadata
updating rpm metadata
downloading packages
installing packages

We still don't know how much of that time exactly is downloading packages.

[citest pending]

[citest bad]

[citest pending]