When overriding init with enclosed generic classes pydantic raises spurious validation errors

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
I have a use case where I'm using python generics (typing.Generic) with pydantic models which are nested and where the nesting model has a custom __init__ function which instantiates the nested model. I think the issue may somehow be with the generic code using the generic typing.TypeVar to instantiate rather than the concrete class, but I have been unable to figure out how to debug this as the traceback never actually goes down to the place where the exception is raised. This will be easier to explain with a working example, I think:
import typing

import pydantic

GC = typing.TypeVar("GC", bound=pydantic.BaseModel)

class EnclosedGeneric(pydantic.BaseModel, typing.Generic[GC]):
    version: int
    model: GC

class EnclosingGeneric(pydantic.BaseModel, typing.Generic[GC]):
    enclosed: EnclosedGeneric[GC]

class EnclosingGenericWithInit(pydantic.BaseModel, typing.Generic[GC]):
    def __init__(self, version: int, model: GC):
        super().__init__(enclosed=EnclosedGeneric[GC](version=version, model=model))

    enclosed: EnclosedGeneric[GC]

When using EnclosingGeneric everything works as expected.
class ConcreteModel(pydantic.BaseModel):
    field: str

EnclosingGeneric[ConcreteModel](
    enclosed=EnclosedGeneric[ConcreteModel](version=1, model=ConcreteModel(field="val"))
)

However, when using EnclosingGenericWithInit:
EnclosingGenericWithInit[ConcreteModel](version=1, model=ConcreteModel(field="val"))

I get the following exception:
Traceback (most recent call last):
  File "/Users/julia.patrin/src/sa-8078-solution-accelerator-framework/pydantic-generics.py", line 32, in <module>
    EnclosingGenericWithInit[ConcreteModel](version=1, model=ConcreteModel(field="val"))
  File "/Users/julia.patrin/src/sa-8078-solution-accelerator-framework/pydantic-generics.py", line 20, in __init__
    super().__init__(enclosed=EnclosedGeneric[GC](version=version, model=model))
  File "/Users/julia.patrin/src/sa-8078-solution-accelerator-framework/.venv/lib/python3.11/site-packages/pydantic/main.py", line 212, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for EnclosingGenericWithInit[ConcreteModel]
enclosed
  Input should be a valid dictionary or instance of EnclosedGeneric[ConcreteModel] [type=model_type, input_value=EnclosedGeneric(version=1...creteModel(field='val')), input_type=EnclosedGeneric]

If I remove the generics entirely everything works fine:
class Enclosed(pydantic.BaseModel):
    version: int
    model: pydantic.BaseModel

class Enclosing(pydantic.BaseModel):
    enclosed: Enclosed

class EnclosingWithInit(pydantic.BaseModel):
    def __init__(self, version: int, model: pydantic.BaseModel):
        super().__init__(enclosed=Enclosed(version=version, model=model))

    enclosed: Enclosed

Enclosing(enclosed=Enclosed(version=1, model=ConcreteModel(field="val")))
EnclosingWithInit(version=1, model=ConcreteModel(field="val"))

I did find a workaround which works with the generics, and that is passing in a dictionary instead of a concrete class in the custom __init__ method, but that seems like a hack:
class EnclosingGenericWithInitWorkaround(pydantic.BaseModel, typing.Generic[GC]):
    def __init__(self, version: int, model: GC):
        super().__init__(enclosed={"version": version, "model": model})

    enclosed: EnclosedGeneric[GC]

EnclosingGenericWithInitWorkaround[ConcreteModel](version=1, model=ConcreteModel(field="val"))

Example Code
import typing

import pydantic

GC = typing.TypeVar("GC", bound=pydantic.BaseModel)

class EnclosedGeneric(pydantic.BaseModel, typing.Generic[GC]):
    version: int
    model: GC

class EnclosingGenericWithInit(pydantic.BaseModel, typing.Generic[GC]):
    def __init__(self, version: int, model: GC):
        super().__init__(enclosed=EnclosedGeneric[GC](version=version, model=model))

    enclosed: EnclosedGeneric[GC]

class ConcreteModel(pydantic.BaseModel):
    field: str

EnclosingGenericWithInit[ConcreteModel](version=1, model=ConcreteModel(field="val"))

Python, Pydantic & OS Version
pydantic version: 2.9.2
        pydantic-core version: 2.23.4
          pydantic-core build: profile=release pgo=false
                 install path: /Users/.../.venv/lib/python3.11/site-packages/pydantic
               python version: 3.11.4 (main, Sep 19 2023, 17:11:25) [Clang 15.0.0 (clang-15<IP_ADDRESS>)]
                     platform: macOS-15.0-arm64-arm-64bit
             related packages: mypy-1.11.2 typing_extensions-4.12.2
                       commit: unknown

hi @reversefold ,

pydantic models which are nested and where the nesting model has a custom init function which instantiates the nested model

Have you considered using post_init?

Hi @reversefold,
See https://github.com/pydantic/pydantic/issues/10583 for an explanation of why this fails.

I'm not sure what post_init would have to do with this, this is a simple matter of instantiating an enclosed class in an init method.
#10583 Only gives a pointer, it doesn't really explain the problem or the solution. The really confusing part of all of this is that the code as given above passes all type checks but only fails at runtime in pydantic validation. It's not clear what the correct course of action is here.
It appears that changing the init method to refer to the type of the passed in model object makes pydantic happy but type checkers now fail, which is the whole point of using generics:
class EnclosingGenericWithInit(pydantic.BaseModel, typing.Generic[GC]):
    def __init__(self, version: int, model: GC):
        super().__init__(enclosed=EnclosedGeneric[type(model)](version=version, model=model))

    enclosed: EnclosedGeneric[GC]

mypy fails with an error about the value in the square brackets not being a type, necessitating adding # type: ignore to force static type checkers to be happy.
It seems like there should be a solution here that works for both static type checking and for pydantic.

The runtime behavior does not always reflect the static type checking mechanisms.
Taking a simpler example:
from typing import Generic, TypeVar

T = TypeVar("T")

class Class(Generic[T]):
    def __init__(self):
        print(T)

