Variable explicit type being ignored

Environment data

Pylance Type Checking Mode: basic
Language Server version: 2021.3.600354918-dev
OS and version: Windows 10 Pro Insider Preview Build 21313
Python version (& distribution if applicable, e.g. Anaconda): 3.8.7 64-bit

Expected behavior
As it was briefly discussed at https://github.com/microsoft/vscode-python/issues/15487, even though I have explicitly set guild: Optional[Guild] it is still interpreted as Any.
Actual behavior
Variable is being interpreted as Any. The same happens if I use guild: 'Guild | None'.
guild: Optional[Guild] = ctx.bot.get_guild(529775376721903617)
if guild is not None:
    guild # type is Any

Additional information
get_guild() is indeed untyped and returns Any | None, but I expected the interpreter to prioratize my explicitly set Guild type over Any.

FWIW I thought #822 meant that we'd be taking the left hand side as truth, but that doesn't appear to be what's happening.

Types are narrowed upon assignment. An Any on the RHS causes the type of the assignment target to be narrowed to Any.
If you want to explicitly cast an expression's type to a specified type, you need to use the typing.cast call.

But is it wrong to have it the other way? I only see it as an improvement. Using typing.cast means an additional import statement and less readable code.

Upon further investigation, we appear to be inconsistent here.
from typing import Any, List, Optional

def func1(a: Any, b: Optional[Any]):
    x: int = a
    reveal_type(x)  # int

    y: Optional[int] = b
    reveal_type(y)  # Optional[Any]

    z: List[int] = [a]
    reveal_type(z)  # List[int]

I'll investigate further.

My statement above ("An Any on the RHS causes the type of the assignment target to be narrowed to Any") was incorrect. I was confusing it with the case where the LHS contained an Any.
I found the cause of the inconsistency. It is triggered only in the case where the declared type of the assignment LHS is a union and the type of the expression on the assignment RHS is also a union that contains an Any — precisely the situation in your example.
This will be fixed in the next release.

Hey, do you mind me asking when can I expect to see this fix in the Insider build?

We release new versions of Pylance once a week, typically on Wednesday. This fix will be enabled in the public version of the next release.

This issue has been fixed in version 2021.3.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202130-3-march-2021

SWEET, IT WORKS!


Same run, Different ouputs

