Move samples to a composite build

One more step towards lazy task configuration (https://github.com/Yelp/swagger-gradle-codegen/pull/69)
This pull requests moves the samples to a composite build. This allows to do dependency substitution on the plugin artifact and therefore have the sample code in sync with the plugin code from the repo (without having to publish on ~mavenCentral~ mavenLocal or jcenter first).
If you're working on the samples, you should open swagger-gradle-codegen/sample in your favorite IDE.

I just realized there's more to it as we need to compile samples from the CI as well obviously. Before I dive into this, is this a path worth exploring or should we continue using mavenLocal ?

This allows to do dependency substitution on the plugin artifact and therefore have the sample code in sync with the plugin code from the repo (without having to publish on mavenCentral or jcenter first).

You don't need to publish on mavenCentral or jcenter at the moment. You have to publish the plugin to mavenLocal and use it in a subsequent build.

If you're working on the samples, you should open swagger-gradle-codegen/sample in your favorite IDE.

Ideally we want to avoid having to open two separate project to work with samples and/or plugins. The convenience of the current setup is that you open a project and you have everything there.

This allows to do dependency substitution on the plugin artifact and therefore have the sample code in sync with the plugin code from the repo (without having to publish on mavenCentral or jcenter first).

You don't need to publish on mavenCentral or jcenter at the moment. You have to publish the plugin to mavenLocal and use it in a subsequent build.

Sorry, I meant mavenLocal, not mavenCentral :man_facepalming: . As I said in the other PR, I'm not a fan of using mavenLocal as it introduces a global state that can have side effects and that needs to be maintained.

Ideally we want to avoid having to open two separate project to work with samples and/or plugins.

Technically, you can do all the work from the composite build and edit the plugin files from there.

The convenience of the current setup is that you open a project and you have everything there.

The drawback being that changing the plugin requires to call publishToMavenLocal for the changes to be seen by the samples. Also when the project is first opened, the samples use the plugin from jcenter and not the one from the repo, which might be confusing if they don't behave exactly the same.
Let me know what you think. I started to work on this while working on lazy configuration because I changed some API in GenerateTaskConfiguration and this broke my gradle sync. But now I know about publishToMavenLocal, I can do the lazy configuration without having composite builds.

Sounds like composite build could help us improve the project setup 👍 I'm in for it. I just ask you to unwrap the setup that you're proposing here.
Ideally the base project should be the one in the root folder. From there you should include all the sample modules (as gradle module) and plugin as a composite build.
In other words: in the top level settings.gradle.kts the goal is to have something like.
include(":samples:junit-tests",
        ":samples:kotlin-android",
        ":samples:kotlin-android-moshi-codegen",
        ":samples:kotlin-coroutines",
        ":samples:groovy-android")
includeBuild(":plugin")

This will make sure that by running gradle in the top folder, everything works as expected.

@martinbonnin I think that #101 caused merge conflicts with this branch. Sorry 😢
Let me know if you need support or you are able to address them by yourself (I don't expect it being very complex)

@macisamuele this branch renames a lot of files so I guess that was expected. I just rebased on master, it should be good now.

@martinbonnin ++
Looked like you had @cortinico approval for your changes. So I'll prefer having him taking care of merging this change.
From a quick pass through the changes I see why the conflicts were there and how rebasing fixed all the things, so it should be all good ™
Thanks a lot for helping in improving our gradle configurations 💯

keep the Make+Gradle discussion opened

@cortinico @martinbonnin : I'm the kind of lazy developer ;)
I do usually configure, in each git repo I'm working on, a custom git command (ie. git push-after-tests) that allows me to push to origin only if tests are green.
Said so I don't have a very strong opinion on having Make or Gradle or both, is more about having a single command to run that basically runs all the tests that travis would run.
Having a gradle task that would behave like the current make test would be more than enough on my side 😄

I'm totally in for nuking the Makefile. @martinbonnin do you want to take this?

👍 I'll open a PR. What's a good name for the gradle task that'll do everything ? test is already taken. Something like ./gradlew buildProject ? ./gradlew makeAll ? Something else ?

What about travisTest? At the end the task should be connected to the travis execution as well :blush:

I'd rather go for preMerge or preMergeTest as is CI agnostic and contains all the verification tasks that needs to be executed before integrating a branch


Yeelight Wifi Bulb, YLDP02YL, errors

I have lamp YLDP02YL not YLDP03YL
Install from docker image
docker run -d --name="home-assistant" -v /Users/gbv/work/local/home-assistant/states/home-assistant/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant

bash-3.2$ docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.7.1
 Git commit:   6f9534c
 Built:        Thu Sep  8 10:31:18 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 17:52:38 2016
 OS/Arch:      linux/amd64
bash-3.2$

Description of problem:
Error log
16-11-07 15:33:31 ERROR (Thread-4) [homeassistant.components.light.yeelight] Failed to connect to bulb <IP_ADDRESS>, kitchen
16-11-07 15:33:31 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform yeelight
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 148, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "uvloop/future.pyx", line 230, in __iter__ (uvloop/loop.c:95269)
  File "uvloop/future.pyx", line 432, in uvloop.loop.BaseTask._fast_wakeup (uvloop/loop.c:98428)
  File "uvloop/future.pyx", line 101, in uvloop.loop.BaseFuture._result_impl (uvloop/loop.c:93687)
  File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/light/yeelight.py", line 40, in setup_platform
    add_devices(lights)
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 288, in add_entities
    self.component.hass.loop
  File "/usr/local/lib/python3.5/concurrent/futures/_base.py", line 405, in result
    return self.__get_result()
  File "/usr/local/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
    raise self._exception
  File "uvloop/future.pyx", line 374, in uvloop.loop.BaseTask._fast_step (uvloop/loop.c:97244)
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 304, in async_add_entities
    yield from asyncio.gather(*tasks, loop=self.component.hass.loop)
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "uvloop/future.pyx", line 434, in uvloop.loop.BaseTask._fast_wakeup (uvloop/loop.c:98463)
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "uvloop/future.pyx", line 372, in uvloop.loop.BaseTask._fast_step (uvloop/loop.c:97209)
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 320, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 194, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 216, in async_update_ha_state
    state = self.state
  File "/usr/src/app/homeassistant/helpers/entity.py", line 318, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/usr/src/app/homeassistant/components/light/yeelight.py", line 77, in is_on
    return self._state == self._bulb.POWER_ON
AttributeError: 'NoneType' object has no attribute 'POWER_ON'

Problem-relevant configuration.yaml entries and steps to reproduce:
homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 73.391186
  longitude: 54.9682045
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 26
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Asia/Omsk

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

http:
  # Uncomment this to add a password (recommended!)
  # api_password: PASSWORD

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

# Weather Prediction
sensor:
  platform: yr

light:
  - platform: yeelight
    devices:
      <IP_ADDRESS>:
        name: kitchen

There is a different implementation available here: https://community.home-assistant.io/t/xiaomi-yeelight-e27-bulb-component/695/32
@HydrelioxGitHub Are you able to help here?

I'm not available until 10 days but I will check if I can do something.

I got the same error message before I enabled "Developer Mode" in the Yeelight mobile app.

There's also a YeeLight library that might help.

No more updates on this? This is on HA and doesn't work at all...

@joaoasilva Do you get the same error as @gebv ?
Have you tried the different implementation available here: https://community.home-assistant.io/t/xiaomi-yeelight-e27-bulb-component/695/32

@Danielhiversen Yes, I've tried the other one but it's also buggy and doesn't sync the status of the lights and brightness and rgb. I did a bit of debugging and the api calls seem to be wrong, the only calls that work are to turn on/off the lights.
I'll check rytilahti wip to see how it is. Thanks

17-01-13 15:10:16 INFO (MainThread) [homeassistant.bootstrap] Setting up light
17-01-13 15:10:16 INFO (MainThread) [homeassistant.components.light] Setting up light.yeelight
17-01-13 15:10:17 ERROR (Thread-7) [homeassistant.components.light.yeelight] Failed to connect to bulb <IP_ADDRESS>, kitchen
17-01-13 15:10:17 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "uvloop/future.pyx", line 372, in uvloop.loop.BaseTask._fast_step (uvloop/loop.c:107227)
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 335, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 204, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    state = self.state
  File "/usr/src/app/homeassistant/helpers/entity.py", line 338, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/usr/src/app/homeassistant/components/light/yeelight.py", line 77, in is_on
    return self._state == self._bulb.POWER_ON
AttributeError: 'NoneType' object has no attribute 'POWER_ON'
17-01-13 15:10:17 INFO (MainThread) [homeassistant.loader] Loaded group from homeassistant.components.group
17-01-13 15:10:17 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<st

I don't think this is valid anymore, can you please check and close if it's working now?

great, there is no error
but I am unable to connect to the light bulb
$ docker run -d --name="home-assistant" -v ${PWD}/config:/config -v /etc/localtime:/etc/localtime:ro -e "TZ=America/Los_Angeles" -p 8123:8123 homeassistant/home-assistant
or
$ docker run -d --name="home-assistant" -v ${PWD}/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant

17-02-28 19:50:52 ERROR (Thread-9) [homeassistant.components.light.yeelight] Failed to connect to bulb <IP_ADDRESS>, kitchen: A socket error occurred when sending the command.

should try on a linux machine

YLDP02YL lights work here. running latest HA in a lxc container

I don't get any more problems now with the latest HA. I get some errors sometime but it's when I disconnect the light from the power, maybe we could try  to have an error handler for when the lights are offline. Apart from that everything seems perfect. Thanks

I don't get any more problems now with the latest HA. I get some errors sometime but it's when I disconnect the light from the power, maybe we could try to have an error handler for when the lights are offline. Apart from that everything seems perfect. Thanks

Thanks, works 👍


Create a ViewComponent to diplay businesshours in front end

Implementation of #799

Thank you @jducobu . However it is a best practice to keep the PR focus, a PR should address one issue only so that it can be reviewed and make merge decision easier.
I will review and add comment for this PR tonight.

Normally, we do not display the prices from ProductThumbnail, but in the ProductThumbnail.CalculatedProductPrice. So we don't need to format the Prices in ProductThumbnail.
For the change related to Tax, I can imagine what you want to archive. But I don't clearly understand why you want to do this.
This pr is kind of big. and it address multiple issues. Could you please split it out, each pr focus on one issue so that we can easily review and merge

I split all the PR in separate PR

Hope you take my comments under consideration


How to adapt heteroscedastic loss for a classification problem?

How could we adapt this for a classification problem using crossentropy?:
def heteroscedastic_mse(true, pred):
        mean = pred[:, :D]
        log_var = pred[:, D:]
        precision = K.exp(-log_var)
        return K.sum(precision * (true-mean)**2. + log_var, -1)

I found a post where it was suggested to use a montecarlo simulation, however accuracy gets stuck at a very low value, and won't go any up:
def heteroscedastic_categorical_crossentropy(true, pred):
        mean = pred[:, :D]
        log_var = pred[:, D:]

        log_std = K.sqrt(log_var)

        # variance depressor
        logvar_dep = K.exp(log_var) - K.ones_like(log_var)

        #undistorted loss
        undistorted_loss = K.categorical_crossentropy(mean, true, from_logits=True)

        # apply montecarlo simulation
        T = 100
        iterable = K.variable(np.ones(T))
        dist = distributions.Normal(loc=K.zeros_like(log_std), scale=log_std)
        monte_carlo_results = K.map_fn(\
                        gaussian_categorical_crossentropy(true, mean, \
                                                          dist, \
                                                          undistorted_loss,\
                                                          D), iterable, \
                                                          name='monte_carlo_results')

        var_loss = K.mean(monte_carlo_results, axis=0) * undistorted_loss

        return var_loss + undistorted_loss + K.sum(logvar_dep,-1)

where gaussian_categorical_crossentropy is defined by:
def gaussian_categorical_crossentropy(true, pred, dist, undistorted_loss, num_classes):
  def map_fn(i):
    std_samples = dist.sample(1)
    distorted_loss = K.categorical_crossentropy(pred + std_samples[0], true,
                                                from_logits=True)
    diff = undistorted_loss - distorted_loss
    return -K.elu(diff)
  return map_fn

The source of the last code:
https://github.com/kyle-dorman/bayesian-neural-network-blogpost
Thanks in advance!

Yeah I agree that this would be very useful. The loss function for a classification problem is in the Concrete Dropout paper, but it's unclear to me how to implement it in this code.


Feature/keystone policy overhaul

Linking: https://github.com/salt-formulas/salt-formula-keystone/pull/11

@dukov can you comment.

@dukov Check the current state of this PR pls, I addressed your comments. Also after discussion with @cznewt we think you can use these states and modules in state files inside other formulas for core OpenStack services, because it is unlikely you will ever have an environment with let's say Nova, but without Keystone. So it shouldn't be necessary to copy these into the other formulas.

you can use these states and modules in state files inside other formulas
Excellent idea!
In this case I'd rename keystone_policy resource to something more generic like policy_rule in order to not confuse enduser


expiration_date is instance of list, instead of datetime

Printing expiration_date to the console, it seems that it's a list and not a datetime object. Could anyone clarify what is happening? Thank you.

what is the domain? there may be multiple dates

closing due to inactivity

Hi there, I'm unable to reopen this, but I've found one case where this is happening which might help drive further investigation.
if I query this specific domain, I get lists of datetime objects:
In [5]: import whois
In [6]: whois.whois("communautique.quebec")
Out[6]:
{'domain_name': ['communautique.quebec', 'COMMUNAUTIQUE.QUEBEC'],
 'registrar': 'TUCOWS, INC.',
 'whois_server': 'whois.tucows.com',
 'referral_url': None,
 'updated_date': [datetime.datetime(2019, 11, 17, 16, 0, 5, 118000),
  datetime.datetime(2019, 11, 17, 16, 0, 5)],
 'creation_date': [datetime.datetime(2014, 11, 21, 6, 5, 4, 794000),
  datetime.datetime(2014, 11, 21, 6, 5, 4)],
 'expiration_date': [datetime.datetime(2024, 11, 21, 6, 5, 4, 794000),
  datetime.datetime(2024, 11, 21, 6, 5, 4)],
...

In this case, the difference between the two objects in each list is just the presence or absence of microseconds.
A tiny bit unrelated but the domain_name entry is also there twice with capitalization difference.
however, super weirdly, if I query another domain in the same TLD, I get datetime objects directly:
In [7]: whois.whois("nic.quebec")
Out[7]:
{'domain_name': 'nic.quebec',
 'registrar': 'PointQuébec, Inc.',
 'whois_server': 'whois.nic.quebec',
 'referral_url': None,
 'updated_date': datetime.datetime(2020, 8, 10, 6, 18, 4, 440000),
 'creation_date': datetime.datetime(2014, 1, 23, 13, 46, 27, 349000),
 'expiration_date': datetime.datetime(2029, 1, 23, 13, 46, 27, 349000),

the two domains seem to be using a different whois server, so the tucows server is producing this result in this case.

I've traced what's happening and it seems that the whois server recursing is causing the duplication. we're getting a full response from the host at 'quebec.whois-servers.net', and the response from 'whois.tucows.com' gets appended to what we've already received, thus the duplicated domain name and dates.

when I trace what's happening with nic.quebec, the same recuse and response duplication happens, however in that case the domain name is not capitalized in the second and the date format and content is the same, so we're not getting two distinct sets of information


Exec tachikoma update<PHONE_NUMBER>5059

:hamster::hamster::hamster:   Strategy none
Powered by Interval Pull Request as a Service - Tachikoma.io

Coverage remained the same at % when pulling 4d3a0864f8272059b4d336c7978e14e1674fe088 on tachikomapocket:tachikoma/update-20150127125059 into ddf31327ec9d3097b29bd6c49c1071d946319912 on sanemat:master.


Error: GitHub Profiles Overlapping/Overriding Social Icons

Describe the Error:
In the current implementation, GitHub profile cards are suppressing the social icons on the main page. As a result, the profile cards cover the social icons, making them inaccessible and disrupting the intended layout.
Expected Behavior:
The social icons should always appear on top of the GitHub profile cards, ensuring they remain visible and accessible regardless of the position of the profile cards.
Steps to Reproduce:
Navigate to the page where GitHub profiles and social icons are displayed together.
Scroll through the profiles and observe how the social icons are overlapped by the profile cards.
Proposed Solution:
Adjust the CSS z-index values to give the social icons a higher z-index compared to the profile cards.
Ensure both elements are positioned correctly (e.g., relative or absolute) to respect the stacking order.
Additional Context This issue affects the user experience, as social icons are meant to be always accessible. Resolving this would improve the usability and visual appeal of the interface.

I think someone raised issue on this.


Spike: slas-react-sdk

Description

Open for visibility. Stage - 20% completion.
This is a spike for creating SLAS React SDK, including react helpers such as contexts/hooks to facilitate shopper login and session/token management.
More description coming soon.

see https://github.com/SalesforceCommerceCloud/pwa-kit/pull/638


Reference type related derivation problems

Why was the m field not derived when it was used

Duplicate of #42257 and many others.
You forgot to fill out the issue template.


Proposed RFC Feature Upgrade Minimum Visual Studio Version to 16.11 and support 17

Summary:
Upgrade the minumum supported Visual Studio Version to 16.11 as 16.7 and add support to Visual Studio 17.
Feature design description:
Microsoft is going to remove support for Visual Studio 16.9 in October 2022 and recently has released a new version (2022) that is able to compile and run most of O3DE without any issue but it is left out as the Project Manager is requesting specifically fot 16.x.
Technical design description:

There is already an issue in the main o3de repo (https://github.com/o3de/o3de/issues/7665) and a merge request (https://github.com/o3de/o3de/pull/7714) that implements this feature but I think that the build machines and the docs may need an upgrade.

What are the advantages of the feature?

Adding VS2022 support may help with developer productivity as it has been upgraded to 64bits and therefore improving the overall performance of the IDE.

How will this be implemented or integrated into the O3DE environment?

As seen in the merge request there is no need to change much of the code as only the parameters of the vswhere invocation are different
VS2022 compiler is binary compatible with 2019 so there won't also be many changes in the produced binary.

@o3de/sig-core Doesn't have any objections to updating the minimum VS2019 version to 16.11 and adding official support for VS2022.
We want need to make sure that any any continuous integration nodes using VS2022 is targeting the v143 compiler toolset. CMake uses by default when the Visual Studio 17 generator is used.

@o3de/sig-core Doesn't have any objections to updating the minimum VS2019 version to 16.11 and adding official support for VS2022.
We want need to make sure that any any continuous integration nodes using VS2022 is targeting the v143 compiler toolset. CMake uses by default when the Visual Studio 17 generator is used.

If you need any help in this I will be glad to be of service.

I'm fine with this RFC, for the record. It's been merged in as of https://github.com/o3de/o3de/pull/7714


Updates invalid_versioner_option translation.

Adds :accept_version_header as valid setting.

The danger error above is my fault, fixed in https://github.com/ruby-grape/grape/pull/1538, you can rebase.

Cheers. Rebased and pushed. :)


chore: add basic editorconfig with google settings

Description

This PR adds a basic editorconfig to the project, which applies the Google coding standards. I've chosen this editorconfig as the project already uses spotless with the Google preset.
Closes #18

Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review:

[ x ] DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
[ x ] Copyright and license header are present on all affected files

In the other PR you also added rules for other file types. Would it make sense to add them here as well?

@borisrizov-zf In the other PR you also added rules for other file types. Would it make sense to add them here as well?

Definitely does. Will do.


Uncraft machine bug.

you can't uncraft the recipes from industrial craft (I don't know if is all of them or not but I tested a lot of items and none of them worked).

Yeah i havent added support for non vanilla recipes, the '?' button usually gives a bit of info.  Might come in future.

The uncrafter will never do non vanilla recipes, simply due to the limitations of forge.  They have coded the IRecipe interface to not output ingrediends.
HOWEVER i am considering some new upgraded uncrafter block, some sort of Grinder/Crusher.  It will work totally differently, instead of looking up recipe ingredients, it would instead have its own recipes created for vanilla blocks, and maybe some mods as well, and then useing CraftTweaker you could add more.
Closing the issue for this reason.


VSCode opens unsaved deleted files

Issue Type
Bug
Details

VS Code Version: 1.54.3
OS Version: Ubuntu 20.04.2 LTS (Focal Fossa)

Steps to Reproduce:

Create a folder & create a file inside that folder
Open the folder in VSCode
Edit the file
Close VSCode without saving the file
Delete the file/folder

You'll see that the file is still open in VSCode.

After deleting the folder:

Does this issue occur when all extensions are disabled?:
Yes
This happens to me quite a few times. Is this is a feature? If it is, then is there any way to disable it?

This is just how vscode behaves, I think this is by design.
However, forwarding to @bpasero so he can decide what to do here


feat: add ingest and delete tools

In addition to adding these extra tools, this change copies the gateway tool to the main tool, changing ${KNOWLEDGE_BIN} to ${GPTSCRIPT_TOOL_DIR}/bin/gptscript-tool so it can be used with the gptscript packaging.

It worked when I ran it locally, but it doesn't seem to be working when I run it from this branch. Moving to draft while I investigate.


Can't load plugin since 0.15.0 (Insiderbuild)

Since the update to the new insiderbuild 0.15.0 or 0.15.1 the plugin can't be loaded anymore for me. I assume it has to do with the update to Codemirror 6, but I don't know.
By the way, I'm loving this plugin. It made writing so much faster and more fluid for me. So thank you very much ☺

Yes, the new CM6 update breaks the plugin! However, I don't have access to insider builds, so I can't test and update the plugin on version 0.15 yet.
I'll release an update as soon as I can after v0.15 is made available to the public. Glad you're enjoying the plugin :)

I was gifted an insider license and have now updated the plugin for v0.15!


react-native-config 1.3.0 android issue

Hello After I install react-native-config 1.3.0 I met compile error. The issue is below like this
1: Task failed with an exception.

Where:
Script '/node_modules/react-native-config/android/dotenv.gradle' line: 67

What went wrong:
A problem occurred evaluating script.

No signature of method: dotenv_8tt8w5oyulzp9wgy9622t53h8.android() is applicable for argument types: (dotenv_8tt8w5oyulzp9wgy9622t53h8$_run_closure1) values: [dotenv_8tt8w5oyulzp9wgy9622t53h8$_run_closure1@51b44ee3]

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.

What went wrong:
A problem occurred configuring project ':app'.

compileSdkVersion is not specified. Please add it to build.gradle

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

Get more help at https://help.gradle.org

@jihokim2 can you test with version 1.3.1? Let me know if the problem persists

@luancurti @jihokim2
I have the same problem, the 1.3.1 test is good

I have tested "react-native-config": "^1.3.1",

Configure project :app
Reading env from: ./config/.env.dev

FAILURE: Build completed with 2 failures.
1: Task failed with an exception.

Where:
Script '../project/partner/node_modules/react-native-config/android/dotenv.gradle' line: 50

What went wrong:
A problem occurred evaluating script.

dotenv_b9q0rr2e7huy15rmg523ghecy$_loadDotEnv_closure5
How to fix this

Did anyone find a solution to this? I'm seeing it in appcenter but not locally


Syntax improvement: allow spaces anywhere commas are allowed

Makes for some much more readable tunes
0,1,2,3,4 optionally becomes 0 1 2 3 4
{1/1,6/5,5/4,4/3,3/2} optionally becomes {1/1 6/5 5/4 4/3 3/2}
Allows #25 to happen

Added in 1.2.0


Parameter consistency for textures/buffers

From the API PR:

Functions that operate on buffer take a buffer and a struct for parameters. Functions that operate on texture only take a struct that includes both texture and parameters. I think it would be better to have functions with similar signature.

Breaking this down a bit...
TextureSlice is a struct which contains a texture pointer, a layer, and mip level. This is used by functions which need to bind a specific resource view, like BeginRenderPass and BindFragmentStorageTextures.
TextureRegion is a struct which encompasses a TextureSlice and 3D offset/dimensions. This is used by functions which write data to a specific region of a texture, like UploadToTexture and CopyTextureToTexture. You cannot have a TextureRegion without also needing a TextureSlice, so it makes sense for TextureRegion to contain TextureSlice.
Let's compare the signatures of UploadToTexture and UploadToBuffer.
extern SDL_DECLSPEC void SDLCALL SDL_GpuUploadToTexture(
    SDL_GpuCopyPass *copyPass,
    SDL_GpuTransferBuffer *transferBuffer,
    SDL_GpuTextureRegion *textureRegion,
    SDL_GpuBufferImageCopy *copyParams,
    SDL_bool cycle);

extern SDL_DECLSPEC void SDLCALL SDL_GpuUploadToBuffer(
    SDL_GpuCopyPass *copyPass,
    SDL_GpuTransferBuffer *transferBuffer,
    SDL_GpuBuffer *buffer,
    SDL_GpuBufferCopy *copyParams,
    SDL_bool cycle);
```c

These have a similar shape. You have a copy pass, the transfer buffer, the resource being uploaded to, some parameters particular to the copy operation, and a cycle bool. The main difference is that TextureRegion contains data about where the data is being copied to, whereas offset data for buffers is contained in the BufferCopy struct.

If we were to change the definition of TextureRegion, we would have to add an extra TextureSlice parameter to every struct and function that uses it. I don't think that is really an improvement.

We could create structs like TransferBufferRegion and BufferRegion that contain a pointer, an offset, and a size. In that case the BufferCopy param would be unnecessary, but then the client would have to duplicate the size fields, and UploadToTexture and DownloadToTexture would still require inputs about stride and pitch. In a way the size duplication would be similar to how CopyTextureToTexture requires that the TextureRegion dimensions match, but I am again not sure if this is a clear improvement.

I don't really see a strong reason for changing the parameter structure. It's a reasonable design as-is and I think this is mostly a matter of personal preference.

It does seem like it would just add layers of indirection without actually changing how it's called or implemented - @meyraud705, thoughts?

UploadToTexture and UploadToBuffer have similar signature but different call: order of copy parameters for UploadToTexture look reversed if you use compound literal.
SDL_GpuUploadToTexture(copypass,
    transfer_buffer,  // source
    &(SDL_GpuTextureRegion){{texture, mipmap, 0}, // destination
                            0, 0, 0, w, h, 1}, // destination parameters
    &(SDL_GpuBufferImageCopy){0, pitch, s}, // source parameters
    SDL_FALSE);
SDL_GpuUploadToBuffer(copypass,
    transfer_buffer, // source
    buffer, // destination
    &(SDL_GpuBufferCopy){src_offset, // source parameter
                         dst_offset, // destination parameter
                         size}, // global parameter
    SDL_FALSE);

And SDL_GpuDownloadFromTexture() is also different: src, src params, dst, dst params.
By moving TextureSlice out of TextureRegion all functions have same parameter order when calling them: src, dst, src_params, dst_params. I think it doesn't really add a parameter, it flatten them.
SDL_GpuUploadToTexture(copypass,
    transfer_buffer,  // source
    &(SDL_GpuTextureSlice){texture, mipmap, 0}, // destination
    &(SDL_GpuBufferImageCopy){0, pitch, s}, // source parameters
    &(SDL_GpuTextureRegion){0, 0, 0, w, h, 1}, // destination parameters
    SDL_FALSE);

After trying a few different things there is now #51

This is now in the latest gpu revision, the result is soooo much nicer to read/write so extra thanks to @meyraud705 for the feedback!


colored breaks awesome_print

Great gem! I've been using cri on a couple projects and it's been working great.  A user reported a bug on my rspec_n gem (which uses cri) and stated rspec_n breaks awesome_print when both gems are listed in a Gemfile. I traced the issue back to the colored gem that cri uses and thought I would make sure you were aware (especially since awesome_print is such a popular gem).
colored adds colorize, green, red, etc... methods directly on String.  awesome_print does the same thing.  The gem that gets listed last in a Gemfile has their implementation loaded by Bundler.  If colored is listed last, it breaks awesome_print.
Based on this comment in the awesome_print code, awesome_print seems to have compatibility with the colorize gem (an alternative to colored), but it doesn't seem to know about colored.

Here’s a potential fix: #90.
I argue that coloring text and making it bold is simple enough that it does not require a separate gem.

This is now fixed and released in Cri 2.15.4.

Thanks for the quick fix!


Restructure and reformat commands and READMEs

Mass draft PR for the changes I’m doing as they’re completed for feedback and noting changes :)
Closes #40
Fixes #53
Fixes #49
Fixes #91

Issues #40 (?) and #53 are in this PR

Utility folder is complete! I wrote a shell script to automate most of the process, so now I just run for each command and tweak the generated README.md

Maintenance is complete!

Only have the fun section left and then this is ready for review

having fun?

It was fun for the first 600 commands... now it makes my eyes water 😂😂
I love it though 🤷

Will fix up the merge conflicts here myself, don't worry about it @thewilloftheshadow 👍

Still missing the fun folder but I can do that tonight when I'm back on my main machine :+1:

Go ahead and finish the fun folder - there's a bunch of merge conflicts and "major" structural changes to the repo which I'd prefer to handle myself. Thank you again for all the work on this, it's very much appreciated!

Hi, really sad to say that I'm closing this because it's stale. This is not your fault at all; I said I'd review it and clean it up but I never did get a chance to do that. This is partly out of time issues - I don't have as much free time for programming as I did in the summer/quarantine, and partly out of motivation issues - I'm not a huge user of Yag anymore, the only server I admin is my school server which doesn't need many Yag CCs. However, that's not an excuse, I did promise to review this and I'm really sorry that I didn't get a chance to do that considering all the work you've put into this.
However, in the time that has passed since this PR was opened, it's fallen out of date with the main branch. I don't foresee having enough time/motivation to review & clean up this PR until the summer is up, at which point it'll be even more outdated. As such, I feel closing this for the time being (perhaps reopening during the summer) is the best decision I can make currently.
Sorry again for letting all your work here go to waste, it wasn't your fault at all.


pre training weight

Is there a pre training weight that can be used？

Weights for UCAS-AOD can be found here .

Weights for UCAS-AOD can be found here .

I trained my own data set, but when I verified it, I couldn't detect anything
image 0/10 /media/data/dataset/DOTA/images/0.jpg: Done. (0.354s) 0 objs image 1/10 /media/data/dataset/DOTA/images/1.jpg: Done. (0.395s) 0 objs image 2/10 /media/data/dataset/DOTA/images/2.jpg: Done. (0.362s) 0 objs image 3/10 /media/data/dataset/DOTA/images/3.jpg: Done. (0.355s) 0 objs image 4/10 /media/data/dataset/DOTA/images/4.jpg: Done. (0.342s) 0 objs image 5/10 /media/data/dataset/DOTA/images/5.jpg: Done. (0.351s) 0 objs image 6/10 /media/data/dataset/DOTA/images/6.jpg: Done. (0.350s) 0 objs image 7/10 /media/data/dataset/DOTA/images/7.jpg: Done. (0.354s) 0 objs image 8/10 /media/data/dataset/DOTA/images/8.jpg: Done. (0.360s) 0 objs image 9/10 /media/data/dataset/DOTA/images/9.jpg: Done. (0.368s) 0 objs Done. (6.344s)

I trained my own data set, but when I verified it, I couldn't detect anything
image 0/10 /media/data/dataset/DOTA/images/0.jpg: Done. (0.354s) 0 objs image 1/10 /media/data/dataset/DOTA/images/1.jpg: Done. (0.395s) 0 objs image 2/10 /media/data/dataset/DOTA/images/2.jpg: Done. (0.362s) 0 objs image 3/10 /media/data/dataset/DOTA/images/3.jpg: Done. (0.355s) 0 objs image 4/10 /media/data/dataset/DOTA/images/4.jpg: Done. (0.342s) 0 objs image 5/10 /media/data/dataset/DOTA/images/5.jpg: Done. (0.351s) 0 objs image 6/10 /media/data/dataset/DOTA/images/6.jpg: Done. (0.350s) 0 objs image 7/10 /media/data/dataset/DOTA/images/7.jpg: Done. (0.354s) 0 objs image 8/10 /media/data/dataset/DOTA/images/8.jpg: Done. (0.360s) 0 objs image 9/10 /media/data/dataset/DOTA/images/9.jpg: Done. (0.368s) 0 objs Done. (6.344s)

我也遇到这种情况，测试没有输出。没有仔细看代码，按照要求inference没有任何结果

Weights for UCAS-AOD can be found here .

The Baidu Drive link seems to be not working.
Is there another way to obtain the weights?

You can train the model yourself, just follow the README file.


Fix shader crash if using multiple underscores in identifier names

Before: __t  => m_dus__t // leads to crash due to double underscore
after: __t => m_dus_dus_t // OK
Before: __k________t; => m_dus__k_dus__dus__dus__dus_t; // leads to crash due to double underscores
After: __k________t; => m_dus_dus_k_dus_dus_dus_dus_dus_dus_dus_t // OK

Cherry-picked for 3.2.1.


Remote Monitor crash

Shift-clicking a card into the Remote Monitor yielding this...
	at shedar.mods.ic2.nuclearcontrol.containers.ContainerRemoteMonitor.slotClick(ContainerRemoteMonitor.java:55)
	at net.minecraft.inventory.Container.retrySlotClick(Container.java:517)
	at net.minecraft.inventory.Container.slotClick(Container.java:288)

with a crash, repeating about one hundred times (sorry for being very unspecific, just try replicating it).
Cards can be placed inside normally though, this is good. Clicking a card out will drop that card on the ground, which is a bit silly.

I think the numbers of the Energy Sensor Location Card may be off for RF stuff, it appears differently in WAILA vs. the card,


String could not be parsed as XML

When I run:
php ./vendor/bin/mgf --show-source app/code/core/

I observe the following exception:
[Exception]
String could not be parsed as XML

mgf [--patterns-dir [PATTERNS-DIR]] [--show-source] [--] <path>

Environment: Mac, PHP 5.6.16, Magento <IP_ADDRESS>.

+1 Getting the same issue here


Polishing

Resolves #6
Resolves #7

Merged as https://github.com/spring-projects/spring-kafka/commit/e0914c5e98804a2c89e2b2296a4d95b9f415342e


Add time namespace constant

This constant is a possible bitflag argument for unshare: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/sched.h?h=v6.6-rc1#n44
I am unsure about its support in Fuchsia, which is why I have not added the constant there.

@bors r+

:pushpin: Commit 590d2a4297fa1dcee7acbabc6d771c1275b4494a has been approved by JohnTitor
It is now in the queue for this repository.

:hourglass: Testing commit 590d2a4297fa1dcee7acbabc6d771c1275b4494a with merge 4142b5822bf8b44fa4862c1d7d3558a70e890e27...

:broken_heart: Test failed - checks-actions

Seems like some tier2 architectures aren't supported, not sure how this is generally handled.
Would the best place to add this be /src/unix/linux_like/linux/gnu/mod.rs?

Feel free to add to the targets where you want to use the item.

@bors r+

:pushpin: Commit 5c2ce3e53233f3cf57aba8d8611114ffda3d50fd has been approved by JohnTitor
It is now in the queue for this repository.

:hourglass: Testing commit 5c2ce3e53233f3cf57aba8d8611114ffda3d50fd with merge 30a8fd2c5ccf8ec005722ad80e38c068e21b4a2d...

:broken_heart: Test failed - checks-actions

Could you squash commits into one?

@bors r+

:pushpin: Commit 0c6b45b096dd039e422753844d57be13eba64491 has been approved by JohnTitor
It is now in the queue for this repository.

:hourglass: Testing commit 0c6b45b096dd039e422753844d57be13eba64491 with merge c059d435347adb30d9ffc2c79d844756dd576443...

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing c059d435347adb30d9ffc2c79d844756dd576443 to main...


Create ashish.md

Hello Team,
I have added my details to firstpr folder.

Please ask in the twitter group or discord for someone to review


Allow processing of lists in migrate-yaml

Fixes: #1346
Connects #1346

so.. this script assumes the following

support update overrides based on release notes

This is needed if the old default is foo=foo-alpha, the old override is foo=foo-alpha, the new default (mentioned in a release note) is foo=foo-beta.  If support does not update their override (or preferably remove it), the new override will be foo=foo-alpha and could break things.
As long as this is done we'll be fine (we are generating release notes with this info in mitaka), the hard part is that we haven't been doing release notes in liberty.  Once this migration has been done support is already tasked with reading the release (upgrade) notes and updating their overrides as needed.

@prometheanfire spotted one issue w/ lists.  If my user_variables.yml has this:
repo_build_upper_constraints_overrides:
- elasticsearch<2.1.0
- test

... and user_rpco_variables_defaults.yml has this:
repo_build_upper_constraints_overrides:
  - "elasticsearch==2.3.0"
  - "test"

... I'll get this spit out using migrate-yaml.py:
==== added the following ====
repo_build_upper_constraints_overrides:
- elasticsearch<2.1.0

==== removed the following list items ====
repo_build_upper_constraints_overrides:
- elasticsearch==2.3.0

That is using the --combine-old-new-lists flag, and if I add --danger DANGER, I see:
repo_build_upper_constraints_overrides:
- elasticsearch<2.1.0
- elasticsearch==2.3.0

Since both have the - test list item, I'd expect that to remain.  Even tho the - test item is in the defaults file, ansible does not merge lists specified in different overrides files (at least, to my knowledge!)  It does have a hash_behavior option which can merge hashes, but we're not using this anywhere.

@prometheanfire, noticed the following behaviour w/ dicts:
My user_variables.yml has this:
horizon_custom_uploads:
  favicon:
    dest: img/favicon.ico
    src: '{{ rackspace_static_files_folder }}/favicon.ico'
  logo:
    dest: img/logo.png
    src: '{{ rackspace_static_files_folder }}/logo.png'
  logo-splash:
    dest: img/logo-splash.png
    src: '{{ rackspace_static_files_folder }}/logo-splash.png'
  test:
    dest: this
    src: that

... and my user_osa_variables_defaults.yml has this:
horizon_custom_uploads:
  logo-splash:
    src: "{{ rackspace_static_files_folder }}/logo-splash.png"
    dest: img/logo-splash.png
  logo:
    src: "{{ rackspace_static_files_folder }}/logo.png"
    dest: img/logo.png
  favicon:
    src: "{{ rackspace_static_files_folder }}/favicon.ico"
    dest: img/favicon.ico

When I run migrate-yaml.py, I see this:
horizon_custom_uploads.test:
  dest: this
  src: that

Is that expected?

yes

I noticed the same @mattt416 did with the dictionary when using the following user_variables.yml entry:
neutron_neutron_conf_overrides:
  DEFAULT:
    l3_ha: False
  nova:
    endpoint_type: internal

This entry isn't defined in /opt/rpc-openstack/rpcd/etc/openstack_deploy/user_osa_variables_defaults.yml, but the migrate-yaml.py script still strips out the "l3_ha" part:
neutron_neutron_conf_overrides.nova:
  endpoint_type: internal

@alextricity25 --info should get you all removed items iirc.
it was brought up that it might be better to not combine the two defaults files and compare them to one file but to compare files based on their use.  Just compare osa defaults to osa overrides and likewise with rpco.  This would change the script to take in two files, the default and overrides but sounds like a good idea.
The mapping we would put in the upgrade script would be like this iirc.
user_osa_defaults == user_variables
user_rpco_defaults == user_extra_variables
Let me know if this change is wanted and I can make it fairly easily.

Hi @alextricity25, that weird dict behaviour is because it was assumed that the dicts in different files would merge once ansible runs but as that is not the case we need to just print out the entire dict from the original overrides file.  The same should happen with lists -- if a list is specified in the  overrides file and it either doesn't exist in the defaults file or is different than the default value then it should just spit out the original value.  It'd be great if it could add a comment before (--danger DANGER mode here) showing the updated default and instructing the deployer to examine the difference.
On a side note @prometheanfire, now that we're not doing any weird list/dict merging do you actually need to use the deepmerge library?  Not having this dependency would actually be good.

Since you can't insert comments w/ PyYAML, how about doing something like this where conflicting defaults are added to the YAML itself:
MITAKA_UPGRADE_CONFLICTING_DEFAULTS:
  cinder_service_backup_program_enabled: false
  keystone_database_max_pool_size: '{{ db_max_pool_size }}'
  keystone_database_pool_timeout: '{{ db_pool_timeout }}'
  keystone_token_driver: sql
  keystone_token_provider: uuid
  neutron_db_max_overflow: '{{ db_max_overflow }}'
  neutron_db_max_pool_size: '{{ db_max_pool_size }}'
  neutron_db_pool_timeout: '{{ db_pool_timeout }}'
  neutron_neutron_conf_overrides:
    DEFAULT:
      l3_ha: false
  nova_db_max_overflow: '{{ db_max_overflow }}'
  nova_db_max_pool_size: '{{ db_max_pool_size }}'
  nova_db_pool_timeout: '{{ db_pool_timeout }}'
aodh_db_ip: <IP_ADDRESS>
aodh_db_port: 27017
aodh_db_type: mongodb
apply_security_hardening: false
ceilometer_api_workers: 2
ceilometer_collector_workers: 2
ceilometer_db_ip: <IP_ADDRESS>
ceilometer_db_port: 27017
ceilometer_db_type: mongodb
ceilometer_notification_workers: 2
cinder_osapi_volume_workers: 2
cinder_service_backup_program_enabled: true
debug: true
galera_innodb_buffer_pool_size: 512M
galera_innodb_log_buffer_size: 32M
galera_wsrep_provider_options:
- option: gcache.size
  value: 32M
glance_api_workers: 2
glance_default_store: rbd
glance_registry_workers: 2
heat_api_workers: 2
heat_engine_workers: 2
horizon_wsgi_processes: 2
horizon_wsgi_threads: 2
keystone_database_max_pool_size: 120
keystone_database_pool_timeout: 60
keystone_token_driver: keystone.token.persistence.backends.sql.Token
keystone_token_provider: keystone.token.providers.uuid.Provider
keystone_wsgi_processes: 2
lxc_cache_resolvers:
- nameserver <IP_ADDRESS>
lxc_container_template_apt_components:
- main
- universe
lxc_net_address: <IP_ADDRESS>
lxc_net_dhcp_range: <IP_ADDRESS>,<IP_ADDRESS>
lxc_net_netmask: <IP_ADDRESS>
neutron_db_max_overflow: 60
neutron_db_max_pool_size: 120
neutron_db_pool_timeout: 60
neutron_l3_agent_ini_overrides:
  DEFAULT:
    handle_internal_only_routers: true
neutron_metadata_workers: 1
neutron_ml2_conf_ini_overrides:
  ml2:
    extension_drivers: ''
neutron_neutron_conf_overrides:
  nova:
    endpoint_type: internal
neutron_rpc_workers: 1
nova_conductor_workers: 2
nova_db_max_overflow: 60
nova_db_max_pool_size: 120
nova_db_pool_timeout: 60
nova_libvirt_images_rbd_pool: vms
nova_metadata_workers: 2
nova_osapi_compute_workers: 2
repo_build_upper_constraints_overrides:
- elasticsearch<2.1.0
swift_account_server_workers: 2
swift_container_server_workers: 2
swift_object_server_workers: 2
swift_proxy_server_workers: 2
tempest_public_subnet_cidr: <IP_ADDRESS>/22
tempest_volume_backup_enabled: true

The operator can then go through and figure out what needs fixing and then remove the MITAKA_UPGRADE_CONFLICTING_DEFAULTS entry.

Ya, once we figure out the final behavior we can prune the code.
The first merge is going to be by hand and then I'll make the program output that same data (comments notwithstanding).
I get demo files we can use 'soon'.

Works as expected, but a few suggestions before this goes in.

I like this new behavior and would love to see some more documentation around usage.
Maybe the upgrade docs are a good place for that, but last I checked L->M upgrade docs weren't up yet.
Giving this my :+1: now to get this rolling

👎 until Matt's and my feedback is addressed.
Regarding whether or not we want to override --output-file we could always just open it append mode that way we never lose the previous run's data.

As far as docs go, I'm not sure if we should do that now or when the upgrade story is closer to completion.

👀 Looks okay to me. 👍

👍


Storage account max character requirements incorrect.

In the comments on the script it states the following:
# Define parameters
# $StorageAccountName is the name of an existing storage account that you want to join to AD
# $SamAccountName is the name of the to-be-created AD object, which is used by AD as the logon name
# for the object. **It must be 20 characters or less and has certain character restrictions**.

Please change this to 15 characters or less, since it is not possible to join a computer object with a longer name (NETBIOS restrictions).
Also, the usage of AES256 requires the storage account name and samaccountname to be identical.

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

ID: 7a1a9f3d-5733-012a-a0d7-c00ec21b9232
Version Independent ID: 1e70ab95-9488-5aa3-b8ef-e58b3e0067bb
Content: Enable AD DS authentication for Azure file shares
Content Source: articles/storage/files/storage-files-identity-ad-ds-enable.md
Service: azure-file-storage
GitHub Login: @khdownie
Microsoft Alias: kendownie

@KrazeyKami
Thanks for your feedback! We will investigate and update as appropriate.

@KrazeyKami thank you for pointing out the NETBIOS restrictions. We will update the doc to say 15 chars instead. Regarding your second point, the most recent AzFilesHybrid module doesn’t have this requirement. Customers can choose a long name for storage account and a short name for samaccountname, as shown in the code example.

#please-close

#please-close


Link between Livebooks

I have experiments where it'd be nice to link Livebooks. It's something that you consider?

For the files itself using cross-references is ok, because it's essentially markdown. However when you open a .livemd file in Livebook, you create a session - the interactive, collaborative notebook form. At that point such cross-references would no longer make sense, because the links refer to notebook files, rather than sessions. Also note that you can use the same file to start multiple sessions (using "Fork" multiple times). We could make the links behave in some way, but I don't think there's a natural mapping of what they should mean in the world of sessions.


Exception when running on GPU

Hi,
I get the following error when I run on GPU. When running on CPU everything works fine:
Input dimensions are:
train: (72435, 413)
target: (72435,)
Estimator 0/1430, Train metric: 0.9326
/local_disk0/.ephemeral_nfs/envs/pythonEnv-10f4fbcf-9bbd-4b56-a409-4a10041ef79a/lib/python3.9/site-packages/pgbm/pgbm.py:298: UserWarning: FALLBACK path has been taken inside: compileCudaFusionGroup. This is an indication that codegen Failed for some reason.
To debug try disable codegen fallback path via setting the env variable `export PYTORCH_NVFUSER_DISABLE=fallback`
To report the issue, try enable logging via setting the envvariable ` export PYTORCH_JIT_LOG_LEVEL=manager.cpp`
 (Triggered internally at  ../torch/csrc/jit/codegen/cuda/manager.cpp:237.)
  _create_tree(X_train_splits, gradient,
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-10f4fbcf-9bbd-4b56-a409-4a10041ef79a/lib/python3.9/site-packages/pgbm/pgbm.py", line 1135, in fallback_function
            # Compute total split_gain
            split_gain_tot = (Gl * Gl) / (Hl + reg_lambda) +\
                            (G - Gl)*(G - Gl) / (H - Hl + reg_lambda) -\
                             ~~~~~~
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
File <command-1911103480853639>:22
     19 train_final_pgbm_dense = train_final_pgbm.toarray()
     21 print("fitting ngboost")
---> 22 pgbm_model.fit(X = train_final_pgbm_dense, y = target_pgbm)
     24 pgbm_end_time = datetime.now()
     26 pgbm_runtime = (pgbm_end_time - pgbm_start_time).total_seconds()

File /local_disk0/.ephemeral_nfs/envs/pythonEnv-10f4fbcf-9bbd-4b56-a409-4a10041ef79a/lib/python3.9/site-packages/pgbm/pgbm.py:1528, in PGBMRegressor.fit(self, X, y, eval_set, sample_weight, eval_sample_weight, early_stopping_rounds)
   1526 if self.init_model is None:
   1527     self.learner_ = PGBM()
-> 1528     self.learner_.train(train_set=(X, y), valid_set=eval_set, params=params, objective=self._objective,
   1529                  metric=self._metric, sample_weight=sample_weight,
   1530                  eval_sample_weight=eval_sample_weight)
   1531 else:
   1532     self.learner_.train(train_set=(X, y), valid_set=eval_set, objective=self._objective,
   1533              metric=self._metric, sample_weight=sample_weight,
   1534              eval_sample_weight=eval_sample_weight)

File /local_disk0/.ephemeral_nfs/envs/pythonEnv-10f4fbcf-9bbd-4b56-a409-4a10041ef79a/lib/python3.9/site-packages/pgbm/pgbm.py:298, in PGBM.train(self, train_set, objective, metric, params, valid_set, sample_weight, eval_sample_weight)
    294 sample_features = torch.arange(self.n_features, device=self.torch_device) if self.feature_fraction == 1.0 else torch.randperm(self.n_features, device=self.torch_device)[:self.feature_samples]
    295 # Create tree
    296 self.nodes_idx, self.nodes_split_bin, self.nodes_split_feature, self.leaves_idx,\
    297 self.leaves_mu, self.leaves_var, self.feature_importance, yhat_train =\
--> 298     _create_tree(X_train_splits, gradient,
    299                 hessian, estimator, train_nodes,
    300                 self.nodes_idx, self.nodes_split_bin, self.nodes_split_feature,
    301                 self.leaves_idx, self.leaves_mu, self.leaves_var,
    302                 self.feature_importance, yhat_train, self.learning_rate,
    303                 self.max_nodes, samples, sample_features, self.max_bin,
    304                 self.min_data_in_leaf, self.reg_lambda,
    305                 self.min_split_gain, self.any_monotone,
    306                 self.monotone_constraints, self.monotone_iterations)
    307 # Compute new gradient and hessian
    308 gradient, hessian = self.objective(yhat_train, y_train, sample_weight)

RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-10f4fbcf-9bbd-4b56-a409-4a10041ef79a/lib/python3.9/site-packages/pgbm/pgbm.py", line 1135, in fallback_function
            # Compute total split_gain
            split_gain_tot = (Gl * Gl) / (Hl + reg_lambda) +\
                            (G - Gl)*(G - Gl) / (H - Hl + reg_lambda) -\
                             ~~~~~~ <--- HERE
                                (G * G) / (H + reg_lambda)
            # Only consider split gain when enough samples in leaves.
RuntimeError: The size of tensor a (2) must match the size of tensor b (256) at non-singleton dimension 1

Thanks - I'll have a look at it this week. It appears that the CUDA kernel is built incorrectly on newer CUDA versions. I am trying to reproduce this bug.

Maybe this is also relevant:
pgbm import works only for some python and cuda versions.
I could import pgbm without errors only with the following configuration under Linux. In all other cases I got "error building extension 'split_decision'
python 3.9
conda install pytorch==1.12.0 torchvision==0.13.0 cudatoolkit=11.3 - pytorch

Then, I installed cuda_12.0.0_525.60.13_linux.run driver from nvidia website and configured PATH and LD_LIBRARY_PATH
 export PATH = /usr/local/cuda-12.0/bin${PATH:+:${PATH}}
 export LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}:/usr/local/cuda-12.0/lib64

Hi,
I've been trying to reproduce but unsuccesful unfortunately.... For now, there's a faster version of PGBM available on CPU through a fork on scikit-learn's HistGradientBoostingRegressor (docs). Maybe that can already help you. In the meantime, I'm still trying to reproduce.

Hi,
I've been trying to reproduce but unsuccesful unfortunately.... For now, there's a faster version of PGBM available on CPU through a fork on scikit-learn's HistGradientBoostingRegressor (docs). Maybe that can already help you. In the meantime, I'm still trying to reproduce.

Hi, Thanks for the information.
I've managed to run it on linux using cuda 11.1 and 11.3. Tried to replicate same approach on Windows failed. So currently my problem is to run PGBM on Windows.

Closing this issue for inactivity, hope it was resolved on your end....


Android Handle response with "Please upgrade app"

In response from what request? /wakeup, /new-gcs-urls, /dispatch?
Or a new specific request just for that?

Once the obsolescence has been detected, offer to open https://play.google.com/store/apps/details?id=net.coolmaze.coolmaze.
Be careful with the app id, see #294

        Intent playStoreIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=net.coolmaze.coolmaze"));
        startActivity(playStoreIntent);

Implemented on /dispatch response (success only, for now).


Documenting the hakaru command

There is no explicit documentation of the hakaru command right now. What should be included on this page?

I think explaining the two ways the hakaru command can be run is a good start now, and talking about the weights when that functionality is added.

There is a second way to run the command? I only know of hakaru program.hk

Yep. It's designed for running markov chains. It's used in
http://hakaru-dev.github.io/transforms/mh/

Ah, I see it. Haven't read that far into the manual yet.
Is it as complex as the example (mh target.hk proposal.hk | simplify - | hakaru - target.hk | head)? Or can it be run as hakaru - target.hk? What is the difference between the two?

When passed two programs like hakaru transition.hk init.hk, the first program transition.hk has type a -> measure(a) while init.hk has type measure(a). What that command does is take a draw from init.hk then passing that sample to transition.hk as input, then keep passing the resulting draw into transition.hk

- is a convention for talking about what comes from standard input. In principle we could have done
mh target.hk proposal.hk | simplify - > transition.hk
hakaru transition.hk target.hk | head

So for hakaru transition.hk init.hk only one sample is drawn from init.hk (the first one) and then all other samples are from transition.hk outputs?

Yep.

Ok, got it.
Regarding -, is this a commonly known thing (i.e. should it be mentioned somewhere)? I've personally never seen it before, but I haven't worked in the command line extensively either.

It comes up in some UNIX tools like vi and grep. It's just a convention, https://unix.stackexchange.com/questions/16357/usage-of-dash-in-place-of-a-filename

Ok, not noteworthy for Hakaru then.
So this page should include a quick introduction (e.g. " The hakaru command is used to generate samples from your Hakaru model.") and then usage instructions and small examples?

Sounds good. Also the dash thing is convention but I don't think it's widely known so mentioning it probably good since we do use it in examples.

Ok. Where do you think the best place to bring it up is? This new hakaru page maybe?

Yep that hakaru page is a good place. It gets used in nearly all the commands but not enough that it makes sense anywhere else.

And the last question for now is - where should this page go? Would it go with the transformations or the introduction?

Introduction.

Alright, the first attempt at documenting the hakaru command is in commit 7726548ce12619b0cf94f9d2cadab08ec93eb4bf

I've added dash documentation in commit af0592f54158f5dbf9e9f716b2f5fc63aff37912.
Did we still want to expand this page with a description of weights in Hakaru?

I think so.

Other than saying "The hakaru command prints out weights for each generated sample. Sample weights are typically all 1, but some programs will cause variances.", how should I explain weights in Hakaru?

So the hakaru command is an importance sampler. Every sampler is designed to approximate the expectation of some probability distribution. Do you think it would be helpful if you included how the samples and their weights are used to compute an approximation of this expectation?

Examples are always more useful than a general description.

Maybe an example like like a biased coin like
weight(3, return true) <|> weight(1, return false)
And then using my awk script to do the count
echo "weight(3, return true) <|> weight(1, return false)" | hakaru - | head -n 2000 | awk '{a[$2]+=$1}END{for(i in a) print i,a[i]}'
false 2028
true 5972

(53f51fd48d02a845309f6b9d85f25bfb43894ba2) I've replaced the normal distribution example with the biased coin and introduced hakaru as an importance sampler in the preamble. What else needs to be done for this page do you think?

I don't see how either the normal(0,1) example or the weight(3, return true) <|> weight(1, return false) example shows "how the samples and their weights are used to compute an approximation of this expectation", because the weights in both examples are constant across samples and moreover ignored by subsequent processing. So the current text fails to address @JacquesCarette's desire to "expand this page with a description of weights in Hakaru".

I am missing some conceptual information for this. I don't think that a single line about weights in the beginning is enough to explain Hakaru weights to someone else. The example is supposed to complement this information, not stand alone. It should (hopefully) make more sense once I understand how the weights work myself.

Yes, so how might I help you (or anyone else) understand weights?
May I suggest you try the following two-part exercise, which helped some other people in my experience?

Do https://github.iu.edu/ccshan/prob2017/blob/master/0110/README.md while reading https://github.iu.edu/ccshan/prob2017/blob/master/papers/eddy-bayesian.pdf
Do https://github.iu.edu/ccshan/prob2017/blob/master/0112/README.md

There are a few changes here now (latest commit 851a36e10ea36ba04116b2dd75d4edf5f4d6ea82):

I broke the awk script example into two parts, which explicitly outlines counting samples and counting weights
Clarified how Hakaru handles weights (starts as 1.0 and is changed by other Hakaru processes/primitives)
Added some background knowledge and a reference for Monte Carlo methods and importance sampling
Other than perhaps finding an example of a Hakaru program generating different weights across samples, I don't think that there is anything else to do for this page.

Other than perhaps finding an example of a Hakaru program generating different weights across samples, I don't think that there is anything else to do for this page.

Agreed. How about we replace biasedcoin.hk by the following:
i <~ categorical([0.25,0.75])
weight([2,1][i],
return [true,false][i])

Sure. Is this modelling a particular problem or is this more of a toy problem? I want to be able to tell people what is happening in the model (which is why the current example section starts off with "The "trick coin" is a basic example that is used to introduce the probability or expectation of an outcome. Suppose we are given an unfair coin that follows the distribution:")

Let me adjust the numbers (but not the structure) of the program to make it match the disintegration of examples/burglary.hk, applied to alarm = true:
burglary <~ categorical([0.0001, 0.9999])
weight([0.95, 0.01][burglary],
return [true,false][burglary])

This example is discussed in Section 2 of "Probabilistic inference by program transformation in Hakaru (system description)".

Is this an accurate description? The line burglary <~ categorical([0.0001, 0.9999] makes me unsure:
"To demonstrate weights in Hakaru, a sample problem of a bulglary alarm is adapted from Pearl's textbook on probabilistic reasoning[^2]. In this problem, the burglary alarm
in your home has been triggered. There is a 95% chance that a burglary is taking place, and a 1% chance that it is a false alarm. From known data, there is a 0.1% chance
that a burglary is taking place and a 99.9% chance that the alarm was triggered by another event. This can be modelled in Hakaru by the program:"

Latest updates in fd0ba43eb054e96232bfb1d0de5b6a2c6bc44cac

Thanks; I commented on that commit.

Should we consider this page complete for now?

Fine with me!

Ok, I've deployed all the changes. Thanks for all the help!


Floats instead of CGFloat

Regular constraints use CGFloats, whereas yours use Floats, and the two are not interchangeable because of type safety. Is there any way, other than redefining my variables, that I can use this class? Our designer uses an 8-point grid, and I have a constant called 'margin' defined at the top level as CGFloat
otherwise love the library

Thank you for your issue. You're right, using Float instead of CGFloat is a controversial decision that I made right at the start of AutoLayoutKit for Swift.
The thing is that the following code doesn't compile:
// view setup, just for reference
let parentView = UIView(frame: CGRectZero)
let childView = UIView(frame: CGRectZero)
parentView.addSubview(childView)

let margin = 4.0
let type = margin.dynamicType // Swift.Double

// doesn't compile
NSLayoutConstraint(item: childView, attribute: .Left, relatedBy: .Equal, toItem: parentView, attribute: .Left, multiplier: 1.0, constant: margin)

The compiler says Could not find member '.Left' but that's just because type inference is messed up due to margin being a Swift.Double instead of a CGFloat.
One fix is to add the type explicitly to margin:
let margin:CGFloat = 4.0
let type = margin.dynamicType // CoreGraphics.CGFloat

// compiles. CGFloat(margin) in this call would have worked as well.
NSLayoutConstraint(item: childView, attribute: .Left, relatedBy: .Equal, toItem: parentView, attribute: .Left, multiplier: 1.0, constant: margin)

So my first solution to this problem was to 'fix' this in Manuscripts API by using Float instead of CGFloat, which is obviously wrong because it doesn't match the Swift default floating point type and it doesn't match the NSLayoutConstraint floating point type as well.
But when I think about changing the type (which will most likely break the API, which is OK as long as we're below 1.0.0) I'm not quite sure which path to take. CGFloat is stored as a Double internally anyways and always having to declare CGFloat isn't really pleasant.
Would you care to discuss this with me? I'm open for your thoughts.

Thanks for the response Florian,
I think switching it to CGFloat is important, since that’s the unit used all across the UI. However, it’s not a huge pain to just set up let fMargin = Float(margin) and use the so called float-margin from there on in the class.
Also, you’re not entirely correct that a CGFloat is a Double internally, it’s architecture specific: on 32-bit phones (i.e. iPhone 5 and below, which we unfortunately still have to support) a CGFloat is represented as a float, whereas on 64-bit devices it is a Double, since that’s the native word-size. Whether or not this plays into Manuscript, I’m not certain.
It would be a pain to have to refactor the library in terms of CGFloats, but ultimately I think it would only be tedious, not technically challenging.
—
Alex Popov Jr.Lead Mobile Developer @ BitLit
On Friday, May 15, 2015 at 1:18 AM, Florian Krüger<EMAIL_ADDRESS>wrote:
Thank you for your issue. You're right, using Float instead of CGFloat is a controversial decision that I made right at the start of AutoLayoutKit for Swift.
The thing is that the following code doesn't compile:
// view setup, just for reference
let parentView = UIView(frame: CGRectZero)
let childView = UIView(frame: CGRectZero)
parentView.addSubview(childView)
let margin = 4.0
let type = margin.dynamicType // Swift.Double
// doesn't compile
NSLayoutConstraint(item: childView, attribute: .Left, relatedBy: .Equal, toItem: parentView, attribute: .Left, multiplier: 1.0, constant: margin)
The compiler says Could not find member '.Left' but that's just because type inference is messed up due to margin being a Swift.Double instead of a CGFloat.
One fix is to add the type explicitly to margin:
let margin:CGFloat = 4.0
let type = margin.dynamicType // CoreGraphics.CGFloat
// compiles. CGFloat(margin) in this call would have worked as well.
NSLayoutConstraint(item: childView, attribute: .Left, relatedBy: .Equal, toItem: parentView, attribute: .Left, multiplier: 1.0, constant: margin)
So my first solution to this problem was to 'fix' this in Manuscripts API by using Float instead of CGFloat, which is obviously wrong because it doesn't match the Swift default floating point type and it doesn't match the NSLayoutConstraint floating point type as well.
But when I think about changing the type (which will most likely break the API, which is OK as long as we're below 1.0.0) I'm not quite sure which path to take. CGFloat is stored as a Double internally anyways and always having to declare CGFloat isn't really pleasant.
Would you care to discuss this with me? I'm open for your thoughts.
—
Reply to this email directly or view it on GitHub.

You're welcome. Thank you for the quick response.
I got your point. Forgot about the 'old' devices a bit - sorry about that ^^ I'll refactor the code and push it on a separate branch  in a bit as it's really not a great deal. And it doesn't make any difference for Manuscript. The library ultimately generates NSLayoutConstraint instances like we would do manually without the wrapper. As it says on the box: No Black Magic ;)

Great,
I’m using Manuscript at work, but I’ll integrate the CGFloat branch into our nightly builds and see how it goes.
Thanks a lot for your work, your alignAllEdges call alone is something I’ve been meaning to write for ages.
—
 Alex Popov Jr. Lead Mobile Developer @ BitLit
On Friday, May 15, 2015 at 1:50 AM, Florian Krüger<EMAIL_ADDRESS>wrote:
You're welcome. Thank you for the quick response.
I got your point. Forgot about the 'old' devices a bit - sorry about that ^^ I'll refactor the code and push it on a separate branch  in a bit as it's really not a great deal. And it doesn't make any difference for Manuscript. The library ultimately generates NSLayoutConstraint instances like we would do manually without the wrapper. As it says on the box: No Black Magic ;)
—
Reply to this email directly or view it on GitHub.

Please check the hotfix/CGFloat. I'd love to hear what you think!


Create & Test Namespace Scraping

Current dependencies on/for this PR:

main

PR #864

PR #912

PR #913   (this PR)

PR #914

This comment was auto-generated by Graphite.


Resources template added

Pull Request
Description
I have Implemented a new issue template for users to easily add new resources to the repository. This template will streamline the process and ensure consistency in how resources are added.
Fixes #797
Type of change

[ ] Adding a new Resource
[ ] Adding a new Category
[X] Documentation enhancement or fixes
[ ] Website enhancement or fixes

Checklist:

[X] I read carefully CONTRIBUTING.md
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation

@jfmartinz  please check it.


Correct way to wait for key press...

Is there a correct way to wait for a key press? The example on this page shows one way, but it's busy-waiting, which hurts my soul.

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

ID: 1607662b-1491-9baa-da9f-8fd3d3ee2c9a
Version Independent ID: 42a68574-47ed-5bb3-e7bc-3e1c9e5eb38f
Content: _kbhit
Content Source: docs/c-runtime-library/reference/kbhit.md
Product: visual-cpp
GitHub Login: @corob-msft
Microsoft Alias: corob

@aboveyou00 The _kbhit function does one thing: report whether a character is available from the input hardware without blocking. (It may actually block if you've redirected input from a source other than the hardware.) You could sleep, or do other work, between checks of the input buffer state, rather than spin. If you want to get into the Windows API, you could conceivably roll your own event loop with handler callbacks for keyboard and other events, but you probably wouldn't be using _kbhit in that case. Reading Input Buffer Events shows one way to do this.

Per your suggestion, I ended up adding a small sleep between checks using the c++11 chrono and thread standard libraries. This worked pretty well for my use case.
Thank you for your help!

@aboveyou00 Happy to help. :)


Collection get by name does not work

Maybe im a bit silly :D
I try to get a guild role by name
$guild->roles->get('name', 'Role-Name');
but this returns NULL
Is there a easy way to get a collection part item by name? Otherwise i would suggest to create a getByName() method on the repositories :)

foreach ($guild->roles as $role) {
     if ($role->name == "string") {
          return true;
     }
}

Yeah, that code works
But that code will not fork for user or other collections.
For user its "username" ie.
It would be great if the collection support that feature otherwise i must include a helper function to not duplicate code :D

the username is not unique

@Kanuuu, you mean like https://github.com/discordjs/collection/blob/master/src/index.ts#L283 right?

I think so. I'm not so good at nodejs code.
On a fork i added to the RoleRepository following code
public function getByName(string $name): Role
    {
        foreach ($this->collection as $part) {
            if ($part->name === $name) {
                return $part;
            }
        }
    }

function getKey($key, $value) {
foreach ($this->collection as $part) {
if ($part->$key === $value) {
return $part;
}
}
}
maybe change it to

idk

I think that code could work on all repositories than.
I work local also with php 7.4 so do not mind :D

same with 7.3.21

@ windows 10 pro

@Kanuuu, you mean like https://github.com/discordjs/collection/blob/master/src/index.ts#L283 right?

this method is great
@davidcole1340 it's exciting if you add this
xd

In my first bot with node i had this methods
 const roleMaline = message.guild.roles.find(role => role.name === "Maline");     const emoteMaline = client.emojis.find(emoji => emoji.name === "Maline"); let perms = client.guilds.find(guild => guild.id === member.guild.id).members.find(member => member.id === client.user.id).permissions;
That was easy and nice to implement

Can you try on the latest version of the master branch?

Now its working <3
   $this->client->on('ready', function () {
            echo "Bot is ready." . PHP_EOL;
            echo $this->client->guilds->get('id',<PHONE_NUMBER>43993870)->roles->get('name', 'Flusseln')->name . PHP_EOL;
        });

Bot is ready.
Flusseln


hide the border of popup widget

Could you elaborate on what your usecase is for this feature? Maybe there is already a way to accomplish it, without needing a popup.


Fix edit_application_command with global scope.

Summary
A condition has errors when editing globally scoped command. Firstly, #type is called on object that might be nil, which results into:
"Exception: #<NoMethodError: undefined method `type' for nil:NilClass>" in the logs.
Secondly, fix the method name itself as it should be edit_global_command, since guild commands are dealt with in previous branch.

Excuse the brevity of the following sections, but this is a very simple one-line fix for an error encountered when programming my bot.

Fix copy-paste typos.

Fixed
Fix
Exception: #<NoMethodError: undefined method type' for nil:NilClass>`
and (once the passed in arguments is fixed)
Exception: #<Discordrb::Errors::UnknownError: Discordrb::Errors::UnknownError>

@swarley I included the fix as proposed here in #254, which is now merged.

That's interesting given that the diff looked to be in order

Sorry about that, that's on me for not being more proactive in checking through these. I appreciate the work but I'll be closing this now that it's redundant.


Debugger pin calls getuser(), which can fail inside Docker

When launching an application with the Werkzeug debugger in Docker with a custom UID, the debugger fails while trying to construct a PIN.
Traceback (most recent call last):
  File "/usr/local/bin/flask", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 894, in main
    cli.main(args=args, prog_name=name)
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 557, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 771, in run_command
    threaded=with_threads, ssl_context=cert)
  File "/usr/local/lib/python3.7/site-packages/werkzeug/serving.py", line 751, in run_simple
    application = DebuggedApplication(application, use_evalex)
  File "/usr/local/lib/python3.7/site-packages/werkzeug/debug/__init__.py", line 258, in __init__
    if self.pin is None:
  File "/usr/local/lib/python3.7/site-packages/werkzeug/debug/__init__.py", line 268, in _get_pin
    self._pin, self._pin_cookie = get_pin_and_cookie_name(self.app)
  File "/usr/local/lib/python3.7/site-packages/werkzeug/debug/__init__.py", line 148, in get_pin_and_cookie_name
    username = getpass.getuser()
  File "/usr/local/lib/python3.7/getpass.py", line 169, in getuser
    return pwd.getpwuid(os.getuid())[0]
KeyError: 'getpwuid(): uid not found: 1001'

https://github.com/pallets/werkzeug/blob/6fc07fec6dfd21690c9909f8c7c8e744d55afba7/werkzeug/debug/__init__.py#L148
It seems that Werkzeug fails on this line when trying to get the user with $UID specified in docker-compose.yml.
Maybe a workaround could be create the user group and the user inside the docker instance, but it's not scalable.
docker-compose.yml:
image: local/imageTest
build:
    context: .
    dockerfile: dockerfiles/Dockerfile
    args:
      BUILD_ENV: dev
user: $UID
volumes:
    - ./:/code
env_file:
    - .env.sample
    - .env
environment:
    HOME: /code
    FLASK_APP: "test/web.py"
    FLASK_DEBUG: "1"
depends_on:
    - postgres
ports:
    - 5050:5000
command: ["flask", "run", "--host=<IP_ADDRESS>"]

Dockerfile:
FROM library/python:3.7.0

WORKDIR /code/

ARG BUILD_ENV=prod

RUN apt-get update \
 && apt-get install -y python3-dev python3-psycopg2 python3-gdal libgdal-dev \
 && rm -rf /var/lib/apt/lists/*

ADD requirements*.txt /code/
RUN pip3 install -U pip setuptools
RUN pip3 install -r requirements-${BUILD_ENV}.txt
ADD . /code/

ENV PYTHONPATH "/code"

That's because your container provides a broken environment where your /etc/passwd has no entry matching the UID. Run useradd with a fixed UID in your Dockerfile to create the user properly.

I just tried this with the python:3.7-alpine official image and did not have an issue calling getpass.getuser(), it returned 'root'.

The problem is that he is using it for development so he's setting the container UID to his regular UID to avoid issues with files created from inside the container.

I just tried this with the python:3.7-alpine official image and did not have an issue calling getpass.getuser(), it returned 'root'. It sounds like an issue with the image you're using.

As ThiefMaster points here

The problem is that he is using it for development so he's setting the container UID to his regular UID to avoid issues with files created from inside the container.

The problem comes from docker-compose.yml in user: $UID. With root it works by default.
And finally:

That's because your container provides a broken environment where your /etc/passwd has no entry for the UID. Run useradd with a fixed UID in your Dockerfile to create the user properly.
However, since this is just in the debugger, and we already skip the username e.g. on GAE, I think we could just catch KeyError here as well: https://github.com/pallets/werkzeug/blob/master/src/werkzeug/debug/init.py#L165

That's true, it's something like I mention here:

Maybe a workaround could be create the user group and the user inside the docker instance, but it's not scalable.

If I add the following to the image it would work, but it's a pity because I cannot manage N users.
RUN groupadd -g 1000 developer1000 && useradd -u 1000 -g 1000 developer1000 && \
    groupadd -g 1001 developer1001 && useradd -u 1001 -g 1001 developer1001`

Thanks for your quick responses anyway ;)


Jimp.loadFont() Error: ENOENT: no such file or directory

When I try to load a font from a .fnt file generate by Littera I get the error:
{ Error: ENOENT: no such file or directory, open 'https://s3-us-west-2.amazonaws.com/botecofc/fonts/black64/font.fnt'
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'https://s3-us-west-2.amazonaws.com/botecofc/fonts/black64/font.fnt' }
Error: ENOENT: no such file or directory, open 'https://s3-us-west-2.amazonaws.com/botecofc/fonts/black64/font.fnt'

I tried to load from a S3 bucket with public permission and also from a local folder using the following:
Jimp.loadFont('https://s3-us-west-2.amazonaws.com/botecofc/fonts/black64/font.fnt');
When I use the default font Jimp.FONT_SANS_64_WHITE everything works. I don't know if the problem is on the converted file or on the library. Is there a way to test the converted fnt and see if it's right?

I solved my problem I put to directory only fnt file. When I generate BMFont you should get fnt and png file. I put png to directory with fnt file and now it works well. Please look at source code https://github.com/oliver-moran/jimp/blob/master/index.js#L2578

loadFont does not currently load fonts from a url. This enhancement is tracked in #448. closing


Adds Website GH build workflow

Use a GitHub Action to build and publish the website based on tags. The actions are running on my repo https://github.com/Shazwazza/lucenenet/actions. Just waiting on infra to deal with the PAT https://issues.apache.org/jira/browse/INFRA-21453

Actually, i'll close this one for now so that any downstream changes I make aren't notified upstream.


PermissionCheck: permission check result is: 601

Basic Information
Device type: ______华为V10_全网通
OS version: ________
EasyPermissions version: ________3.0.0
gradle:3.5.3   Androidx
Describe the problem
程序有崩溃，在日志中发现这样的代码：
02-14 16:49:27.386 15560 15560 E PermissionCheck: permission check result is: 601

@lovehahazy sorry this is not enough information to debug.  I would need code to reproduce the problem and more logs that show exactly where this code is coming from!  If you need help but can't provide those things, please try StackOverflow.

Sorry to bother you. I think I need to further identify the root cause of the problem. Maybe the problem is somewhere else. If I can further prove that the problem is from here, I will leave a message. I'm really sorry.
------------------ 原始邮件 ------------------
发件人: "Sam<EMAIL_ADDRESS>发送时间: 2020年2月15日(星期六) 凌晨1:21
收件人<EMAIL_ADDRESS>抄送: "畅想"<1171660883<EMAIL_ADDRESS>主题: Re: [googlesamples/easypermissions] PermissionCheck: permission check result is: 601 (#297)
@lovehahazy sorry this is not enough information to debug.  I would need code to reproduce the problem and more logs that show exactly where this code is coming from!  If you need help but can't provide those things, please try StackOverflow.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.


Backup to Object Storage

As a SIMS team member, I want our recovery process to be more resilient to the loss of the persistent volume claim or openshift environment.
Acceptance Criteria:

[ ] Database backups to Object storage
[ ] Object storage credentials/bucket unique per environment
[ ] Restore process verified and documented

@JasonCTang  to discuss with Nino and take forward or close.

@JasonCTang and @bidyashish to discuss feasibility and how to move forward.

Release tag added - may be good for SIMSMAS as research item.


[DOC] Add documentation for setting montage order

Reference issue
Example: Fixes #5619
What does this implement/fix?
Adds documentation that explains that the montage must be set after adding a reference.
Additional information
Should I also add a warning that runs inside the code itself after running set_montage?

Should I also add a warning that runs inside the code itself after running set_montage?

You could logger.info something but I think documenting makes the most sense. Maybe add something to the Notes of add_reference_channels that says it should be run before set_montage?

Should I also add a warning that runs inside the code itself after running set_montage?

You could logger.info something but I think documenting makes the most sense. Maybe add something to the Notes of add_reference_channels that says it should be run before set_montage?

Okay, thank you @larsoner. Also, just for future reference, do you prefer all warnings to be contained in the same box? Or should each warning be in its own box like I did:

I think separate warnings makes sense

@larsoner Ready for merge!


Axios Error: Network Error

After clicking on run.BAT, my cmd opens and shuts itself down within the span of a second, it's basically impossible to see what happened. I downloaded ffmpeg properly, and followed the other procedures, am I doing something wrong?

Unfortunately, I'll need more info to help you.
Start by re-running the setup.BAT.
Then, start a cmd, and using the cd command, navigate to the crispy folder.
After that run python backend/src/app.py.
If there is any error, report it here, otherwise, try to re-run the run.BAT.

I get this error despite opening up cmd with admin

Someone had the exact same issue.
The answer has been given on the reddit thread

Oh I'm so sorry, I fixed that issue! Thank you so much for the help.


[background-media]: Adjust the ratio of the video background to account for 1:1 (half-width) treatment within Leadspace

JIRA ticket: https://jsw.ibm.com/browse/ADCMS-3189

The problem

The current <dds-background-media> component offers full-width background video treatment, however, it's missing a 1:1 ratio container which takes up half/8 cols of the Leadspace container.
This option is needed for ambient/graphic animation videos that are prominent on our PGL (Product Growth Lead) pages.
Attached is an example of the video position/alignment issue that we're seeing right now - https://prod-author.roks.cms.cis.ibm.net/editor.html/content/adobe-cms/language-masters/en/testing/amanda-test-page/leadspace-test-amanda.html

The solution

Add a prop to the <dds-background-media> component that allows an adopter like AEM to set the container of the video background to 1:1/Square instead of 16:9/Full width

<dds-background-media ratio="1:1" mobile-position="bottom" opacity="100">
  <dds-video-player-container video-id="1_9h94wo6b"
     background-mode="true"></dds-video-player-container>
</dds-background-media>

See the v19 Leadspace 2E for an example - https://pages.github.ibm.com/MSC-Cloud/hc_fractal/components/detail/2e--html5-video.html

@areagan1030 Please include design specs, if you have one defined within the Leadspace design.

Application/website
AEM
Business priority
Medium Priority = upcoming release but is not pressing
What time frame would this ideally be needed by (if applicable)
No response
Examples
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate issues

@oliviaflory and @areagan1030 I'd love to get both of your inputs on this issue so that we can open a PR that follows the correct specs and provide documentation for proper guidance/usage.

@oliviaflory @areagan1030 is this something that's worth keeping open?

@andy-blum I think so. We had someone asking for a 1:1 image (or 50/50 lead space as @areagan1030 and I call it) recently. @RichKummer is currently exploring the 50/50 image and how the typography would be affected this sprint. Specifically looking at if the image should be allowed to span to the edge of the lead space container or be inset (like the currently homepage design).
Do you happen to know how it's being implemented on the homepage right now? I cannot remember if the homepage is in AEM yet, or if ya'll built the current homepage lead space in the Carbon for AEM repo?

Homepage is not in AEM yet, but the 50/50 leadspace exists in CAEM.
https://pages.github.ibm.com/webstandards/carbon-for-aem/canary/index.html?path=/story/components-lead-space--container

@oliviaflory @andy-blum From a current AEM perspective, we would not prioritize this at the moment, since the only video option for this leadspace would be using MediaCenter — and this is a pretty awful experience all around. While ambient videos/animations would be more viable for motion in this leadspace, an open question might be how designers would set up the asset canvas and crop in AEM — I'm assuming this would still require empty space to sit behind copy/CTA elements at the bigger breakpoints. This may open the question of whether a 50/50 setup would be a more effective setup for animation?
@oliviaflory We can definitely find time to sync up on what we got into AEM for the 50/50!


Values for /transporttype and relationship to IS-04 "transport" values

Schema for /transportfile endpoint is at https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.1-dev/APIs/schemas/transporttype-response-schema.json. This currently contains enumerated values.
I presume this should be updated to match the pattern based schema in https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.3-dev/APIs/schemas/sender.json (added by https://github.com/AMWA-TV/nmos-discovery-registration/commit/d6dfff24c8e66658637ab951bb59b65cc4dfce5c).
That commit also added the following in the IS-04 Common Keys documentation:
"Note: From v1.3 onwards, permitted transport types are not versioned and are instead defined via the NMOS Parameter Registers."
The table of values below that sentence, and the transport parameter register which is to be used instead of it, contains the entries for both the top-level category "urn:x-nmos:transport:rtp" and the subclassifications with ".ucast" and ".mcast" appended.
So the question arises, whether the IS-05 "/transporttype" may be any value from the parameter register, including subclassifications, or only one of the top-level categories? If so, the concept of ‘subclassifications’ and ‘top-level category’ need better definition. Can I trim to the first ‘.’ after the last ‘:’ for instance?

I propose that it should be acceptable to return a URN with subclassification (and versioning if that were introduced for urn:x-nmos:transport: URNs) from the /transporttype endpoint. Clients can easily form the 'base' URN.

Stumbled upon this now as well -- and support your proposal.

Any further thoughts on this one? It's worth noting if we permit URNs like urn:x-nmos:transport:rtp.ucast and urn:x-nmos:transport:rtp.mcast we'll need to be careful about specifying behaviour when a Sender or Receiver is re-configured. If a Sender destination IP is changed it may change the URN used in /transporttype which (however tightly we specify it) will have the potential to confuse implementations.

For IS-04 at least this is noted in https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2.x/docs/2.1. APIs - Common Keys.md#transport. The text suggests that on the Sender side it reflects configuration and on the Receiver side capability. This is of course not ideal, and 'capability' should probably be handled in 'caps' rather than in this URN.

So, if I understand correctly, it is already the case that a PATCH /staged on an IS-05 Sender that switched between multicast and unicast addresses for "destination_ip" should change the IS-04 Sender "transport"?

If you were to follow the docs text of IS-04 to the letter then yes I believe that's what should happen. Whether this has been universally adopted or not I'm unsure.

Deciding to update /transporttype - or not - seems quite similar.

It does, but the question for me is whether we should be matching existing behaviour elsewhere for complete consistency, or doing something simpler based upon practical issues we've observed in implementations. Is there a notable benefit to permitting sub-classifications here which outweighs the potential for clients to trip up over them (and servers to mis-implement)?
If matching existing behaviour is the group preference then the existing dev schemas should be changed. I'm unconvinced personally, but it's a relatively minor detail so there's no point spending loads more time on it.

We have this issue due to a naive implementer wondering whether he could just copy IS-04 Sender "transport" into IS-05 Sender /transporttype.
We could stick with the v1.0 status quo... What if we added a sentence to ConnectionAPI.raml and/or schemas/transporttype-response-schema.json to say the value should be the URN base transport type (i.e. with any subclassification or version removed), with a link to the docs added by https://github.com/AMWA-TV/nmos-discovery-registration/pull/78 (although to avoid referring to IS-04, perhaps those words should be in the Parameter Registers instead)?

That would be fine by me. I don't know if others wish to comment?
The IS-04 reference issue should hopefully go away once we have NMOS Core defined. There is still some chance of that happening before this version is complete, but yes otherwise the parameter registers may be a better place for the time being.

Closing this given the clarification made. If there are any further queries please re-open this or create a new issue.