text:
Unable to install Music Assistant on HASS supervised

Thank you for making the great music custom component for HASS.
By the way, I'm running HASS on supervised environment and install Music Assistant 1.19 via HACS but not successfully.
Could you give me the suggestion how to fix.
Here is error log:
  2022-05-30 23:05:11 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package music-assistant==1.1.19: error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      running bdist_wheel
      running build
      running build_py
      running egg_info
      writing src/greenlet.egg-info/PKG-INFO
      writing dependency_links to src/greenlet.egg-info/dependency_links.txt
      writing requirements to src/greenlet.egg-info/requires.txt
      writing top-level names to src/greenlet.egg-info/top_level.txt
      reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      no previously-included directories found matching 'docs/_build'
      warning: no files found matching '*.py' under directory 'appveyor'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      warning: no previously-included files matching '.coverage' found anywhere in distribution
      adding license file 'LICENSE'
      adding license file 'LICENSE.PSF'
      adding license file 'AUTHORS'
      running build_ext
      building 'greenlet._greenlet' extension
      error: command 'gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for greenlet
  error: subprocess-exited-with-error

  × Running setup.py install for greenlet did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      running install
      /usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      running egg_info
      writing src/greenlet.egg-info/PKG-INFO
      writing dependency_links to src/greenlet.egg-info/dependency_links.txt
      writing requirements to src/greenlet.egg-info/requires.txt
      writing top-level names to src/greenlet.egg-info/top_level.txt
      reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      no previously-included directories found matching 'docs/_build'
      warning: no files found matching '*.py' under directory 'appveyor'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      warning: no previously-included files matching '.coverage' found anywhere in distribution
      adding license file 'LICENSE'
      adding license file 'LICENSE.PSF'
      adding license file 'AUTHORS'
      running build_ext
      building 'greenlet._greenlet' extension
      error: command 'gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> greenlet

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: You are using pip version 22.0.3; however, version 22.1.1 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

My environment:
Home Assistant Core 2022.5.5
Home Assistant Supervisor 2022.05.3

I also tried to install greenlet manually via pip3 install greenlet then try to install music assistant again but still same error.
Thank you.

Strange, I've never seen this one before. What architecture are you running HA on ?
It looks like its trying to compile greenlet but that fails due to missing dev tools like gcc

@dinhchinh82 if I understand correctly, you did manage to install greenlet manually from within the HA core container ?
see also #270 for a duplicate issue report

Here is the log from docker:

Here are more detail about my architecture:

@marcelveldt I just tried to install 1.1.20 and still got the same error.
`2022-06-01 12:56:45 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package music-assistant==1.1.20: error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
running bdist_wheel
running build
running build_py
running egg_info
writing src/greenlet.egg-info/PKG-INFO
writing dependency_links to src/greenlet.egg-info/dependency_links.txt
writing requirements to src/greenlet.egg-info/requires.txt
writing top-level names to src/greenlet.egg-info/top_level.txt
reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no files found matching '.py' under directory 'appveyor'
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyd' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
adding license file 'LICENSE'
adding license file 'LICENSE.PSF'
adding license file 'AUTHORS'
running build_ext
building 'greenlet._greenlet' extension
error: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for greenlet
error: subprocess-exited-with-error
× Running setup.py install for greenlet did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running egg_info
writing src/greenlet.egg-info/PKG-INFO
writing dependency_links to src/greenlet.egg-info/dependency_links.txt
writing requirements to src/greenlet.egg-info/requires.txt
writing top-level names to src/greenlet.egg-info/top_level.txt
reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no files found matching '.py' under directory 'appveyor'
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyd' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
adding license file 'LICENSE'
adding license file 'LICENSE.PSF'
adding license file 'AUTHORS'
running build_ext
building 'greenlet._greenlet' extension
error: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> greenlet
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: You are using pip version 22.0.3; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.`

I also tried to update pip3
python3 -m pip install --upgrade pip Requirement already satisfied: pip in /usr/local/lib/python3.9/dist-packages (22.1.1) Collecting pip   Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.2 MB/s eta 0:00:00 Installing collected packages: pip   Attempting uninstall: pip     Found existing installation: pip 22.1.1     Uninstalling pip-22.1.1:       Successfully uninstalled pip-22.1.1 Successfully installed pip-22.1.2
and tried to install greenlet manually:
pip3 install greenlet Requirement already satisfied: greenlet in /usr/local/lib/python3.9/dist-packages (1.1.2) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Question is why it is trying to install greenlet while that is already installed.
Version 1.1.20 of MA has greenlet pinned in the integration's manifest to hopefully solve this weird issue. Looks like that doesn't help and I'm out of options.
There's a good chance there's another (custom) integration or its dependencies or maybe some leftover cached stuff that is causing this issue but I'm not a pip expert to have the answer here. Unfortunately it is system specific because the majority of users can install just fine.
I will ask around today if somebody has any clue.
Maybe you can have a look at everything installed if you can spot something that might cause this.

@dinhchinh82 did you try to install greenlet from within the HA core container itself or on the host ?
There's a little something to try... Go to your ha config folder --> custom_components/mass
edit the file manifest.json
edit the "greenles==1.1.2" and change it to "greenlet==1.1.1"
restart HA and try if it installs then.
Other than that I can't help you. You are running an unsupported config at the moment, for example armbian.
Not all packages/wheels are available. So without being rude I want to tell you that when you decide to create a supervised install with unsupported building blocks you're kind of on your own when it comes to issues.
If I were you I'd look into installing HA OS into your device, works rock stable for me.

I have a similar problem.
I installed this integration yesterday, which worked fine till today.
But after I installed the new update today, I restarted HA and now get these errors:

Setup failed for custom integration mass: Requirements for mass not found: ['greenlet==1.1.2'].

@corgan2222 see my note above about editing the manifest.json to see if that helps for you

This don't works for me

after restart:

@corgan2222 and if you try to remove the requirement for greenlet altogether ?
or change it to plain 'greenlet' without the version ?
Are you also running supervised with the unsupported warning ?

@marcelveldt I found a strang point. I've tried to delete the mass version from HACS and also remove HACS then restart HASS.
Later on, I download the latest source code from your repo and install manually to custom_component folder.
By the way, when I trying to add music assistant from Integration, the log still show the errore as before and I can see it is still trying to install version 1.1.20, not the latest version 1.1.22 as expected.
Please check the latest log:

2022-06-01 20:47:13 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 173, in post
return await super().post(request)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 70, in post
result = await self._flow_mgr.async_init(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 205, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 223, in _async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 740, in async_create_flow
await async_process_deps_reqs(self.hass, self._hass_config, integration)
File "/usr/src/homeassistant/homeassistant/setup.py", line 360, in async_process_deps_reqs
await requirements.async_get_integration_with_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 83, in async_get_integration_with_requirements
await _async_process_integration(hass, integration, done)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 99, in _async_process_integration
await async_process_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 162, in async_process_requirements
await _async_process_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 194, in _async_process_requirements
raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for mass not found: ['music-assistant==1.1.20'].

@corgan2222 and if you try to remove the requirement for greenlet altogether ? or change it to plain 'greenlet' without the version ?
Are you also running supervised with the unsupported warning ?

remove the version

shows me this erros:

but remove the line completely fixed the issue for me! Thanks!

@corgan2222 thanks for testing. I've decided to ditch that pinned version of greenlet completely from the manifest file.
I have no idea what is going on with the few users that report issues with greenlet but I guess its simply not available as prebuilt wheel for their platform.
I am going to close this issue now because I can't fix the issue of unsupported platforms.

@marcelveldt I just installed latest version 1.1.22 which you already removed the greenlet but I confused why greenlet is still showing in the log.

@dinhchinh82 I did not remove the greenlet dependency. I just removed that pinned version from the manifest as it clearly did not fix your issues and instead caused other trouble. I do not have a solution for your issue I'm afraid, it's an issue with your set-up.

Maybe you can try to build greenlet yourself and share it in the deps folder ?

Maybe you can try to build greenlet yourself and share it in the deps folder ?

so you mean if I could build greenlet from scratch in my environment instead of using pre-built lib then it may work?

Hi, on my raspberry with HA core in docker I have a similar error. The problem (visible int the log :  command 'gcc' failed: No such file or directory) was that I needed to install gcc and some other dependencies in the docker container.
I am using portainer, I just opened the HA container console, it is based on alpine linux so I started the installation with
apk update
apk add build-base

After the reboot, I restart the Music Assistant installation successfully.
I hope this helps someone

repo: music-assistant/hass-music-assistant


text:
Jellyfin: Faster track fetching

This:

Fixes a case where the same _parse_track call might call out to get the same album twice
Fetches all tracks, even if they don't have an album

It also means instead of making a HTTP request for evey album its making one for every 4 or so albums (paginating over the whole library, rather than fetching each albums tracks).
Ideally i'd like to not query the album API at all when parsing the track. But:

Right now we use the album to find the artist if the track doesn't have an artist directly. This feels weird and edge casey, but it does happen in my library.
Apparently there might be edge cases where we have an album id but not name. Can I have an item mapping that has an id but not a name?

Apparently there might be edge cases where we have an album id but not name. Can I have an item mapping that has an id but not a name?

Technically you can (just set the name to a random string or whatever) but UX is not great as the referenced object will be shown with that name.

OK, if i return an ItemMapping with a faked (random) name, then it never shows up in my UI. I assume because the Album for that ID was pre-created during the sync already, it doesn't use the name from the ItemMapping or some other similiar mechanism.
With both of those changes, _parse_track no longer needs to make any HTTP calls 🥳

source: gharchive/pull-request

repo: music-assistant/server

license_type: permissive

license_source: github-api


text:
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

I get the issue on the script "07 Preprocessing data on GPU" even though I run the exact same script. Works on CPU though.
The error hits on the line " signal = self._resample_if_necessary(signal, sr)".
NB: Running on PyTorch 1.10.0+cu113 with RTX 2060(6 GB)

Works fine if we bring the resampler callable object into the device.
def _resample_if_necessary(self, signal, sr):
if sr != self.target_sample_rate:
resampler = torchaudio.transforms.Resample(sr, self.target_sample_rate)
resampler = resampler.to(self.device) # Does not work if not brought to device
signal = resampler(signal)
return signal

source: gharchive/issue

repo: musikalkemist/pytorchforaudio

license: MIT


text:
messageObject always nil

I lifted the example code and I do get notified, but the messageObject is always nil in the block handler.
In my watch kit extension, I send:
[self.wormhole passMessageObject:@{@"buttonNumber" : @(1)} identifier:@"button"];
But in my view controller, messageObject is always nil.
Any ideas? I assume it's something simple.
[self.wormhole listenForMessageWithIdentifier:@"button" listener:^(id messageObject) {
// The number is identified with the buttonNumber key in the message object
NSNumber *number = [messageObject valueForKey:@"buttonNumber"];
self.numberLabel.text = [number stringValue];
}];

Make sure you've enabled the App group in the Watch Kit Extension capabilities list. That did the trick for me.

I have enabled the app group. It's really weird and it's a problem on the app side. The extension is correctly sending the object. The problem is happening with this call: containerURLForSecurityApplicationGroupIdentifier
Now, the application does have the correct app group.

Weird. No changes, works today.

repo: mutualmobile/MMWormhole

license: mit

license_source: bigquery


text:
DynaTest Freezes with Gradle+JDK 11

Even a simple test suite freezes Gradle when running on JDK 11 (also OpenJDK 10 and OpenJDK 9). You can reproduce this bug easily by running ./gradlew on the https://github.com/mvysny/karibu-helloworld-application example app. The build passes on OpenJDK 8.

Might be a bug in Gradle, I've opened a bug report: https://github.com/gradle/gradle/issues/8523

Workaround implemented in 980c450599190ee1ffb7c0e161c0b9dd16894841 ; fixed in DynaTest 0.14

repo: mvysny/dynatest


text:
MWPhotoBrowser and UITabBarController - UITabBar not visible

Hi,
I'm using  MWPhotoBrowser (1.4.1 version) as root view controller of a UINavigationController  and the UINavigationController is a view controller of an UITabBarController.
The problem is that UITabBarController's UITabBar disappears.
Am I doing something wrong?

did you ever figure this out ?

@mdaymond actually I didn't, any ideas?

I have tried this

but no luck yet.   I've also looked at a couple other projects (MHVideoPhotoGallery) - but they seem to follow the same model.   I may try to add the browser as  a subview to my controller next, but not sure that will end well..

@mdaymond I've tried various solutions myself, with no luck . Let's keep us posted about this issue.

Try with hidesBottomBarWhenPushed = false:
photoBrowser = MWPhotoBrowser(delegate: self)
photoBrowser!.enableGrid = true
photoBrowser!.startOnGrid = true
photoBrowser!.hidesBottomBarWhenPushed = false
It worked for me.
Regards!

authors: agurz laucel mdaymond

repo: mwaterfall/MWPhotoBrowser


text:
Add async as a Promise class func

Just a quicker way to make an async function without having to directly use DispatchQueue.async(PMKNamespacer).
The fun part of this extension is that you can use .async { } in the return of a function just like with .value(), making the code more readable.
Example:
func qResponse<T>() -> Promise<QResponse<T>> {
        return .async {
            let (data, res) = try self.response().wait()
            var qRes = try JSONDecoder().decode(QResponse<T>.self, from: data)
            qRes.status = (res as? HTTPURLResponse)?.statusCode ?? -1
            return qRes
        }
}

Happy to learn if there is a cleaner way I'm not seeing.

I think there should be a way to use the .wait() in a faster, more readable way than inside a DispatchQueue.global(qos: qos.qosClass).async(.promise) { } and conserving intuitiveness.
What do you think?
Thank you for this project.

I would like something, but I've not come up with anything so far.

authors: ArifADS mxcl

repo: mxcl/PromiseKit


text:
Refactoring and bugfixing

Prometheus output has been changed:

gateway_ prefix renamed into fritzbox_
gateway label removed. There is only one gateway per instance.

Sorry @corny for the late response! Would you be down for fixing the merge conflict? Then we can merge it of course!

Closed because it's stale, please reopen/rebase if you are still interested in getting it merged.

authors: corny mxschmitt


text:
Update Addition.cpp

:warning: This is a Pull Request Template :warning:

Checkout all the things you've done by placing an x within the square braces below.

Proposed Changes

[] I've read the CODE OF CONDUCT and abide to it.
[] I've read the CONTRIBUTING.md
[] I've forked the repository.
[] I've created a branch and made my changes in it.
[] I understand opening a PULL REQUEST doesn't mean it will be merged for sure.

Please re-submit when you're ready 👍


text:
🛑 Website Load Balancers is down

In 7e82c60, Website Load Balancers ($WEB_SERVER) was down:

HTTP code: 522
Response time: 15334 ms

Resolved: Website Load Balancers is back up in a2ea0c5.

repo: myavsuper/upptime


text:
collection of type List

All duplicate entries are removed in an array list with strings. Here is what I found out.
This is the resultset:
ID_1	| RESULT_1	| ID_2	| RESULT_2
-------------------------------------------------------
321		| NAME1		| 329	| 123
321		| NAME1		| 330	| 1234
321		| NAME1		| 331	| 1234
321		| NAME1		| 332	| 12345
322		| NAME2		| 333	| 321
322		| NAME2		| 334	| 4321

This is the resultMap:
<resultMap id="resultMap" type="package.class">
	<id column="ID_1"/>
 	<result column="RESULT_1" property="x"/>
 	<collection property="xyz" ofType="java.lang.String" javaType="java.util.ArrayList">
 		<!-- <id column="ID_2"/>  -->
 		<result column="RESULT_2"/>
 	</collection>
</resultMap>

The duplicate entry RESULT_2 = 1234 is removed and myBatis return just one of them. If I uncomment the id-tag within the collection, myBatis return the duplicate entries, but as value I get column ID_2 and not RESULT_2.
To resolve this issue, I create a subselect like the following.
<resultMap id="resultMap" type="package.class">
	<id column="ID_1"/>
 	<result column="RESULT_1" property="x"/>
 	<result column="RESULT_2" property="xy"/>
 	<collection property="xyz" ofType="java.lang.String" column="ID_1" select="subselect">
 		<id column="ID_2"/>
 		<result column="RESULT_2"/>
 	</collection>
</resultMap>

<select id="subselect" resultType="String" parameterType="String">
	SELECT RESULT_2 FROM TABLE_2 WHERE ID_1 = #{ID_1}
</select>

Is there another way to solve this problem without a subselect?

Your first problem is that the two times found "RESULT_2" field.
For the first time in the "xy" property. For the second time in the "xyz" collection.
Your second problem is that the "id" - is a unique key for the cache.
For this reason, the second record should not get in the cache (321 | NAME1 | 1234)
since it is the first record (321 | NAME1 | 123).
For this reason, your decision to use a nested sample can yield unexpected results.

Sorry that was my fault. Please ignore the property "xy", I removed it from the original post.
But I guess thats a problem of myBatis. I would like to show the two duplicate entries of the result set. Therfore I uncomment the this line <id column="ID_2"/> and I expect to see the values of column RESULT_2, but what I get are the values of ID_2.

Hi @robertrichter, @alexey-su
I am afraid it is working as intended. MyBatis deduplicates join results. For that, it detects repeated values and supposes that they correspond to the same object. We do not know if that result comes from a join or a simple table select.

authors: alexey-su emacarron robertrichter


text:
用户程序更改返回值时导致的本地缓存与数据库不一致

当用户程序对返回值进行更新值，会破坏本地缓存与数据库数据的一致性，代码示例如下：
    public void dirtyCache() {
        SqlSession sqlSession = new DefaultSqlSession(null, null);       // just test
        List<Object> list = sqlSession.selectList("selectById");         // empty list
        list.add(new Object());                                          // update list
        List<Object> dirtyList = sqlSession.selectList("selectById");    // non empty list !!!
    }

解决方案如下：
org.apache.ibatis.cache.impl.PerpetualCache#cache 的 key 使用 Pair<Key, Value> 进行包装，其 key 为缓存值的哈希码，value 为缓存对象。
获取对象时，如果发现 key 和 value 的哈希码不一致，则说明缓存值被用户变更过，此时删除该缓存并返回 null，从数据库重新查询。
测试代码如下：
@Test
  void showRemoveCacheOnChangeCache() {
    Cache cache = new PerpetualCache("change-cache");
    List<Object> value = new ArrayList<>();
    cache.putObject("key", value);
    value.add(1);
    assertNull(cache.getObject("key"));
  }

@kfyty
你应该使用英文来描述，你可以使用百度或谷歌翻译
本项目社区成员不懂中文
You should use English to describe it. You can use translation tools, such as Baidu or Google
Community members of the project do not understand Chinese.

It's not a good practice to modify the return value. I don't think we need to do this in  mybatis core.
Of course, You can freely extend the cache implementation without modifying mybatis core.

Thank you for your reply.


text:
🛑 BRICKS BETA is down

In f45e14c, BRICKS BETA (https://display-beta.bricks.tools) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BRICKS BETA is back up in f54014e.

repo: mybigday/service-uptime


text:
WIP - Tbaums tidy config example

@dmzmk - can you take a look and lmk if you think it's worth continuing in this manner? Is there a way to write once and and get docs outputted too? Or should we maintain this info in 2 places for now?

looks good to me

authors: dmzmk tbaums

repo: mycelial/mycelial


text:
[1.0][rc][BE]update 4 POM GET templates

add 2 fields in response template:
GET add uni
GET delete uni
GET add eline
GET delete eline
@{{productOrderItem[0].stateChange[*].state}}
description: state in state change history
required: No
Extended Property: No
state value mapping is required
@{{productOrderItem[0].stateChange[*].changeDate}}
description: change date in state change history
required: No
Extended Property: No

pass

repo: mycloudnexus/kraken


text:
support no_std and use sha3

:)

Because there docs.rs, maybe we do not need travis doc?

yeah I wanted to remove all that travis documentation crap
this package doesn't need API docs at all :D
I'm not sure I want to change the hash function, is there a tiny no_std sha256?

@myfreeweb
I think we should not use sha256, sha3 or blake2 is a better choice.

authors: myfreeweb quininer

license: unlicense


text:
Added the query execution time in query()'s callback.

This is for #483
Added to pass queryTime as the fourth argument of query()'s callback.
connection.query('SELECT SLEEP(1)', function (error, results, fields, queryTime) {
    console.log(queryTime); // 1.005
});

I didn't use a new option to handle this. That's because it doesn't have the overhead that is serious enough to worry about.
I hope this helps.

Is there no way to get the actual execution time on the server, exclusive of the network transfer and latency, like how the mysql command client works?

@dougwilson I'll try to check how the mysql command client works.

👍 I'm not 100% sure it does anything different, but I think I looked a long time ago and saw some kind of way it could better get the query time. The biggest issue with doing it in Node.js space is that it can get really off when the event loop is saturated or some tasking is blocking up the loop, ignoring the network latency issue.

I'm probably -1 to the way it is (just measuring before/after query time) as opposed to server side timing (if that's possible at all)
you can do this manually quite easily:
var start = new Date();
connection.query('SELECT * FROM `books` WHERE `author` = "David"', function (error, results, fields) {
  var queryTime = new Date() - start
})

also, extra parameter can potentially break old code (so this should be at least major semver) - see example here - https://github.com/sidorares/node-mysql2/pull/45#issuecomment-24448470

@sidorares I totally agree on your opinion, but I thought it would be useful to provide it by default.
Thanks for letting me know the problem of using a extra parameter. I'll try to find the another approach.
I hope there's a good way.