What you expected here is that doing Class[str]() will print <class 'str'>, but you instead get the T type var instance printed out. Python does not "replace" type vars instances inside the body of the class when parametrized (and it can't do so anyway).
using type(model) is the way to go, but you'll have to ignore the type checker error here unfortunately.

I'm not necessarily expecting Python to print out the class that the generic TypeVar is standing in for in that case, I do understand that Python's type hinting and Generics are not a full runtime type system like in, say, Java. What I do expect is for the type checking tools to work properly with these mechanisms. Which is does. Take the example of these non-pydantic classes:
import typing

GCP = typing.TypeVar("GCP")

class ConcreteModelPy:
    def __init__(self, field: str):
        self.field: str = field

class EnclosedGenericPy(typing.Generic[GCP]):
    def __init__(self, version: int, model: GCP):
        self.version: int = version
        self.model: GCP = model

class EnclosingGenericWithInitPy(typing.Generic[GCP]):
    def __init__(self, version: int, model: GCP):
        self.enclosed: EnclosedGenericPy[GCP] = EnclosedGenericPy[GCP](version=version, model=model)

EnclosingGenericWithInitPy[ConcreteModelPy](version=1, model=ConcreteModelPy(field="val"))
EnclosingGenericWithInitPy(version=1, model=ConcreteModelPy(field="val"))

mypy and python are both perfectly happy with this code. It passes static type checks and runs at runtime with no issues. The issue is that pydantic is not accepting something that mypy does accept and that seems like a violation of the contract that pydantic makes with the typing system. Instead of allowing code to pass static type checks we are required in this case to silence the static type check to make pydantic happy.
How is pydantic introspecting the type that has replaced the Generic at runtime? How does it know whether it's a TypeVar or not? Couldn't pydantic be modified to allow for a use-case like this which leaves the type checkers happy and still works at runtime fine?

Ok I'm going to give you some technical details but I would suggest digging more on your side as well.
When doing super().__init__(enclosed=EnclosedGeneric[GC](version=version, model=model)) at runtime, Python calls the __class_getitem__ class method of EnclosedGeneric.
__class_getitem__ was originally designed for typing.Generic (and naturally Generic implements this method). Pydantic defines a custom __class_getitem__ implementation so that whenever you parametrize a Pydantic model (i.e. doing MyModel[SomeType]), we actually create a new class and manually replace every type variable present in the class annotations.
The __class_getitem__ method takes a single key argument, which may be a tuple if you parametrize a class with multiple arguments (e.g. MyModel[int, str]). In your case, we are calling EnclosedGeneric[GC], so key will be the GC type variable instance, no matter if the parent class where this is happening (EnclosingGenericWithInit) was parametrized or not. This equivalent example might make things clearer:
class EnclosingGenericWithInit(pydantic.BaseModel, typing.Generic[GC]):
    def __init__(self, version: int, model: GC):
        ParametrizedEnclosedGeneric = EnclosedGeneric.__class_getitem__(GC)

It's the same thing as calling a regular method.


Issue on page /lcss-example.html

Hi, please help with this two issues:

Example work properly if install osmnx 1.9.4. with osmnx 2.0.0 get error. [solved: pip install osmnx==1.9.4]
Try example with my own gps data (on colab) - didn't work because trace and geofence are created on ESPG:4326 but nx_map created on ESPG:3857. How i can solve this error?

from mappymatch.matchers.lcss.lcss import LCSSMatcher
matcher = LCSSMatcher(nx_map)
match_result = matcher.match_trace(trace)
=>
ValueError: crs of origin EPSG:4326 must match crs of map EPSG:3857
print(nx_map.crs) => EPSG:3857
print(geofence.crs) => EPSG:4326
print(trace.crs) => EPSG:4326

sorry, my fault: geofence and trace should be en EPSG:3857 (use xy=true to convert from EPSG:4326 in Trace)


Some graphs show "no data"

Describe the bug
Some graphs show "no data"
Environment

Harvest version: harvest version 21.05.1-1 (commit 2211c00) (build date 2021-05-21T01:28:12+0530) linux/amd64
Command line arguments used: using provided systemctl-unit-file
OS: Red Hat Enterprise Linux release 8.3 (Ootpa)
Install method: native-rhel-package
ONTAP Version: several (from 9.5 upwards)

To Reproduce
Steps to reproduce the behavior: just open any dashboard
Expected behavior
Want to see graphs
Actual behavior
Graph shows - no-data
Possible solution, workaround, fix
Nothing found
Additional context

Do you see the data in Prometheus?

Reinstallation solved problem. Guess where some leftovers from old installation maybe

Thanks for acknowledging and glad it's working now


Add macOS and Windows builds to CI matrix, post artifacts on success

I have no idea why Actions just stopped running on this PR. They worked up until my last commit after which the UI went away (no Checks tab in this PR, no builds in the Actions log.

...so it looks like ordinary Joes (even if they are org members, thanks for the invite!) can't see Actions error messages if there are syntax problems with the YAML. I found the issue using my fork, then fixed it here, and CI status checks came back.


Is it based on XML or JSON in fact?

The text contains fragment describing the DSL that it is based on XML to me it seems to be the JSON rather. If I'm wrong, can you explain the connection to XML?

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

ID: f34eea37-51a4-6227-f5ed-6501624ad045
Version Independent ID: 2994cf60-0cb7-afa2-20b8-7e2b1117f964
Content: ASP.NET Core web API documentation with Swagger / OpenAPI
Content Source: aspnetcore/tutorials/web-api-help-pages-using-swagger.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @RicoSuter
Microsoft Alias: scaddie

@znamenap, thanks for pointing out this could be clarified.  I see what you mean.  That paragraph seems to be unintentionally  blurring the specification and the JSON output the way it is worded. Maybe pointing out the relationship a little more in the topic would also help.   The OpenAPI specification is used by the tooling called Swagger.  Swagger reads the attribute annotations and XML within controllers and models to produce a JSON file that describes what the API is capable of. To add to the confusion, as the previous paragraph addresses, OpenAPI and Swagger are often used interchangeably to refer to the same thing, and then there is the specification vs the tool, vs the output.


Does it work?

Does this plugin work at all, or is no idea to even try using it?

Greetings @novalain!
I've closed this issue because my sensors indicated it was old and inactive, and may have already been fixed in recent versions of Ionic. However, if you are still experiencing this issue, please feel free to reopen this issue by creating a new one, and include any examples and other necessary information, so that we can look into it further.
Thank you for allowing me to assist you.


Tool tip

Implement a tooltip

When we hover over a card, it should display the usage of the corresponding tool.
To achieve this, we can provide a tooltip
Because in the tools section, it is difficult to know the functionality of each tool
Users may find it challenging to locate the tools they need since the tool descriptions do not provide sufficient information about their functionality.

For this, i guess we have to add one more field in our db to store a short into about the website.


Crash every time I click to add a channel

When I open the app on my HTC One M8 and I click on ADD NEW CHANNEl the app crashes.
I sent a crash log using the built-in feature of Android, is it enough?

I do get crash reports through an internal service, so I should have
received it and should be able to develop a fix.
On Nov 1, 2016 10:49 AM, "Federico Zivolo"<EMAIL_ADDRESS>wrote:

When I open the app on my HTC One M8 and I click on ADD NEW CHANNEl the
app crashes.
I sent a crash log using the built-in feature of Android, is it enough?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Fleker/CumulusTV/issues/186, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADI581yExeLSz9hSxdxqEcTDD0mjM_waks5q51GCgaJpZM4KmLA4
.

Thank you! Let me know if you need any help with the testing.
May you provide an apk of the latest release to test it out? The Play Store version is still 1.6.4

You can look at the GitHub releases section for more up to date version.
On Nov 1, 2016 11:26 AM, "Federico Zivolo"<EMAIL_ADDRESS>wrote:

Thank you! Let me know if you need any help with the testing.
May you provide an apk of the latest release to test it out? The Play
Store version is still 1.6.4
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Fleker/CumulusTV/issues/186#issuecomment-257596631,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADI58-gnSTd18tO3wfJZ8TzWbBBiddiYks5q51okgaJpZM4KmLA4
.

I can't find the APK tho :(

Currently the most up to date version is 1.6.4. I needed a new release
primarily for Jitpack to work.
On Nov 1, 2016 11:50 AM, "Federico Zivolo"<EMAIL_ADDRESS>wrote:

I can't find the APK tho :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Fleker/CumulusTV/issues/186#issuecomment-257603589,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADI589UspMof3pn7QjxzzCLcfTpTHvZpks5q51-sgaJpZM4KmLA4
.

I see, thanks. Please let me know if I can help you in any way. (I'd also like to contribute to the project but I can work on Android only with React Native 😓 )

You don't have any other Android experience aside from React?

No sorry, I'm mainly a JS developer, for fun I started looking into React Native because I already use React at my workplace.

Thanks! Any ETA for the release?

It's available now
On Nov 4, 2016 5:16 AM, "Federico Zivolo"<EMAIL_ADDRESS>wrote:

Thanks! Any ETA for the release?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/Fleker/CumulusTV/issues/186#issuecomment-258378976,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADI580X-0c5_Uz2FNl1RzhOxYQQ1l_LSks5q6vf6gaJpZM4KmLA4
.

Thanks, works perfectly now.


Select dropdown doesn't appear when clicked.

Same as Issue #27 is happening again with ngx-tree-select 0.13.0 and bootstrap 4.0.0-beta.2.

Select dropdown doesn't appear when clicked.

Ok, bs4 beta change where class "show" must be append. I try to resolve this asap with keeping compatibility to BS3 - bs4 alpha and new bs4 beta ^^

Same problem here! Can't get the css override style to stick either. @VijetaH where did you put the selector?

@VijetaH @stockmind Can you provide some hint or gist where to apply this CSS class? Not working for me.
@Crazyht Any plans for Bootstrap 4.x support?


Bug - Job Poster Builder not working in IE

Description
A user reported that the Job Builder wasn't loading in IE, but that switching to Chrome fixed the issue.

@rositak Do you have any more details that the user may have reported?

Manager 1 (Sep 26):
13:40 - I went in and created the poster but then realized I went too far and the app was hanging a lot.  I deleted the poster to start over, and now when I click create a poster, nothing happens.  I get the Intro screen but nothing else shows up to fill in.
14:27 - I couldn’t get it to work in Internet Explorer, I switched to Chrome with success.
Manager 2 (Sep 25)
I was using IE11 version 11.950.17134.0 on my Win10 PSPC laptop while dialed in from home over our department’s VPN.  I did the data entry for the posters throughout the day yesterday and the lags were consistent throughout the day.  I just tried again now (6:20pm ET, 25 Sept) and it seemed to load faster.  There was a momentary lag with a blank screen but soon say a loading message and then the content appeared. This manager offered to ping some IP addresses if that's helpful.
Note
I tried using the tool on both Chrome and IE on my Surface (both over the office network and VPN) when the managers reported the error. Though I noticed the builder took a bit longer to load on IE, I didn't experience the same issue as the two managers.

I tried to login again this morning.  I clicked into the My Job Posters area, then immediately clicked the Edit Job Poster link for the .Net poster and again got the blank page.  This was at 09:44am Atlantic Time (08:44 your time).  I’ve included a screen capture here.  Remaining on this screen, the loading message never appeared and the content never loaded.  Refreshing the screen had no result.

Two minutes later (at 09:46am Atlantic Time), I then clicked the My Job Posters link to return to the list of posters, then again tried the Edit Job Poster link for the .Net poster and had the same result.
Then at 09:47am AT I used the back button and tried again.  Same result.
Right around that time my Outlook crashed, and we had an interruption to my network connection as my Instant Messenger app crashed as well.
Sometime around 09:55am AT when I tried the Edit Job Poster link again, it loaded as per normal.  However when I tried again at 10:01am AT, I got the blank result.
A refresh of the page at 10:04am AT had the same results.  At 10:05am I tried the Edit Job Results of the Drupal Specialist and it was again blank.
In case you’re able to use my connection details to comb your logs here is my ipconfig results:

And if you’d like me to do any specific testing today to help you trouble shoot this, just let me know.  For our department, when you work from home the network architecture is an inefficient mess.  My laptop connects to my home wifi, then we create a CISCO AnyConnect VPN tunnel back to our VPN gates in HQ (note that I’m in Halifax).  Then my connection is routed from the PSPC departmental internet through our security perimeter (again in HQ) and out to the internet (or in this case, likely to the GC network layer between OGDs), then it would go in through TBS’s security perimeter (gate+proxy etc) and to your hosted GC Talent Cloud service.  Then the connect would reverse again to get back to me in Halifax.  So we’d be clearing multiple proxy servers, content scanners, encryption end-points, and lots of little additions of lag all along the way.
By contrast, I just tried to access the platform from my personal computer (on a Chrome browser), this was at 10:16am AT.  I logged in with no issues, went into the My Job Posters area and I had barely released the mouse from the Edit Job Poster link of the .Net poster when then content was already loaded.
At 10:18am AT, I successfully loaded the .Net poster on my work computer.  The pattern I saw was there was about a 3-4 second delay while the page itself was still loading (I could see the little spinning wheel in the browser tab next to the Job Builder: Review page title) and as soon as the spinning wheel icon switched to the Cloud with the lightning bolt, the loading note appeared and about 1 second later the content started to fill in.
But then at 10:21am when I tried to load the FA poster, the page was blank again.  I still saw the 3-4 second spinning wheel in the browser tab before the thunder cloud icon appeared next to the page name, but then the loading message and content never appeared.
NOTE: Switching to a Chrome browser on my work computer had things loading more quickly (and consistently) this morning.  I tried several different times around 10:24am and they all loaded quickly.  0.5s to get the thunder cloud icon in the browser tab and again a fraction of a second for the loading message and content to appear.  I’ll continue to use Chrome from this point onwards, but again if you need me to help you test in IE11 (or Edge, which we also have) then I can.  You may want to add a note that IE11 is not a recommended browser for use with this site.


Typo in README.md

There is a small typo in Clone it and Sync it section under Steps to follow.
They are listed below
This will change directory to a folder Algo_Ds_Notes (should be Learning-Made-Easy)
$ cd Learning-Made-Easy
Push changes to your forked Algo_Ds_Notes (should be Learning-Made-Easy) repo
$ git push origin master

Can i work on it?

Yeah


GLOSSARY prob

Hi, I'm trying the GLOSSARY.md . It works well, but If I export on .pdf, the blue word (because that word are blue) does not works. Why?
It doesn't works also on .epub and .mobi
Thank you
Renato Pontefice

I think it's a bug. I've moved it to https://github.com/GitbookIO/gitbook/issues/1647


copy and paste from word doc?

For my use case copy and paste from Microsoft Word ist a common task. Draft.js does not handle this very well right now,Is there any plugins or anything available to provide this functionality?
Not the whole .docx standard but Bullet point lists and base formatting.

Hi @the-creature , we don't currently support this and I'm not currently aware of any plugins that support this. I think someone asked about this recently in the Draft.js Slack channel, but there was nothing that was supported. you may think about asking there again, as you may get better responses there.

Thx for the quick response! Do you mind posting the slack channel? Or is a private/invite type of group?
Thx!

anyone can join! the slack channel has more people in there willing to help and is more so the right place for questions/discussions like these.
i'm going to close this issue. feel free to respond or reopen if further questions/comments!

For people looking at this in the future, handlePastedText might help you for your use case.
Pasting from word gives you some odd html which is available in the second param of the handlePastedText function. You will have to handle that html the way you want because there are a lot of non-standard html formatting. For example, headers are just font size differences so it makes it hard to replace with header tags. Underlines are just a class with text-decoration: underline instead of something like maybe <ins> tag. So if you are really serious about pasting from Word, you will have to do a lot of custom regexing, but hopefully this helps you.
Note: stateFromHTML is from draft-js-import-html
handlePastedText(text, html){
    const { editorState } = this.state
    const blockMap = stateFromHTML(html).blockMap
    const newState = Modifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), blockMap)
    this.onChange(EditorState.push(editorState, newState, 'insert-fragment'))
    return true
}

...

<EditorState
    handlePastedText={this.handlePastedText}
   />

@terencechow , awesome ! it works! Thank you!
, i am returning return "handled";
but i got:
Type 'string' is not assignable to type 'DraftHandleValue'.

@terencechow Thank you! solved it with adding  returning type any to function
handlePastedText(text, html): any{
i am using typescript*

I do hope I could get the exactly same html as the copied one in my draft.js editor, but it seems extremely hard to do so.

Added a fallback for text if html is null:
handlePastedText(text, html){
    const { editorState } = this.state
    const blockMap = stateFromHTML(html || text /* here */).blockMap
    const newState = Modifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), blockMap)
    this.onChange(EditorState.push(editorState, newState, 'insert-fragment'))
    return true
}