What I do
Trying to cargo test against some code
What I got
Don't freak out the underlying error is coherent and is exactly the same :)
BUT
The ouput may appear broken like if two threads are writing to stdout at the same time, so the output variants appear to be infinite like these :
# RUN KO 1
→ cargo test
   Compiling lists v0.1.0 (file:///lab/rust/lists)
src/second.rs:56:6: 56:7 src/second.rs:56:6: 56:7 error: expected ident, found `&`error:
expected ident, found `&`
src/second.rs:56 src/second.rs:impl<&T> Iterator for List<&T> {
56 impl<&T> Iterator for List<&T> {
                      ^
^
Build failed, waiting for other jobs to finish...
Could not compile `lists`.

# RUN KO 2
→ cargo test
   Compiling lists v0.1.0 (file:///lab/rust/lists)
src/second.rs:56:6: 56:7src/second.rs:56:6: 56:7  error: error: expected ident, found `&`
expected ident, found `&`src/second.rs:56
 impl<&T> Iterator for List<&T> {
src/second.rs                      :56^ impl<&T> Iterator for List<&T> {

                      ^
Build failed, waiting for other jobs to finish...
Could not compile `lists`.

# RUN KO 3
→ cargo test
   Compiling lists v0.1.0 (file:///lab/rust/lists)
src/second.rs:56:6: 56:7src/second.rs:56:6: 56:7  error: error: expected ident, found `&`
src/second.rs:56expected ident, found `&` impl<&T> Iterator for List<&T> {

^
src/second.rs:56 impl<&T> Iterator for List<&T> {

# etc...

Note: No code change or anything between the runs. Just re-exec build test
This messes up understanding, indicators and maybe colors...
What I expected
What I end up with on some runs :
# RUN OK
   Compiling lists v0.1.0 (file:///lab/rust/lists)
src/second.rs:56:6: 56:7 error: expected ident, found `&`
src/second.rs:56 impl<&T> Iterator for List<&T> {
                      ^
src/second.rs:56:6: 56:7 error: expected ident, found `&`
src/second.rs:56 impl<&T> Iterator for List<&T> {
                      ^
Build failed, waiting for other jobs to finish...
Could not compile `lists`.

How to reproduce
The code used for the code samples of this issue (generating these errors) is available here : https://gist.github.com/frntn/e9e5652c12fdc931315d

Ubuntu 14.04.2 LTS
rustc 1.1.0 (35ceea399 2015-06-19)
cargo 0.2.0-nightly (a483581 2015-05-14) (built 2015-05-15)

This is actually intentional because Cargo is running the compiler in parallel behind the scenes. For more info see this comment: https://github.com/rust-lang/cargo/issues/1717#issuecomment-112189409

This is actually intentional

hmmm...
What's intentional here is running the compiler in parallel, not having a mixed ouput.
Am I right ? (I'm confident you'll answer yes to this one, so I proceed)
If so, this is actually an issue!
You shouldn't just close (past and upcoming) issues about that.
I know everybody is working hard on developing Cargo and making it a top level tool, but this kind of output behavior + your answer can scare people out and make them loose confidence about the way Cargo and Rust are developped.
Resolution patterns do exists :
I am thinking of other tools using parallel runs and concurrent ouput like Packer for example. They have choosen to control their mixed ouput by lines, with each line prefixed by some identifier with a distinct color.
I haven't done any research about that, but I'm pretty sure we can find other implementations to solve this concurrent ouput issue.

Ok, seems reasonable to consider the symptom solvable without not parallelizing.

MsBuild solves this problem by numbering the "node/thread/compiler" instances. So you'll see something like
1> foo.cpp
2> bar.cpp

Ah I think this is a dupe of https://github.com/rust-lang/cargo/issues/1198 which is also about interleaving output


Breaking additions to the Field trait

These new trait methods are moved from the FieldExt trait in pasta_curves, where we had placed them while figuring out their APIs.
Closes #33.

Force-pushed to address review comments from @ebfull and @daira.


Japanese translation

Hello, I'd like to contribute Excalidraw as translator of Japanese. Could you add Japanese on Crowdin?

https://crowdin.com/project/excalidraw

Hey @kuy :) Just a friendly reminder.. are you still up for it?

How is Japanese in Japanese?

@lipis Thanks for adding Japanese. I'm working on it 😃

Thank you @kuy!
We also need the Japanese in Japanese for the drop down.

@lipis Oops, thanks. I didn't noticed that, sorry. I've just forked but too late, you looks like already added Japanese locale on the branch l10n_master.
Thanks for sharing very useful tool. I'm happy to contribute Excalidraw! ⚔

https://github.com/excalidraw/excalidraw/pull/1508 :) Just take a look and approve it if it's all good! Once approved we'll merge it.

It's live :) Thanks again.. @kuy


Allow more configuration via environment variables

As the operator of a platform on which many different Python services are deployed, it would be enormously helpful to be able to configure more sentry SDK options via environment variables, in addition to the currently-supported SENTRY_DSN, SENTRY_ENVIRONMENT, and SENTRY_RELEASE options.
In particular, we would like to be able to set the value of the request_bodies and with_locals config options via environment variables, which we disable in production to help mitigate the risk of accidentally capturing PII, so that we can control them at the platform level rather than needing to copy/paste (and maintain) the same boilerplate code across each codebase.
We currently have the equivalent of this boilerplate code copy/pasted across the fleet of Python apps:
# SENTRY_DSN, SENTRY_ENVIRONMENT, and SENTRY_RELEASE are already set
# automatically in the process's environment at deploy time.

sentry_sdk.init(
    integrations=[DjangoIntegration()],
    request_bodies="never" if DEPLOY_ENV == "production" else "small",
    with_locals=DEPLOY_ENV != "production",
)

It would be nice to replace that with something more like
sentry_sdk.init(
    integrations=[DjangoIntegration()],
)

which is less complex and less prone to accidental misconfiguration.

This is a fine idea. The only caveat I can think of right now is that explicit init options take precedence over environment variables.
For example, sentry_sdk.init(dsn="...") will always initialize the SDK to the given DSN and ignore the SENTRY_DSN environment variable.
With this precedence order, an operator cannot use env vars to enforce a particular configuration without trusting/reviewing the code to ensure it doesn't set the particular options inline.
If this is more about convenience than enforcement/trust, I think looking up env vars for other options is perfectly fine and we could take in PRs for that.

I am facing the same need. I think the main challenge is the same as in https://github.com/getsentry/sentry-python/issues/1133#issuecomment-870467228 : all "primitive" parameters of the sentry_sdk.init call (integers, floats, strings, etc) can easily be fetched from env vars.
But for parameters requiring function objects like traces_sampler or before_send it'd be necessary that the init call could resolve string import paths into objects, and possibly offer some kind of eval environment? (that would be if it was desired that the envvar--parameter mapping was exhaustive in configuration options)

@n1ngu I don't think we'll ever do an exhaustive environment config mapping, that doesn't make sense to me. A few key options are fine to expose as env values for convenience but generalizing even function configs is overkill in my opinion.

I think loading config from the environment is not part of the SDKs job. If we add all the config parameters to be loaded from the environment some users will still need to do something like this:
import os

request_bodies = os.environ.get("SENTRY_REQUEST_BODIES")
if something_is_true:
    request_bodies = "some-other-value"

sentry_sdk.init(
    integrations=[DjangoIntegration()],
    request_bodies=request_bodies,
)

So no matter how we would implement this, it would never make everybody happy.
So imho the preferred way to do this would be something like this:
import os
dsn = os.environ.get("SENTRY_DSN", "[default-dsn]")
debug = os.environ.get("SENTRY_DEBUG", True)
release = os.environ.get("SENTRY_RELEASE", "x.x.x")
environment = os.environ.get("SENTRY_ENVIRONMENT, "local")
sample_rate = os.environ.get("SENTRY_SAMPLE_RATE", 0.2)

sentry_sdk.init(
    dsn=dsn,
    integrations=[DjangoIntegration()],
    debug=debug,
    release=release,
    environment=environment,
    sample_rate=sample_rate,
)

This way you can see what environment variables the config expects to be set and what default values are used in case they are not set. Makes the configuration explicit and not implicit. See also https://www.python.org/dev/peps/pep-0020/

As we will not implement this enhancement, because there is no chance in doing it right and it also overkill, I will close this issue.
Thanks everyone for bringing this up and discussing this!


new-feature: filter transactions at the group level

#1482
this PR adds a new filter flag omit-group-transactions. filter processor would return the matched txn and its grouped txns by default. when omit-group-transactions is set to false, only matched txns are returned.
Test
new unit tests

move this PR to conduit


Visual Studio Community 2017 - extended trial expired

Lab 2 Task 2 Step 5:
Using image for "Visual Studio Community 2017 on Windows Server 2016 (x64)" shows error after launching VS 2017 for first time later in lab:
Error: "Your extended trial has expired. License with an online account or a product key"
Tried "Check for an updated license" and "Unlock with a Product Key" and tried different subscription but only option then is to "Exit Visual Studio".

Can you share a screenshot?

Tested with the "Visual Studio Community 2017 on Windows Server 2016 (x64)" image and error does not occur. Also tested with "Visual Studio Enterprise 2017 on Windows Server 2016 (x64)" and error occurs. Must have selected incorrect image. Please close this issue.


'roles' column in the search result is empty

This is due to commit b2e576d5f, done intentionally. For detail, see the comment for that commit. To get the 'role' information back, we need to come up with a new design here.

I discussed with Ken. We not only should show the roles, but need to separate the result of one subject into multiple rows in case there are more than one role for the subject as well. This is only relevant for CellSubset though because only subjects don't have different roles.

Tested in production.  Works as specified.


Changing Motorcycle/Bicycle Rider

Hi,
I know that in #7612 you've mentioned that you haven't implemented rider change for the packaged version. I was wondering how should I go about doing that in UE? Specifically, changing the rider of the blueprint using driver_id and not directly from the blueprint editor.
My thinking (based on how vehicle colors are changed) has been to add pedestrian meshes to the Pedestrian Models array in the Set Skeletal Mesh from Array function of BP_Base2wheeledNew and let the construction script start there. This randomizes the rider, which is the effect I'm after, but wouldn't set the rider based on driver_id. What else do I need to do?

Download
https://mega.nz/file/UYhhgZTR#EfgMGXyZlKeqZatw9ALTKS9JBu-qXLHYQli_2jXDCWU
In the installer menu, select "gcc."

Download
https://mega.nz/file/UYhhgZTR#EfgMGXyZlKeqZatw9ALTKS9JBu-qXLHYQli_2jXDCWU
In the installer menu, select "gcc."

Hi GoodarzMehr,  we've made a test similar to yours, with SetSkeletalmeshAsset,

So it will randomize the riders you add to the array, is this what you want? or you want to use one specific rider from the array?
Hope this helps,

About the driver _id,  pedestrians ( thorugh blueprints) have id at the BP_walker_factory.   Riders don't have an id,
Riders are skeletal meshes assigned as riders,  maybe you can use the riders_array's index,

Thanks for the info. I'm creating a driving dataset and for the time being my approach (which, shown below, is similar to yours) randomizes the rider skeletal meshes when creating the actors, which satisfies my needs. However, no matter which rider is selected the actor's "driver_id" is 0. I was thinking of, in the future, being able to select the rider's skeletal mesh through the PythonAPI by specifying the index of the skeletal mesh array, instead of that index being selected randomly as it currently is.

One thing I recently found out is that doing this (at least my solution) makes CARLA not count riders as actors anymore, i.e. when using world.get_actors() nothing is returned for riders.


Tutorial Tests Broken

I have followed the tutorial and the tests aren't actually testing anything it seems.
My command looks like this:
    class Calculate < SlackRubyBot::Commands::Base
      command 'calculate' do |client, data, _match|
        client.say(channel: data.channel, text: '3')
      end
    end

Note it's returning 3.
My tests look like this:
expect(message: "#{SlackRubyBot.config.user} calculate 2+2", channel: 'channel').to respond_with_slack_message('5')

Note it's expecting 2+2 to equal 5.
This test passes.  2+2 does not equal 3 or 5, so it should fail.
I'm running the tests with bundle exec rspec
The tests in dblock/slack-mathbot which this tutorial is apparently based on correctly fail if I try to expect 2+2 to equal 5.

I'm using these tests all the time with good success :) Care to put up a PR that reproduces this?

It turns out this was entirely my fault by naming the command specfile spec/slack-mathbot/commands/calculate.rb - ie missing out _spec in the filename and therefore it wasn't even loading it.  My one passing test was in bot_spec.rb.

Glad it was something simple and that we were able to help!


Issue #1241 (Topic and Queue name used instead of arn) Some default report field added for VPC and Security Groups

"source" command is replaced with "." in Makefile because this gives and error. (Issue #1236 )
Default report fields "CidrBlock" and "tag:Name" for VPC and "GroupName" and "VpcId" for Security Groups in vpc.py to give more useful information to user.

Issue #1241  @kapilt  review this.


Regex for subject_alt_names fails on Windows due to \r\n as line break

Issue description
I am using acme-tiny on Windows to create new Let's Encrypt certificates with OpenSSL 1.1.1k  25 Mar 2021.
The certificate creation is working with one domain in the CSR, however it fails as soon as I added multiple domains as Subject Alternative Name (SAN) with the following error:

'detail': 'Error finalizing order :: Order includes different number of names than CSR specifies',
'status': 403

The log output for "Found domains" only shows domain, so the error is expected from there.
Cause
The cause is, that the SAN domains are not found by the regex (on my machine).
This is happening, as the openssl output contains \r\n as line breaks (on my machine) and the regex is only looking for \n as linebreaks.
Workaround / Fix
I could fix it (for me) by adding additional \r? to the regex.
Original code:
subject_alt_names = re.search(r"X509v3 Subject Alternative Name: (?:critical)?\n +([^\n]+)\n", out.decode('utf8'), re.MULTILINE|re.DOTALL)
https://github.com/diafygi/acme-tiny/blob/0a9afb2b72bafad29d172f9d3d704ef979530fe3/acme_tiny.py#L96
Workaround code (added \r? before every \n):
subject_alt_names = re.search(r"X509v3 Subject Alternative Name: (?:critical)?\r?\n +([^\r?\n]+)\r?\n", out.decode('utf8'), re.MULTILINE|re.DOTALL)

@bastelflp Since we just moved to Github Actions for testing, it's now possible to add tests for Windows support.
https://github.com/diafygi/acme-tiny/blob/master/.github/workflows/full-tests-with-coverage.yml
Are you able to add a windows matrix entry to these tests?
If so, then this issue could get resolved. Otherwise (since I don't use windows), there's no way for me to test your proposed changes.


Change to crawl Portuguese (Brazilian) from libreoffice/dictionaries

Changes the crawl.sh script to fetch the pt_BR dictionaries from libreoffice/dictionaries as they are updated more frequently than the extension. Version 3.2.14 is the latest available there.

Thanks!


docs(bfdr): update docs for bfdr 1.0.0 preview.9 release

https://github.com/nightingaleproject/vital-records-dotnet/blob/ba4cd43e081ede28959f0e9d3070b59644943953/projects/Canary/ClientApp/src/index.js#L16 should be updated too. Not sure if you want to include it in this PR or make another one for it.

https://github.com/nightingaleproject/vital-records-dotnet/blob/ba4cd43e081ede28959f0e9d3070b59644943953/projects/Canary/ClientApp/src/index.js#L16
should be updated too. Not sure if you want to include it in this PR or make another one for it.

The index.js file is updated with the new version numbers

I have re-published Canary following this update.


2.5.2 Steepness Chantel Wetzel

https://github.com/pacific-hake/hake-assessment/blob/94c3fe351c2982af3a8af26865f6cb2dbdfa3ebf/doc/008-data.rmd#L587-L590

@chantelwetzel-noaa do you have time by Friday January 19th, 2024 to edit this piece of text regarding the prior on steepness for the Pacific Hake assessment. I have checked that all the values are correct, I am just not certain if the information regarding the history of the prior is correct. Can we have this statement about being used since 2007. Didn't you change/update the prior? Do we need to update our prior in the future as well 🤷? Any thoughts here are welcome. Thanks a bunch.

This looks roughly correct for Pacific hake.  Looking back at the older assessments I find references to using two Myers papers for a median of 0.75 in 2006 and 2007, then 2008 being the first assessment where they appear to move to the Myers 1999 paper using the median of 0.79 similar to the current approach.  The updated steepness prior I have worked on is for rockfish alone.

Thank you for looking and for the details! Much appreciated.


Document exit code values for ngen.exe

It would be helpful to document whether ngen.exe sets an EXIT CODE upon termination or not, and if the exit code has any meaning.

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

ID: 085ecaf8-233f-82eb-c564-b05137c899b9
Version Independent ID: e2088737-ec20-b083-0a26-c041003d12dd
Content: Ngen.exe (Native Image Generator)
Content Source: docs/framework/tools/ngen-exe-native-image-generator.md
Product: dotnet-framework
GitHub Login: @rpetrusha
Microsoft Alias: ronpet

Thanks for your feddback @tscott98. @noahfalk is this something your team can help with?

Adding @sergiy-k

Came here specifically for this. Can we please get documentation on exit codes? @noahfalk @sergiy-k

Adding some folks on the .NET team who may know who is tending to ngen.exe these days?
@fadimounir @davidwrighton @nattress
(@sergiy-k has since left the team)


As a software engineering student I want to learn professionalism so I can be a better organisational citizen when I have a job.

[ ] Are the notes written for students?
[ ] Are the notes uploaded to GitHub?
[ ] Are the slides written ready to present to students?
[ ] Are the slides uploaded to GitHub?

Next action: find some information on professionalism.


Multistage build added

I have added multistage build in the docker file which resolvs #116
I have removed multiple COPY command and added a single one to copy all the json files initially. After adding the multi stage build the final size of the image has reduced around 30 to 35 mb.

Before
After

415 MB
372 MB

@origranot  Please review it.

@goldenPheonix02 Hey!
We just migrated into Qwik framework 💯
Do you mind update the PR?

Will do that shortly

Hey @origranot I have modified the Dockerfile and after modifying the docker file the size of final image has reduced significantly again.

Before
1st Modification
Current

415 MB
372 MB
176 MB

Please review it now.


Looking for co-maintainer

Hey,
as I am not using this package in any project anymore, I can not justify putting too much time into it. This is why I want to add one or more co-maintainers to this project who can help with anything from answering issues, to fixing bugs, improving the code and adding new features.
If you are interested, please reply to this issue or email @lukasoppermann

Hey! I would like to help! I know a little javascript and can help manage issues and other organizational things

Hey @kaffarell, great to hear this, welcome to the project. I am happy with anything you feel comfortable helping with. Feel free to reach out if you would like to discuss something first.

Hello! Sorry if i'm 4 years late into this thread. I'm a fullstack-ish developer, working mostly frontend as of now. I would like to help, seems like a solid project so far 😄

@mikael-j-rich this is great. If you want to start by addressing some issues via PRs that would be a fantastic start.


stable/jenkins All user config.xml

Is your feature request related to a problem? Please describe.
I'd like to be able to define a static API token for a user which persists across restarts. This can be done by having a config.xml file in $JENKINS_HOME/users/$username/ at boot.
Describe the solution you'd like
I'd like to be able to define a list of users and the config.xml file content for them. E.g.
users:
- user1: |
    <?xml version='1.1' encoding='UTF-8'?>
    <user>
      <version>1</version>
      <id>user1</id>
      <fullname>user1</fullname>
      ...
    </user>

This is a change that I'm happy to implement myself, I would just like to confirm whether or not you'd accept a PR for this.

nice. actually i want  to create a job in jenkins while installaion using helm chart . where do i find a config.xml file?


Fails to recognize simple English words/phrases

Hi Peter- This project looks exciting, however we can't get the most basic tests working when trying simple English words or phrases:
require 'whatlanguage'
=> true
"test".language
=> :dutch
"hello".language
=> :arabic
"how are you".language
=> :arabic

How about using unicode ranges to determine a string's language? (Obviously you wouldn't make a function for every language like this silly short example here)
class String
  def arabic?
    index(/[\u0600-\u06FF]/) != nil
  end
end

puts 'اللغة التي هي هذه؟'.arabic? #=> true
puts 'You know that this is the body of the answer.'.arabic? #=> false

In the "comically bad" camp here. Was hopeful this would be useful on some article headlines for a project I'm working on but it seems like there is lots of work to do!
I Puritani review – Bellini, gracefully poised in the Troubles
- english

PauseMusicale.com
- farsi

Quickdraw: Big Grams, Chvrches, Death Cab For Cutie, Small Black, Youth Lagoon
- english

video con Salmo e Noyz Narcos
- english

Jag Och Min Far
- english

stream these :: Palm + Dan Friel + Guerilla Toss + Stove + Night Birds + Swings + Wildhoney
- english

Angeldust, from Panorama, out on 4... – Walzerkönig. Music blog from Vienna, Austria
- spanish

Two Bodies (Henri Remix)
- russian

The Home of Great Thinkers
- arabic

Rhonda Smith Interview
- norwegian

Alps Review from Music Emissions
- english

All Yours [Album Review]
- french

SXSW 2015 - OEB Spreadsheet #48 Sunday morning...
- russian

Martin Castillo -(Version Official Nueva Era Music)2012 2013 video at savevid.com
- english

Mi destino -4CzxAQmFcd0 video at savevid.com
- english

filous — How Hard I Try (Robotaki Remix)
- arabic

Any updates on this?! I am getting this problem too and it's a huge huge problem!

The official advice based on experiments is now that on texts under around several words in length, you are unlikely to get reliable results, simply due to the algorithm used and the tradeoffs of using bloom filters for efficiency. We will add/change to a Unicode codepoint presence test in future (as was used in a comment above).

So this is closed, but would it not make sense to add some sort of dictionary-based approach? One of the first examples in this issue was "How are you?" ... I just tried that as well, more than two years later, and the result has changed from :arabic to :hungarian:
main » wl.language "How are you?"
=> :hungarian

It does use a dictionary based approach. But because the dictionaries are heavily "compressed" using a Bloom filter, you get a certain percentage of false positives. With texts beyond a handful of words, this is no problem, but for anything very short, it does not work.

Hmm, I get that single words would pose problems, but "how are you" is a proper sentence and not of unusual length as far as English sentences go. For the project I'm currently working on I had to choose CLD now, which is a shame because I liked whatlanguage better, API-wise.

CLD will definitely give you better results, but has some key downsides of its own. WhatLanguage is extremely old now (the core is about 9 years old) and does have some major limitations, which I am always quick to point out.
The latest research I've seen for doing this sort of thing in a memory efficient way is to use a combination of n-gram and codepoint histograms. I understand how this works and could reimplement it with a few days of work, but it's not time I have right now, unfortunately.
One thing that someone could do would be to have a dictionary of the X most popular words in each language and that could "reinforce" the results. That would probably take care of most shorter texts, but it would definitely be a hack.

Why not reintegrate https://github.com/peterc/whatlanguage/pull/22 ?
Because currently it's scanning only the first words until it finds a convicting language.
So if you have for ex 10 words in french followed by 1000 words in english, it will return 'french'
And also the score would be something that you can compare with number of words of the text.


Task doesn't work???

When I run this task, both locally and on travis, I get the following:
Unhandled rejection Error: true
    at maybeWrapAsError (/Users/AndrewNichols/code/anichols/grunt-only/node_modules/grunt-codeclimate-reporter/node_modules/bluebird/js/main/util.js:70:12)
    at /Users/AndrewNichols/code/anichols/grunt-only/node_modules/grunt-codeclimate-reporter/node_modules/bluebird/js/main/promise_resolver.js:41:50
    at FSReqWrap.cb [as oncomplete] (fs.js:226:19)

My configuration in Gruntfile.js looks like this:
    codeclimate: {
      main: {
        options: {
          file: 'coverage/coverage.lcov',
          token: 'd7abe4f421d4b39b0618b3f8d75d112e7e2d347837ad33e4a94b1be8ab57ccca'
        }
      }
    },

pr inc

:+1:

Should be fixed with current master.
@MrBoolean : would be great if you could publish a new version soon :)

@Xiphe: :+1:  Thanks for your help!


[mongodb][doc] Fix meta field collection_name of metadata sql example

Fix issue-1286.
I change table_name to collection_name.

Thanks @gong for contribution.
LGTM.

@gong Could you also open pull requests for the branch release-2.1 and release-2.2 ?

@gong Could you also open pull requests for the branch release-2.1 and release-2.2 ?

ok, I will add pr for branch release-2.1 and release-2.2.

@gong Could you also open pull requests for the branch release-2.1 and release-2.2 ?

@Jiabao-Sun ok, I will add pr for branch release-2.1 and release-2.2.


CREAM Finance BSC - missing price first month

During the first month of the CREAM finance BSC, we do not have any way of grabbing price.
1- CREAM BSC oracle returns prices in BNB
2- Chainlink has an oracle available 1.5 months into the start of CREAM BSC
3- I could not find a way to get on chain prices during that time. I checked Pancake swap and they do not have any BSC liquidity pools before that as well.

hmm, i wouldn't call this a bug as I don't think we will fix it. I'd call it out in the methodology doc and label it as a data note

closing and addressing in #1051


Fix broken CI

Recently our main branch checks stopped passing:
https://github.com/astronomer/astronomer-cosmos/actions/runs/10528925346/job/29255782679
We managed to reproduce the issue locally by running:
hatch -v run tests.py3.9-2.7:type-check

The stacktrace is:
Traceback (most recent call last):
  File "/Users/tati/Library/Application Support/hatch/env/virtual/astronomer-cosmos/4VBJdS-x/tests.py3.9-2.7/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/Users/tati/Library/Application Support/hatch/env/virtual/astronomer-cosmos/4VBJdS-x/tests.py3.9-2.7/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
  File "/Users/tati/Library/Application Support/hatch/env/virtual/astronomer-cosmos/4VBJdS-x/tests.py3.9-2.7/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
  File "/Users/tati/Library/Application Support/hatch/env/virtual/astronomer-cosmos/4VBJdS-x/tests.py3.9-2.7/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
  File "/Users/tati/Library/Application Support/hatch/env/virtual/astronomer-cosmos/4VBJdS-x/tests.py3.9-2.7/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/tati/Library/Application Support/hatch/env/virtual/astronomer-cosmos/4VBJdS-x/tests.py3.9-2.7/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 457, in resolve
    raise ResolutionTooDeep(max_rounds)
pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 200000

The issue is happening during the dependency resolution. Locally these are the logs that happened beforehand:
  Using cached apache_airflow_providers_amazon-8.24.0-py3-none-any.whl.metadata (10 kB)
  Using cached apache_airflow_providers_amazon-8.23.0-py3-none-any.whl.metadata (10 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Using cached apache_airflow_providers_amazon-8.22.0-py3-none-any.whl.metadata (10 kB)
INFO: pip is still looking at multiple versions of apache-airflow-providers-amazon[s3fs] to determine which version is compatible with other requirements. This could take a while.
  Using cached apache_airflow_providers_amazon-8.21.0-py3-none-any.whl.metadata (10 kB)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /simple/xmlsec/
Collecting xmlsec<1.3.14 (from apache-airflow-providers-amazon[s3fs]>=3.0.0)
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /packages/37/9f/342d4562eac99178d0d515c780285e107c6828cefad37d02f05b7b7d8751/xmlsec-1.3.13.tar.gz
  Downloading xmlsec-1.3.13.tar.gz (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.6/64.6 kB 416.4 kB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting apache-airflow-providers-amazon[s3fs]>=3.0.0
  Using cached apache_airflow_providers_amazon-8.20.0-py3-none-any.whl.metadata (10 kB)

This may be a solution to the problem:
https://github.com/astronomer/astronomer-cosmos/issues/967
@jbandoro did this in the past:
https://github.com/astronomer/astronomer-cosmos/pull/812
But we need to understand why this was removed and perhaps revert

A suggestion from @pankajkoti is that we may be able to remove some dependency causing this - to unblock other work - since we have other critical things to do in this sprint.

It appears that all CI jobs using Airflow 2.7 are encountering deep resolution issues and failing. Notably, recent releases of Amazon, Google, and Azure providers have specified a minimum Airflow version of 2.8. I’m currently exploring potential connections between these findings and testing various combinations in PR #1182.
Interestingly, while Airflow versions 2.4, 2.5, 2.6, 2.8, and 2.9 are functioning correctly, only version 2.7 seems to be causing deep resolution problems.

But we need to understand why this was removed and perhaps revert

Upon review, I found that the installation wasn’t removed but rather moved under the script scripts/test/pre-install-airflow.sh, which is now included in the pre-install-commands. This change was introduced in PR https://github.com/astronomer/astronomer-cosmos/pull/771/. Therefore, it seems that we are still installing Airflow with constraints.

My finding so far is that resolutions are erroring out for Airflow 2.7
I changed the Airflow version for jobs using 2.7 to 2.8 and they finish up quicker. https://github.com/astronomer/astronomer-cosmos/actions/runs/10593607825/job/29355497612?pr=1182
Previously, I tried removing Amazon and Azure dependencies which I guessed to be taking time, but that din’t help.
I’m continuing to investigate what is it that is causing Airflow 2.7 taking time and failing

There’s not much luck here. Apparently, the airflow providers are conflicting each other trying to find common set.
I have tried various combinations locally by pinning, adding upper bounds and commenting some providers with not a complete success. The closest success I have got so far it this run https://github.com/astronomer/astronomer-cosmos/actions/runs/10605337919/job/29393925767?pr=1182
with the approach to pre-install the providers with Airflow 2.7 constraints. With this approach, it only fails for a combination of Python 3.7 & 3.8 for Airflow 2.7, and rest all are succeeding
I spent many hours yesterday but still clueless on what is the exact reason for this.

We've merged the PR #1182 . Let's observe for a few PRs on how this solution acts up.

Looks like the CI has been green for recent PR runs. So closing this ticket. We can re-open it in case we see failures again.


Support box-shadow

Some style features will require editing the Sx prop typescript object, as well as the css file for react native.

I imagine for this we'd probably allow for the react-native box-shadow properties and the normal css box-shadow properties in the sx prop then give the web based box-shadow precendence if the platform is web e.i:
shadowColor: "#000",
shadowOffset: {
  width: 0,
  height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5,
box-shadow: "10px 5px 5px red" (This takes precedence over native shadows and is only applied on the web)

What do you think?

This might be useful for converting an sx prop to RN styles. https://github.com/styled-components/css-to-react-native

This takes precedence over native shadows and is only applied on the web

I prefer to just have one style across platforms. However, boxShadow would be necessary if web shadow styling isn't fully supported by RN's normal shadow styles. I'll look into what RNW says about this.

I agree. I just didn't know if they mapped one-to-one or not. Sounds good hopefully, RNW supports the web box-shadows as well.

Any idea on how we might support elevation for android? I think https://github.com/styled-components/css-to-react-native will cover most of our needs for this and be easy to integrate after taking a look at there API. But it doesn't create the elevation property.
We may be able to attach an additional space for a comma to be added for on the elevation for example:
boxShadow: '3px 3px 5px #ccc, 1',

We would then parse the style use css-to-react-native for the first part and manually add on the elevation property with the second part if it exists.

👍 this is something that became an issue for me too, I would like to support shadows, is there no work around for this with the current implementation?
The only way I can see is by using react-native when required for this an apply View as RNView for these cases... but it sucks that I have to specially do this and limiting in more complex cases.

So far, I've been using the normal React Native shadow properties without much of an issue. That said, I don't have many shadows in my current app, so maybe I'm behind on something.
This issue was actually intended to solve the fact that the sx prop's TS types don't expect values like shadowOffset, etc. that come from RN styles. Functionally speaking, the RNW shadows have been fine in my experience. Have they not for you @daxfrost ?
If RNW's shadows are insufficient for you, could you try something like this?
import React from 'react'
import { View } from 'dripsy'
import { Platform } from 'react-native'

const WithShadow = () => (
  <View
    sx={{
      ...Platform.select({
        // these are just random shadow values to illustrate
        web: {
          boxShadow: '3px 3px 5px #ccc, 1'
        },
        default: {
          shadowColor: '#000',
          shadowOffset: {
            width: 0,
            height: 2
          },
          shadowOpacity: 0.25,
          shadowRadius: 3.84,
          elevation: 5
        }
      })
    }}
  />
)

However, given that the React Native Web philosophy is quite strict on not using CSS values, I don't recommend this usage. RNW doesn't even support the className prop anymore, so I wouldn't feel safe using boxShadow directly to style it, as it might become a no-op in the future.
In general, you should aim for platform-agnostic styles. But when you can't, I think it should be up to the developer, not this library, to decide when.
I also find this tool by @EvanBacon useful for creating React Native shadows that are web-compatible: https://shadows.netlify.app/
Let me know if I missed something here.

If you want to see which fields from React Native map onto web shadows, you can see this file from React Native Web:
/**
 * Copyright (c) Nicolas Gallagher.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import normalizeColor from '../../modules/normalizeColor';
import normalizeValueWithProperty from './normalizeValueWithProperty';

const defaultOffset = { height: 0, width: 0 };

const resolveShadowValue = (style: Object) => {
  const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;
  const { height, width } = shadowOffset || defaultOffset;
  const offsetX = normalizeValueWithProperty(width);
  const offsetY = normalizeValueWithProperty(height);
  const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
  const color = normalizeColor(shadowColor || 'black', shadowOpacity);
  if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
    return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
  }
};

export default resolveShadowValue;

Since I don't see much changing about this, I'm going to close.

I see the Theme Aware props here, but I want to map my own custom keys from my custom theme file, how does one go about doing that? https://theme-ui.com/sx-prop#theme-aware-properties
e.g:

const theme = {
  colors: {
    text: '#000',
    containerBackground: '#f6fcfe',
    viewBackground: '#ffffff',
    shadowColor: '#000000',
    primary: 'tomato',
  },
  fonts: {
    body: 'system-ui, sans-serif',
    heading: '"Avenir Next", sans-serif',
  },
  spacing: [10, 12, 14],
  shadows : {
    light: {
      shadowOffset: {
        width: 0,
        height: 2
      }
    }
  }
};

export default theme;

and then in my sx prop in the theme referencing file:
<View
    sx={{
      ...Platform.select({
        default: {
          backgroundColor: 'viewBackground',
          shadowColor: 'shadowColor',
          shadowOffset: {
            width: 'shadows.light.shadowOffset.width',
            height: 2
          },
          shadowOpacity: 0.25,
          shadowRadius: 3.84,
          elevation: 5
        }
      })
    }}>

I assume I am not understanding how this lookup is done in Dripsy, but it's not mapping, and instead interpreted as the raw string value.

I tried the above, what I noticed is that the following:
web: {
 boxShadow: '3px 3px 5px #ccc, 1'
},

has no effect for me on RN4W, but commenting this out and using the default values works fine.
What I am curious about is how to move these shadow values into my theme file so I can reference them in the same way I do with colors for example? Any help would be appreciated.

@daxfrost This was more of a proof of concept. I'm currently doing something like this in my theme file:
cards: {
primary: {
...Platform.select({
        // these are just random shadow values to illustrate
        web: {
          boxShadow: '3px 3px 5px #ccc, 1'
        },
        default: {
          shadowColor: '#000',
          shadowOffset: {
            width: 0,
            height: 2
          },
          shadowOpacity: 0.25,
          shadowRadius: 3.84,
          elevation: 5
        }
      })
   }
}

You can map a custom theme property by using the createThemeElement export like the following:
export const Card = createThemedComponent(View, {
  themeKey: 'cards',
  defaultVariant: 'primary',
})

Let me know if this helps at all.

Oh, you're right. Thanks for the useful example. Shadows don't seem to take theme values.
I've actually been using hooks to access theme values as variables, so it's interesting to see the different approaches.
I'm pushing a major update soon that will expose a useDripsyTheme hook that you'll be able to use. In the meantime, could you try this?
import { useThemeUI } from 'theme-ui'

const Shadows = () => {
  const { shadows } = useThemeUI().theme

  return (
    <View
      sx={{
        backgroundColor: 'viewBackground',
        shadowColor: 'shadowColor',
        shadowOffset: {
          width: shadows.light.shadowOffset.width, // no longer a string
          height: 2
        },
        shadowOpacity: 0.25,
        shadowRadius: 3.84,
        elevation: 5
      }}
    />
  )
}

I tried the above, what I noticed is that the following:
web: {
 boxShadow: '3px 3px 5px #ccc, 1'
},

has no effect for me on RN4W, but commenting this out and using the default values works fine.
What I am curious about is how to move these shadow values into my theme file so I can reference them in the same way I do with colors for example? Any help would be appreciated.

@daxfrost This was more of a proof of concept. I'm currently doing something like this in my theme file:
cards: {
primary: {
...Platform.select({
        // these are just random shadow values to illustrate
        web: {
          boxShadow: '3px 3px 5px #ccc, 1'
        },
        default: {
          shadowColor: '#000',
          shadowOffset: {
            width: 0,
            height: 2
          },
          shadowOpacity: 0.25,
          shadowRadius: 3.84,
          elevation: 5
        }
      })
   }
}

You can map a custom theme property by using the createThemeElement export like the following:
export const Card = createThemedComponent(View, {
  themeKey: 'cards',
  defaultVariant: 'primary',
})

Let me know if this helps at all.

I like the look of this approach, too - I will try it in a sec.

@daxfrost Oh, you're right. Thanks for the useful example. Shadows don't seem to take theme values like that. I could look into adding it.
I've actually been using hooks to access theme values as variables, so it's interesting to see the different approaches.
I'm pushing a major update soon that will expose a useDripsyTheme hook that you'll be able to use. In the meantime, could you try this?
import { useThemeUI } from 'theme-ui'

const Shadows = () => {
  const { shadows } = useThemeUI().theme

  return (
    <View
      sx={{
        backgroundColor: 'viewBackground',
        shadowColor: 'shadowColor',
        shadowOffset: {
          width: shadows.light.shadowOffset.width, // no longer a string
          height: 2
        },
        shadowOpacity: 0.25,
        shadowRadius: 3.84,
        elevation: 5
      }}
    />
  )
}

I understand if this isn't the perfect approach, since using theme values is great directly in the theme itself. I'll see what it would take to add those aliases.

So, I tried this, and it actually works... however I get a TS compiler error.

I tried the above, what I noticed is that the following:
web: {
 boxShadow: '3px 3px 5px #ccc, 1'
},

has no effect for me on RN4W, but commenting this out and using the default values works fine.
What I am curious about is how to move these shadow values into my theme file so I can reference them in the same way I do with colors for example? Any help would be appreciated.

@daxfrost This was more of a proof of concept. I'm currently doing something like this in my theme file:
cards: {
primary: {
...Platform.select({
        // these are just random shadow values to illustrate
        web: {
          boxShadow: '3px 3px 5px #ccc, 1'
        },
        default: {
          shadowColor: '#000',
          shadowOffset: {
            width: 0,
            height: 2
          },
          shadowOpacity: 0.25,
          shadowRadius: 3.84,
          elevation: 5
        }
      })
   }
}

You can map a custom theme property by using the createThemeElement export like the following:
export const Card = createThemedComponent(View, {
  themeKey: 'cards',
  defaultVariant: 'primary',
})

Let me know if this helps at all.

I like the look of this approach, too - I will try it in a sec.

This approach also works, and feels quite clean to me... however, I am also getting the following TS error:

I tried the above, what I noticed is that the following:
web: {
 boxShadow: '3px 3px 5px #ccc, 1'
},

has no effect for me on RN4W, but commenting this out and using the default values works fine.
What I am curious about is how to move these shadow values into my theme file so I can reference them in the same way I do with colors for example? Any help would be appreciated.

@daxfrost This was more of a proof of concept. I'm currently doing something like this in my theme file:
cards: {
primary: {
...Platform.select({
        // these are just random shadow values to illustrate
        web: {
          boxShadow: '3px 3px 5px #ccc, 1'
        },
        default: {
          shadowColor: '#000',
          shadowOffset: {
            width: 0,
            height: 2
          },
          shadowOpacity: 0.25,
          shadowRadius: 3.84,
          elevation: 5
        }
      })
   }
}

You can map a custom theme property by using the createThemeElement export like the following:
export const Card = createThemedComponent(View, {
  themeKey: 'cards',
  defaultVariant: 'primary',
})

Let me know if this helps at all.

I like the look of this approach, too - I will try it in a sec.

This approach also works, and feels quite clean to me... however, I am also getting the following TS error:

I have a feeling that this might be fixed in #14. I can check just to make sure.

@cmaycumber that would be so great if it is fixed, this would really give me confidence. I see you plan to merge it today 👍  looking forward to this if it is fixed.

@daxfrost I think the issue relates to #33. I used your code and reproduced it on the fresnel-2 branch with a dripsy View, but when I switched to a plain react-native View it works fine.
Are you using a View from dripsy or RN by any chance?

@daxfrost I think the issue relates to #33. I used your code and reproduced it on the fresnel-2 branch with a dripsy View, but when I switched to a plain react-native View it works fine.
Are you using a View from dripsy or RN by any chance?

Ah, silly me! I was, and I see it fixed the issue using a RN View. I take it createThemedComponent should obviously only be used on a RN View.
That said, I take it we still want to find a work around for #33 in future.

Yeah, I'd stick to using a native view when calling createThemedConponent for now. #33 is a high priority issue in my mind, but I haven't been able to figure it out quite yet. Any help on that would be amazing, since it's also blocking the pragma and other useful features.
I'll be putting out some release notes later when I publish the major changes from fresnel-2.

TS warnings for components are fixed in 1.2.1. Now that multiple variants is supported, I think #33 is a bit of an urgent problem, especially since we want to build UI libraries on top of Dripsy.


[Tool][Feature request] Copy XmlDoc for generated classes

Is there any way to copy XmlDoc from source type to destination when using generation?If no, can it be implemented?

Also interested in being able to pass XmlDocs from ICodeGenerationRegister, when using Map() method.

Any updates here? :)


npm install grunt-grunticon does not work

I get this error on multiple machines when I try to install grunticon:
$ npm install grunt-grunticon --save-dev
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "grunt-grunticon" "--save-dev"
npm ERR! node v0.10.38
npm ERR! npm  v2.8.3

npm ERR! Cannot read property 'dependencies' of undefined

@crohrer ok, so - I'm on Yosemite (OSX 10.10.3 to be exact, which is a newer version of Darwin than I'm seeing in your error) and grabbed node v0.10 and npm v2.8 and wasn't able to reproduce.
That leads me to believe this is an OSX + node v0.10 problem.
Ok - there are a couple of ways you can possibly fix this:

Upgrade to node 0.12
ulimit -n 2560

Let me know if you try one of those and it doesn't help!

Thanks!
upgrading node to v0.12.5 fixed it for me


Language Owners の表示件数を選択

Codecov Report

Merging #319 into master will decrease coverage by 16.96%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master   #319       +/-   ##
=========================================
- Coverage   19.37%   2.4%   -16.97%
=========================================
  Files          71     52       -19
  Lines        1894   1329      -565
  Branches      270    183       -87
=========================================
- Hits          367     32      -335
+ Misses       1457   1296      -161
+ Partials       70      1       -69

Impacted Files
Coverage Δ

...der-problems-frontend/src/pages/LanguageOwners.tsx
0% <0%> (ø)
:arrow_up:

atcoder-problems-backend/src/sql/streak.rs

atcoder-problems-backend/src/sql/models.rs

...tcoder-problems-backend/src/sql/rated_point_sum.rs

...er-problems-backend/src/lambda/time_submissions.rs

atcoder-problems-backend/src/lambda/io.rs

atcoder-problems-backend/src/crawler.rs

...tcoder-problems-backend/src/sql/contest_problem.rs

atcoder-problems-backend/src/sql.rs

atcoder-problems-backend/src/sql/simple_client.rs

... and 10 more

Continue to review full report at Codecov.

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


[teleMelody] Inference (EN): pattern is empty list. thus, ValueError: min() arg is an empty sequence.

Hi,  I run the inference/infer_en.py with the test data (data/en/test). Here is the output of each variables:
beats:
0 0 0 1 1 1 2 [sep] 1 2 2 0 1 1 2 [sep]

beats_label:
[[0], [0], [0], [1], [1], [1], [2], [2], [1], [2], [2], [0], [1], [1], [2]]

clean(syllables):
.............

tmp:
['.']

pattern:
[]

The following error occurred, Does anyone know how to fix it?
min_bar = min([i[0] for i in e])
ValueError: min() arg is an empty sequence.

--
Update
Maybe do not need clean() function when run infer_en.py ?

Thank you for you information! I also met this error and I think this error is caused by this regexp
where re.sub(r'.{6} *', ".", word) may intend to filter something like ......, so changing it to re.sub(r'\.{6} *', ".", word) fixes this problem.


Docker requirements

Using LXD to test some docker stuff.  Had issues with overlays running in the ver 1.12+ swarm due to modprobe, particularly br_filter.  Modules loaded on the host and the kernel usually solves for most problems, but did not for this particular case.  Found an old reference #2321, referred to adding a file /.dockerenv as the docker code uses it as a marker that it is virtualized and stop default behavior of loading modules already loaded.  Suggestion, add to front page, where I believe @brauner had added that 'security.nesting = true' replaced the need for profile docker.  Hopefully save some others time searching when they try out or upgrade to the new version of swarm.
FYI:  lxc/lxd is better than docker. :)

@brauner Way better than my incoherent mess that I wrote. You the man. :)

@jfgibbins, well thank you for the compliment but I'm passing it along to @stgraber since I'm just the merger not the mergee. :)

This ticket is about network overlays for Docker, right? Is it some Docker-specific solution or a common Linux mechanism?

@techtonik docker looks for a file called /.dockerenv as a marker to if it is running inside a virtual environment.  When the file is detected, docker changes its behavior on certain aspects, such as trying to force load of modules, which of course can't be done inside lxd containers.  The mechanism seems to be applied to any hosted environment.  Hope that answers what you were looking for.

This answers partially. /.dockerenv from #2321 is still looks like a hack, but I am not sure if it is a Docker hack or Linux kernel. From what I can understand the problem is either:

Docker can't load some overlay network module
Docker can't detect that overlay network module is loaded

So, if I understand correctly, we are dealing with the 2nd problem. Then the question is - why Docker is unable to detect that its kernel modules are loaded?

@techtonik From my research, it seems that docker, tries to force load the modules it needs, regardless of whether it is already loaded or not.  .dockerenv was added into the docker code, to allow it to know if it inside a container or not, and if so, don't force the behavior.  This enabled, for example, running docker-in-docker and such.  Trying to find the link where I found the source code inside docker for it.

Can someone contribute a simple check to Docker to look at /sys/modules/NAME prior to attempting a force load of the module?

that should be a pretty trivial and uncontroversial change that would most likely resolve this particular issue

@techtonik From docker code, which is how .dockerenv is used, as well as the code that was giving me the issue running overlay
https://github.com/docker/libnetwork/blob/master/drivers/bridge/setup_bridgenetfiltering.go
func isRunningInContainer() bool {
_, err := os.Stat("/.dockerenv")
return !os.IsNotExist(err)
}
https://github.com/docker/libnetwork/blob/19ac3ea7f52bb46e0eb10669756cdae0c441a5b1/drivers/bridge/setup_bridgenetfiltering.go
func setupBridgeNetFiltering(config *networkConfiguration, i *bridgeInterface) error {
err := checkBridgeNetFiltering(config, i)
if err != nil {
if ptherr, ok := err.(*os.PathError); ok {
if errno, ok := ptherr.Err.(syscall.Errno); ok && errno == syscall.ENOENT {
if isRunningInContainer() {
logrus.Warnf("running inside docker container, ignoring missing kernel params: %v", err)
err = nil
} else {
err = errors.New("please ensure that br_netfilter kernel module is loaded")
}
}
}
if err != nil {
return fmt.Errorf("cannot restrict inter-container communication: %v", err)
}
}
return nil
}

@stgraber I believe you mean into docker code to check that, and that would certainly fix the issue for that, but I did see reference to isRunningInContainer throughout the docker code, so wouldn't even want to guess how many things need that check.  I would stay safe with just adding the file, rather than additional code to handle case by case issues as they seem to have already done that in code, ie docker-in-docker.

I see isRunningInContainer only in setup_bridgenetfiltering.go - everything else are tests - https://github.com/docker/libnetwork/search?utf8=✓&q=isRunningInContainer&type=
https://github.com/moby/moby/search?utf8=✓&q=isRunningInContainer&type=

@jfgibbins I don't see where Docker force loads the module in https://github.com/docker/libnetwork/blob/master/drivers/bridge/setup_bridgenetfiltering.go
It checks file /proc/sys/net/bridge/bridge-nf-call-iptables and writes to it, but I see no module manipulation.


[PHP] Implement Token auto refresh

Create a dedicated client to renew expired token automatically
Add tests
Adapt build.gradle in order to copy relevant files

lgtm


thrift_proxy: use per-upstream sequence ids

Rather than use the downstream connection's sequence ID, track
sequence IDs per upstream connection.
Risk Level: low
Testing: unit tests
Docs Changes: n/a
Release Notes: n/a
Signed-off-by: Stephan Zuercher<EMAIL_ADDRESS>

@brirams @rgs1 @fishcakez if you'd like to have a look

@junr03 do you mind taking an overview pass on this so I can merge it?


[Bug] Extra comma causing compile issues in stg_hubspot__ticket

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the issue
Line 32 of stg_hubspot__ticket begins with a comma, however the remove_duplicate_and_prefix_from_columns macro also begins each line with a comma, resulting in a SQL compilation error. All other uses of this macro follow another pattern, though it should make for the same result. The other pattern does not include an additional comma between the fivetran_utils.fill_staging_columns and the remove_duplciate_and_prefix_from_columns macro calls.
Relevant error log or model output
00:26:45    Database Error in model stg_hubspot__ticket (models\stg_hubspot__ticket.sql)
  001003 (42000): SQL compilation error:
  syntax error line 169 at position 8 unexpected ','.
  compiled Code at target\run\hubspot_source\models\stg_hubspot__ticket.sql
00:26:45
00:26:45  Done. PASS=1 WARN=0 ERROR=1 SKIP=0 TOTAL=2

### Expected behavior

The models should be composed with valid SQL, passing through all columns from hubspot.

### dbt Project configurations

`hubspot__pass_through_all_columns: true`

### Package versions

0.14.0

### What database are you using dbt with?

snowflake

### dbt Version

Core 1.7.1
Snowflake 1.7.0

### Additional Context

_No response_

### Are you willing to open a PR to help address this issue?

- [X] Yes.
- [ ] Yes, but I will need assistance and will schedule time during our [office hours](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) for guidance
- [ ] No.

Hi @marshallbroussard, thanks for opening this issue and brining this issue to our attention. Also thank you much for digging into the code and finding the source of the issue! I am currently working on a few updates for this package, so I will roll this fix in with my current batch.

Hi @marshallbroussard, I have created a test branch for our next release of dbt_hubspot that should resolve this issue. You can install it by using the below snippet in your packages.yml in place of your normal hubspot lines.
- git: https://github.com/fivetran/dbt_hubspot.git
  revision: release/v0.15.0
  warn-unpinned: false

Please let me know your feedback if you are able to try it out!

This update has been released in the latest version, so closing this issue out!

This update has been released in the latest version, so closing this issue out!


Multi-threading?

Hi,
Thanks for an interesting project!
I was wondering how the SubStream behaves when it is accessed from multiple threads?
I did not notice any locking / atomics in the source-code so is this not a supported use-case?
Also worth a look: https://github.com/Azure/azure-storage-net/blob/b0d47bfd4c1c0dcbe60eaf373e2977cd7405aa5f/Lib/Common/Blob/SubStream.cs
Thanks!

Hey, sorry for taking so long to get back to you on this!
The behaviour of a Substream instance when accessed from multiple threads would generally be dependent on the behaviour of the underlying stream, with one main exception. While a substream will Seek before each read/write operation (to ensure that the operation reads from/writes to the expected position), because the underlying stream itself is not locked in any way (as you mentioned) between the seek and subsequent mutation, there is an opportunity for this to be interrupted if there are multiplte threads using the same substream instance. Ergo, I would recommend the use of the Stream.Synchronized method which you could use to wrap a Substream instance to ensure thread safety: https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.synchronized?view=net-6.0

Hey, sorry for taking so long to get back to you on this!
The behaviour of a Substream instance when accessed from multiple threads would generally be dependent on the behaviour of the underlying stream, with one main exception. While a substream will Seek before each read/write operation (to ensure that the operation reads from/writes to the expected position), because the underlying stream itself is not locked in any way (as you mentioned) between the seek and subsequent mutation, there is an opportunity for this to be interrupted if there are multiplte threads using the same substream instance. Ergo, I would recommend the use of the Stream.Synchronized method which you could use to wrap a Substream instance to ensure thread safety: https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.synchronized?view=net-6.0

I wasn't aware of Stream.Synchronized - it looks like a great solution. Thanks!


UI is a little confusing

from davecoolgood https://www.reddit.com/r/coolgithubprojects/comments/zuxuxz/comment/j1m7o0f/?utm_source=share&utm_medium=web2x&context=3

Add a more space in two user's sections and make heading or increase the font size of: "{user} starred this repo on {date} and recently contributed to {x} repos."

Yes, the look is terrible.
Some directions I'm thinking of:

Incrementally add styling. I'm not a designer, so it will keep its bare-bones look.
Adopt a design language, preferably something that looks like GitHub, has ready-to-use CSS import, and has darkmode.

On increasing the size of the user line. It is just there to show where the recomedation is comming from, not intended to be important information. I'll have to give it some thought.

#6 should show some improvement.

#7 also improves usability.


Add save_as_tex for TikZ circuit saving

This patch adds a function save_as_tex for generating a TikZ LaTeX representation of a circuit.
The function takes some optional arguments that regulate how the network is displayed (node separation, gate styling, labels for vertices or edges, etc), and implementing this for the Probabilistic part should be trivial (we only need to pass a dictionary containing the weights as argument).

I underestimated how difficult it is to draw a circuit with TikZ. It works (somewhat) well for small circuits:
using LogicCircuits

a, b = compile(PlainLogicCircuit, Lit(1)), compile(PlainLogicCircuit, Lit(2))
na, nb = compile(PlainLogicCircuit, Lit(-1)), compile(PlainLogicCircuit, Lit(-2))
a′, b′ = compile(PlainLogicCircuit, Lit(1)), compile(PlainLogicCircuit, Lit(2))
na′, nb′ = compile(PlainLogicCircuit, Lit(-1)), compile(PlainLogicCircuit, Lit(-2))
and1 = a & nb
and2 = na & b
and3 = a′ & b′
and4 = na′ & nb′
or = disjoin(and1, and2, and3, and4)
save_as_tex(or, "/tmp/example_1.tex")

But for larger circuits the problem of overlapping is obvious.
using LogicCircuits

⋀_1 = compile(PlainLogicCircuit, Lit(1)) & compile(PlainLogicCircuit, true)
⋀_2 = compile(PlainLogicCircuit, Lit(-1)) & compile(PlainLogicCircuit, Lit(-2))
⋀_3 = compile(PlainLogicCircuit, Lit(3)) & compile(PlainLogicCircuit, Lit(-4))
⋀_4 = compile(PlainLogicCircuit, Lit(-3)) & compile(PlainLogicCircuit, false)
⋀_5 = compile(PlainLogicCircuit, Lit(3)) & compile(PlainLogicCircuit, true)
⋀_6 = compile(PlainLogicCircuit, Lit(-3)) & compile(PlainLogicCircuit, Lit(4))
⋀_7 = compile(PlainLogicCircuit, Lit(1)) & compile(PlainLogicCircuit, Lit(2))
⋀_8 = compile(PlainLogicCircuit, true)
⋀_9 = compile(PlainLogicCircuit, Lit(-1)) & compile(PlainLogicCircuit, Lit(-2))
⋀_10 = compile(PlainLogicCircuit, false)

l = (⋀_1 | ⋀_2) & (⋀_3 | ⋀_4)
m = (⋀_5 | ⋀_6) & compile(PlainLogicCircuit, false)
r = (⋀_7 | ⋀_8) & (⋀_9 | ⋀_10)

ξ = disjoin(l, m, r)
save_as_tex(ξ, "/tmp/example_2.tex")

Since the output .tex file is a human-readable file, it can be used to generate a rough sketch of the circuit and eventually tweaked to actually look good.
Suggestions on how to make this better are very welcome.

Codecov Report

Merging #30 into master will decrease coverage by 4.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
- Coverage   90.62%   86.62%   -4.01%
==========================================
  Files          22       22
  Lines        1515     1585      +70
==========================================
  Hits         1373     1373
- Misses        142      212      +70

Impacted Files
Coverage Δ

src/LoadSave/circuit_savers.jl
43.50% <0.00%> (-36.26%)
:arrow_down:

Continue to review full report at Codecov.

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

Very nice feature!
Do you think it makes sense to optionally use https://ctan.org/pkg/dot2texi?lang=en for auto-layout?

Thanks, this is very cool :D
it might be possible to calculate the coordinates in a way that they don't collide since here we draw the circuits as a trees (with leaves repeated) instead of the DAG version.
Also to make the codecov happy, maybe we can add your example as a test (just to see if it generates a file and does not crash, etc").  Something like this:
@testset "Circuit to TeX happy case test" begin
  mktempdir() do tmp
    a, b = compile(PlainLogicCircuit, Lit(1)), compile(PlainLogicCircuit, Lit(2))
    na, nb = compile(PlainLogicCircuit, Lit(-1)), compile(PlainLogicCircuit, Lit(-2))
    a′, b′ = compile(PlainLogicCircuit, Lit(1)), compile(PlainLogicCircuit, Lit(2))
    na′, nb′ = compile(PlainLogicCircuit, Lit(-1)), compile(PlainLogicCircuit, Lit(-2))
    and1 = a & nb
    and2 = na & b
    and3 = a′ & b′
    and4 = na′ & nb′
    or = disjoin(and1, and2, and3, and4)
    save_as_tex(or, tmp)
    @test 1 == 1
  end
end

I did not run the above test so might be typos in there.

Do you think it makes sense to optionally use https://ctan.org/pkg/dot2texi?lang=en for auto-layout?

I fooled around a bit with dot2tex and seems like I got the hang of it. I'll push a v2 using dot2tex.

it might be possible to calculate the coordinates in a way that they don't collide since here we draw the circuits as a trees (with leaves repeated) instead of the DAG version.

I was thinking about this, and I guess we'd need to know the bounding rectangles of nodes and texts, and given that we're not working with TikZ itself, I think that'd amount to a lot of hard-coding. I think I'll take Guy's suggestion and try and make it work with dot2tex.

Also to make the codecov happy, maybe we can add your example as a test (just to see if it generates a file and does not crash, etc").

Done. Will push on my v2.

So I got dot2tex working for save_as_tex, but I'm not too happy with how dot throws around nodes the way it does.
Here is the first example's output now:

And example 2:

Terminal nodes are handled differently (I manually draw them closer to their parents, and repeat already visited leaves), since the way dot draws them is by putting all nodes on the same hierarchical rank, and that made for some really weird, kind of sparse, circuits.
It'd be nice to have parents centered above their children to avoid these odd-looking edges, but it seems there are no simple solutions to this problem.
A possible solution would be to have dot compute the layout, but only draw nodes which only have terminal nodes, setting others as invisible. We then do a kind of bottom-up drawing, where we compute where the parent should be (centered above its children) and draw a "fake" node, connecting edges from its children to it. We keep doing this until we reach the root. I think this might solve the problem, and there shouldn't be any node overlapping. But I guess that's too overkill for a simple drawing utility function.

I kept the old save_as_tex function and renamed the new dot2tex to save_as_dot2tex. The reasoning is that the old function is much more human-readable, and something that I'll be using often, I think. But feel free to add only one of them to Juice if you guys think it's best.

Thanks Renato. I merged the changes.
I noticed the examples are all trees, not DAGs, but I suppose the code works on both? In any case it's very useful.

Yes, it should work for DAGs, as I use Juice's functions.


Unable to maintain zoom on Transform.scale widget

I'm trying to build some zoom functionality into the flutter camera package for my app. Currently I am able to use the zoom feature by wrapping the CameraPreview widget in a Transform.scale and a GestureDetector. However whenever I am zooming in it is not maintaining the zoom. Currently it is snapping back to 1.0 scale when letting go after pinching and zooming.
Is there something I am doing wrong here? I am able to maintain the scale using the onDoubleTap function but not using the onScaleUpdate function.
Here is my code:
ClipRect(
                    child: AspectRatio(
                      aspectRatio: controller.value.aspectRatio,
                      child: LayoutBuilder(builder:
                          (BuildContext context, BoxConstraints constraints) {
                        return GestureDetector(
                          onDoubleTap: () {
                            setState(() {
                              scale = 4.0;
                            });
                          },
                          onScaleUpdate: (ScaleUpdateDetails details) {
                            print(details.scale);

                            setState(() {
                              scale = details.scale;
                            });
                          },
                          child: Transform.scale(
                            scale: scale,
                            child: AspectRatio(
                              aspectRatio: controller.value.aspectRatio,
                              child: CameraPreview(controller),
                            ),
                          ),
                        );
                      }),
                    ),
                  )

I recommend asking on a help site like stackoverflow or in our gitter channel.
When you filed this bug, did you end up going through https://github.com/flutter/flutter/issues/new/choose? If not, do you know where you followed a link to file a bug?


Modify Azure Runner to use existing EMS

Currently we are passing individual credentials directly to Runner.new. This is both problematic and inefficient, in the first case because we aren't including proxy information, and in the second case because we already have the connection information we need from the EMS.
This code, which is very similar to the Google provider code, alters the Runner's initialize method to accept an ems object rather than individual credentials. This, in turn, lets us use the :with_provider_connection method which already contains the credentials we need, including the proxy information.
It's also shorter and easier to read. :)
In addition to the specs, this can be validated by firing up a local instance of the app, deliberately triggering an event (such as a power on/off) for a VM, and then look for power events in the UI.

@bronaghs Please review.

👍

@bronaghs @Fryguy Shouldn't we backport this because of the lack of proxy info?

@djberg96 @Fryguy - yes we should.

@Fryguy @blomquisg I think this should be backported.

@miq-bot add_label darga/yes

Cherry-pick to Darga encountered conflicts:
$ git cherry-pick -x -m 1  f9ceee8
error: could not apply f9ceee8... Merge pull request #10710 from djberg96/azure_event_catcher
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

$ git status
On branch darga
Your branch is up-to-date with 'upstream/darga'.
 to mark resolution)

        both modified:   app/models/manageiq/providers/azure/cloud_manager/event_catcher/runner.rb
        both modified:   app/models/manageiq/providers/azure/cloud_manager/event_catcher/stream.rb

$ git diff

diff --cc app/models/manageiq/providers/azure/cloud_manager/event_catcher/runner.rb
index 9615bbc,efa43d8..0000000
--- a/app/models/manageiq/providers/azure/cloud_manager/event_catcher/runner.rb
+++ b/app/models/manageiq/providers/azure/cloud_manager/event_catcher/runner.rb
@@@ -32,15 -32,7 +32,19 @@@ class ManageIQ::Providers::Azure::Cloud
    private

    def event_monitor_handle
++<<<<<<< HEAD
 +    unless @event_monitor_handle
 +      client_id             = @ems.authentication_userid
 +      client_key            = @ems.authentication_password
 +      tenant_id             = @ems.azure_tenant_id
 +      azure_region          = @ems.provider_region
 +      @event_monitor_handle = ManageIQ::Providers::Azure::CloudManager::EventCatcher::Stream.new(
 +        client_id, client_key, azure_region, tenant_id)
 +    end
 +    @event_monitor_handle
++=======
+     @event_monitor_handle ||= ManageIQ::Providers::Azure::CloudManager::EventCatcher::Stream.new(@ems)
++>>>>>>> f9ceee8... Merge pull request #10710 from djberg96/azure_event_catcher
    end

    def reset_event_monitor_handle

diff --cc app/models/manageiq/providers/azure/cloud_manager/event_catcher/stream.rb
index db38652,281147e..0000000
--- a/app/models/manageiq/providers/azure/cloud_manager/event_catcher/stream.rb
+++ b/app/models/manageiq/providers/azure/cloud_manager/event_catcher/stream.rb
@@@ -2,12 -2,10 +2,18 @@@ class ManageIQ::Providers::Azure::Cloud
    #
    # Creates an event monitor
    #
++<<<<<<< HEAD
 +  def initialize(client_id, client_key, azure_region, tenant_id)
 +    @client_id         = client_id
 +    @client_key        = client_key
 +    @tenant_id         = tenant_id
 +    @azure_region      = azure_region
++=======
+   def initialize(ems)
+     @ems = ems
++>>>>>>> f9ceee8... Merge pull request #10710 from djberg96/azure_event_catcher
      @collecting_events = false
+     @since = nil
    end

    # Start capturing events
@@@ -62,11 -60,8 +68,17 @@@
    end

    def create_event_service
++<<<<<<< HEAD
 +    conf = Azure::Armrest::ArmrestService.configure(
 +      :client_id  => @client_id,
 +      :client_key => @client_key,
 +      :tenant_id  => @tenant_id
 +    )
 +    Azure::Armrest::Insights::EventService.new(conf)
++=======
+     @ems.with_provider_connection do |conf|
+       Azure::Armrest::Insights::EventService.new(conf)
+     end
++>>>>>>> f9ceee8... Merge pull request #10710 from djberg96/azure_event_catcher
    end
  end

@bronaghs @djberg96 please resolve merge conflicts locally and make a PR against Darga referencing this PR.

@chessbyte You can use -X to force it.

@djberg96 Please run the same cherry-pick command locally, resolve conflicts, validate, and make a Darga PR from it.

@chessbyte It's cleaner if this is merged first: https://github.com/ManageIQ/manageiq/pull/10953

@chessbyte Done. https://github.com/ManageIQ/manageiq/pull/11026

Backported to Darga via #11026
$ git log

commit e30499c543a82fb2584ed9f4fe6938add6f416fb
Merge: 5810554 49cf9d7
Author: Oleg Barenboim<EMAIL_ADDRESS>Date:   Tue Sep 6 13:25:29 2016 -0400

    Merge pull request #11026 from djberg96/darga

    [DARGA] Modify Azure Runner to use existing EMS (backport)

https://bugzilla.redhat.com/show_bug.cgi?id=1375344


Scrolling text is slightly blurry in 1440p

I just wanted to let you know that it feels like the scrolling text is a little blurry when I'm playing in 1440p. I tried to change some settings around but I couldn't find a way to fix it. I am running d912pxy + reshade as well, if that matters. My rig is a 1440p 165Hz screen powered by a RTX 2070 Super and a Ryzen 3900X. Not sure what further info I can provide, but I'd be happy to help in debugging the issue! I will attach an image later if necessary.

On which version are you experiencing this issue? Are you on the prerelease for 2.0? If not, try that one. Otherwise it would help if you could specify the font and font size you're using.

Well, I managed to forget the most basic info. I am using the 1.3 RC4 version with the font settings on default (e.g. default font, 22 for normal hits and 30 for crits).
I could try 2.0 tonight, but I'll need to read the manual installation first, since I used the mod manager to install SCT.

This will be probably the same issue as in https://github.com/Artenuvielle/GW2-SCT/issues/20.
This should be fixed by the prerelease for 2.0 since the font rendering was completely changed.

Thanks, will try that out! Got a little screenshot for ya, too (only 22 size so not very obvious). Will probably not be relevant, though, since you said it's fixed in 2.0.


POST Multipart-Form

Using this library for simple gets/posts/puts and it works a-ok.
However, was looking to do a multipart form post upload of an image file to the server using this. Not sure if this support is available here (or is a todo). Thanks in advance.

@rtipnis
is the library available to support multipart-form now?

is anyone working on this?

not currently there are 2 inactive PRs that are somewhat related with some prior art https://github.com/mrtazz/restclient-cpp/pull/139 https://github.com/mrtazz/restclient-cpp/pull/69


PermissionError: [Errno 13] Permission denied: on Ubunti 18.04.

Describe the bug
ddev does not start properly with ddev start
On macOS works fine bit on Ubuntu 18.04 we get following error:
.PermissionError: [Errno 13] Permission denied: '/home/aharring/.ddev/router-compose.yaml'
Failed to start maui2: failed to start ddev-router: Failed to run docker-compose [-f /home/aharring/.ddev/router-compose.yaml -p ddev-router up -d], err='exit status 1', stdout='', stderr='.PermissionError: [Errno 13] Permission denied: '/home/aharring/.ddev/router-compose.yaml''
We tried a lot of stuff but nothing works.
Thank you
Sytem:
Ubuntu 18.04.4 LTS
DDEV-Local version: v1.14.2
commit: v1.14.2
db: drud/ddev-dbserver-mariadb-10.2:v1.14.1
dba: phpmyadmin/phpmyadmin:5
ddev-ssh-agent: drud/ddev-ssh-agent:v1.14.0
docker: 19.03.11
docker-compose: 1.25.0-rc4
os: linux
router: drud/ddev-router:v1.14.0
web: drud/ddev-webserver:v1.14.2
Docker:
Client: Docker Engine - Community
Version:           19.03.8
API version:       1.40
Go version:        go1.12.17
Git commit:        afacb8b7f0
Built:             Wed Mar 11 01:22:56 2020
OS/Arch:           linux/amd64
Experimental:      false
Server:
Engine:
Version:          19.03.11
API version:      1.40 (minimum version 1.12)
Go version:       go1.13.12
Git commit:       77e06fd
Built:            Mon Jun  8 20:24:59 2020
OS/Arch:          linux/amd64
Experimental:     false
containerd:
Version:          v1.2.13
GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version:          1.0.0-rc10
GitCommit:
docker-init:
Version:          0.18.0
GitCommit:        fec3683

You seem to have used sudo at some point, or ran as root?
Please show the output of id && ls -lR ~/.ddev - I think it will show that files are owned by root (or by another user?)
ddev does its best not to let you run as root, but maybe there's a way around it.

I'm hoping you'll study this just a bit longer so we can try to understand what happened, but you'll be able to fix it with sudo chown -R aharring ~/.ddev

Hi @rfay sadly it does not work:
.PermissionError: [Errno 13] Permission denied: '/home/aharring/.ddev/router-compose.yaml'
Failed to stop project maui2:
Failed to run docker-compose [-f /home/aharring/.ddev/router-compose.yaml -p ddev-router down], err='exit status 1', stdout='', stderr='.PermissionError: [Errno 13] Permission denied: '/home/aharring/.ddev/router-compose.yaml''
That's wired, because on macOS/Windows I never had any problems. By the way: great job!

I'm really happy to help you, and will do a zoom or other screenshare if it helps. But the problem is not with Ubuntu, it's with your permissions.
I already asked you for your results of id && ls -lR ~/.ddev, and that's what I need to see. You have file ownership in ~/.ddev/router-compose.yaml or ~/.ddev or another parent directory that are not allowed to the user running ddev.
You could likely solve this by just removing ~/.ddev, sudo rm -r ~/.ddev, and again I'm happy to help with a screenshare of any type, and happy to help in more interactive environments like slack or gitter, see https://ddev.readthedocs.io/en/stable/#support-and-user-contributed-documentation
People around the world use ddev on Ubuntu every day, and have since the beginning of the project. And it gets several hours of testing with every push. So it's just something that's gone wrong on your machine.

The Problem was docker-compose - my apprentice installed this with apt install docker-compose. I didn't realize that.
Installing docker-compose with sudo apt remove docker-compose && sudo curl -L "https://github.com/docker/compose/releases/download/1.26.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose solved our problem.
Thank you for your support.

For those who might come on this in the future, please follow the Linux installation instructions - the preferred method for getting docker-compose is Linuxbrew. And of course, do not forget to do the post-installation steps, making your user able to run docker without root privileges.
Glad this is working for you @YusufFidan

Reopening as this same thing was reported in Stack Overflow, https://stackoverflow.com/questions/62860476/ddev-got-no-permissions-to-home-directory-files

Hello rfay,
thank you for your support,
as mentioned in stackoverflow and right above here,
I had to uninstall the snap packages and install them via apt.
Runs like charme now, thank's again.

Ah, snap packages often have permissions problems. Had you installed docker via snap?
For everybody, Docker installation technique is in the docs at https://ddev.readthedocs.io/en/stable/users/docker_installation/#linux-installation-docker-ce
I guess "Don't use snap!"


Add Dec newsletter, update tiers sponsors

Needs https://github.com/maplibre/demotiles/pull/20

@HarelM can you review this one?


is xgboost support stream input?

In most cases,we need to read the characteristic data directly from the string, and then to predict the result.
Does xgboost support this interface now?

No support for stream, but there is a Spark interface for huge datasets.


aws-elasticache-memcached module

We should be making aws/elasticache-memcached as the module, shouldn't have any reference to MD per note

Thanks for clarifying, super pumped to get these things clinically applied.


why is coco.nim executable? ls shows: -rwxr-xr-x

and running it shows something weird too:
./coco.nim
Version: ImageMagick 7.0.8-12 Q16 x86_64 2018-10-03 https://imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
...

At some point I made a typo in nimble with bin = ["coco.nim"] instead of bin = ["coco"]. Maybe it comes from that.
On my side, trying to execute coco.nim shows this. Not as weird as you.


hwatch: init at 0.3.6

Description of changes
This adds a new tool hwatch to nixpkgs.
It is..

A modern alternative to the watch command, records the differences in execution results and can check this differences at after.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Rebased & squashed commits into one for hwatch and one to add maintainer to list.

0.3.6 was released 3 hours ago, and thx for the PR to adding Cargo.lock! https://github.com/blacknon/hwatch/releases/tag/0.3.6

Thanks for merging - will update this.

Result of nixpkgs-review pr 177188 run on x86_64-linux 1

1 package built:

hwatch


Reset Password on Login Screen

Functionality for users to reset password.
Send auth code to email set in user database..
User enter auth code into field then user is able to change password.

https://gist.github.com/nemtsov/6c2c24fa565a29404b487c61ce5bae4f


[SPARK-40599][SQL] Add multiTransform methods to TreeNode to generate alternatives

What changes were proposed in this pull request?
This PR introduce TreeNode.multiTransform() methods to be able to recursively transform a TreeNode (and so a tree) into multiple alternatives. These functions are particularly useful if we want to transform an expression with a projection in which subexpressions can be aliased with multiple different attributes.
E.g. if we have a partitioning expression HashPartitioning(a + b) and we have a Project node that aliases a as a1 and a2 and b as b1 and b2 we can easily generate a stream of alternative transformations of the original partitioning:
// This is a simplified test, some arguments are missing to make it conciese
val partitioning = HashPartitioning(Add(a, b))
val aliases: Map[Expression, Seq[Attribute]] = ... // collect the alias map from project
val s = partitioning.multiTransform {
  case e: Expression if aliases.contains(e.canonicalized) => aliases(e.canonicalized)
}
s // Stream(HashPartitioning(Add(a1, b1)), HashPartitioning(Add(a1, b2)), HashPartitioning(Add(a2, b2)), HashPartitioning(Add(a2, b2)))

The result of multiTransform is a lazy stream to be able to limit the number of alternatives generated at the caller side as needed.
Why are the changes needed?
TreeNode.multiTransform() is a useful helper method.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New UTs are added.

I've opened 3 WIP PRs to demonstrate the usage of multiTransform():

A bug fix to omprove AliasAwareOutputPartitioning to take all aliases into account: https://github.com/apache/spark/pull/37525
A performance improvement to generate constraints in projection more effectively: https://github.com/apache/spark/pull/38035
A refactor to simplify output partitioning calculation of BroadcastHashJoinExec: https://github.com/apache/spark/pull/38038

Please note that all 3 are based on this PR so currently they contain the changes of this PR too.

@cloud-fan, @gengliangwang, @sigmod could you please take a look at this PR?

@cloud-fan, @sigmod I still think multiTransform() can be useful helper. Please find a few examples a previous comment. I've rebased the PRs on the latest master once more. Let me know if you are intterested. If not, I will drop these PRs.

@peter-toth:
do you have more concrete examples in mind for multiTransform?  It seems that we can easily run into exponential alternatives?

@sigmod,

do you have more concrete examples in mind for multiTransform?

I gave 3 concrete examples where multiTranform could help. All of these PRs contain 2 commits. The first commit is equal to this PR, the second contains the suggested change.

In https://github.com/apache/spark/pull/37525 I showed that AliasAwareOutputPartitioning is currently incorrect. When it builds the outputPartitioning it only takes the last alias into account. E.g. when we have a SELECT a AS a1, a AS a2 ... node then its outputPartitioning containes the child's partitioning where a is replaced to a2 only. But in this case the correct partitioning should be a PartitioningCollection where the child's partitioning expression is duplicated and a is replaced to a1 and a2 respectively.
In https://github.com/apache/spark/pull/38038 we have a very similar issue. When we build BroadcastHashJoinExec.outputPartitioning the expandOutputPartitioning() method takes the mapping from stream to build side keys and calcualtes the final PartitioningCollection. This PR is only a refactor to show that the old generateExprCombinations is simplified to a multiTransform call.
In https://github.com/apache/spark/pull/38038 I use muliTransform to speed up the current constraint generation logic. The problem with the current code is that it takes the aliases one by one and applies the mapping on all the current elements of allConstraints buffer (https://github.com/apache/spark/pull/38035/files#diff-fbc6da30b8372e4f9aeb35ccf0d39eb796715d192c7eaeab109376584de0790eL187-L192). Consider we have project node with n attribute aliases (a1 AS a1a, a2 AS a2a, ..., an AS ana) and a child constraint as a1 = 1 || a2 = 2 || ... || an = n then we end up with 2^n elements in allConstraints buffer (a1 = 1 || a2 = 2 || ... || an = n, a1a = 1 || a2 = 2 || ... || an = n, a1 = 1 || a2a = 2 || ... || an = n, a1a = 1 || a2a = 2 || ... || an = n, ...) and later on 2^10 - 1 of these are simply dropped as the attributes are not in output set of the project node.
The new multiTransform generates the only valid constraint: a1a = 1 || a2a = 2 || ... || ana = n.

It seems that we can easily run into exponential alternatives?

That's correct but that's why 'multiTransformreturns a lazyStream. To let the caller decide how many results they need and don't calculate the alternatives in advance. In the fist example the number of elements in the partitioning collection is limited by a new spark.sql.aliasAwareOutputPartitioning.expandLimitconfig. The 2nd example uses the already introdudedspark.sql.execution.broadcastHashJoin.outputPartitioningExpandLimitconfig. The 3rd example doesn't limit the number of constraints as the original code doesn't do that. (But we could easily introduce a finer grained limit instead of just beeing able to enable/disablespark.sql.constraintPropagation.enabled`.)

I assume you eventually will only choose one from those alternatives?
No, the main pont in the above examples is that we need a set of results.

But, this new method also gives the oportunitly to limit the number of alternatives returned by time. E.g. we could spend a certain max number of seconds generating and evaulating alternative trees to find the best one...

@sigmod let me know if you need more examples or I should ellaboreate on the aboves.
Also cc @cloud-fan, let me know your thoughts please.

I'm a bit hesitant to touch the core TreeNode library as these things can be hard to generalize. For example, for output ordering a + b, if the project list is a, a as x, b as y1, b as y2, we should produce a + y1, a + y2, x + y2, x + y2. Note that:

sometimes we only want to replace one alias as the original attribute a is still in the output
We might do some early pruning to avoid exponential growth
We can strip some expression from the project list, e.g. empty2null(a) -> a

Are you sure the multiTransform can meet all these requirements? Can you give an example about how to use it to implement the algorithm in https://github.com/apache/spark/pull/39556#discussion_r1069575600 ?

sometimes we only want to replace one alias as the original attribute a is still in the output

multiTransform accepts a rule with type PartialFunction[BaseType, Seq[BaseType]] so the transformation can contain the original item itself . E.g. a -> Seq(a, x) in your example. This is how the aliasMap is built in https://github.com/apache/spark/pull/37525/files#diff-a2a190aab57ed84a61da9c3a1b57a79a65b0f31537d81450ad4ba2c199aad2c1R31-R52.

We might do some early pruning to avoid exponential growth

I think by early pruning you mean that some of the maped expressions should confirm to some constraint. E.g. the mapped expressions should be unique in terms of their canonicalized form. HashPartitioning(a + b) and HashPartitioning(b + a) are the same so there should be only one of them in the output set of mapped expressions. This can be archieved by filtering the output of multiTransform() like I do in https://github.com/apache/spark/pull/38038/files#diff-3790dac5196f1c7b2bdaf905eca516e9d8fd1a779187ecbee4efc11b83f9cda9R115-R119.

We can strip some expression from the project list, e.g. empty2null(a) -> a

I'm not sure why don't we do that change in a simple transform before generating the results. But you can also do that with empty2null(a) -> Seq(a) using multiTransform().

@cloud-fan I've updated my previous comment with the right example for 2.

I think this is more efficient than keeping a candidate plans list and transforming all the plans in the list and repeating, as I mentioned in https://github.com/apache/spark/pull/39556#discussion_r1069575600 . I'll take a closer look after the autoContinue flag is removed. Great idea and great job!

thanks, merging to master!

Thanks for the review @cloud-fan, @ulysses-you!


to_string?

Describe the feature in as much detail as possible.

Given a json object of any primitive type, I'd like to be able to call something like std::to_string on it, allowing me to turn it into a string without the quotes/escaping that dump would put on a string.
So far the closest I've gotten to the behavior I want is a big switch statement on the type of the json object, where I call std::to_string(json_val.get<thetype>()) in each case except string and raise an exception on non-primitive types.
So if I have the object { 'lokey' : 'hival' }, I want to be able to save the string "hival" (where the quotes ust denote the string, in memory would just be hival) and not "\"hival\"". I would like the same function to implicitly format bools and ints to strings, as well. I understand that this is asking for opinionated behavior, but I think it would be helpful for brevity if you were, for example, converting from one JSON schema to another, where the same thing has a different type in the two schema. At the least, letting me get just the string of a string value instead of the escaped version would be enough for me.
I'm very sorry if there's already something like this in the library, I looked through the documentation multiple times over the last few days before arriving at my switch statement.
Thanks for the awesome library!

At the least, letting me get just the string of a string value instead of the escaped version would be enough for me.

Does this do what you want? json_val.get<std::string>()

The library does not provide an automatic stringification for all value types. As @gregmarr points out, the (unescaped) string value can be queried with .get<std::string>(). Other primitive types (null, number, boolean) need to be converted by the user.

@gregmarr You're right, I completely forgot that I had used that in my switch-case statement, haha.
Probably a good decision to make us do this explicitly, I've already been bitten by some of the implicitness allowed in this library and it seems like you're taking steps to move away from that, no sense introducing more :P

@haydenflinner Do you need further assistance or can we close this issue?

Thank you!


Show breadcrumb in title bar

This PR introduces a BreadCrumbs component.
Implementation notes

Deletion of title related stuff from the NavBar service is not part of this PR.

Will be continued in https://github.com/DSD-DBS/capella-collab-manager/pull/543.


[proptest] upgrade to proptest 0.10.0, proptest-derive 0.2.0

These upgrades mean that we no longer have to maintain a patch.

@bors-libra r+

:pushpin: Commit af72f93 has been approved by bmwill

:hourglass: Testing commit af72f938137e249f30140cbc03060f913a04424a with merge<PHONE_NUMBER>67ba7fea020ef42c564c8bfe657daf...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: bmwill
Pushing<PHONE_NUMBER>67ba7fea020ef42c564c8bfe657daf to master...