I took a couple of comments and changed my previous work.
@dougwilson mysql command line is also very similar.
https://github.com/mysql/mysql-server/blob/71f48ab393bce80a59e5a2e498cd1f46f6b43f9a/client/mysql.cc#L3613
(#) start_timer -> mysql_real_query -> mysql_store_result -> (#) end_timer -> mysql_fetch_row
I adjusted the position to end the timer.
@sidorares removed the additional parameter and chose a different approach.
connection.query('SELECT * FROM `books` WHERE `author` = "David"', function (error, results, fields) {
  console.log(connection.getLastQueryTime());
});

@ifsnow maybe better to use process.hrtime() for sub-millisecond queries? ( I can see that happen on local connection )

Also might be interesting to log more then just a 'last row' time, but also TTFB / fields / first row / last row

@sidorares process.hrtime() added in v0.7.6. This module supports version 0.6 or later, so it's likely to be difficult to use it. I thought about what you said (TTFB / fields / first row / last row), but I wonder if most of people want to know about that generally. If yes, it's not difficult.
@dougwilson What do you think about this?

@ifsnow my point is that just timing is vert easy to implement on top of public api if somebody needs  but more detailed breakdown need library support

This module supports version 0.6 or later

fall back to Date() in that case?

@sidorares I know what you're talking about, and I agree on offering detailed information if possible. I'll work on it a bit later.

@sidorares I tried to improve this by a new approach. This new version can get detailed step-by-step times and uses process.hrtime. (included a fallback for nodejs v0.6)
connection.enableQueryTimeProfiling(); // You can turn it on and off.

connection.query('SELECT * FROM `books` WHERE `author` = "David"', function(err, results, fields) {
  connection.printQueryTimeProfiling(); // or connection.getQueryTimeProfiling();

  /*
  output example

  ================================
  - first_byte : 0.000886171 sec.
  - fields     : 0.000983313 sec.
  - first_row  : 0.000086899 sec.
  - last_row   : 0.000544853 sec.

  # total time : 0.002501236 sec.
  ================================
  */
});

What do you think about this try?

@ifsnow nice! Do you think the recording methods should be on the Query object instead of the Connection object? I'm thinking the Query object may make more sense since what you're trying to measure is the Query sequence time, not just all the packets on a given connection. It also seems like that would play really nice with the fact that you can have multiple queries all queued up on a single connection.
Also, regarding the output to console, do you know if that would work for the user you're implementing this for?

@dougwilson It seems to be a good opinion, so I had an another try to be able to use this more easier.
connection.enableQueryTimeProfiling(function (query) {
  query.printQueryTimeProfiling();

  /* output sample
  ===============================================================================
  SELECT * FROM `books` WHERE `author` = "David"
  -------------------------------------------------------------------------------
  - first_byte : 0.000912604 sec.
  - fields     : 0.000930777 sec.
  - first_row  : 0.000084256 sec.
  - last_row   : 0.000513133 sec.

  # total time : 0.00244077 sec.
  ===============================================================================
  */

  query.getQueryTimeProfiling();

  /* result sample
  {
    sql: 'SELECT * FROM mysql.help_topic LIMIT 2',
    timeline: {
      first_byte: 0.00084553,
      fields: 0.000905997,
      first_row: 0.000077647,
      last_row: 0.000513133
    },
    total_time: '0.002342307'
   }
   */
});

connection.query('SELECT * FROM `books` WHERE `author` = "David"', function(err, results, fields) {
  ....
});

This approach doesn't add code for time checking to existing logic. I think this is a good direction to make the clean code, and output added a executed query to understand easily.
connection.enableQueryTimeProfiling();

connection.query('SELECT * FROM `books` WHERE `author` = "David"', function(err, results, fields) {
  this.printQueryTimeProfiling(); // or this.getQueryTimeProfiling();
  ....
});

This method is also offer in callback.
If you agree on this, I'll add a description about using this at Readme.md

I guess what I meant above is that I don't think you need any methods on the Connection object at all, since things like conn.query() return the Query object. Even then, since conn.query() takes an object of options, it may make sense to just add the opt-in to that set of options instead of a bunch of new toggling methods on Connection. Unless I'm missing something here.

@dougwilson I thought of using options of query, but it's so inconvinient to use to existing codes. That's because the code shoud be changed to an object of options. If there are lots of queries, It's not easy.
I don't like to change the code for testing whenever I need it. I think there is a possibility of a mistake in this process. People including me easily forget. :)
There is also the advantage of processing separately from the query. Now this approach can easily monitor all queries and filter out slow queries without affecting existing codes.

I just wrote this today to enable building performance counters on queries.
https://github.com/oxygen/unparametrize-sql-query
It is suposed to unparametrize queries the way the MySQL Performance Schema does.
Has the query execution time feature made it, or will it ever?

FYI
The old way of doing query profiling, using SET SESSION profiling = 1; is deprecated:
"19:29:26 SET SESSION profiling = 10 row(s) affected, 1 warning(s): 1287 '@@ profiling' is deprecated and will be removed in a future release.	0.031 sec`"
https://dev.mysql.com/doc/refman/5.6/en/show-profile.html
The new way of doing profiling is using Query Profiling Using Performance Schema
which is permanently disabled for many cloud providers.
Which means, asking @ifsnow to provide data extracted from MySQL will not work for many people out of the box. It will also not work for production systems with performance schema instrumentation disabled.

authors: dougwilson ifsnow oxygen sidorares

repo: mysqljs/mysql


text:
Breached Defenses does not work on Vampires.

Breached Defenses allows you to bypass resistances that have an "except" clause. All vampires have resistance to physical damage except "magical silver". Due to the way the PF2 system developers programmed this unique resistance, the exploit vulnerability script bugs out, showing for Breeched Defenses "physical, bypassed by [object Object], and when selecting says "Don't know how to bypass [object Object]"
The Vampire Vulnerabilities effect contains the code that adds the resistances for vampires. This is an example of the code from the Vampire Count creature:
{
  "exceptions": [
    {
      "definition": [
        "item:magical",
        {
          "or": [
            "damage:material:dawnsilver",
            "damage:material:silver"
          ]
        }
      ],
      "label": "PF2E.IWR.Custom.MagicalSilver"
    }
  ],
  "key": "Resistance",
  "type": "physical",
  "value": 7
}

This is going to take a little time for me to mull over. The issue is the combination magical + silver. I ran into the issue before. It's a little bit of a problem that I've been pushing off trying to solve.

authors: mysurvive tcordeki


text:
unable to run simulation

/px4fp_ws$ roslaunch px4_fast_planner px4_fast_planner.launch
RLException: [px4_fast_planner.launch] is neither a launch file in package [px4_fast_planner] nor is [px4_fast_planner] a launch file name
The traceback for the exception was written to the log file
enord@enord:~/px4fp_ws$

Hi @mzahana I am new to ROS can you help me so i can use my depth model in realtime i can calculate depth from CNN but i wanna use it in ros and i am not aware how  can i implement


text:
recompiling/incremental builds is slower with hard-source

Sorry about the lack of information just wanted to know if this was normal or not?
It increases the initial build but a lot (120 seconds -> 15-20 seconds) but it increases our recompile and incremental build by a couple of seconds
without = 1-2 seconds
with= 3-5 seconds
We don't use typescript and we have a monorepo if thats important info.
Just wanted quick advice or any info that states whether this is fine/normal.

The purpose of this is to speed up subsequent builds, which I believe includes incremental builds. If that wasn't what you were experiencing then I suspect that is an issue.
Since this is quite old and there's no direct feedback other than "it isn't doing what it's supposed to," which I believe to be echoed by a lot of subsequent tickets, I'm going to close this out.

authors: christiannguyen kadamwhite

repo: mzgoddard/hard-source-webpack-plugin

license: isc


text:
sync actor: make ContentStatusCallback async

This is a prerequisite to moving the store to its own actor
NOTE: I might update the issue as my understanding of the problem progresses

closed as not needed


text:
KVMのstorageとnicのattachをべき等にできていない

https://github.com/n0stack/n0core/blob/master/provisioning/node/kvm/commands.go#L197
ココらへんの話

https://godoc.org/github.com/digitalocean/go-qemu/qemu
これに全部かえる

変えたが、べき等にはできてない

なかなかべき等にすることは難しそうなので、とりあえずVirtualMachineのAPIをCRUDにし、Updateを禁止している


text:
Any ideas?  CasperJS not working with  tag...

I'm using CasperJS to scrape a website.  The page source has a  tag, and therefore is not showing the page I need to scrape, because it claims I don't have JavaScript enabled.
javascriptEnabled is true by default in CasperJS, but I added it to my initialization anyway, to no avail.
Any work arounds to fix this issue?  It might also be an issue with PhantomJS...

Please show your code, or minimal reproduce code?
If show your code that reproduces this problem, someone may help you easier.

There is no code to show, really...
The HTML page has

asdfasdf

Actually, I want you show your scraping code.
If you do not want to show full your code, I hope you to show minimal reproduce code.

@cosmo0920 no like there's literally no scraping code...  I'm just opening a URL:
casper.start();
casper.thenOpen(url);
casper.run();

Hmm..., it is lack of information about your environment and steps to reproduce....

Again, there is no information required to produce...
Create an HTML page, and add the following:

Javascript not enabled.

```.

Then, access the page via Casper:

```nodejs
casper.start();
casper.thenOpen(url);
casper.run();

Then, casper.capture('image.png'); the contents.  You should get an image of "No Javascirpt available"...
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript

@cosmo0920 for some reason the webpage thinks JavaScript isn't enabled...

Above html contains <title> tag and
 or other tags?
I try to following HTML to reproduce this issue.
But, sadly, I couldn't reproduce this issue.
~/work/test-scraping.html

<title>no script test</title>

Javascript not enabled.

no script test

And I use following javascript code:
~/work/test-scraping.js
var casper = require('casper').create();
var system = require('system');
var home = system.env.HOME;

casper.start('file:////' + home + '/work/test-scraping.html', function() {
    this.echo(this.getTitle());
    this.capture('local.png');
});
casper.run();

Run it:
$ casperjs test-scraping.js --verbose --log-level=debug --ignore-ssl-errors=true
[info] [phantom] Starting...
[info] [phantom] Running suite: 2 steps
[debug] [phantom] opening url: file://///Users/hhatake/work/test-scraping.html, HTTP GET
[debug] [phantom] Navigation requested: url=file://///Users/hhatake/work/test-scraping.html, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "file://///Users/hhatake/work/test-scraping.html"
2015-08-26 14:41:28.974 phantomjs[15531:110b] CoreText performance note: Client called CTFontCreateWithName() using name "Times New Roman" and got font with PostScript name "TimesNewRomanPSMT". For best performance, only use PostScript names when calling this API.
2015-08-26 14:41:28.975 phantomjs[15531:110b] CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
[debug] [phantom] Successfully injected Casper client-side utilities
no script test # can get page title
[debug] [phantom] Capturing page to /Users/hhatake/work/local.png
[info] [phantom] Capture saved to /Users/hhatake/work/local.png
[info] [phantom] Step anonymous 2/2: done in 128ms.
[info] [phantom] Done 2 steps in 128ms

And then I can get this page screenshot:

Ok that is very weird... The website I keep trying to access tells me I do not have JavaScript enabled through the same method and so it doesn't load content.... I have no problem in web browser and I never told anything to turn off JavaScript...

Also I should mention I can see page title...

Not sure if it will make a difference but try changing the user agent
Sent from my Windows Phone

From: sawteethmailto:notifications@github.com
Sent: 26/08/2015 06:54
To: n1k0/casperjsmailto:casperjs@noreply.github.com
Subject: Re: [casperjs] Any ideas?  CasperJS not working with  tag... (#1304)
Also I should mention I can see page title...
—
Reply to this email directly or view it on GitHubhttps://github.com/n1k0/casperjs/issues/1304#issuecomment-134845188.

@rippo cool thanks.  Is there anywhere I can find a list of them that duplicated browsers?

Urmm just sniff your own browser user fiddler. Or I am sure there must be a web site that lists these things
Sent from my Windows Phone

From: sawteethmailto:notifications@github.com
Sent: 26/08/2015 13:59
To: n1k0/casperjsmailto:casperjs@noreply.github.com
Cc: Richard Wildemailto:richard@wildesoft.net
Subject: Re: [casperjs] Any ideas?  CasperJS not working with  tag... (#1304)
@rippohttps://github.com/rippo cool thanks. Is there anywhere I can find a list of them that duplicated browsers?
—
Reply to this email directly or view it on GitHubhttps://github.com/n1k0/casperjs/issues/1304#issuecomment-134998761.

Changing user agent did nothing:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36

Ok this issue has been fixed -- I did the following, if anyone has any questions.  The HTML was rendered by the JavaScript, which took a long time to load, so open it like you would normally in a browser, and find an element that only appears when the javascript loads -- note doing view source doesn't work you have to inspect element (you get current DOM).
I then did:
casper.waitForSelector('.SOME_CLASS', function() {
    this.echo(this.getHTML('.SOME_CLASS'));
    this.echo(this.getElementInfo('.SOME_CLASS').text);
});

This allows the page to stop and load the javascript.  IF anyone has a similar issue, let me know.


text:
🛑 rasp.n1l.dev is down

In b144020, rasp.n1l.dev (https://rasp.n1l.dev) was down:

HTTP code: 0
Response time: 0 ms

Resolved: rasp.n1l.dev is back up in c25a785 after 48 minutes.


text:
Issue with chalk dependency within jsondiffpatch [graphql-live-query-patch-jsondiffpatch]

https://github.com/benjamine/jsondiffpatch/issues/249
https://github.com/n1ru4l/graphql-live-query/blob/868404fd564d0a2b32fc4a3533edffc1ba932101/packages/graphql-live-query-patch-json-diff/src/applyJSONDiffPatch.ts#L2
The issue is that the @n1ru4l/graphql-live-query-patch-jsondiffpatch package doesn't function in-browser due to importing everything from the jsondiffpatch package within this file, which makes the browser try to import the chalk dependency, which throws an error in the browser because it's trying to access process which doesn't exist outside of node.

It looks like the intended solution, from the jsondiffpatch readme is to import one of the distributions within the package for browser use:
https://github.com/benjamine/jsondiffpatch#browser

browser
In a browser, you could load directly a bundle in /dist, eg. /dist/jsondiffpatch.umd.js.

Ah it is unfortunate that this package is pretty messy 😰 Maybe we should inline it here instead - and further tweak it to not include the previous result - only the addition

Ah it is unfortunate that this package is pretty messy 😰 Maybe we should inline it here instead - and further tweak it to not include the previous result - only the addition

100% I was thinking the same thing

@dburles @TrentWest7190 Contributions would be highly appreciated :)

I finally created a slim version 🥳  https://github.com/n1ru4l/graphql-live-query/pull/692

Closing this as the jsondiffpatch dependency got removed 🥳


text:
蜂窝图绿色代表什么，看起来是一组里最大的数字会变成绿色，可以添加自定义颜色吗？

在图表样式里面有颜色的设置，内置了几组颜色方案，每组颜色都是通过三个颜色组成，默认是 绿色 -> 灰色 -> 橙色，映射数据是从 max ->
min，还有也可以反转颜色
暂时不支持自定义颜色
MiraClei @.***> 于2022年12月26日周一 11:13写道：

[image: image]
https://user-images.githubusercontent.com/13267570/209495136-961e5d4b-e8ea-4a45-958b-08caf061a6b1.png
[image: image]
https://user-images.githubusercontent.com/13267570/209495149-9f584891-8fc1-4ef2-a8de-d71aa93bc885.png
—
Reply to this email directly, view it on GitHub
https://github.com/n9e/fe-v5/issues/227, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABYUU6UMSXN3BE25XG435XTWPEEMDANCNFSM6AAAAAATJKEQXE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

👌

authors: chenchanglei jsers


text:
How to install this?

How to install this? I found no install.php?

This phpVMS version is currently under development. More information can be found here: https://forum.phpvms.net/topic/24719-just-a-tease

Hey, there's no installer. I wouldn't suggest installing it just yet because it's changing on the daily, esp with database changes and resets that wipe out all your data.
However, if you want to try it out, there are some instructions in the README file. You'll need to point your webserver to the public_html folder.

authors: kferrano nabeelio phpmods

repo: nabeelio/phpvms


text:
Fixed first column?

Hi! It would be awesome if you could fix the first column. So that when you scroll the table horizontally, the row labels always stay on screen.

+1 would love to see that too! THANKS

+1

authors: lolmaus nicmare vadimwe

repo: nadangergeo/RWD-Table-Patterns


text:
Several changes

Add 5th player to moonlight + remove conf file before mapping, remove commas in gamepad name for gamecontrollersdb.txt

https://gitlab.com/recalbox/recalbox-configgen/commit/09d031505a27e90f48b968adfb5006a9203bf7ba

do you have tested these changes on batocera ?
please remind that the batocera code is beeing upgraded at the same time, and that some recalbox code may not work.

repo: nadenislamarre/recalbox-configgen


text:
Using Firebase

Can you please help me with some code to show how can I use this plugin to fetch realtime data from Firebase and show in graph? The structure is like this:

Hi @nagix, I've tried your code but it doesn't work.
"Uncaught TypeError: buffer.append is not a function"

Sorry, use buffer.push instead of buffer.append.

v1.7.0 supports the push based data feed. You can rewrite the code above without onRefresh as follows:
var myChart = new Chart(ctx, config);

var admin = require("firebase-admin");
var db = admin.database();
var ref = db.ref("<path>");
ref.on("child_changed", function(snapshot) {
  var changedData = snapshot.val();
  myChart.data.datasets[0].data.push({
    x: Date.now(),
    y: changedData.value
  });
  myChart.update({
    preservation: true
  });
});

authors: Almazi nagix nam1665

repo: nagix/chartjs-plugin-streaming


text:
csgo

i play chill and my game crashed and he say me this error "cl_callpostdata updates missing ent 636" Please help

same :/

authors: apameaYT blxckshark

repo: namazso/nSkinz


text:
fix: On time change called (no before) on item drag

#838
Link issue.
I think that is a misunderstanding with the bug, why it should have been called onTimeChange when I drag i item?
docs:
onTimeChange(visibleTimeStart, visibleTimeEnd, updateScrollCanvas, unit)
A function that's called when the user tries to scroll. Call the passed updateScrollCanvas(start, end) with the updated visibleTimeStart and visibleTimeEnd (as unix timestamps in milliseconds) to change the scroll behavior, for example to limit scrolling.

@florianbepunkt @MertHaddad can you help verify this PR please

authors: DanielDerma Ilaiwi

repo: namespace-ee/react-calendar-timeline


text:
[PUB-4] You are only permitted to remove 100 repositories at a time.

Scenario:

I originally added GitHub user ghuntley with read/write to all for GitHub Actions Runners under this account.
I wish to reduce scope to just ghuntley/ghuntley and when doing so below happens.

PUB-4

This seems like a GitHub limitation @ghuntley; we defer to GitHub on this as they do the access control. I'm closing this as working-as-intended even though it sucks. I suggest removing the application, and constrain it to the set of repos you want on reinstallation.

authors: ghuntley hugosantos

repo: namespacelabs/foundation


text:
Updated README by fixing small typo in code block

The example code showing how to create a JWT use a payload containing a uid property. Reuse this payload property in the code example that verify the JWT (instead of id).

thanks man! :)

authors: gido odino

repo: namshi/jose


text:
Add support for fetching deps from multiple solutions

When the engine was originally designed, the solutions for vendoring were mostly in disarray. As time has passed, it appears that a few solutions are starting to be standardized:

GoDep
Glide
govendor
no vendoring solution just go get

The engine should be modified to check for the aforementioned vendoring solutions and run the vendor fetch command accordingly.

Until this becomes automagical, the go engine does allow the fetch command to be specified:

run.config:
 engine: golang
 engine.config:
   fetch: go get -v ./...

authors: glinton tylerflint

repo: nanobox-io/nanobox-engine-golang


text:
Request to add Prometheus for Linux package

Hello!
Please add the linux version of https://prometheus.io package to Nanobox. It is situated here.
Thank you.

prometheus should be available now

Thank you

authors: AlexandrPy notxarb

repo: nanobox-io/nanobox-pkgsrc-base


text:
over reasonable disk space usage

I'm trying a basic app with Django and the Nanobox is taking 3.8Gb of disk space.
When your disk is a 128gb ssd drive and this nanobox is one single basic project among others, that's consequent.
I see that nanobox is strongly based on Docker.
Maybe could you consider using Alpine images?

nanobox creates an isolated environment for every application. What is happening is you are installing a very small image for virtual box (rough 38m) then we pull down minimal docker images. Then we install the language and all dependencies that your app needs in an isolated environment. I am guessing the vast majorty of your 3.8Gb of usage is coming from the dependencies.

That said, we're always looking to optimize; It's an ongoing effort. Would you mind providing where you're seeing the 3.8Gb of usage?
Thanks

Well, the same project is 2.9Mb and all its dependencies are 50Mb when installed on my system.
The project is https://github.com/CommonsDev/sso.
Here attached is a screenshot of that nanobox. I may have done something wrong to reach that amount of disk space…

I don't think you've done anything wrong. Nanobox is an ambitious project and we haven't yet been able to focus on optimizing for disk efficiency. You're totally fine.
However, since you're the first to actually report the issue, I'm hoping you'll be willing to investigate where we can do better ;)

I try to delete an reinstall; I'll have a deeper look to check why it's requiring such a large amount.
I had similar issues with Docker until I used only Alpine based images.

Also, the "dependencies" that @lyondhill is referring to are the environment dependencies: binaries, libraries, build tools, etc. The actual application and app dependencies are likely very small as you've mentioned.
As a point of reference, the Xcode build tools for mac install at ~3gb as a minimum. The build image (nanobox/build) will be at least 1GB unpacked simply due to the build tools required for compiling and linking.

@notxarb When you get a moment, can you provide some instructions for isolating disk usage within the VM?

I've deleted the folder machine/nanobox and rerun nanobox start and nanobox run in that same folder.
The disk usage of disk.vmdk has now been reduced to 10Mb, which is very fine.
I'm not sure then why I had these 3.8Gb for that image.
Notice I had asked to build with Docker on my first launch of nanobox before I was told it was not ready yet. I then moved to the suggested VM.
Maybe is it linked?

Hey @vinyll, could you check the current usage now?

I just ran out of space on the disk the nanobox vm is using and I happened to check its disk usage:

I did have 5 apps, but it seems like old images may be part of the issue as all those apps are down:
docker@nanobox:~$ docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
nanobox/build        latest              54e899273e41        6 days ago          587.4 MB
nanobox/build        bugfix_nosupdate    b63a08c1c881        2 weeks ago         587.4 MB
nanobox/mysql        latest              f9401b450a36        2 weeks ago         737.5 MB
nanobox/code         latest              3f92f5e4a03e        2 weeks ago         351.3 MB
nanobox/redis        latest              471f67205b3b        2 weeks ago         416 MB
nanobox/unfs         latest              3c0e9e80e675        2 weeks ago         362.7 MB
nanobox/logvac       latest              049dd48d9e0f        2 weeks ago         332 MB
nanobox/unfs         <none>              a328aedc80b1        3 weeks ago         362.5 MB
nanobox/redis        <none>              68b12cbc0a2e        3 weeks ago         415.8 MB
nanobox/mysql        <none>              a1ca198136cf        3 weeks ago         737.5 MB
nanobox/portal       latest              0493e06e34c9        3 weeks ago         387.6 MB
nanobox/mist         latest              11487fac4910        3 weeks ago         331.9 MB
nanobox/hoarder      latest              f6648c7ffcb8        3 weeks ago         344.3 MB
nanobox/code         <none>              df88fc0b61e9        3 weeks ago         351.3 MB
nanobox/build        <none>              3f1edc7f5ecc        6 weeks ago         723.7 MB
nanobox/postgresql   <none>              f7489edbac52        9 weeks ago         690.3 MB
nanobox/bridge       latest              b07bebe96c90        10 weeks ago        456.4 MB

i should be releasing 2.0.3 today.

authors: glinton lyondhill tylerflint vinyll

repo: nanobox-io/nanobox


text:
Load evar(s) from .env file

Given a .env file containing things like:
ENV1=value1
ENV2=value2

Could it be possible to add a feature to nanobox cli to load these environment variables from one or more files ? like nanobox evar load local .env .env.development

It should also allow
export KEY=VAR

So long as we keep the filename explicit, here. .env has uses inside some apps – Ruby, PHP, and Node, at minimum, have packages for reading these in, which let the actual environment override what's listed in the file, so things like DATABASE_HOSTNAME=$DATA_DB_HOST wouldn't work properly if .env is assumed as a fallback.

authors: danhunsaker glinton zedalaye


text:
Compilation fails when cache directory exists (sometimes)

Nanoc compilation sometimes fails unless you rm -rf tmp.
Expected behavior
Compilation succeeds.
Actual behavior
Compilation fails.
Details
The item reported in the log below is passed-through, no filters and such. Note the path pointing to a temporary file.
Crash log
https://gist.github.com/agross/9831ab6eb3844783424b19f64bd7831c

I’m unsure how to reproduce this. Can you try whether the issue also exists on master, and if so, could you provide a reproduction (a small one is preferred, but not required).

I'll try to. I think I can reproduce it locally pretty reliably, but the project is rather complex.

This failure looks remarkably similar to the failure mentioned tangentially in #1082. I came up with a reproduction recipe, but it only manifested when some in-progress patches from Denis were applied. However, if the underlying cause is the same, perhaps those patches and the recipe I provided could help track down the problem (assuming it still manifests on master).

Any reproductions that work with master would be incredibly valuable!
I know that @gpakosz is also experiencing this issue.

I have a reproduction case!

A (WIP) fix is in #1109.

Works for me! Many thanks!

authors: agross ddfreyne sunshineco

repo: nanoc/nanoc


text:
Surface without points in the current time frame raise "AttributeError: 'NoneType' object has no attribute 'shape'" on main branch.

🐛 Bug Report
This is related to the previous bug I submitted https://github.com/napari/napari/issues/6870 and can be demonstrated from that example.
💡 Steps to Reproduce
Run the example in the other bug: https://github.com/napari/napari/issues/6870 select time frame 1 then select another time frame where the second mesh doesn't exist. Rotate the mesh, and the error will occur.
💡 Expected Behavior
I expect no errors, and only one mesh gets shown.
🌎 Environment
WSL2 Ubuntu using Windows 10 on the napari main branch.
💡 Additional Context
The issue appears to happen due in napari/_vispy/layers/surface.py once the mesh gets shown the first time, it has a shading_filter, then when view rotates, it tries to calculate a normal for a mesh without any vertexes. I changed line 207 to
    if self.node.shading_filter is not None and self._meshdata._vertices is not None:

And the problem goes away.

I forgot the traceback.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/app/backends/_qt.py:928, in CanvasBackendDesktop.paintGL(self=<vispy.app.backends._qt.CanvasBackendDesktop object>)
    926 # (0, 0, self.width(), self.height()))
    927 self._vispy_canvas.set_current()
--> 928 self._vispy_canvas.events.draw(region=None)
        self._vispy_canvas = <NapariSceneCanvas (PyQt5) at 0x7f9be9bf0d60>
        self._vispy_canvas.events.draw = <vispy.util.event.EventEmitter object at 0x7f9be9bf2800>
        self = <vispy.app.backends._qt.CanvasBackendDesktop object at 0x7f9be9bdfc70>
        self._vispy_canvas.events = <vispy.util.event.EmitterGroup object at 0x7f9be9bf2740>
    930 # Clear the alpha channel with QOpenGLWidget (Qt >= 5.4), otherwise the
    931 # window is translucent behind non-opaque objects.
    932 # Reference:  MRtrix3/mrtrix3#266
    933 if QT5_NEW_API or PYSIDE6_API or PYQT6_API:

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/util/event.py:453, in EventEmitter.__call__(self=<vispy.util.event.EventEmitter object>, *args=(), **kwargs={'region': None})
    450 if self._emitting > 1:
    451     raise RuntimeError('EventEmitter loop detected!')
--> 453 self._invoke_callback(cb, event)
        event = <DrawEvent blocked=False handled=False native=None region=None source=None sources=[] type=draw>
        self = <vispy.util.event.EventEmitter object at 0x7f9be9bf2800>
        cb = <bound method VispyCamera.on_draw of <napari._vispy.camera.VispyCamera object at 0x7f9be9bf0d00>>
    454 if event.blocked:
    455     break

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/util/event.py:471, in EventEmitter._invoke_callback(self=<vispy.util.event.EventEmitter object>, cb=<bound method VispyCamera.on_draw of <napari._vispy.camera.VispyCamera object>>, event=<DrawEvent blocked=False handled=False native=None region=None source=None sources=[] type=draw>)
    469     cb(event)
    470 except Exception:
--> 471     _handle_exception(self.ignore_callback_errors,
        self = <vispy.util.event.EventEmitter object at 0x7f9be9bf2800>
        cb = <bound method VispyCamera.on_draw of <napari._vispy.camera.VispyCamera object at 0x7f9be9bf0d00>>
        event = <DrawEvent blocked=False handled=False native=None region=None source=None sources=[] type=draw>
        (cb, event) = (<bound method VispyCamera.on_draw of <napari._vispy.camera.VispyCamera object at 0x7f9be9bf0d00>>, <DrawEvent blocked=False handled=False native=None region=None source=None sources=[] type=draw>)
    472                       self.print_callback_errors,
    473                       self, cb_event=(cb, event))

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/util/event.py:469, in EventEmitter._invoke_callback(self=<vispy.util.event.EventEmitter object>, cb=<bound method VispyCamera.on_draw of <napari._vispy.camera.VispyCamera object>>, event=<DrawEvent blocked=False handled=False native=None region=None source=None sources=[] type=draw>)
    467 def _invoke_callback(self, cb, event):
    468     try:
--> 469         cb(event)
        cb = <bound method VispyCamera.on_draw of <napari._vispy.camera.VispyCamera object at 0x7f9be9bf0d00>>
        event = <DrawEvent blocked=False handled=False native=None region=None source=None sources=[] type=draw>
    470     except Exception:
    471         _handle_exception(self.ignore_callback_errors,
    472                           self.print_callback_errors,
    473                           self, cb_event=(cb, event))

File ~/linux-desktop/napari/napari-repo/napari/_vispy/camera.py:188, in VispyCamera.on_draw(self=<napari._vispy.camera.VispyCamera object>, _event=<DrawEvent blocked=False handled=False native=None region=None source=None sources=[] type=draw>)
    183 """Called whenever the canvas is drawn.
    184
    185 Update camera model angles, center, and zoom.
    186 """
    187 with self._camera.events.angles.blocker(self._on_angles_change):
--> 188     self._camera.angles = self.angles
        self._camera.angles = (0.4350144751843147, 2.893990661923638, 86.80650786529637)
        self._camera = Camera(center=(5.0, 10.0, 0.0), zoom=40.232499999999995, angles=(0.4350144751843147, 2.893990661923638, 86.80650786529637), perspective=0.0, mouse_pan=True, mouse_zoom=True)
        self = <napari._vispy.camera.VispyCamera object at 0x7f9be9bf0d00>
    189 with self._camera.events.center.blocker(self._on_center_change):
    190     self._camera.center = self.center

File ~/linux-desktop/napari/napari-repo/napari/utils/events/evented_model.py:307, in EventedModel.__setattr__(self=Camera(center=(5.0, 10.0, 0.0), zoom=40.23249999...perspective=0.0, mouse_pan=True, mouse_zoom=True), name='angles', value=(0.14731901486049193, 0.4556950725660273, 89.40443463136077))
    305     super().__setattr__(name, value)
    306     return
--> 307 with ComparisonDelayer(self):
        self = Camera(center=(5.0, 10.0, 0.0), zoom=40.232499999999995, angles=(0.4350144751843147, 2.893990661923638, 86.80650786529637), perspective=0.0, mouse_pan=True, mouse_zoom=True)
    308     self._primary_changes.add(name)
    309     self._setattr_impl(name, value)

File ~/linux-desktop/napari/napari-repo/napari/utils/events/evented_model.py:520, in ComparisonDelayer.__exit__(self=<napari.utils.events.evented_model.ComparisonDelayer object>, exc_type=None, exc_val=None, exc_tb=None)
    518 def __exit__(self, exc_type, exc_val, exc_tb):
    519     self._target._delay_check_semaphore -= 1
--> 520     self._target._check_if_values_changed_and_emit_if_needed()
        self._target = Camera(center=(5.0, 10.0, 0.0), zoom=40.232499999999995, angles=(0.4350144751843147, 2.893990661923638, 86.80650786529637), perspective=0.0, mouse_pan=True, mouse_zoom=True)
        self = <napari.utils.events.evented_model.ComparisonDelayer object at 0x7f9b5ab7e530>

File ~/linux-desktop/napari/napari-repo/napari/utils/events/evented_model.py:345, in EventedModel._check_if_values_changed_and_emit_if_needed(self=Camera(center=(5.0, 10.0, 0.0), zoom=40.23249999...perspective=0.0, mouse_pan=True, mouse_zoom=True))
    342 with ComparisonDelayer(self):
    343     # Again delay comparison to avoid having events caused by callback functions
    344     for name, new_value in to_emit:
--> 345         getattr(self.events, name)(value=new_value)
        name = 'angles'
        self = Camera(center=(5.0, 10.0, 0.0), zoom=40.232499999999995, angles=(0.4350144751843147, 2.893990661923638, 86.80650786529637), perspective=0.0, mouse_pan=True, mouse_zoom=True)
        new_value = (0.14731901486049193, 0.4556950725660273, 89.40443463136077)

File ~/linux-desktop/napari/napari-repo/napari/utils/events/event.py:764, in EventEmitter.__call__(self=<napari.utils.events.event.EventEmitter object>, *args=(), **kwargs={'value': (0.14731901486049193, 0.4556950725660273, 89.40443463136077)})
    761     self._block_counter.update([cb])
    762     continue
--> 764 self._invoke_callback(cb, event if pass_event else None)
        event = <Event blocked=False handled=False native=None source=None sources=[] type='angles'>
        self = <napari.utils.events.event.EventEmitter object at 0x7f9be269dd20>
        cb = <bound method VispySurfaceLayer._on_camera_move of <napari._vispy.layers.surface.VispySurfaceLayer object at 0x7f9b604e0970>>
        pass_event = True
    765 if event.blocked:
    766     break

File ~/linux-desktop/napari/napari-repo/napari/utils/events/event.py:802, in EventEmitter._invoke_callback(self=<napari.utils.events.event.EventEmitter object>, cb=<bound method VispySurfaceLayer._on_camera_move ...._vispy.layers.surface.VispySurfaceLayer object>>, event=<Event blocked=False handled=False native=None source=None sources=[] type='angles'>)
    800     self.disconnect(cb)
    801     return
--> 802 _handle_exception(
        self = <napari.utils.events.event.EventEmitter object at 0x7f9be269dd20>
        event = <Event blocked=False handled=False native=None source=None sources=[] type='angles'>
        cb = <bound method VispySurfaceLayer._on_camera_move of <napari._vispy.layers.surface.VispySurfaceLayer object at 0x7f9b604e0970>>
        (cb, event) = (<bound method VispySurfaceLayer._on_camera_move of <napari._vispy.layers.surface.VispySurfaceLayer object at 0x7f9b604e0970>>, <Event blocked=False handled=False native=None source=None sources=[] type='angles'>)
    803     self.ignore_callback_errors,
    804     self.print_callback_errors,
    805     self,
    806     cb_event=(cb, event),
    807 )

File ~/linux-desktop/napari/napari-repo/napari/utils/events/event.py:789, in EventEmitter._invoke_callback(self=<napari.utils.events.event.EventEmitter object>, cb=<bound method VispySurfaceLayer._on_camera_move ...._vispy.layers.surface.VispySurfaceLayer object>>, event=<Event blocked=False handled=False native=None source=None sources=[] type='angles'>)
    787 try:
    788     if event is not None:
--> 789         cb(event)
        event = <Event blocked=False handled=False native=None source=None sources=[] type='angles'>
        cb = <bound method VispySurfaceLayer._on_camera_move of <napari._vispy.layers.surface.VispySurfaceLayer object at 0x7f9b604e0970>>
    790     else:
    791         cb()

File ~/linux-desktop/napari/napari-repo/napari/_vispy/layers/surface.py:207, in VispySurfaceLayer._on_camera_move(self=<napari._vispy.layers.surface.VispySurfaceLayer object>, event=<Event blocked=False handled=False native=None source=None sources=[] type='angles'>)
    205 # combine to get light behind the camera on the top right
    206 self._light_direction = view - up + np.cross(up, view)
--> 207 self.node.shading_filter.light_dir = self._light_direction
        self._light_direction = <class 'numpy.ndarray'> (3,) float64
        self = <napari._vispy.layers.surface.VispySurfaceLayer object at 0x7f9b604e0970>
        self.node.shading_filter = <vispy.visuals.filters.mesh.ShadingFilter object at 0x7f9b5ac13130>
        self.node = <SurfaceVisual at 0x7f9b604a3220>

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/visuals/filters/mesh.py:460, in ShadingFilter.light_dir(self=<vispy.visuals.filters.mesh.ShadingFilter object>, direction=<class 'numpy.ndarray'> (3,) float64)
    458     raise ValueError('Invalid direction %s' % direction)
    459 self._light_dir = tuple(direction)
--> 460 self._update_data()
        self = <vispy.visuals.filters.mesh.ShadingFilter object at 0x7f9b5ac13130>

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/visuals/filters/mesh.py:552, in ShadingFilter._update_data(self=<vispy.visuals.filters.mesh.ShadingFilter object>)
    547 self.fshader['flat_shading'] = 1 if self._shading == 'flat' else 0
    548 self.fshader['shading_enabled'] = (
    549     1 if self._enabled and self._shading is not None else 0
    550 )
--> 552 normals = self._visual.mesh_data.get_vertex_normals(indexed='faces')
        self = <vispy.visuals.filters.mesh.ShadingFilter object at 0x7f9b5ac13130>
        self._visual = <SurfaceVisual at 0x7f9b604a3220>
    553 self._normals.set_data(normals, convert=True)

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/geometry/meshdata.py:380, in MeshData.get_vertex_normals(self=<vispy.geometry.meshdata.MeshData object>, indexed='faces')
    377     raise ValueError("Invalid indexing mode. Accepts: None, 'faces'")
    379 if self._vertex_normals is None:
--> 380     face_normals = self.get_face_normals()
        self = <vispy.geometry.meshdata.MeshData object at 0x7f9b60406080>
    381     faces = self.get_faces()
    382     vertices = self.get_vertices()

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/geometry/meshdata.py:351, in MeshData.get_face_normals(self=<vispy.geometry.meshdata.MeshData object>, indexed=None)
    349 if self._face_normals is None:
    350     vertices = self.get_vertices(indexed='faces')
--> 351     self._face_normals = _compute_face_normals(vertices)
        self._face_normals = None
        vertices = None
        self = <vispy.geometry.meshdata.MeshData object at 0x7f9b60406080>
    353 if indexed == 'faces' and self._face_normals_indexed_by_faces is None:
    354     self._face_normals_indexed_by_faces = \
    355         _repeat_face_normals_on_corners(self._face_normals)

File ~/linux-desktop/napari/napari-venv/lib/python3.10/site-packages/vispy/geometry/meshdata.py:23, in _compute_face_normals(vertices=None)
     22 def _compute_face_normals(vertices):
---> 23     if vertices.shape[1:] != (3, 3):
        vertices = None
     24         raise ValueError("Expected (N, 3, 3) array of vertices repeated on"
     25                          f" the triangle corners, got {vertices.shape}.")
     26     edges1 = vertices[:, 1] - vertices[:, 0]

AttributeError: 'NoneType' object has no attribute 'shape'

Fixed by #6874

authors: jni odinsbane

repo: napari/napari


text:
Use mode='constant' in numpy.pad usage

Description
A couple of changes snuck by that use np.pad without a mode= keyword argument, which is not valid in NumPy 1.16 and earlier. See #645. This adds the missing kwarg in those calls.
Type of change

[x] Bug-fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

References

How has this been tested?

[ ] example: the test suite for my feature covers cases x, y, and z
[ ] example: all tests pass with my change

Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works

Thanks @jni!  I just encountered this issue with an older numpy install

authors: hectormz jni


text:
DOC Add docs on how to run napari headless

Description
closes #4930
Adds docs on how to run napari headless. Summary of info from: https://github.com/napari/napari/pull/4929/files#r947506160 and https://github.com/lucyleeow/napari/pull/7#discussion_r946160065

Type of change

[ ] Bug-fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

References

How has this been tested?

[ ] example: the test suite for my feature covers cases x, y, and z
[ ] example: all tests pass with my change
[ ] example: I check if my changes works with both PySide and PyQt backends
as there are small differences between the two Qt bindings.

Final checklist:

[ ] My PR is the minimum possible work for the desired functionality
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] If I included new strings, I have used trans. to make them localizable.
For more information see our translations guide.

Thanks for the reviews @Czaki and @tlambert03 , changes made.

Feel free to self-merge, I'm just unsure about the .md.

Thanks for the reviews!

authors: Carreau lucyleeow


text:
Remove cached property from Action.injected

Description
As the action manager is global, then we cannot cache property, as after closing one viewer and opening another one the action will crash.

I cannot reproduce it now. so maybe it is fixed on the side of injection manager (as it looks to provide not binned version of function, but perform binning each time). So I'm not sure if this cache save now time.

would love to see the error that caused this here.  Since the injection doesn't hard link a specific viewer instance (but rather calls the provider that should call get_viewer ...) i'm still curious to know why this would be an issue.  By contrast, I do expect that you this will cause you performance issues if you're running inject every time every command is called


text:
Add word of the day section

What does this PR do?
Add "Word of the day" section to index page
Any helpful background information around the changes?
Any new dependencies? Why were they added?
No
Relevant Screenshots/gifs
Does is close any issue(s)?
issue #157
Closes # ...

Hi @alireza-jahandoost thank you so much for the prompt work on this issue!  It looks like you are getting some build issues with the page on build you can observe the output here or look to reproduce it via yarn build on your machine.

@narbs91 The problem solved with moving new component to src/components directory. I think we have to move other components from src/pages directory to this directory. Should I open an issue about it?

Hi @alireza-jahandoost moving it outside the pages folder seems kinda odd for it to be the fix.  I'll have a closer look in the upcoming days as well as a review of the UI (from my original design proposal) and let you know.  Thank you for the great work 🚀

Hi @narbs91 . If you reset the HEAD to the point that it has error, and try to build, a link to the cause of error is this. And the recommended way to solve it is to move every non-pages to out of page directory.

@all-contributors please add @alireza-jahandoost for code


text:
factorio-updater isn't updating old server version

I have a local isntallation of the factorio headless server 0.13.20 in /home/jan/factorio/bin/x64/factorio
Thatfor I run python3 update_factorio.py -a /home/jan/factorio/bin/x64/factorio
But that gives a return of
No updates available for version 0.13.20 (latest stable is 0.14.23). Did you want `--experimental`?

It doesn't update the server and it doesn't even seem to recognize that there is a newer version, even though it displays just that. What's the problem here?

The problem is that 0.13.19 and 0.13.20 are dead-ends for headless servers* (no updates exist to go from them to the 0.14 series). If you look at https://updater.factorio.com/get-available-versions?apiVersion=2, you will see there is no "from": "0.13.20" to anything, and that the only "from": "0.13.19" has "to": "0.13.20". From 0.13.18 you can go to 0.13.19 or to 0.14.0.
I'm sorry to say, you're going to have to download the whole thing**. Try:

wget -O factorio-headless-0.14.23.tar.gz 'https://www.factorio.com/get-download/0.14.23/headless/linux64' for stable, or
wget -O factorio-headless-0.15.30.tar.gz 'https://www.factorio.com/get-download/0.15.30/headless/linux64' for experimental.

Or try other versions from https://www.factorio.com/download-headless, of course.

* For regular (i.e., non-headless), there are updates from 0.13.20 to 0.14.5. This, of course, doesn't help us.
** Actually, since you're going so many versions forward, you're saving bandwidth -- the entire set of 0.14.0 to .23 is 223 MB, whereas the 0.14.23 headless download is only 22 MB.

Hmm. Maybe I could detect this case and change the error to say something like "can't reach latest stable, which is 0.14.23".

Would my command auto-update it afterwards? I mean would it download newer version and automatically apply them?

It certainly should. You may want to add -D for "delete after apply" and -x for "experimental"; my update command is python3 ~/src/factorio-updater/update_factorio.py -xDa ./bin/x64/factorio (while in the factorio root folder, obviously).

alright, thanks


text:
Change unWISE bucket to nasa-irsa-wise

The unWISE dataset accessed by the light curve notebooks is now in a NASA ODR bucket. This PR updates the code to access that bucket.

The new bucket is in a different region. How does this affect performance? Collecting results of time tests in this comment.
Test code, to be run from FSC and ISP:
import sample_selection
import wise_functions

cords, labels = [], []
sample_selection.get_sdss_sample(coords, labels, num=10_000)
sample_table = sample_selection.clean_sample(coords, labels)
savename_sample = "output/SDSS_10000_sample.ecsv"
sample_table.write(savename_sample, format='ascii.ecsv', overwrite = True)
sample_table = Table.read(savename_sample, format='ascii.ecsv')

%time unwise_df = wise_functions.wise_get_lightcurves(sample_table, radius=1.0, bandlist=['W1', 'W2'])

Results:
(TBD. Will update comment.)

Thanks!

authors: bsipocz troyraen

repo: nasa-fornax/fornax-demo-notebooks


text:
API header documentation doesn't match c file documentation

Is your feature request related to a problem? Please describe.
Currently the API's are documented in both the .h and .c, and they aren't always consistent.  See:
https://github.com/nasa/cFE/blob/5802d229ce047185e9247192f0fa328219d54b78/fsw/cfe-core/src/inc/cfe_sb.h#L947-L968
vs
https://github.com/nasa/cFE/blob/5802d229ce047185e9247192f0fa328219d54b78/fsw/cfe-core/src/sb/cfe_sb_util.c#L228-L241
Describe the solution you'd like
Document in header only (remove duplicated info in .c), and reference from c files
Describe alternatives you've considered
None
Additional context
Requested by JP/PACE
Requester Info
Jacob Hageman - NASA/GSFC

@jpswinski - FYI

repo: nasa/cFE


text:
Fix #1604, Clean/simplify version header and reporting

Describe the contribution
Fix #1604 - cleans up the version header and how it's reported (standardized event text).  Note just ES uses/reports the short version.
Testing performed
Built and ran unit tests, executed cfe to confirm output.
Expected behavior changes
Minor event message output format changes
System(s) tested on

Hardware: Intel I5/Docker
OS: Ubuntu 18.04
Versions: Bundle main + this commit

Additional context
#1603
Third party code
None
Contributor Info - All information REQUIRED for consideration of pull request
Jacob Hageman - NASA/GSFC

Converted back to integer build number

CCB:2021-06-09 APPROVED

@astrogeco - fixed conflict

authors: astrogeco skliper


text:
handle export file csv in Oder Page

Is this export all Orders or just export only order we selected?
Could you record or capture the step that shows how to use the export function so that we can easily comprehend it?

Could you record or capture the step that shows how to use the export function so that we can easily comprehend it? It appears to be duplicated with PR #706?

I think we should confirm with Mr. Thien whether it is preferable to export a CSV file from the front-end or the back-end.

authors: LEHOANGGLAM dtkhanh

repo: nashtech-garage/yas


text:
Review how we handle daylight savings time

In working on:

#267

I realized that I wasn't sure how we handle DST. The clocks in California change in March and in November - does our shift calculator take that into account, or do we have a bug where shifts are being miscalculated by a full hour for six months of the year?

Good news: I think we are doing the right thing.
Our code is a bit lazy in that it stores everything as UTC-marked datetimes, despite those times actually being local time in Los Angeles timezone:

The things that matter for the calculator are the NOAA tide predictions and our calculated sunrise/sunset times.
We call NOAA like this: https://github.com/natbat/pillarpointstewards/blob/9bf9c0eafe0d887ab53541d6625655dea6afea9c/pillarpointstewards/tides/models.py#L28-L39
Using time_zone=lst_ldt asks NOAA to return tide times in the local time for that area, taking DST into account.
I confirmed that this is working using curl like this:
curl "https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?begin_date=20240310%2000:00&end_date=20240310%2004:00&product=predictions&station=9410230&datum=mllw&time_zone=lst_ldt&units=english&format=json&interval=h" | jq

Which produced:
{
  "predictions": [
    {
      "t": "2024-03-10 00:00",
      "v": "2.165"
    },
    {
      "t": "2024-03-10 01:00",
      "v": "1.009"
    },
    {
      "t": "2024-03-10 03:00",
      "v": "0.290"
    },
    {
      "t": "2024-03-10 04:00",
      "v": "0.226"
    }
  ]
}

Note how it skips from 1am to 3am because the hour from 1am to 2am doesn't exist.
In November:
curl "https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?begin_date=20241103%2000:00&end_date=20241103%2003:00&product=predictions&station=9410230&datum=mllw&time_zone=lst_ldt&units=english&format=json&interval=h" | jq

{
  "predictions": [
    {
      "t": "2024-11-03 00:00",
      "v": "3.395"
    },
    {
      "t": "2024-11-03 01:00",
      "v": "2.524"
    },
    {
      "t": "2024-11-03 02:00",
      "v": "2.221"
    },
    {
      "t": "2024-11-03 03:00",
      "v": "2.224"
    }
  ]
}

Technically the hour from 1am to 2am occurs twice. It looks like NOAA just ignore that entirely, which is good because it would be confusing if they returned one of those times twice!

I confirmed this in our database as well:
https://www.tidepoolstewards.com/dashboard/?sql=select+*%2C+to_char(dt%2C+'Day%2C+DD+Mon+YYYY+at+HH12%3AMI+AM')
from+tides_tideprediction
where+station_id+%3D+9414131
and+dt+>+'2024-03-10+00%3A54%3A00'+order+by+dt+limit+20%3AqhgALSV9j3xvgSpnH_8oVOlPXg_IuIwTVYEw2jxeTmE&sql=select+*%2C+to_char(dt%2C+'Day%2C+DD+Mon+YYYY+at+HH12%3AMI+AM')
from+tides_tideprediction
where+station_id+%3D+9414131
and+dt+>+'2024-11-03+00%3A54%3A00'+order+by+dt+limit+30%3AiYdEHCbHRgJf82lBmyqmvNYS9KmPEJshlRfPamVaCZo
select *, to_char(dt, 'Day, DD Mon YYYY at HH12:MI AM')
from tides_tideprediction
where station_id = 9414131
and dt > '2024-03-10 00:54:00' order by dt limit 20

Note how it skips the 2am to 3am hour.
And:
select *, to_char(dt, 'Day, DD Mon YYYY at HH12:MI AM')
from tides_tideprediction
where station_id = 9414131
and dt > '2024-11-03 00:54:00' order by dt limit 30

It doesn't have duplicate data four that additional repeated hour.

Similar investigation for sunrise/sunset: https://www.tidepoolstewards.com/dashboard/?sql=SELECT+
++day+||+'+'+||+sunrise+AS+original_datetime%2C
++to_char(to_timestamp(day+||+'+'+||+sunrise%2C+'YYYY-MM-DD+HH24%3AMI%3ASS.US')%2C+'Day%2C+DD+Mon+YYYY+at+HH12%3AMI+AM')+AS+formatted_sunrise%2C
++id%2C
++day%2C
++dawn%2C
++sunrise
FROM+tides_sunrisesunset
WHERE+location_id+%3D+1
++AND+day+>+'2024-03-07'
ORDER+BY+day
LIMIT+5%3AijnAfXB9IbJvDMVobiElCqMoqFg1lUz3ikjYX7jZ_RU&sql=SELECT+
++day+||+'+'+||+sunrise+AS+original_datetime%2C
++to_char(to_timestamp(day+||+'+'+||+sunrise%2C+'YYYY-MM-DD+HH24%3AMI%3ASS.US')%2C+'Day%2C+DD+Mon+YYYY+at+HH12%3AMI+AM')+AS+formatted_sunrise%2C
++id%2C
++day%2C
++dawn%2C
++sunrise
FROM+tides_sunrisesunset
WHERE+location_id+%3D+1
++AND+day+>+'2024-10-30'
ORDER+BY+day
LIMIT+5%3AXoj0Hv8grtn9r-Md8H0i9yx2G47r9ZUcTq8TsJDDi5g
SELECT
  day || ' ' || sunrise AS original_datetime,
  to_char(to_timestamp(day || ' ' || sunrise, 'YYYY-MM-DD HH24:MI:SS.US'), 'Day, DD Mon YYYY at HH12:MI AM') AS formatted_sunrise,
  id,
  day,
  dawn,
  sunrise
FROM tides_sunrisesunset
WHERE location_id = 1
  AND day > '2024-03-07'
ORDER BY day
LIMIT 5

Sunrise leaps forward an hour.
SELECT
  day || ' ' || sunrise AS original_datetime,
  to_char(to_timestamp(day || ' ' || sunrise, 'YYYY-MM-DD HH24:MI:SS.US'), 'Day, DD Mon YYYY at HH12:MI AM') AS formatted_sunrise,
  id,
  day,
  dawn,
  sunrise
FROM tides_sunrisesunset
WHERE location_id = 1
  AND day > '2024-10-30'
ORDER BY day
LIMIT 5

Sunrise leaps back an hour.
So our database tables are storing both tide predictions and sunrise/sunset data in local time, taking DST into account.

Here's the code that populates the sunrise/sunset data: https://github.com/natbat/pillarpointstewards/blob/9bf9c0eafe0d887ab53541d6625655dea6afea9c/pillarpointstewards/tides/models.py#L66-L92
It's using https://sffjunkie.github.io/astral/#sun which is timezone and DST aware.

repo: natbat/pillarpointstewards


text:
telescope integration

The roadmap in the readme shows telescope integration slated for release 0.2, but unless I'm crazy I don't see it in the 0.2 tag.

Release 0.2 added the libzf library. I released a telescope extension as a separate repository telescope-zf-native.nvim that relies on the libzf library. Sorry the roadmap wasn't super clear, I had written the roadmap before I had started on libzf. I'll edit the readme really fast to remove that because 0.2 is out anyway.
The changelog also gives more details on libzf.
Hope that clears things up! Did you have any other questions about the telescope integration?

Terrific! I didn't see that other repo. Thank you!

authors: natecraddock onelesd

repo: natecraddock/zf


text:
Hashbang (#!) support

PureScript compiler supports hashbangs in source files.
Currently, purs-tidy format-in-place src/M.purs, with M.purs being
#! wat

module M where

produces this error:
/home/me/purs-test/src/M.purs:
  [1:1] Unexpected operator #!

This needs to be supported by purescript-language-cst-parser.

Added in 0.11

authors: natefaubion postsolar

repo: natefaubion/purescript-tidy


text:
NFSW filter?

I'm getting lots of black images, even when my text isn't really trying to create something harmful or explicit?

Not an issue moved to discussions.

repo: nateraw/stable-diffusion-videos


text:
Improve navigation options

As it is right now, the sidebar buttons and links are somewhat hard to click because they are too small. Links on text only enable when ever that section is open, but not otherwise.

Thanks for the feedback. I'm also not entirely happy with the sidebar. I'll take a look at the mdBook options otherwise I may have to fiddle around with some of the CSS.

@jinchuika I have now turned each of the non-clickable sidebar options into clickable ones. Previously I had been using "draft chapters" which are non-linkable in order to separate out the content. Now I just have a small README which I can link to for those chapters or in some cases I have moved content into those chapters. This should now be easier to navigate at least.

authors: jinchuika nathaneastwood

repo: nathaneastwood/fablore


text:
JS injection can't access global variables / objects

Hello folks,
I am using the most recent version of nativefier:
> nativefier --version 45.0.0

When I inject a JS file like this one:
(function () {

    function disableTracking() {
        odoo.session_info.user_context.tracking_disable = true;
    };

   disableTracking();

})();

and build the app with the following command:
nativefier --name "<APP_NAME>" --conceal --single-instance --inject test.js --lang en <APP_URL> .local/share/nativefier-apps

The console of the app tells me, that the global variable odoo is not defined:
Error encoutered injecting JS files ReferenceError: odoo is not defined
    at disableTracking (VM128 inject-c5c0b1.js:4)
    at VM128 inject-c5c0b1.js:7
    at Object.<anonymous> (VM128 inject-c5c0b1.js:9)
    at Object.<anonymous> (VM128 inject-c5c0b1.js:10)
    at Module._compile (VM43 loader.js:1078)
    at Object.Module._extensions..js (VM43 loader.js:1108)
    at Module.load (VM43 loader.js:935)
    at Module._load (VM43 loader.js:776)
    at Function.f._load (VM70 asar_bundle.js:5)
    at Function.o._load (VM75 renderer_init.js:33)

From the documentation I expect that this variable should be available:

Note about JS injection: injected JS is loaded after DOMContentLoaded, so you can assume the DOM is complete & available.

I also tried various manual checkings in the JS file for a loaded DOM, all with the same result. The variable is available in the applications console tough:
> odoo
{csrf_token: "f630ede6b4ccdd28d4b51879292f2e06be7bdb71o", session_info: {…}, testing: false, debug: true, remaining_jobs: Array(0), …}
csrf_token: "f630ede6b4ccdd28d4b51879292f2e06be7bdb71o"
debug: true
define: ƒ ()
log: ƒ ()
process_jobs: ƒ (jobs,services)
remaining_jobs: []
session_info: {session_id: "145d5d94b26f8426bc57829a4ac44bed5e0f31f9", uid: 44, is_system: true, is_superuser: false, user_context: {…}, …}
testing: false
__DEBUG__: {didLogInfo: {…}, get_dependencies: ƒ, get_dependents: ƒ, get_waited_jobs: ƒ, get_missing_jobs: ƒ, …}
_modules: (126) ["base", "web", "web_editor", "web_planner", "bus", "web_tour", "mail", "portal", "website", "product", "account", "payment", "website_payment", "sales_team", "sale", "account_invoicing", "sale_management", "wk_appointment", "website_appointment", "website_seo_pro", "calendar", "contacts", "crm", "project", "barcodes", "stock", "hr", "hr_timesheet", "hr_holidays", "website_partner", "website_form", "website_crm", "hr_attendance", "document", "hr_recruitment", "hr_expense", "account_bank_statement_import", "account_bank_statement_import_ofx", "account_cutoff_base", "date_range", "report_xlsx", "account_financial_report", "account_lock_date_update", "account_reversal", "archeti_external_layout_clean", "archeti_website_appointment", "attachment_large_object", "attachment_preview", "auth_jwt", "auth_signup", "base_import", "board", "contract", "crm_timesheet", "currency_rate_update", "customer_outstanding_statement", "knowledge", "document_page", "document_page_approval", "document_page_reference", "document_url", "email_template_qweb", "git_webhooks", "iap", "knowsystem", "knowsystem_multilang", "l10n_ca", "mail_activity_creator", "mail_inline_css", "mail_outbound_static", "mail_tracking", "web_kanban_gauge", "mass_mailing", "mail_tracking_mass_mailing", "mass_editing", "meeting_ida", "web_widget_color", "mis_builder", "survey", "oh_appraisal", "partner_sector", "payment_paypal", "payment_transfer", "portal_task_kanban", "sale_timesheet", "project_report_task_overview", "project_stage_state", "project_task_add_very_high", "project_task_default_stage", "project_task_dependency", "web_timeline", "project_timeline", "project_timeline_hr_timesheet", "project_timeline_task_dependency", "rating", "sale_stock", "web_ir_actions_act_multi", "web_ir_actions_act_view_reload", "timesheet_force_on_change_state", "web_diagram", …]
__proto__: Object

So what am I doing wrong? Is something special needed to access global variables?
Any help would be very much appreciated.
Thanks in advance!

It seems to be fixed with https://github.com/nativefier/nativefier/commit/ca7d25f4327d353d940cb51b0e419d15df8b655b#diff-60366959d6497ad3a50fdc7b32dd59c76eb35ab6c0ea18f0e700b15c03b67b12R151 in v45.0.6.

It seems to be fixed with ca7d25f#diff-60366959d6497ad3a50fdc7b32dd59c76eb35ab6c0ea18f0e700b15c03b67b12R151 in v45.0.6.

@insolite wheee! Thanks for the precise report. With that, closing.

authors: insolite llabusch93 ronjouch

repo: nativefier/nativefier


text:
[IOS] Player does not keep playing when phone is locked

When a track is playing, it is automatically paused when the phone is locked (on IOS).

Add this to your App_Resources/iOS/Info.plist:
<key>UIBackgroundModes</key>
<array>
          <string>audio</string>
</array>

In addition, you need to set some specific configs in your player options:
this._playerOptions = {
            loop: false,
            //audioFile: ...
};

if(platform.isIOS) {
            //allow audio to continue on screen lock, app sent to background or silent switch
            this._playerOptions.sessionCategory = AVAudioSessionCategoryPlayback;
            this._playerOptions.sessionMode = AVAudioSessionModeDefault;
            this._playerOptions.sessionRouteSharingPolicy = AVAudioSessionRouteSharingPolicy.Default;
}

player.initFromUrl(this._playerOptions).then(() => {
   //...
} (e) => {
            console.log(e);
});

authors: felixkrautschuk zPhoeniqz

repo: nativescript-community/audio


text:
add NatsTlsOpts.LoadClientCertContext

For net8.0 and up, adds:

NatsTlsOpts.LoadClientCertContext
static NatsTlsOpts.LoadClientCertContextFromPem helper function
Parses CertFile and KeyFile to look for intermediates

On Windows, ephemeral keys/certificates do not work with schannel. e.g. unless stored in certificate store.

Need to confirm if setting SslClientAuthenticationOptions.ClientCertificateContext adds the ephemeral keys/certificates on windows.  SslStreamCertificateContext.Windows.cs seems to add intermediates to the store but I'm not sure about leafs.
Will just running the tests on windows confirm or deny whether it's all working?  Or is this only on certain versions of windows?


text:
Integrate Drift Manager

Closes NaN
What's Changed
Removed rebake workflow from templates.
Created workflow to automatically re-bake the following apps:

nautobot/nautobot-app-capacity-metrics
nautobot/nautobot-app-chatops
nautobot/nautobot-app-circuit-maintenance
nautobot/nautobot-app-data-validation-engine
nautobot/nautobot-app-device-lifecycle-mgmt
nautobot/nautobot-app-device-onboarding
nautobot/nautobot-app-firewall-models
nautobot/nautobot-app-floor-plan
nautobot/nautobot-app-golden-config
nautobot/nautobot-app-netbox-importer
nautobot/nautobot-app-nornir
nautobot/nautobot-app-secrets-providers
nautobot/nautobot-app-ssot
nautobot/nautobot-app-welcome-wizard

This PR is ready for review now.

nautobot-app-vX tags are created, old ones can be deleted later. PR is ready for review @whitej6

repo: nautobot/cookiecutter-nautobot-app


text:
not easy/intuitive (any more) to add new IP address and prefix

Environment

Python version: 3.7.3
Nautobot version: 1.0.2

Steps to Reproduce

find a free IP address. i.e. go to IPAM > Prefixes > 10.0.0.0/24 > IP Addresses in the https://demo.nautobot.com site. and click on 254 IPs available. The Add a new IP address form appears with the Address field empty/None.

find a free prefix. i.e. go to IPAM > Prefixes > 10.0.0.0/18 in the https://demo.nautobot.com site. and click on 10.0.8.0/21. The Add a new prefix form appears with the Prefix field empty/None.

Expected Behavior

The Address field should be filled with the first available free IP address as was the case within Netbox.

The Prefix field should be filled with the first available free prefix as was the case within Netbox

Observed Behavior

the Address field is empty/None
the URL is: https://demo.nautobot.com/ipam/ip-addresses/add/?address=10.0.0.1/24 so the first available IP was discovered but not filled into the form.

the Prefix field is empty/None
the URL is: https://demo.nautobot.com/ipam/prefixes/add/?prefix=10.0.8.0/21 so the first available prefix was discovered but not filled into the form.

Thank you for the report! I think we fixed a similar issue before under https://github.com/nautobot/nautobot/issues/224. This is probably a side effect of #78.

Hi, thank you for reporting this, wanted to do the same. Few people already noticed this in our instance and asked for the fix. This feature seems to be used quite a lot.

authors: Thetacz evdzande glennmatthews

repo: nautobot/nautobot


text:
🛑 Harmony Bot Website is down

In 72ea104, Harmony Bot Website ($HARMONY_WEB) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Harmony Bot Website is back up in 0a2f870.


text:
🛑 Harmony Bot Website is down

In 08cac11, Harmony Bot Website ($HARMONY_WEB) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Harmony Bot Website is back up in fe20dda.


text:
🛑 Harmony Bot Website is down

In 96a8254, Harmony Bot Website ($HARMONY_WEB) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Harmony Bot Website is back up in 58b157b.