...

<EditorState
    handlePastedText={this.handlePastedText}
   />

How can I remove all styles of html ?

Your handlePastedText() should have three parameters: text, html, editorState.  If you only want to insert the text, you can insert like this:

function handlePastedText (text, html, editorState) {
	var content = editorState.getCurrentContent();
	var selection = editorState.getSelection();

	var newContent = Modifier.insertText(
		content,
		selection,
		text
	)

	var newEditorState = EditorState.push(editorState, newContent, "insert-characters")
	//Then send this to onChange()
	return 'handled'
}

@folkjc thanks your answer saved me. I wanted to have pasted text as plain text. But after sending emails, I was getting extra lines because of  tag. But this answer helped me to achieve what I wanted


Not all countries represented

Hello!
I use the library 'country-region-data', because I also need the regions/states data for every country.
Bu I also have the phone field.
There are some differences in lists of countries, provided by the  'country-region-data' and your library. Only some countries.
For example: when I choose the country from the  'country-region-data' , American Samoa - there is no that country in the 'defaultCountries' variable, imported from the 'react-international-phone' library.
Is it possible to provide there absent countries? Or add regions data to the 'react-international-phone' for every country?
Thank you!

@artemklishch Hey!
Sorry, but it's not planned to add all ISO-3166-2 countries' support in the near time.
You can extend defaultCountries with the countries you need:
https://react-international-phone.vercel.app/docs/Usage/ModifyCountries
Just pass your updated country-data JSON to the countries prop.

Thanks for the answer!
пт, 26 янв. 2024 г. в 17:25, Yurii Brusentsov @.***>:

@artemklishch https://github.com/artemklishch Hey!
Sorry, but it's not planned to add all ISO-3166-2 countries' support in
the near time.
You can extend defaultCountries with the countries you need:
https://react-international-phone.vercel.app/docs/Usage/ModifyCountries
Just pass your updated country-data JSON to the countries prop.
—
Reply to this email directly, view it on GitHub
https://github.com/goveo/react-international-phone/issues/148#issuecomment-1912246973,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANMI2YHYSP7UYEFUVA2QZMDYQPDHPAVCNFSM6AAAAABCFKENKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJSGI2DMOJXGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

Closed as duplicate of https://github.com/goveo/react-international-phone/issues/53


Update SMPTE registers

Closes #359

Tested and proven to work.
Much needed update to fully support 2067-21:2023 in IMF.
(Also addresses #332.)


Revert "Remove resource limits for the observability components (#9785)"

How to categorize this PR?

/area auto-scaling
/kind enhancement
What this PR does / why we need it:
This reverts commit 0be0fdc5db1370a3c9e67ac112dd03640c6d9678.
The issue described in https://github.com/gardener/gardener/pull/9785 is rather caused by the fact that in<EMAIL_ADDRESS>the prometheus VPA didn't had a containerPolicy set for the blackbox-exporter sidecar: https://github.com/gardener/gardener/blob/b600fcdd1698c9b30d83259a9950cce7b60fc024/pkg/component/observability/monitoring/charts/seed-monitoring/charts/core/charts/prometheus/templates/prometheus-vpa.yaml#L17-L31. Hence, in<EMAIL_ADDRESS>VPA was using controlledValues: RequestsAndLimits for scaling the blackbox-exporter sidecar. That's why VPA reduced the limits to 13.42MB which caused the OOM kill.
However, in<EMAIL_ADDRESS>the blackbox-exporeter is extract to a Deployment and its VPA is configured with controlledValues: RequestsOnly. With controlledValues: RequestsOnly we should be on the safe side as VPA won't reduce the memory limits. node-exporter also runs with controlledValues: RequestsOnly. For plutono, there is no VPA. We haven't faced issues with its memory limit, so I would also keep it for now.
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
N/A
Release note:

Memory limits for the blackbox-exporeter, node-exporter and plutono components are introduced again.

/cc @istvanballok @rickardsjp

/close


Animate branch, merge, and rebase graphics

Normally, the basement slides are for supplementary information, but the set-up of the merge and rebase sections breaks from this.
Implementing an animation that runs through the process, that advances on slide fragments, could help reinforce important concepts and make sure that the presentation follows the patterns established in the first few slides.

Alternatively, a temporary fix would be to simply move the rebase and merge images out of basement slides and into normal slides.

Alternatively, use something like P5.js and build a graph and a dummy terminal with the ability to simulate git commands live, to demonstrate how git works.
Ideas: as the user progresses through the workshop, new limited sets of commands appear which can perform different actions on the graph.


HTTP flv.js client drops connection

Hey, first of all, great repo, love it.
Issue.
HTTP flv.js player drops connection after about 30 minutes. Here's logs from the browser and nodejs console.
At the same time I launched ffplay and it didn't drop the connection. So the issue possibly lies in the flv.js player.
Edit: looks like it's really a flv.js player issue. Please close this ticket if there's no need for it.
Another edit: Not sure if it's completely player issue.
https://github.com/Bilibili/flv.js/blob/master/docs/cors.md
This link here says that OPTIONS http request will be made at some point and server should respond, but in this case, server drops the connection because it can only answer on GET correctly.
According to the log, MSE SourceBuffer gets full and it attempts to play video after that, sends OPTIONS request and server responds with res.end() closing the connection.
https://github.com/illuspas/Node-Media-Server/blob/5bbb9a76f27a967fc7a32498f6619eaf926ba9f6/node_http_session.js#L62

[MSEController] > MediaSource onSourceOpen  logger.js:123:8
[FLVDemuxer] > Parsed onMetaData  logger.js:123:8
[FLVDemuxer] > Parsed AudioSpecificConfig  logger.js:123:8
[FLVDemuxer] > Parsed AVCDecoderConfigurationRecord  logger.js:123:8
[MSEController] > Received Initialization Segment, mimeType: audio/mp4;codecs=mp4a.40.2  logger.js:123:8
[MSEController] > Received Initialization Segment, mimeType: video/mp4;codecs=avc1.64001f  logger.js:123:8
[FlvPlayer] > MSE SourceBuffer is full, suspend transmuxing task  logger.js:123:8
[FlvPlayer] > Continue loading from paused position  logger.js:123:8
OPTIONS XHR http://<IP_ADDRESS>:8000/live/main.flv [HTTP/1.1 405 Method Not Allowed 2ms]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://<IP_ADDRESS>:8000/live/main.flv. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).  (unknown)
[IOController] > Loader error, code = -1, msg = ProgressEvent error  logger.js:38:12
[TransmuxingController] > IOException: type = Exception, code = -1, msg = ProgressEvent error  logger.js:38:12
Error: Uncaught, unspecified "error" event. (NetworkError)  events.js:62

Parse AudioTagHeader sound_format=10 sound_type=1 sound_size=1 sound_rate=3
Parse VideoTagHeader frame_type=1 codec_id=7
[http-flv play] play stream live/main
[http-flv play] join stream live/main
http-flv parse message [start]
[http-flv play] play stream live/main
[http-flv play] join stream live/main
http-flv parse message [start]
http-flv parse message [stop]
Unsupported method=OPTIONS

It seems that there is no response to the OPTIONS method that caused this error.

Yeah, looks like it.

But an hour and a half passed I have not caught this error, can not test whether the problem is fixed.
What is your test environment,Operating system, browser version.

Windows 7, node 8.2.1, Firefox 56 beta, FLV.js player 1.3.2.

My guess is, since player uses different tricks to get this to work on different browser, this may only happen with MSE implementation of desktop firefox. I'll try to reproduce this on different browsers.

If you received "MSE SourceBuffer is full, suspend transmuxing task" under a live stream,
It means the playback progress is slowly than the network stream polling progress.
Then the SourceBuffer got full, and cannot append any segments anymore.
So have you found any audio-video unsync issue, or incorrect playback speed issue?

Yes, that was a livestream. Tested this yesterday on localhost and live server, player worked completely fine, playback speed was correct and then it stopped. After a few times of the same behavior I decided to test it on localhost and this is where the logs came from.
Also, bitrate of the video doesn't matter for this issue, I tried 1 mbps and 100 mbps, same result, after ~30 minutes it drops the connection.

Does the stream have an audio stream and A/V sync correctly?

Testing right now, will post results here in a ~10 minutes.

Nope, no A/V desync. Everything plays correctly. I'll do more testing with other browsers.

Tested yesterday on a live test server with real network connection on both FF and chrome.
Couldn't reproduce this on chrome, only FF, but not consistently. Sometimes it played for 30 minutes and stopped, next time it played for almost 2 hours and didn't stop.

HI everyone same issue here randomly stops on FF with
[FlvPlayer] > MSE SourceBuffer is full, suspend transmuxing task

I have the same issue with FF
[FlvPlayer] > MSE SourceBuffer is full, suspend transmuxing task
Has someone fixed that problem yet?


[ERROR:flutter/impeller/runtime_stage/runtime_stage.cc(28)] Reached unreachable code.

Running flutter framework tests at tip of tree locally on a Mac appears to be crashing. 😱
Whether running flutter test, or flutter/test/some/specific_test.dart, I am getting a crash:
flutter test

...

00:20 +934 ~14: ... StarBorder parameters
Shell: [ERROR:flutter/impeller/runtime_stage/runtime_stage.cc(28)] Reached unreachable code.
unhandled error during finalization of test:
/Users/katelovett/_github/flutter/packages/flutter/test/painting/system_fonts_test.dart
TestDeviceException(Shell subprocess crashed with SIGABRT (-6).)
#0      FlutterTesterTestDevice.finished (package:flutter_tools/src/test/flutter_tester_device.dart:248:5)
<asynchronous suspension>
#1      FlutterTesterTestDevice.kill (package:flutter_tools/src/test/flutter_tester_device.dart:230:5)
<asynchronous suspension>
#2      FlutterPlatform._startTest.<anonymous closure> (package:flutter_tools/src/test/flutter_platform.dart:525:9)
<asynchronous suspension>
#3      FlutterPlatform._startTest (package:flutter_tools/src/test/flutter_platform.dart:581:11)
<asynchronous suspension>

Or another:
flutter test test/material/switch_test.dart

...

00:04 +20: switch sends semantic events from parent if fully merged
Shell: [ERROR:flutter/impeller/runtime_stage/runtime_stage.cc(28)] Reached unreachable code.
unhandled error during finalization of test:
/Users/katelovett/_github/flutter/packages/flutter/test/material/switch_test.dart
TestDeviceException(Shell subprocess crashed with SIGABRT (-6).)
#0      FlutterTesterTestDevice.finished (package:flutter_tools/src/test/flutter_tester_device.dart:248:5)
<asynchronous suspension>
#1      FlutterTesterTestDevice.kill (package:flutter_tools/src/test/flutter_tester_device.dart:230:5)
<asynchronous suspension>
#2      FlutterPlatform._startTest.<anonymous closure> (package:flutter_tools/src/test/flutter_platform.dart:525:9)
<asynchronous suspension>
#3      FlutterPlatform._startTest (package:flutter_tools/src/test/flutter_platform.dart:581:11)
<asynchronous suspension>

Appears to be impeller related. I've synced with TOT a couple times today and updated packages, the tree is not red, so it may just be my unfortunate circumstance.
Flutter doctor:
[!] Flutter (Channel [user-branch], 3.22.0-18.0.pre.61, on macOS 14.4.1 23E224 darwin-x64, locale en)
    ! Flutter version 3.22.0-18.0.pre.61 on channel [user-branch] at /Users/katelovett/_github/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at
      https://flutter.dev/docs/get-started/install.
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 7ff31a4f7a (35 minutes ago), 2024-04-30 01:14:01 +0300
    • Engine revision c093562677
    • Dart version 3.5.0 (build 3.5.0-109.0.dev)
    • DevTools version 2.35.0-dev.16
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/katelovett/Library/Android/sdk
    • Platform android-34, build-tools 33.0.2
    • Java binary at: /Applications/Android Studio with Blaze Beta.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.17-11446219)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    ! Flutter recommends a minimum Xcode version of 15.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Android Studio with Blaze Beta.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.17-11446219)

[✓] IntelliJ IDEA Community Edition (version 2023.3.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 77.3.1
    • Dart plugin version 233.13763.5

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (4 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554                        • android-x64    • Android 13 (API 33)
      (emulator)
    • iPhone 14 Pro Max (mobile)   • 3AE9FBA4-5508-4C1A-84C5-E76355E61A27 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)              • macos                                • darwin-x64     • macOS 14.4.1 23E224
      darwin-x64
    • Chrome (web)                 • chrome                               • web-javascript • Google Chrome
      124.0.6367.92

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.

I'm not able to reproduce this @Piinks. I'm not sure what the x factor is.
$ flutter test test/material/switch_test.dart
...
00:07 +65: All tests passed!
$ flutter doctor -v
[!] Flutter (Channel [user-branch], 3.22.0-18.0.pre.73, on macOS 14.4.1 23E224 darwin-arm64, locale en)
    ! Flutter version 3.22.0-18.0.pre.73 on channel [user-branch] at /Users/aaclarke/dev/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 456f0101fd (28 minutes ago), 2024-04-30 12:04:09 -0400
    • Engine revision 2c1517bbf5
    • Dart version 3.5.0 (build 3.5.0-114.0.dev)
    • DevTools version 2.35.0-dev.16

This crash seems to be related to runtime effects which I'm not that familiar with.  The assert has to do with an unexpected data type for uniforms.  Something like specifying a fragment shader that has a uniform that isn't a struct, float or sampler could cause this crash.
I'm not familiar with this API or what state it's in.  I think ideally this would result in a Dart exception when the shader is created instead of a runtime assert.  It may be that they just haven't implemented the other datatypes yet though.
Maybe running with a local engine and a debugger attached can tell us what datatype we are getting and hopefully trace it back to the source.

I synced my branch this morning, ran flutter clean and flutter doctor, and the issue was gone. Seems to be working fine now. 👍


Standardize command line parsing

Move command line parsing logic to the centralized utility.

Standardize command line flags.

Use Yargs for parsing.

for commands that support targetName without --target flag a warning WARNING: use --target or -t flag to specify the target name. Specifying the target name without a flag will not be supported starting from November 1, 2021.

:tada: This issue has been resolved in version 1.19.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Enforce Conjunctive-Normal-Form for Types at the type level

Problem: Types can be created that are not in CNF.
Solution: Create a type definition for Types that disallows non-CNF types.
Alternative: Would dependent typing make this easier or harder to describe?
Should type constructors be allowed to be shared across type unions? Is that necessary or appropriate?

Fix this definition:
type Type =
     Any
   | Named(String,Type[])
   | And(Type[])
   | Arrow(Type,Type)
   | Tuple(Type[])
   | Product(Type[])
   | Ratio(Type,Type)
   | Constant(Term)

This is more generally a problem with enforcing type normal form. Combinations of ratio and product types can also create non-normal types:
(Aa/Bb)*(Aa/Bb) => Aa*Aa/Bb*Bb

Again, a weird normal form quirk.
{(A -> B) + {A -> D})

is not equivalent to
A -> {B+D}

These are both distinct types that can't be unified across all contexts.

There is no canonical normal form for all types. Sometimes normal form implies an ordering applied, which doesn't fit into Rust's type system. Closing this feature request as it has grown out of scope of the Rust backend for the project.


DUPLO-19069 TF: OpenSearch: Not able to edit Non EBS storage type to EBS storage type (eg. with instance size c5)

Fixed updating of instance types from non ebs to ebs type by adding resource level difference to make storage_size mandatory on such updation
Overview
Summary of changes
This PR does the following:

Resource level customdiff to check for ebstype storage_size has been passed
...

Testing performed

[ ] Using unit tests
[ ] Manually, on my local system
[ ✓] Manually, on a remote test system

Describe any breaking changes

...

Task linked: DUPLO-19069 TF: OpenSearch: Not able to edit Non EBS storage type to EBS storage type (eg. with instance size c5)


Fix float shape parameter in data.py

I get an error when running the variational_autoencoder.py example (and probably other examples which call the plot_images function from data.py). This is caused by trying to use a float as part of a shape tuple. Line 28 of data.py is
    N_rows = np.ceil(float(N_images) / ims_per_row)

This creates a float (np.ceil returns a float), which is then used here in a shape parameter a couple of lines below:
    concat_images = np.full(((digit_dimensions[0] + padding) * N_rows + padding,
                             (digit_dimensions[1] + padding) * ims_per_row + padding), pad_value)

This is trivial to fix...

Ah wait hang on I can see what I've done isn't exactly equivalent to ceil... will fix it

Thanks! I think it's possible that numpy changed its behavior with floats that should be ints (possibly in a point release, which is kind of annoying).


Innovation Primitives Ticket

Made code.org account. Made a Java programs using the object-oriented principles covered such as creating objects and using methods and attributes.
Java Primitives
bash environment
college board page

2.7+. Everything is complete, and the formatting for fastpages looks extra nice.


[resotocore][fix] Show meaningful error message if a task is already running

Code of Conduct
By submitting this pull request, I agree to follow the code of conduct.

Codecov Report
Base: 90.00% // Head: 89.98% // Decreases project coverage by -0.02% :warning:

Coverage data is based on head (f8bb7ab) compared to base (373657f).
Patch coverage: 73.91% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1223      +/-   ##
==========================================
- Coverage   90.00%   89.98%   -0.03%
==========================================
  Files          60       60
  Lines       10018    10030      +12
==========================================
+ Hits         9017     9025       +8
- Misses       1001     1005       +4

Flag
Coverage Δ

resotocore
89.98% <73.91%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

resotocore/resotocore/task/task_handler.py
87.73% <71.42%> (ø)

resotocore/resotocore/cli/command.py
88.28% <75.00%> (-0.18%)
:arrow_down:

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

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


error when uploading to board

I don't know if I'm just doing something stupid here or what but I cant get this to upload???
someone please help
error:
Sketch uses 5406 bytes (17%) of program storage space. Maximum is 30720 bytes.
Global variables use 759 bytes (37%) of dynamic memory, leaving 1289 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x82
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x82
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

ok so I found the fix
I wont bother explaining because I found a video what will explain better than me
just if someone has the same problem
https://www.youtube.com/watch?v=u8rV2abuUgQ&list=LLgUez6xac_-h1y7iNiP1YWg&index=2&t=0s

I would configure the board type to be (Old Bootloader). If that fails, try to reflash the bootloader using an external Arduino.


fix spine mipmap

this was pulled from the open source assetpack and I believe this helps fix the issue with mipmapping spine files

will follow up in separate PR
https://github.com/play-co/pixi-external/issues/89


Flatlist scrollToIndex scrolls item all the way to the top of the list and produces whitespace

[x] I have reviewed the documentation
[x] I have searched existing issues
[x] I am using the latest React Native version

I am rendering a flatlist and on iOS, when scrolltoindex is called on a item that is close to the bottom of the list, it is pushed to the top and leaves whitespace below it. When you touch the list, it snaps back down. On android it works perfectly. I would like to add that get item layout is implemented.
Environment

Environment:
OS: macOS High Sierra 10.13.2
Node: 7.10.1
Yarn: Not Found
npm: 4.2.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0
Steps to Reproduce

Expected Behavior

Expected behavior is what happens on android, it will only scroll a item far enough to leave whatever is below it without any whitespace under the last item.

upgraded still same issue. There are items above the index that is scrolled to

Can confirm this is happening on React Native 55.4.
I have to do some janky logic to offset the scroll position by the max number of rows that can be rendered at a time. Like
//Scroll to last item
let scrollIndex = data.length - 1;

//Correct for the bug
const maxNumRows = Math.floor(windowHeight / ROW_HEIGHT);
if (data.length - scrollIndex < maxNumRows) {
  const diff = maxNumRows - (data.length - scrollIndex) - 2;
  scrollIndex = scrollIndex - diff;
}

Is this related to this PR? https://github.com/facebook/react-native/pull/22769

Yes, that PR appears as though it would fix it.

Can you test it on your problem and verify?

I think so. Is the RN build process complicated or can I just point my package.json at his forked repo?

https://facebook.github.io/react-native/docs/building-from-source

@scottmas Were you able to verify that the PR fixed your issue? You don't actually have to worry about building from source for iOS (that's Android specific), so you can just npm/yarn add the github link to that branch to test your change.
"react-native": "cabelitos/react-native#scrollFix"


Replace failing flair test

The test

@pytest.mark.skip(reason="This test is failing, and can not be confirmed to be correct")
def test_flair_dcm_series_modality(mock_flair_series):
    for series in mock_flair_series:
        assert series.get_modality() == "flair"
    # for series_number, series in mock_series_study.series_dictionary.items():
    #     if series_number == 7:
    #         assert series.get_modality() == "flair"

needs to be verified and made to pass.

@CavRiley what is the status on that?
I believe that the commented code is no longer valid and the FLAIR is evaluated.


P6 [Q4] Refine the 'Restricted Mode' by providing more nuanced options, such as 'Light', 'Medium', etc."

Backlogged as discussed here https://docs.google.com/document/d/1jNw0qFMLzi_3xKLmKZDEINxY8omzXF5VedcXCeHh7aQ/edit


docs(configuration) new options for 0.15 and 1.0 - WiP

Summary
Documents new configuration options arriving in Kong 0.15 and 1.0
Checklist:

[x] Commit message & atomicity checked
[ ] Documentation N/A
[ ] Spellchecked my updates
[ ] Ready to be merged

Thanks for everything, @coopr ;)


[Bug] 编辑器内显示的总帧数与实际导出的gif总帧数出现巨大差距 A huge gap about the total number of frames

Describe the bug
编辑器内显示的总帧数与实际导出的gif总帧数出现巨大差距，编辑器内显示一共91帧，导出结果只有44帧，且每帧持续时间差距很大。
There is a huge gap between the total number of frames displayed in the editor and the total number of frames actually exported, a total of 91 frames are displayed in the editor, but the exported result has only 44 frames, and the duration of each frame varies greatly.
Screenshots

Desktop (please complete the following information):

OS:  Windows 11

Version 10.0.22631 版本 22631

ScreenToGif.2.41.1.Portable.x64

The encoding is only exporting the frames that have changes.
You can disable compression in the encoder settings:

But be aware that the filesize will increase a lot.


Add delay effect

I keep copying+pasting the delay effect between my projects. Don't you think it would be a good candidate to be included in redux-saga?
I have also enhanced the signature of the function to yield to true instead of undefined:
function delay(ms) {
  return new Promise(resolve => setTimeout(() => resolve(true), ms))
}

Then you could easily check for timeouts in race
const { timeout, otherCall } = yield race({
  timeout: call(delay, 5000),
  otherCall: call(asyncFunc, ...)
})

That would be a great addition! Maybe you should submit a pull request.

Would that be an effect like take and put or a simple function as described above?
function* wait(ms, result=true) {
  return call(new Promise(resolve => setTimeout(() => resolve(result), ms)))
}

const { timeout, otherCall } = yield race({
  timeout: wait(5000),
  otherCall: call(asyncFunc, ...)
})

I see something like this:
export function* delay(ms, result = ms) {
  return new Promise(resolve => {
    setTimeout(() => resolve(result), ms)
  })
}

export function wait(ms) {
  return call(delay, ms)
}

delay is a task
wait is an effect which under the hood calls the delay task

adding a delay util function could make sens. But adding a new effect here is irrelevant here since this is just an alias for a call effect. I prefer to keep the core small and focused

I too had to copy this method in my project. Initially I though it was built-in but figured out it was not later :)

i'm using something like following. it's simple but it does the work for me:
function *sleep(time) {
  yield new Promise(resolve => setTimeout(resolve, time));
}

I'd vote for just adding a delay() util function to the docs or a contrib folder.

@axelson Fyi added a delay fn to redux-saga/utils in the current master branch

Thanks , so I can close this one.

@yelouafi I don't see delay being exported here and when I do import {delay} from 'redux-saga/utils' I get undefined. Should I import from somewhere else?

Sorry forgot to mention: its exported from the root redux-saga

@Anahkiasen I think it's import {delay} from 'redux-saga'.

That worked, thanks!

just a note on the docs because it's related to this. On the page https://redux-saga.js.org/docs/advanced/ForkModel.html the delay import is coming from 'redux-saga/effects' when it should be as you mentioned here 'redux-saga'

@Julio-Assis starting from redux-saga@1 the delay is coming from redux-saga/effects

It seems that delay had a long journey. it was at every place where it ever could.

In your saga file, create a delay function like:
const delay = time => new Promise(resolve => setTimeout(resolve, time));
Then create the watcher like:
const fnWatcher = function* () {
  yield call(delay, 2000);
  yield put({type: 'ACTION_SUCCESS'});
};

takeEvery("ACTION_NAME", fnWatcher);

wow it's been almost 4 years. time flies.

is delay already working in saga?

Yes


Consider pushing container images to Github Container Registry (GHCR)

Hello,
In order to combat dockerhub's imposed rate limits it would be great to host these images on ghcr as well as dockerhub. It should be a minimal change to push the images to ghcr as it's supported across all GitHub repositories for free.
Thanks!

Moving this over to the node-red-docker repo where the containers are maintained.
For future reference, please read the issue template we provide. They clearly ask that feature requests should be posted to the forum and not raised as issues.


Fix chart speed

Fix chart speed, notify false, fix multiple tasks per chrom spec
ChromatogramAndSpectraVisualizer

every click in any chart was starting 2 tasks to update each plot - 4 in total
added a small delay to simlify it
set notify to false to only update the charts once everything is done

I noticed it before, do you know why the click event is even triggered twice in the first place?

is it ready for final review?

Yes.

looks good


adds basic cypress test

Here's a PR that merges in develop and resolves the conflicts in package.json / yarn.lock: https://github.com/bakdata/conquery/pull/2367

Todo:

remove readlink

add separate .env.e2e that is sourced for the cypress frontend

Another todo:

[ ] avoid adjusting different kinds of pom.xml versions when building for cypress

Screenshots showing the issue

are there some chmod +x missing?

@Kadrian i had to tinker a bit. Unfortuanatelly i could not use all the scripts in the ci, just the start script


Unable to run code snippts from try-samples repository

Hi All,
I tried running code snippts from 101 LINQ Samples but I am getting bright red bar in the response. PFA screenshot.
Could anyone please help me with this.
Regards,
Navjot S.

I'm getting Internal Server Errors with the code snippets as well.


Can't move from vim to tmux

I am having a similar issue as #141, but in my case :TmuxPaneCurrentCommand does output vim. Otherwise, the plugin and configuration work perfectly: movement between vim splits, movement between tmux panes, and movement from tmux panes to vim.
I know it is not the key bindings; running :TmuxNavigate{Up|Left|Down|Right} manually moves between vim splits successfully but will not move out of vim into tmux.
OS X 10.11.6
Vim 7.4
tmux 2.2
iTerm2 3.0.7

@scolby33 sorry to hear about the trouble. Based on the fact that you can move within splits, I don't believe the Vim detection is the problem. Instead, it sounds like the Vim plugin code is not properly detecting when you're at the wall. Can you describe what happens when you attempt to navigate from Vim to tmux? Is it nothing, or do you move to a different Vim split?
Also, would you mind running with just the plugin active (no vimrc) using the following command:
vim -U NONE -c 'source ~/.vim/bundle/tmux-navigator/plugin/tmux_navigator.vim'

If I am already at the "edge" of vim and attempt to navigate out to tmux, nothing happens.
Running with just the plugin active did not solve the issue.
However, I am using fish as my shell. Adding the following snippet to my .vimrc fixed the issue:
if &shell =~# 'fish$'
    set shell=sh
endif

This is a bit surprising because (in only a cursory look, admittedly), I don't see why the plugin's attempts to call out to the shell would be hindered by fish vs. bash or sh...the tmux commands are the same for all.

Depending on the version of the plugin you're using, we might have introduced an env variable into the system call that could be the issue. Can you try running :echo $TMUX_PANE with fish as your shell to confirm?

With fish as the shell, this returns %1. The same result occurs when forcing the shell to be sh as well.
I am using the most recent plugin version installed by Vundle.

Can you try running the following?

Tmux window with Vim on the left, tmux pane on the right
In Vim, run :echo system('tmux select-pane -t '. $TMUX_PANE .' -R') and capture anything that is echoed
Check the output (again in Vim) of :echo v:shell_error.

With the sh workaround in .vimrc, nothing was echoed in step (2) and the tmux pane was switched. Step (3) returned 0.
Without the workaround, again nothing was echoed in step (2) and the tmux pane was not switched. Step (3) returned 0 again.

Hmm, well unfortunately I'm out of ideas. Feel free to poke around and share back if you are able to track anything down. Sorry I couldn't be of more help.

I figured it out! Here are my observations:

The command you gave earlier to run just the plugin should be vim -u NONE -c 'set nocompatible' -c 'source ~/.vim/bundle/tmux-navigator/plugin/tmux_navigator.vim' Note the lower-case -u and the addition of set nocompatible. Without nocompatible set, the plugin bails out when checking &cp right at the start.
fish uses % for process expansion, so the composed command like tmux -S whatever select-pane -t %1 -D fails. Unfortunately, fish doesn't return an error code when this happens, it just prints an error message. (I'm not even sure if it's to stderr or what, but that doesn't end up mattering.)

Running tmux -S whatever select-pane -t \%1 -D works correctly in fish and bash at first glance, but I can't claim to have tested thoroughly.
I will make a pull request momentarily with my suggested change.


Should add the location in a variable or if it is not westus it will have always a 401 not autorised error!!

code do ..
detectLanguageWebRequest.Headers.Add("Ocp-Apim-Subscription-Region", "westus");
Got all time 401 errors until I modified it for:
detectLanguageWebRequest.Headers.Add("Ocp-Apim-Subscription-Region", "eastus");
[Enter feedback here]

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

ID: 2bfeb62f-8c6b-ed9b-3563-0514ccf05b8c
Version Independent ID: 64a9dfae-cade-7425-d858-eb2d33e75fba
Content: Tutorial: Create a translation app with WPF, C#  - Translator - Azure Cognitive Services
Content Source: articles/cognitive-services/Translator/tutorial-wpf-translation-csharp.md
Service: cognitive-services
Sub-service: translator-text
GitHub Login: @laujan
Microsoft Alias: lajanuar

@frablaser thanks for your feedback. Did you notice the note below?

No I didn't read up to this point... 🙄 Maybe it could be more easier to write this important point. in the code...? I was near to give up with MS stuff and return to google (who is as hard as MS to manage by the way).

@frablaser thanks for your feedback.
@laujan please take note of feedback above for doc enhancement, thanks.


feat(self-trigger): add backend pagination for the table

This PR add backend pagination for plugin-chart-table.
Requires: https://github.com/apache/superset/pull/13137
As part of this request done next changes:

Getting ownState of table chart from dashboard with { pageSize, currentPage }
It's update buildQuery of this plugin with adding row_offset and row_limit:
Because BE still not support returning of total rows available for current request, we do request for number items per page +1 to know if there is available one more page. For same reason we use only previous/next button in pagination
Because we needed update definition of setExtraFormData hook, we also updated it's name to more relevant for it's action: setDataMask
Added custom_form_data to extraFormData object to pass custom props for build necessary request to the server in buildQuery

https://user-images.githubusercontent.com/56388545/107976853-e4544a80-6fc2-11eb-9eb6-988b07a755f7.mov

It was difficult to achieve that right now
I think we could get to that together with the row totals feature

Since the queryContext can now run multiple queries, I'm wondering how difficult would it be to let buildQuery add an additional SELECT count(*) FROM {...subquery...} query, which may be implemented by adding another ChartDataResultType?

This is definitely on the short term roadmap. I didn't look to closely into how much work this will be, but I believe we need to do some minor refactoring to achieve this. I had been planning on adding some optional props from QueryContext to QueryObject to make it possible to introduce support for querying data from multiple different datasources in a single QueryContext, and I believe the same could be relevant for result_type (=mixing RESULTS with SAMPLES or the forthcoming ROWCOUNT).
Anyway, let's defer this feature until the backend feature is merged, as there's no clean ANSI SQL way to achieve multi-column COUNT DISTINCTs without a subquery.

Another question, how does this interact with percent metrics? Are we OK with percent metrics only be calculated based on limited rows? It'd be somewhat pointless to calculate distribution only on one page of data (10 ~ 200 rows) when the total number of records may be millions.

Another question, how does this interact with percent metrics? Are we OK with percent metrics only be calculated based on limited rows? It'd be somewhat pointless to calculate distribution only on one page of data (10 ~ 200 rows) when the total number of records may be millions.

This will need to be addressed in a forthcoming PR - once we have the second query for totals we can calculate the percent mertrics in the frontend, bypassing the need for the backend postprocessing and always getting percent distributions for the full dataset.

@villebro I didn't test this PR, but with npm 7, you need to manually run npm i --legacy-peer-deps in the plugin package after running npm link.

Mostly minor comments, looking good. However, I'm having trouble getting this to work, but it appears to be related to linking working differently on npm@7 (I believe I had this working a few days ago, but now I can't get it to work). @ktmud - is it working ok for you?

but it also requires: https://github.com/apache/superset/pull/13137 to pull out

Thanks @simcha90 - I had indeed linked from the wrong branch. One last comment, as this feature isn't quite feature ready yet (slightly misleading percent metrics, no totals, no page numbers), perhaps we should the pagination control behind the cross filtering FF? We could then remove it when we have all features implemented and are certain that this works robustly.

On which version is available this feature? I'm testing on 1.1 but apparently is not covered here. In addition, what would be the best approach to upgrade from 0.36? TIA


Support the LSP go_to definition capability

Add go to definition support when right-clicking on a token. If the current token passed the type checking phase, get the Ident of the token definition and use the file name and position to jump the editor to that location.
Add the following line when constructing a ServerCapabilities in server.rs
definition_provider: Some(OneOf::Left(true)),

This is mostly done now apart from tuples and arrays. There is an issue tracking that here. https://github.com/FuelLabs/sway/issues/2486

addressed with #2620


"abort installation" just happened while it alomst done.

I just follow the steps on README,
but got some error,
the screenshot as below,
Does anyone know what happened it is?
Thanks a lot.

Which npm version are you using?
I would probably try creating a project in a directory without hieroglyphs in the name.

Hi, Gaeawon,
Sorry for my late reply.

All software version as below ( npm / node / nvm ) :

About the hieroglyphs in the name, you mean "Google 雲端硬碟" ?
if so, that's because the Window OS language i used is Chinese.
It indeed looks like hieroglyphs words.

Or maybe create-react-app might not work right in Chinese lang?

I changed the path to some EN named path,
but the problem still exist,
the screenshot as below

Thanks for help. ^^

Please try a path without spaces.

Hi, Timer,
Thanks for that fast reply.
the path in third screenshot picture is non-spaces one.
but the problems still there ><...

I see Google Drive in your path, do you know where that's coming from?

Hi, Timer,
I usually set my local project on my google drive ( as first & second screenshot ),
but now, I changed my local project to C:/Users/User ( as the third screenshot ),
just for testing Chinese named path would make CRA work normally or not,
but it looks like not for this reason.

Hi, guys,
I've deleted the nvm, but the problem still exist

sorry for the wrong click.... XP

Hi, Guys,
I found that my issue is same with this closed issue :
https://github.com/facebookincubator/create-react-app/issues/1905
so, everything just works perfectly while I deleted the autorun command in regedit list...
create-react-app is done ( the path named with Chinese words & spaces on purpose for testing ) :

npm start also works perfectly:

Thanks for the help.
Wish u guys have a good day. ^^


v2.0.0: Fix misspelling and format using the -s option

Coverage remained the same at 78.758% when pulling 31a172c8c1d4c5fc0d82e6c10573c3636e211735 on tiny-fixes-for-gofmt-and-spelling into fb06c46c0080d8fa52f8cb764c8ba1f60e46c349 on master.


Error in README. transaction.execute returns Result<u64, PostgresError>

The examples in the README does not compile because transaction.execute returns Result<u64, PostgresError>, while up returns Result<(), PostgresError>.
fn up(&self, transaction: &postgres::Transaction) -> Result<(), PostgresError> {
    transaction.execute("CREATE TABLE users (id BIGINT PRIMARY KEY);", &[])
}

The OK-part needs to be mapped to () for this to work.

Thanks! Fixed in b6c14d3.


KAFKA-3675; Add lz4 to parametrized test_upgrade system test

System tests run:
https://jenkins.confluent.io/job/system-test-kafka-branch-builder-2/65/console
Two failures: known to be transient offset validation and connect rest tests.
All test_upgrade variants passed (including the lz4 ones).
Review by @ewencp or @gwenshap.

LGTM


Integrate "Learn to Play" and "New Game" modes

Task: Eliminate the "Learn to Play" and "New Game" distinction
These can take the form of a flat level list where the player can freely interact with the early or later levels as desired.
The priority (first appearance) of the "Learn to Play" sections will drive players to interact with the tutorial levels first.
These can optionally be titled as "Special Scenario" or "Tutorial Scenarios" if appropriate, using a divider within the list for most visual appeal.
Quote from #45

As an "easy to say, hard to do" big one, I would suggest an overhaul which eliminates the "Learn to play" mode entirely. These should just be the first missions. Ready for my opinionated take? 😃
As a life-long gamer I found it kind of hard to immediately tell the mapping between the scenarios and the tutorials. I would ideally want to jump in feet first and learn on the ground, but I'm immediately faced with a choice I don't understand. When I regress to enter the tutorial, it's a lot of pop-up boxes that don't let me test my knowledge. There's currently a heavy weight of "tell don't play" which needs to be reversed to "play don't tell". A way that some game designers really make head-way in this space is to imagine that someone said "We need to ship this to [foreign country] next week and there's no budget to localize any text. Go." Knowing that you can't use any text, you'd start to swap out for symbols. Rendering pictorial/ideographic game prompts for any and all textual representations and slowly training on the meaning of those symbols is the means of eliminating these text prompts.
Not an easy idea, but I believe a low barrier to entry is critical for any game looking to get off the ground.

Good idea on merging the tutorials into the scenarios, that seems like a really easy starting point!
One thing I liked from playing Against the Storm is that there was no choice - the first few games you play are simplified scenarios.
My one concern over totally gating players based on what they've played is that I don't want the game to require an account, so there should be some clear way to say "I've already done the intro scenarios, take me to the full game"

Against the Storm sounds like it has the exact idea I'm talking about :slightly_smiling_face:
I definitely agree that we should not gate players at all.
That's especially what I meant by can freely interact with the early or later levels as desired. :wink:
Having a visual divider and not adding those sessions to any "%complete" value can make them entirely skippable. A toggle to hide those into a collapsible heading should neatly get them out of the way for "expert players". If the game grows to a point where they don't even want the header, we can have a second "dismiss" button that can hide it into the options

Closing, as I think https://github.com/toddmedema/electrify/pull/87 achieved this sufficiently for now


[release-4.15] resync 20240529

cherry-pick commits to consume improvements about logging and ephemeral storage handling

/cc @Tal-or @shajmakh

/hold cancel

/lgtm
/approve


Pod documentation that use :allow< > does not highlight as Raku code but as Pod

Pod documentation that is: =begin code :allow<B L> highlights as Pod not Perl 6 code. It is the :allow which causes this.
htmlify.p6 passes these as Pod to the highlighter, and so it gets highlighted as such (this is to allow us to make things bold/other styles).
Proposed solution from the docs side: we need to parse this Pod and strip it of Pod tags, and insert special Unicode control codes which nobody will have in normal text. These control codes can then be removed in the htmlify.p6 side once the highlighter highlights them.
From the highlighter https://github.com/perl6/atom-language-perl6 side, we will tag these differently than normal code, so we can add that effect in the CSS.

This issue is still open, but it is now being discussed in view of new syntax highlighter.
Closing this issue as duplicate


DEFINE DATA/AGGREGATE (aka /ENSEMBLE)

Reported by ansley b manke on 7 Jun 2012 17:17 UTC
To create ensemble datasets from a set of member datsets, a set of model runs for instance, or any set of datsets containing the same variables on matching grids.  This will include user-defined variables defined for a dataset with LET/D=
The beta executables, sent to Andrew and Patrick, generated lots of enthusiasm and ideas for extending this to aggregations in other directions. To allow for that, I've taken Andrew's suggestion to name this AGGREGATE instead of ENSEMBLE.
Here are sets of notes from Steve, in an email of 4/25/2012, and a following two on 5/24/2012

Notes on implementing the new command
DEFINE DATA/ENSEMBLE/TITLE==<title for this ensemble>  dnew = d1, d2, d3, ..., dn

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

new subcommand and qualifier DEFINE DATA/ENSEMBLE

xeq_define.F   -- borrow code from xeq_set.F under SET DATA
define_dset.F  (in utl?)

creating the ensemble dataset

new routine init_ensemble_dset.F

borrow code from tm_init_dset.F, cd_init_dset
o dset_num, ds_name, ds_type, etc.
o ds_type(dset) = "ENS"
save  or if not defined, then save
the list of component dset names
run through each dataset listed with dnew = d1, d2, d3, ...

create a list of the variables shared by all of the
datasets.  Include LET/D variables in the list (based
upon uvar_dset)
o unless /QUIET issue a note of excluding any variable
not found in all dsets
make sure that each shared file variable uses the same
axes in all cases, and that the ensemble axis is normal
(unused).
o if the variable is a LET/D user variable, the
check for a matching grid has to be delayed.
o unless /QUIET issue a note of excluding any variable
not sharing a single grid
create the ensemble axis (e=1, 2, 3, ..., n)
foreach shared variable

create an ensemble grid  (the external functions
framework must have some code like this, too)

from stk/is_grid_mode.F the lines under
'allocate another context for the "merged" grid'
copy the grid_lines and other stuff into the
newly init'ed grid
insert the ensemble axis
use tm_get_like_dyn_grid to finalize and re-use
a pre-existing grid if already exists

grab a ds_var slot and fill it in with the new
ensemble variable
o do not allow ds_grid_start/end to be values other than full axis length (1 and N).  This feature of files containing grid subsets is very rarely used.

evaluating an ensemble variable

general utility codes

You'll need to grep for "ds_type" and make sure that
wherever choices are based upon ds_type, there is an option
for ds_type='ENS'.  In general ENS variables will behave
like 'CDF' variables.
You'll

at get-grid time

FIND_VAR_NAME should return a type of cat_ ensemble_var,
when dset_num points to a dataset of type ds_type='ENS'.
SEE DISCUSSION BELOW ABOUT LET/D VARIABLES

inside of INTERP_STACK

new isact_ensemble_gather and isact_class_ensemble_gather
parameters will need to be defined along with the other
isact_ parameters
just below statement 260 but before "IF ( cat .EQ.
cat_user_var"add
... strip off need to gather ensemble components together
IF ( cat .EQ. cat_ensemble_var) THEN
CALL IS_STRIP( isact_class_ensemble_gather,   e_dim, *10, status )
under "PERFORM TRANSFORMATIONS, ARITHMETIC, RE-GRIDDING, ETC
o ELSEIF ( act .EQ. isact_ensemble_gather               ) THEN
CALL IS_ENSEMBLE_GATHER( memory, *10,
*2500, status )

inside of IS_STRIP

a good model for what needs to be done gathering ensemble
components is what we see when Ferret breaks up calculations
too large for memory.  This is the action "isact_gather".
(The class of actions is "isact_class_gather" and contains
only the one action.)

The code will look something like this (/assume there are
errors!)/ -- inserted into IS_STRIP at statement 100 (and
pushing the existing statement 100 to the ELSEIF below)
o 100 IF ( aclass .EQ. isact_class_ensemble_gather) THEN
* SET UP TO GATHER THE COMPONENTS OF AN ENSEMBLE VARIABLE
            is_act( lo_isp ) = isact_ensemble_gather
* save the default context so it can be re-used for each
ensemble member
            CALL CREATE_NEW_CONTEXT( lo_cx, big_cx,
status )     ! pushes stack
            IF ( status .NE. ferr_ok ) GOTO 5000
            is_big_cx( lo_isp ) = big_cx
* cancel result pointer to indicate no result yet
            is_mr( lo_isp ) = unspecified_int4
* set up context (hi_cx) to get the first ensemble
member of N
            is_sum( lo_isp ) = <length of the ensemble axis>
            is_phase( lo_isp ) = 1   ! component counter

(ACM note: is_phase and is_sum should be the lo and hi ss in e_dir of the result, not the full ensemble-axis length)
                    CALL TRANSFER_CONTEXT( big_cx, hi_cx )
        <set limits on e axis to unspecified>
        <set the grid to the grid of the 1st ensemble component>
              ELSEIF  ( aclass .EQ. isact_class_trans) THEN
                      ...

new routine IS_ENSEMBLE_GATHER

copy and modify is_gather.F
main action:  copy each component as it arrives into the
next m index of the result
"are we done?" test based upon see if is_phase is equal to
is_sum
"no - set up com_cx to get the next component grid" looks
like this
is_phase(res_isp) = is_phase(res_isp) + 1    !
next ensemble member
CALL TRANSFER_CONTEXT( dflt_cx, com_cx )

inside of diag_op.F

a diagnostic output line about gathering ensemble components

Dealing with LET/D=n variables

The power and flexibility of DEFINE DATA/ENSEMBLE will be great
because the user can introduce virtual variable definitions into
datasets using LET/D.  However, the grid of a LET/D variable is
not knowable until the moment of evaluation.
I recommend postponing working on the code to handle LET/D
variables until after the basic ENSEMBLE functionality on file
variables is working.  When the time comes, what's needed is an
addition to  is_uvar_grid so that when it sees that the variable
it is processing is an ensemble variable,  it triggers a
sequence of grid fetches for the grid of each ensemble component
in turn.  In merge_grid.F, there will be a small block of new
code to look at the sequence of ensemble component grids as they
arrive. There's no real merging of grids; just trigger an error
if the axes of the next ensemble component grid does not exactly
match the previous.
I'll send more detailed noted when the time comes.

define a new alias "ENSEMBLE" for "DEFINE DATA/ENSEMBLE"?

======================
quick notes on handling LET/D user variables:

GET_UVAR_GRID calls IS_UVAR_GRID which recursively calls itself
is there ever a situation where the ensemble grid needs to be
determined at the same level at which GET_UVAR_GRID is called? (grep
and look at places where GET_UVAR_GRID is called)
o if so then changes needed at the top level -- possible rename
GET_UVAR_GRID to GET_DELAYED_GRID and have it handle both uvars
and evars ("ensemble vars")
o _We will assume for now in this discussion that no such changes
are needed _-- the common situation is that variable "ex#1" (or
whatever) is a uvar wrapper for any other variable
is_uvar_grid.F:
o clone and create a new routine is_ensemble_grid.F
+ new one is called only to get an ensemble grid
+ the loop at label 100 is replaced with a loop over the
components of the ensemble variables, fetching their grids
and comparing to ensure all are compatible
o in is_uvar_grid add
ELSEIF ( itype .EQ. <ensemble_variable>      ) THEN
and push the stack to call the new is_ensemble_grid.F if so
+ pattern the push after the recursive calls to self
(is_uvar_grid) that you currently see

There will be one other situation to code:  The bullets under "is_uvar_grid.F:" above talk about requesting the component grids in the ensemble.  If the component grid was defined with LET/D, then the code logic will channel back into IS_UVAR_GRID to get that grid.  When that stack level of IS_UVAR_GRID is complete -- i.e. the component grid has been determined -- some place in the code it needs to know that it is time to return to the new is_ensemble_grid.F.  I have not looked to see where that enhanced logic needs to sit.  Quite likely it is in GET_UVAR_GRID (which is short, so it should be easy to figure out.)
Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1944

Comment by ansley.b.manke on 7 Jun 2012 17:19 UTC
Here is the email introducing phase 1 of this to Andrew and Patrick:
... here is the First cut at the command DEFINE DATA/ENSEMBLE.
There's more work remaining for DEFINE DATA/ENSEMBLE and I'll describe that below, but first here's what we've got now.
The ensemble definition lets you list a set of file names or id's and define from them a virtual dataset which contains all the variables that have identical names and grids.  Ferret defines an E-axis and the ensemble members are aggregated in the E direction to create a virtual dataset.  Here's an example. I saved 3 datasets, e1.nc, e2.nc, e3.nc; with variables based on ones from the coads_climatology dataset.  One dataset has an extra variable:
    > ferret_c
            NOAA/PMEL TMAP
            FERRET v6.8 (beta2, 6D)
            Linux 2.6.18-308.1.1.el5 64-bit - 05/31/12
            31-May-12 13:48

    yes? use e1,e2,e3
    yes? sh dat
         currently SET data sets:
        1> ./e1.nc
     name     title                             I         J         K         L         M         N
     SSTE     SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:12      ...       ...
     AIRTE    AIR TEMPERATURE                  1:180     1:90      ...       1:12      ...       ...

     AIRTE    AIR TEMPERATURE                  1:180     1:90      ...       1:12      ...       ...

    yes? define data/ensemble/title="Variations on coads_climatology" ens_3  = 1,2,3
     *** NOTE: Exclude variable from ensemble. Does not appear in all member datasets: SLP
    yes? sh dat 4
         currently SET data sets:
        4> ensemble dataset  (default)
     name     title                             I         J         K         L         M         N
     SSTE     SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:12      1:3       ...
     AIRTE    AIR TEMPERATURE                  1:180     1:90      ...       1:12      1:3       ...

    yes? shade/L=3 sste[- sste[m=2](m=3])

The syntax is:
  DEFINE DATA/ENSEMBLE/TITLE/QUIET  name = [of ensemble member datasets](list)

DEFINE DATA is valid only if /ENSEMBLE is specified

/TITLE=   specifies an optional dataset title  (equivalent to the global dataset title from a netCDF header).

/QUIET   shuts off notes such as the " NOTE: Exclude variable from ensemble. ..." above

name  is the short-dataset name (equivalent to the filename without path for file datsets: coads_climatology)

The list of ensemble member datasets can be specified using Ferret dataset numbers or Ferret dataset names as used by "set data". Ferret goes and sees if these datasets are open and if not tries to open them.  So the above script could also be either of these:
yes? define data/ensemble ens_3  = e1, e2, e3
yes? show dat
yes? shade/L=3 sste[- sste[m=2](m=3])

or
yes? define data/ensemble ens_3 = "/home/users/ansley/linux_6d/FERRET/fer/e1.nc", "/home/users/ansley/linux_6d/FERRET/fer/e2.nc","/home/users/ansley/linux_6d/FERRET/fer/e3.nc"
yes? show dat
yes? shade/L=3 sste[- sste[m=2](m=3])

or they could be URL's.  This would eventually be limited by the length of the Ferret command line of course. We might think of other notations for this, such as a command to let us "append" another dataset to an ensemble.  And some kind of alias like "ENSEMBLE" for DEFINE DATA/ENSBBLE.
For variables in the ensemble, Units and Variable Title are inherited from the input variables. The way I've done it, they are inherited from the variable in the first dataset. We need to think how much to require that attributes are the same for variables in the member datasets. Units should probably match, doing it with the UDUNITS code for variables. In general I don't think that we'd want ALL attributes to have to match. I haven't done anything to automatically inherit all attributes, and I don't think we want to.  The bad-flag from each input dataset is applied to that data after it's read from the member set, and the same is done for scale and offset attributes if the data in the files is packed.  The default Ferret bad-flag is used for the variables in the ensemble dataset.
The remaining item in this work is to allow variables defined with LET/D=  be part of the set of variables included in the ensemble.  This would let us do renaming, regridding, rescaling or whatnot to create an ensemble from datasets that aren't necessarily coming from the same source on the same grid.  This is still in the works.

Comment by ansley.b.manke on 7 Jun 2012 17:22 UTC
Here are suggestions from Patrick and Andrew:
The DEFINE DATA/ENSEMBLE stuff is really neat.  So neat that, as I do all too often, I'll reward your diligent efforts with suggestions for even more features.  :-)  Thinking out loud:

Should we perhaps call this an "aggregate" rather than an "ensemble", to support future generalization?  For example, there's a lot of demand for concatenating datasets along the time dimension (which we currently do with MC descriptor files) -- since at GFDL and elsewhere, data is often stored in year-long chunks that always have to be concatenated in order to do anything useful.  In that case, we'd be joining multi-level chunks along an existing axis, rather than stacking individual "points" along a brand-new axis.  Similarly, we might want to "aggregate" along spatial dimensions, when there are regional blocks that need to be joined together (e.g. subdomains that were output by different processors).  This would be really useful for debugging our models, e.g. when a numerical instability terminates a model run before it has had a chance to concatenate all of those regional chunks together.  In this "chunk aggregation" case, it would be desirable to have the aggregation preserve the axis coordinates and bounds (which might be times or longitudes) in each chunk, simply stacking them together.

If I understand correctly, a nice feature of the current implementation is that datasets are aggregated after they've already had all their missing values, offsets, and scale factors applied on a per-constituent basis. That's cool, since we do sometimes (but not often) encounter cases where the constituent chunks or ensemble-members have differing values for these attributes.

A shortcoming of the current implementation is that after the aggregation is done, we still have all those constituent chunks cluttering up our workspace.  For large ensembles (or multiple ensembles) this would make SHOW DATA hard to read, would require the user to track the accumulated dataset numbers, and might cause us to run out of dataset slots fairly quickly.  It would be great if there were some way to "hide" or "replace" those constituent datasets in the workspace.  Or maybe Ferret could provide a qualifier (perhaps called /FROM_FILES, or /DIRECT) to shortcut the aggregation, defining it directly from a list of NetCDF files or OPeNDAP links, so that only one new dataset is created without any intervening constituent dataset numbers.  While this shortcut would give up the per-file attribute capability noted in (2), it would be more convenient for the large majority of cases where such attributes are known to be identical among all the constituent files.

A natural extension is "aggregates of aggregates."  For example, I currently have a distributed dataset whose chunks I'd like to aggregate in time, then aggregate into ensembles, then aggregate across initialization times (forecasts).

To supply the list of input files or dataset numbers, I'd suggest that DEFINE DATA/AGGREGATE accept an array variable as the input list, instead of the explicit list inline. This would prevent us from filling up the line buffer, would make scripts more readable, and would make it simpler to generate the list automatically -- e.g.
DEF DAT/AGG ens = {1,2,3}
DEF DAT/AGG ens = x[gx=1:40:1]
LET datasets = {"a.nc", "b.nc", "c.nc"}
DEF DAT/AGG/FROM_FILES ens = datasets
DEF DAT/AGG/FROM_FILES ens = spawn("ls *.nc")

If the aggregation is large and involves lots of files -- e.g. my example in (4) -- then reading all of those file headers might take some time.  So it'd be nice to be able to "SAVE" an aggregation descriptor (i.e. the "state" of the entity defined by DEF DAT/AGG) as a text file, and then be able to load it again later with "USE".  Advantages: faster startup the next time, and would provide a valuable descriptor that could be emulated by other software (e.g. our model postprocessor) in order to make a complex set of building blocks visible as a unified dataset with just a simple "USE" command in Ferret.  Perhaps SAVE/AGGREGATION could output the descriptor, while SAVE would output the full aggregated NetCDF dataset.  For simplicity, maybe Ferret would only allow SAVE/AGG for aggregations defined with DEF DAT/AGG/FROM_FILES.

Andrew

Comment by ansley.b.manke on 7 Jun 2012 17:25 UTC
Patrick also suggested aggregations in other directions than E.  In addition, he found a way to create a list of files in quotes, suitable for sending to the DEFINE DATA command, using the "ls -Q" option. He writes:[[BR]]
[[BR]]

Ok I have found the trick. -Q option for ls.
Then the dynamique creation of an aggregation in a ferret session from a list of files
can be expressed as:
yes? def data/ens myens=spawn("ls -Q /prodigfs/esg/CMIP5/merge/IPSL/IPSL-CM5A-LR/rcp85/mon/atmos/Amon/r?i1p1/latest/tas/tas_Amon_IPSL-CM5A-LR_rcp85_r?i1p1_200601-210012.nc | paste -sd,")
or tested with script option from unix:
~/ferret_v68_2/bin/ferret -script make_ens.jnl "/prodigfs/esg/CMIP5/merge/IPSL/IPSL-CM5A-LR/rcp85/mon/atmos/Amon/r?i1p1/latest/tas/tas_Amon_IPSL-CM5A-LR_rcp85_r?i1p1_200601-210012.nc"
with
$ cat make_ens.jnl
def data/ens myens=spawn("ls -Q ($01) | paste -sd,")
show data/full
Patrick

Comment by ansley.b.manke on 7 Jun 2012 17:35 UTC
For the Ferret v6.8 release, I will implement this to only the E direction.
DEFINE DATA /AGGREGATE /E /QUIET /TITLE   ensemble_name = of files
and if possible a SHOW DATA/AGGREGATE to list only those datasets which are aggregates. Things to explore for the future will include other directions, investigation into ways to make the member datsets even more invisi

Modified by ansley.b.manke on 8 Aug 2012 23:57 UTC

Comment by ansley.b.manke on 17 Sep 2012 22:43 UTC
Further tasks and improvements:

Make an alias ENSEMBLE for DEFINE DATA/AGG/E

The grid should be labeled as an ensemble grid when in the E direction, on SHOW DATA.

When there are LET/D variables and we define an ensemble, the grid IS known by the time we're done aggregating, isn't it?  Can we show it on SHOW GRID, rather than "... Aggregate grid undetermined" ?

If a member dataset is closed, we should close the ensemble dataset. If a dataset needed by a user-defined variable is closed, that should also happen (the general capability already in the LET/D machinery?)

DEFINE DATA/HIDE would mark the member datsets so that they would not show up in a SHOW DATA command.  SHOW DATA/HIDDEN would then show all datasets.

Comment by ansley.b.manke on 28 Feb 2013 22:55 UTC
Close this ticket and open a new one with the above enhancements


Re-export glib::signal::Inhibit to gtk4 crate root like gtk3's bindings.

This pull request re-exports glib::signal::Inhibit to gtk4's crate root like gtk3's bindings.
This will help with gtk-rs developers translating to gtk4-rs as it is not immediately apparent where Inhibit is in the new API.

I don't quite know why some checks didn't pass, all builds worked fine on my end.

I don't quite know why some checks didn't pass, all builds worked fine on my end.

rustfmt is not happy; cargo fmt would do the job

@bilelmoussaoui It's all good though right?

@bilelmoussaoui It's all good though right?

It's, the CI checks that the formatting is correct as well.

See https://github.com/gtk-rs/gtk4-rs/pull/319/checks?check_run_id=2428995820

This PR should also drop this file https://github.com/gtk-rs/gtk4-rs/blob/master/gtk4/src/signal.rs which isn't very useful :)

I deleted the file and removed it from lib.rs, it all looks good from what I can tell.

you still need to run cargo fmt on the code :)

There we go, that should fix it.

Thanks!


Tags and Categories are not working in master

Following the configuration guide the categories and tags are not being displayed or generated.
I also checked your gh-pages branch and it seems that both categories and tags are actually new pages, not something generated via jekyll.

Please refer to https://chriskyfung.github.io/amp-affiliately-jekyll-theme/plugins/#-jekyll-archives
The categories and tags pages rely on the jekyll/jekyll-archives: Archive pages for your Jekyll tags and categories. plugin, while this plugin is not whitelisted in GitHub Pages. They will not be created if you deploy the Jekyll directly using the default GitHub Actions workflow to build and deploy your site source files.
You need to use a custom GitHub Actions to work around. Please use the .github/workflows/deploy-jekyll.yml as a template for configuring your own workflow.


New features from latest Vision API update

Cloud Vision API has just received an update and some new features have become generally available. This PR shows the new functionality in the Vision API detect sample.
Features:

Best guess labels for web entity detection

Confidence scores in OCR annotations

Racy axis in safe search.

To test:

cd vision/detect

go generate

go test

You can also try running on an image that you have available locally by:
go build && ./detect $PATH_TO_IMAGE

@odeke-em , @broady : Looking for guidance on addition of region tags to the generated code.
I need to add region tags ([START x] and [END x] comments as in this code) to the new samples, but it is not clear if I should be modifying the code generator or just doing it by hand in detect.go.

LGTM. just a nit about spacing for the region tag.

@broady : Didn't understand about go_function, could you link to a sample that uses it (or GitHub screenshot)?

Sent via IM. (internal to Google)

@broady : Thanks. Can we merge this in for now? I will talk to the technical writer working on the documentation corresponding to these samples and see if we can switch over to go_function once I make the hand-off.

Edit 2: Never mind, just swallowed my trepidation and modified the code generator. It went better than expected. @odeke-em - could you please take another look?

Sorry for the late reply, I missed this notification as I had stepped away from work to go grab dinner :) Thanks for the updates, I'll def be using these sometime soon.


Chart data distribution

Hi everyone. I'm looking for a way to chart something like a normal distribution or any distribution actually using britecharts.
The chart would be something like this:

I've been looking into the line chart and the sparkline chart but they work with dates not with numerical data.
Is there a way to create this charts using britecharts?

Hi @gabitoju, thanks for creating this issue!
At the moment we don't support line charts with non-timeseries data. It has been a request from many people, so it should become part of the library soon.
In the meanwhile, the only way I see this working would be using a bar chart.
Thanks!

Thanks for the answer @Golodhros.
Right now that's what we are doing, using the bar chart to represent a distribution and also as a sort of historgram (that would also be a nice chart to have).
I'm closing the issue.
Regards!