text:
Kibana tells me login is disable. Consult admins.

(Original issue 3 created by DanielJ210 on 2018-01-30T17:07:11.760965+00:00)
When I use the run command and then navigate to the Kibana URL, I'm shown the login page and told that login is disable and to contact administration. I shouldn't be getting this, right?

(Original issue 3 last updated on 2018-07-16T09:02:17.036236+00:00)
(Issue automaticaly closed due to status in Bitbucket: resolved)

(Original comment by nshou on 2018-02-11T07:36:23.446060+00:00)
This container image does not require any authentication steps. Did you edit .yml files or install X-Pack Security?

(Original comment by nshou on 2018-07-09T02:30:07.877311+00:00)
I am going to close this ticket if you no longer experience the issue. Thank you.

repo: nshou/elasticsearch-kibana


text:
Ensure all relationship creation interfaces work

Respondents should be able to create relationships between observing systems and data products, between data products and applications.
Relationships will be created working backwards from a response object. E.g. on the "Applications" page, you can create applications and relate them to data products.
Societal benefit areas can come later.

Application/Data Product was working at the start of this story. Now Observing System/Data Product is also working.

source: gharchive/issue

authors: MattF-NSIDC rmarow

repo: nsidc/usaon-vta-survey

license: MIT

license_type: permissive

license_source: github-api


text:
LICENSE

Just read your publication in Nature - Great work. Can you please add a LICENSE file to this repository so others know how to give you proper attribution?

+1 on this issue.  I agree, very interesting paper, and some useful functions here that would be nice to utilize without having to re-implement from scratch (eg. calculating LLR on ESM models).  @vasilisNt, my understanding is that no license implies no rights for usage (https://choosealicense.com/no-permission/).  Are there plans to add a permissive license here?

@timbitz @brianloyal Apologies for the late response. We just added an MIT license.

authors: brianloyal nadavbra timbitz

repo: ntranoslab/esm-variants


text:
Roadmaps for improving quality?

Hi,
I found this to be a great barcode recognition library. I'd like to help improve it but I didn't see a contribution doc. Could the authors list some tasks / roadmaps for improving the recognition quality?

Also hi from my side and welcome. Out of curiosity I have two questions:
a) What is your background and area of expertise?
b) What is your motivation to contribute (do you have a specific use case of the library yourself or just want to contribute to an interesting open source project)?
I have several 'loose' ends in my head as to where the project can be improved but most of them are still relatively vague or rather long term changes. Depending on your answers I'll try to come up with a suggestion to start somewhere.

You have a rather peculiar objective ;). So you are going to be the internal support for a presumably commercial environment?
If I'm confronted with this question (why is a particular image not recognized) I have to look at debugging output while running the code on the sample myself and I (re-)wrote half the detection algorithms in this code base. So I guess the best approach would likely be to just dig in once you have a specific sample to work with? As a little "exercise" you could start looking into the first 3 samples of #275 and see what your analysis is regarding the limitation of the current code.
If you want to tackle something 'big' where the current code is completely lacking then you might want to have a look at the Aztec and the MaxiCode detectors. Especially the latter is simply not working at all for real-world input. I have not looked at that code at all. The Aztec is also severely limited. There I do at least have some thoughts on how to possibly improve the situation. If you want to dive into any of those, I'd encourage you to make your progress visible, so you don't spent days or even weeks on that only to find out that I find your end result questionable for whatever reason. ;).

Haha it's still in the early stage, not going commercial yet. I need to answer the questions from my supervisor.
Thanks for the advice. I'll dig deeper into the barcode readers.

authors: axxel duanqn

repo: nu-book/zxing-cpp

license_source: bigquery


text:
🛑 Lavoro e Politiche Sociali is down

In c4b6fe2, Lavoro e Politiche Sociali (http://www.lavoro.gov.it/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Lavoro e Politiche Sociali is back up in a7c1020.


text:
🛑 Cultura is down

In d5647a5, Cultura (https://www.beniculturali.it/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Cultura is back up in 315c8bd after 10 hours, 57 minutes.


text:
Numpy isnan failing when used multiple times in prange

I've encountered an error when I try and use isnan on more than one array in any function I prange. Below I've provided a minimal example and the error message.
I'm using Numpy 1.15.4 and Numba 0.42.0
import numpy as np
from numba import prange, njit

@njit(parallel=True)
def nanWorks (nan_array):
    for i in prange(2):
        test =  nan_array[i][~np.isnan(nan_array[i])]

@njit(parallel=True)
def nanNoWork (nan_array, nan_array2):
    for i in prange(2):
        test = nan_array[i][~np.isnan(nan_array[i])]
        test2 = nan_array2[i][~np.isnan(nan_array2[i])]

nan_array = np.array([[np.nan, 5, 6, 7, np.nan], [3, 5, 6, np.nan, np.nan]])
nan_array2 = np.array([[np.nan, 1, 2, 3, np.nan], [4, 7, 8, np.nan, np.nan]])

nanWorks(nan_array)
nanNoWork(nan_array, nan_array2)

Error Message
Traceback (most recent call last):
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\errors.py", line 617, in new_error_context
    yield
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\lowering.py", line 259, in lower_block
    self.lower_inst(inst)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\lowering.py", line 408, in lower_inst
    func(self, inst)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\npyufunc\parfor.py", line 238, in _lower_parfor_parallel
    bool(alias_map), index_var_typ, parfor.races)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\npyufunc\parfor.py", line 1012, in _create_gufunc_for_parfor_body
    locals)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 941, in compile_ir
    lifted_from=lifted_from)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 382, in compile_ir
    return self._compile_ir()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 864, in _compile_ir
    return self._compile_core()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 844, in _compile_core
    res = pm.run(self.status)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 255, in run
    raise patched_exception
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 246, in run
    stage()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 485, in stage_nopython_frontend
    self.locals)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 1028, in type_inference_stage
    infer.build_constraint()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 816, in build_constraint
    self.constrain_statement(inst)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 1094, in constrain_statement
    f(inst, self)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\parfor.py", line 3903, in parfor_typeinfer
    typeinferer.build_constraint()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 816, in build_constraint
    self.constrain_statement(inst)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 1076, in constrain_statement
    self.typeof_assign(inst)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 1139, in typeof_assign
    self.typeof_global(inst, inst.target, value)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 1267, in typeof_global
    self.lock_type(target.name, lit or typ, loc=inst.loc)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 883, in lock_type
    tv.lock(tp, loc=loc, literal_value=literal_value)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\typeinfer.py", line 76, in lock
    assert not self.locked
AssertionError: Failed in nopython mode pipeline (step: nopython frontend)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Bryce\source\repos\testing nan.py", line 20, in <module>
    nanNoWork(nan_array, nan_array2)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\dispatcher.py", line 367, in _compile_for_args
    raise e
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\dispatcher.py", line 324, in _compile_for_args
    return self.compile(tuple(argtypes))
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\dispatcher.py", line 655, in compile
    cres = self._compiler.compile(args, return_type)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\dispatcher.py", line 82, in compile
    pipeline_class=self.pipeline_class)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 926, in compile_extra
    return pipeline.compile_extra(func)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 374, in compile_extra
    return self._compile_bytecode()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 857, in _compile_bytecode
    return self._compile_core()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 844, in _compile_core
    res = pm.run(self.status)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 255, in run
    raise patched_exception
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 246, in run
    stage()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 717, in stage_nopython_backend
    self._backend(lowerfn, objectmode=False)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 666, in _backend
    lowered = lowerfn()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 653, in backend_nopython_mode
    self.metadata)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\compiler.py", line 1048, in native_lowering_stage
    lower.lower()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\lowering.py", line 178, in lower
    self.lower_normal_function(self.fndesc)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\lowering.py", line 219, in lower_normal_function
    entry_block_tail = self.lower_function_body()
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\lowering.py", line 244, in lower_function_body
    self.lower_block(block)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\lowering.py", line 259, in lower_block
    self.lower_inst(inst)
  File "C:\Users\Bryce\Anaconda3\lib\contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\errors.py", line 625, in new_error_context
    six.reraise(type(newerr), newerr, tb)
  File "C:\Users\Bryce\Anaconda3\lib\site-packages\numba\six.py", line 659, in reraise
    raise value
numba.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
Failed in nopython mode pipeline (step: nopython frontend)

File "testing nan.py", line 12:
def nanNoWork (nan_array, nan_array2):
    for i in prange(2):
    ^

[1] During: lowering "id=4[LoopNest(index_variable = parfor_index.144, range = (0, $const2.2, 1))]{12: <ir.Block at C:\Users\Bryce\source\repos\testing nan.py (12)>}Var(parfor_index.144, C:\Users\Bryce\source\repos\testing nan.py (12))" at C:\Users\Bryce\source\repos\testing nan.py (12)
-------------------------------------------------------------------------------
This should not have happened, a problem has occurred in Numba's internals.

Thanks for the report. I think the root cause is the same as https://github.com/numba/numba/issues/3686 which was fixed in https://github.com/numba/numba/pull/3706 and will make it into the next (0.43) release. The code sample presented works fine when using the Numba master branch.
If you would like to try out the latest development releases of Numba they are available via:
conda install -c numba/label/dev numba

Thank you, it does work now with the new update.

repo: numba/numba


text:
Wip/deprecate jitclass location

Based on https://github.com/numba/numba/pull/5352 adds deprecation behaviours for numba.jitclass moving to numba.experimental.jitclass.

The relevant part is only the second commit, and this looks fine.

I tested it manually by doing.
In [1]: from numba import jitclass

In [2]: @jitclass(spec=[])
   ...: class foo:
   ...:     def __init__(self):
   ...:         pass
   ...:
<ipython-input-2-48ecccfeaba6>:1: NumbaDeprecationWarning: The 'numba.jitclass' decorator has moved to 'numba.experimental.jitclass' to better reflect the experimental nature of the functionality. Please update your imports to accommodate this change and see http://numba.pydata.org/numba-doc/latest/reference/deprecation.html#change-of-jitclass-location for the time frame.
  @jitclass(spec=[])

source: gharchive/pull-request

authors: esc stuartarchibald


text:
Emoji reactions

Feature Request
[WIP] support Emoji animations/reactions as on GMeet.

Nice to have, not a priority.

repo: numerique-gouv/meet


text:
Ability to access article frontmatter / Page object in extend-head.html

Is your feature request related to a problem? Please describe.
As far as I'm aware, it's currently not possible to access the current page's Page object (and by extension, any page parameters from frontmatter) in extend-head.html. This makes it impossible to perform any page-level logic.
For example, in my use case, I wish to add something in my extend_head.html which relies on a condition such as if page.HasShortcode "foo_bar", but (again, as far as I'm aware?) this is not possible with the way extend-head.html is currently implemented, since Blowfish only passes .Site into the partial.
Describe the solution you'd like
It would open up a lot of possibilities and be super handy to be able to access the current page from extend-head.html.
Describe alternatives you've considered
Given what I wish to do, I don't believe there is any alternative, but I'm open to correction!
Additional context
This is the same issue as #1425, which appears to be have been prematurely closed due to a misunderstanding.

Have same problem but looks like the {{ page }} variable contain Page object
# example
{{ page.Resources }}

Have same problem but looks like the {{ page }} variable contain Page object
# example
{{ page.Resources }}

Seems this only has the global page object, thus it's always the root.

authors: Erwane deltaclock tigattack

repo: nunocoracao/blowfish


text:
Did something break with dependencies on 7.0.4?

I was updating project dependencies and 7.0.3 works fine, but on 7.0.4 composer throws a problem:
  Problem 1
    - Root composer.json requires nunomaduro/collision 7.0.4 -> satisfiable by nunomaduro/collision[v7.0.4].
    - You can only install one version of a package, so only one of these can be installed: sebastian/environment[5.1.2, ..., 5.1.x-dev, 6.0.0, 6.0.x-dev].
    - phpunit/phpunit 9.6.3 requires sebastian/environment ^5.1.3 -> satisfiable by sebastian/environment[5.1.3, 5.1.4, 5.1.5, 5.1.x-dev].
    - nunomaduro/collision v7.0.4 requires sebastian/environment ^6.0.0 -> satisfiable by sebastian/environment[6.0.0, 6.0.x-dev].
    - Root composer.json requires phpunit/phpunit 9.6.3 -> satisfiable by phpunit/phpunit[9.6.3].

Is this somehow related with phpunit bump to v10? Project is on Laravel 9 with PHPUnit 9.
EDIT: nvm, appears that 7.0.3 does not contain the sebastian/environment dependency, is it possible to allow v5 too?

Closing as it seems it's solved on 7.0.5

repo: nunomaduro/collision


text:
Use phpstan/phpstan and nunomaduro / larastan simultaneously

Larastan version: ^1.0
Laravel version: 8.69.0

Description
I want to use original/base phpstan/phpstan and wrapper - this package - at the same time.
Laravel code where the issue was found
$ composer require nunomaduro/larastan --with-dependencies --dev
Using version ^1.0 for nunomaduro/larastan
./composer.json has been updated
Running composer update nunomaduro/larastan --with-dependencies
Loading composer repositories with package information
Dependency "laravel/framework" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Dependency "mockery/mockery" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Dependency "phpstan/phpstan" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - nunomaduro/larastan[dev-master, 1.0.0, ..., 1.0.1] require phpstan/phpstan ^1.0 -> found phpstan/phpstan[dev-master, 1.0.0, ..., 1.1.1] but it conflicts with your root composer.json require (^0.12.96).
    - nunomaduro/larastan 1.0.x-dev is an alias of nunomaduro/larastan dev-master and thus requires it to be installed too.
    - Root composer.json requires nunomaduro/larastan ^1.0 -> satisfiable by nunomaduro/larastan[1.0.0, 1.0.1, 1.0.x-dev (alias of dev-master)].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Hi,
Looks like in your composer.json you have "phpstan/phpstan":"^0.12.96" You need to change it to "phpstan/phpstan":"^1.0"

Thanks!

But? Can I use phpstan in old way, or installing larastan will override default phpstan defaults to work with Laravel code?

I don't understand the question. Larastan is just a PHPStan plugin. It'll help PHPStan understand Laravel code. PHPStan will run normally.

It's mean That thread have to be open.

authors: LocalHeroPro canvural

repo: nunomaduro/larastan


text:
Precise return type for Enumerable::partition()

[x] Added or updated tests
[ ] ~Documented user facing changes~
[x] Updated CHANGELOG.md

Changes
Fixes the false-positive error reported in this example:

Breaking changes
None, analysis will be more precise.

Hi,
All the collection stubs are moved to Laravel core now. And Larastan 2 will remove it from this repo. So we will no longer be accepting PRs that are modifying collection stubs. Thank you for understanding.

authors: canvural spawnia


text:
[T2A2][W15-A3]Marcus Ng Wen Jian

Ready for review
Tutorial Group 6
Wednesday 1500-1600 Team A3

@marcusngwj

in general good work on this. keep it up!
try to improve on the minor comments made throughout the code.

authors: marcusngwj okkhoy


text:
[CS2103-W13-2] SmartLib

SmartLib is a platform for private book loaning service to keep track of books and customers' information digitally.

Codecov Report

Merging #7 (b99ad29) into master (c36220c) will decrease coverage by 0.11%.
The diff coverage is 74.78%.

@@             Coverage Diff              @@
##             master       #7      +/-   ##
============================================
- Coverage     72.15%   72.04%   -0.12%
  Complexity      399      399
============================================
  Files            70       72       +2
  Lines          1232     1234       +2
  Branches        125      125
============================================
  Hits            889      889
- Misses          311      313       +2
  Partials         32       32

Impacted Files
Coverage Δ
Complexity Δ

src/main/java/seedu/smartlib/AppParameters.java
75.00% <ø> (ø)
9.00 <0.00> (?)

src/main/java/seedu/smartlib/Main.java
0.00% <ø> (ø)
0.00 <0.00> (?)

src/main/java/seedu/smartlib/MainApp.java
0.00% <0.00%> (ø)
0.00 <0.00> (?)

.../main/java/seedu/smartlib/commons/core/Config.java
68.18% <ø> (ø)
7.00 <0.00> (?)

.../java/seedu/smartlib/commons/core/GuiSettings.java
69.23% <ø> (ø)
5.00 <0.00> (?)

...n/java/seedu/smartlib/commons/core/LogsCenter.java
78.37% <ø> (ø)
10.00 <0.00> (?)

...ain/java/seedu/smartlib/commons/core/Messages.java
0.00% <ø> (ø)
0.00 <0.00> (?)

...main/java/seedu/smartlib/commons/core/Version.java
82.50% <ø> (ø)
19.00 <0.00> (?)

.../java/seedu/smartlib/commons/core/index/Index.java
100.00% <ø> (ø)
10.00 <0.00> (?)

...ib/commons/exceptions/DataConversionException.java
100.00% <ø> (ø)
1.00 <0.00> (?)

... and 64 more

Continue to review full report at Codecov.

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

authors: arsatis codecov-io


text:
bad page map kernel warning when QEMU guest uses hugepages for guest memory

When using hugepages for the guest memory:
-object memory-backend-file,id=mem,size=1G,mem-path=/dev/hugepages,share=on -mem-prealloc -numa node,memdev=mem

the kernel (5.4.0-rc8) emits the following warning multiple times:
[2065774.775141] BUG: Bad page map in process gpio-pci-idio-1  pte:80000001bcea0027 pmd:22f4c4067
[2065774.775980] page:ffffddd2c6f3a800 refcount:0 mapcount:-1 mapping:dead000000000400 index:0xa0 compound_mapcount: -1
[2065774.776641] hugetlbfs_aops name:"qemu_back_mem.mem.NGh5A4"
[2065774.777329] flags: 0x2ffff8000000000()
[2065774.778116] raw: 02ffff8000000000 ffffddd2c6f38001 ffffddd0c6f3a808 dead000000000400
[2065774.778733] raw: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[2065774.779350] page dumped because: bad pte
[2065774.779965] addr:00007fb15f4f4000 vm_flags:1c0000fb anon_vma:0000000000000000 mapping:ffff8c0329d59570 index:a0
[2065774.780608] file:00000000-0000-0000-0000-000000000000 fault:0x0 mmap:libmuser_mmap [muser] readpage:0x0
[2065774.781307] CPU: 4 PID: 96138 Comm: gpio-pci-idio-1 Tainted: G           O      5.4.0-rc8+ #11
[2065774.782361] Hardware name: Nutanix AHV, BIOS 1.9.1-5.el6 04/01/2014
[2065774.783352] Call Trace:
[2065774.784611]  dump_stack+0x66/0x8b
[2065774.785866]  print_bad_pte+0x1d1/0x2a0
[2065774.786652]  unmap_page_range+0x7b6/0xab0
[2065774.787410]  ? __switch_to_asm+0x40/0x70
[2065774.788114]  unmap_vmas+0x81/0xf0
[2065774.788811]  unmap_region+0xae/0x120
[2065774.789501]  __do_munmap+0x2aa/0x4d0
[2065774.790190]  __vm_munmap+0x6f/0xc0                                                                                [2065774.790868]  __x64_sys_munmap+0x27/0x30
[2065774.791531]  do_syscall_64+0x52/0x180
[2065774.792184]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[2065774.792828] RIP: 0033:0x7fb19f5386e7
[2065774.793476] Code: c7 c0 ff ff ff ff eb 8d 48 8b 15 ac 47 2b 00 f7 d8 64 89 02 e9 5b ff ff ff 66 2e 0f 1f 84 00 00 00 00 00 b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 47 2b 00 f7 d8 64 89
01 48
[2065774.794832] RSP: 002b:00007ffdc6f671d8 EFLAGS: 00000206 ORIG_RAX: 000000000000000b
[2065774.795524] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb19f5386e7
[2065774.796232] RDX: 0000000040000000 RSI: 0000000040000000 RDI: 00007fb15f454000
[2065774.796934] RBP: 00007ffdc6f67200 R08: 0000000000000000 R09: 0000000000000000
[2065774.797628] R10: 0000000000000001 R11: 0000000000000206 R12: 000055e3b81fb830
[2065774.798324] R13: 00007ffdc6f67a40 R14: 0000000000000000 R15: 0000000000000000
[2065774.799088] Disabling lock debugging due to kernel taint

reported by kun.qiu@intel.com
Surprisingly the GPIO sample seems to work, although attempting to unload muser.ko results in much more serious errors.
The problem might be that libmuser calls mmap without the MAP_HUGE flags in this case.

@raphael-nutanix FYI.

I tested with spdk and MAP_ANONYMOUS causes problems as suspected. qemu does start up but it disables the device. See the attached logs.
spdk_muser_map_anon.txt
This looks consistent with broken DMA to me. @tmakatos @swapnili do you agree?
I can't tell for sure what's wrong, but most likely the MAP_ANONYMOUS caused libmuser to essentially allocate private memory, as you said. Can you show what the guest says about the NVMe device? E.g. dmesg | grep -i nvm?

I enabled debug prints in muser.ko and kept the original mmap call except that I round to 2 MB, and noticed this:
[179716.592438] muser muser: libmuser_mmap_dma: expected mmap of 0x200000 bytes, got 0x20000 instead
[179716.593681] notifier failed for iova=e0000 vaddr=7f7872620000 size=20000

So it's muser.ko the one that fails the mmap. Removing this checked allowed the memory map to succeed. @franciozzy also confirmed that it is possible to mmap non-2MB chunks of memory on a hugetlbfs file, with the kernel essentially memory mapping the entire 2 MB page. So we'll have to do the same thing in MUSER, but we'll also have to maintai a list of which pages of a DMA map are valid so that we can validate the arguments passed to dma_map_sg. And muser.ko will also have to tell libmuser the page size.

My setup was broken so the above might not be valid, need to retest everything.

As @swapnili already said, I don't think we can make mmap work since the control device is not a huge file. So if we still want to use mmap we'll have to do without the MAP_HUGETLB flag and see whether we can fix the error in unmap.

repo: nutanix/muser


text:
go get prest/cmd and prest/config should install only these packages

Guys,
When I do go get -u github.com/nuveo/prest/cmd it must download only cmd package, right? So, the go get command is downloading all prest files, same case when I do go get -u github.com/nuveo/prest/config.

@lerrua go get download all code in repository, but you can use the packages separately

@lerrua @lerrua this can be seen on https://github.com/golang/go/blob/master/src/cmd/go/internal/get/vcs.go#L501

authors: felipeweb lerrua

repo: nuveo/prest

license: mit


text:
SanityContent causing [Vue Warn] & console log flooding

Description
The SanityContent component is causing the following Vue error:
[Vue warn]: Extraneous non-props attributes (data-v-inspector) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
In addition to this, for larger blocks arrays, there is a significant issue where the console gets flooded with log messages, eventually preventing the local development environment from starting or responding properly.
Version
"@nuxtjs/sanity": "^1.12.1"
"nuxt": "^3.13.2"
"vue": "^3.5.6"

Reproduction
StackBlitz
Steps to Reproduce

Use a <SanityContent /> with a blocks array.
Start the local development server.
Observe the console flooding with warnings or errors.

Expected Behavior
No warnings about extraneous non-prop attributes should appear.

had the same issue, its likely to be related to Vue 3.5. it seems like it requires components to set inherit attribute to false

repo: nuxt-modules/sanity


text:
Support "custom" srcDir

With a the srcDir set in Nuxt the module won't find the icons and writes output to the default 'root' directory.
So with:
export default defineNuxtConfig({
  srcDir: "src",
  modules: [
    '@nuxtjs/svg-sprite',
  ],
});

Expected would be reading and writing icons from/to: ./src/assets/sprite/ but instead an empty gen is written to ./assets/sprite/.
I've tried some combinations of custom input & output, but couldn't find a working workaround sadly...

Found a workaround just now:
  svgSprite: {
    input: '~/src/assets/sprite/svg',
  }

And then use a symbolic symlink from assets/sprite/gen to src/assets/sprite/gen.

repo: nuxt-modules/svg-sprite


text:
fix: add global preload links to entry chunk

resolves https://github.com/nuxt/fonts/issues/152
🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 41.68%. Comparing base (df2685d) to head (a0b04cb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #274      +/-   ##
==========================================
+ Coverage   41.48%   41.68%   +0.20%
==========================================
  Files          58       58
  Lines        3539     3553      +14
  Branches      437      442       +5
==========================================
+ Hits         1468     1481      +13
- Misses       2033     2034       +1
  Partials       38       38

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

authors: codecov-commenter danielroe

repo: nuxt/fonts


text:
extendRoutes not working

I have test.vue file under pages directory. So /test path automatically works. With the below configuration, I should have got /test1 pointing to that same test.vue file. However, when I load it on browser, I get 404.
    router:{
        extendRoutes(routes,resolve){
            routes.push({
                name:'test1',
                path:'/test1',
                component:resolve(__dirname,'pages/test.vue')
            });
        }
    }

any update on this issue?

not sure but maybe simply create test1.vue with the content of:
<script>
  import Index from './test.vue'
  export default Index
</script>

I use this approach for adding multi language pages with the same content but different path

hey guys,  i got the same problem ,do you resolve it ?

https://github.com/nuxt-community/router-module

authors: alexchopin cyrilpanicker dohomi lurenhtml5


text:
Global Sass mixins and functions

It seems that only compiled CSS is available globally.
For example, something like this included globally would work:
// assets/scss/main

@mixin createGrid() { ... }

.container {
  @include createGrid()
}

But this wouldn't work:
// assets/scss/main

@mixin createGrid() { ... }

// components/someComponent

.container {
  @include createGrid()
}

Would it be possible to inject sass mixins and functions globally? Or is there a reason they need to be imported individually for each file/component?
If the latter, another alternative would be to have sass @import statements resolve node_modules so that components that use them don't all have to do @import 'node_modules/somePlugin/dist/someFile'.

I use stylus ( yarn add stylus and stylus-loader )
It think you need import at style
( do you install sass-loader ? )
for my example
assets/css/variables.styl
production = true

components/Footer.vue
<template lang="pug">
div
  h1
<template>
<style lang="stylus" scoped>
@import = '~assets/css/variables.styl'
if production
  h1
    background red
// background red only production ( manually modify on variables.styl ) ...
</style>

as another sample ( with sass )
I have use bootstrap 4 , but I only need reboot grid visibility
assets/css/bs4.scss
/**
 * Bootstrap build only reboot grid visibility
 */

@at-root {
  @-ms-viewport { width: device-width; }
}

html {
  box-sizing: border-box;
  -ms-overflow-style: scrollbar;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

@import "../../node_modules/bootstrap/scss/variables";
@import "../../node_modules/bootstrap/scss/mixins";

// 瀏覽器初始化
@import "../../node_modules/bootstrap/scss/normalize";
@import "../../node_modules/bootstrap/scss/reboot";

// 網格
@import "../../node_modules/bootstrap/scss/grid";

// RWD隱藏工具
@import "../../node_modules/bootstrap/scss/utilities/visibility";

nuxt.config.js
css: [
    { src: '~assets/css/bs4.scss', lang: 'scss' },
  ]

Are you using then trying to use the CSS in Vue component files?
I tried following your example, I have a global CSS file configured in nuxt.config.js, and I imported the sass plugins in that file.
For example:
// ~assets/global.scss
.background
  background-color: blue

@mixin background() {
  background-color: blue
}

// nuxt.config.scss
css: [
    { src: '~assets/scss/global.scss', lang: 'scss' },
  ]

I verified that normal selector styles work; if I use .background then the background will be blue.
However, I get errors for any variables, mixins, and functions that I try to use; if try to @include background() it will not work until I do @import '~assets/scss/global.scss in the respective Vue component file.

@alidcastano I wirte stylus
I think my English not good enough 👶
I just want say I also need import var.styl file in my each vue file .
I think that don't have global import for sass/scss/stylus
I had looking for global import for stylus
https://github.com/vuejs/vue-loader/issues/328
but it look like need import from sass/scss/stylus file you need .

Hi @alidcastano
We depend on vue-loader for this, and indeed, you need to import your mixins/variables everytime you need to use them, it's better for clarity and also does not make your bundle bigger since it's only helpers. See https://github.com/vuejs/vue-loader/issues/328#issuecomment-269915030
if you use node modules, you can use directly:
@import "bootstrap/scss/variables"

BTW, thank you @ausir0726 for helping us to find the answer 👍

See here for a more up-to-date answer, working with at least alpha4: https://github.com/nuxt/nuxt.js/issues/1092#issuecomment-316365016

@alidcastano There's a fitting solution to this exact problem. It's been something that I have been looking for a while. Let me share the solution with you-
https://stackoverflow.com/a/46015906/5013932

Here is my solution that loops through all loaders and allows for more fine-grained filtering based on loader type. For example, to add includePaths to sass / scss:
const util = require('util')

module.exports = {
  build: {
    extend(config, ctx) {
      if (ctx.dev && ctx.isClient) {
        const vueLoader = config.module.rules.find(
          rule => rule.loader === 'vue-loader')
        const { options: {loaders} } = vueLoader || { options: {} }
        if (loaders) {
          for (const loader of Object.values(loaders)) {
            changeLoaderOptions(Array.isArray(loader) ? loader : [loader])
          }
        }
        config.module.rules.forEach(rule => changeLoaderOptions(rule.use))
        // console.log(util.inspect(config.module.rules, { depth: 6 }))
      }
    }
  }
}

function changeLoaderOptions(loaders) {
  if (loaders) {
    for (const loader of loaders) {
      let options
      switch (loader.loader) {
      case 'sass-loader':
        options = {
          includePaths: ['./styles'],
          data: '@import "_imports";'
        }
        break
      case 'stylus-loader':
        options = {
          paths: [path.resolve('./styles')],
          import: ['_imports']
        }
        break
      }
      if (options) {
        Object.assign(loader.options, options)
      }
    }
  }
}

authors: Atinux alidcastano anish000kumar ausir0726 jsonberry lehni


text:
FeatherJS Client globally visible

Hi Guys,
I am totally new to nuxt.js.Tried to integrate nuxt.js with featherjs successfully when i tried to include featherjs client as plugin so that i could call it globally across all my component's it's not attaching to the VueJS instance,
my package.json
{
"name": "nuxt-i18n",
"dependencies": {
"axios": "^0.15.3",
"bootstrap": "^3.3.7",
"feathers": "^2.1.1",
"feathers-client": "^2.0.0-pre.2",
"feathers-localstorage": "^1.0.0",
"feathers-socketio": "^1.5.2",
"jquery": "^3.2.1",
"nuxt": "latest",
"socket.io-client": "^1.7.3"
},
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start"
}
}
my nuxt.config.js
const webpack = require('webpack')
module.exports = {
loading: {
color: 'green'
},
router: {
middleware: 'i18n'
},
build: {
vendor: ['axios','jquery', 'bootstrap','socket.io-client','feathers','feathers-client','feathers-hooks','feathers-socketio','feathers-authentication-client'],
plugins: [
// set shortcuts as global for bootstrap
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
]
},
css: ['bootstrap/dist/css/bootstrap.css'],
plugins: [{src: '~plugins/bootstrap.js',ssr:false},
{src:'~plugins/i18n',ssr:true},
{src:'~plugins/feathers',ssr:false}]
}
my plugins/feathers.js
import feathers from 'feathers/client';
import hooks from 'feathers-hooks';
import socketio from 'feathers-socketio/client';
import io from 'socket.io-client';
import localstorage from 'feathers-localstorage';
import authentication from 'feathers-authentication-client';
import Vue from 'vue'
if (process.BROWSER_BUILD) {
const client = feathers().
configure(socketio(io("http://localhost:3030"))).
configure(hooks()).
configure(authentication({ storage: window.localStorage }));
console.log("Loading Feather's Client Globally");
Vue.prototype.$feathersClient = function () {
console.log("Returning Client");
return client;
}
}
My Home.vue which is the one throwing error,

Can someone throw some light on what mistake am i doing....

To be clear this line on click of the login button attached to the authenticate method is trowing the error 'this.feathersClient().authenticate is not a function'
.....
this.feathersClient().authenticate
......

Got it working guy's it should have been referenced as this.$feathersClient


text:
app.html is rendered incorrectly.

Version
v2.6.3
Reproduction link
https://codesandbox.io/embed/pymmj2r9x7
Steps to reproduce
I add app.html to root dir.
<!DOCTYPE html>
<html {{ HTML_ATTRS }}>
  <head {{ HEAD_ATTRS }}>
	  <script>window.ts_start=+new Date()</script>
    {{ HEAD }}
    <script>window.ts_head=+new Date()</script>
  </head>
  <body {{ BODY_ATTRS }}>
    {{ APP }}
    <script>window.ts_body=+new Date()</script>
  </body>
</html>

What is expected ?
Expect <script>window.ts_body=+new Date()</script>  to be placed before </body>
What is actually happening?
<script>window.ts_body=+new Date()</script> is places after bundle scripts.

This bug report is available on Nuxt community (#c9178)

Since most of the scripts are using defer, is it really an issue?

@Atinux is correct, all the bundle scripts are also pre-fetched by prefetch tag in head
The reason why the script is after bundle scripts is:
In SPA mode, bundle files are injected into app.html while webpack building step by html-webpack-plugin.
And html-webpack-plugin body injection will put all bundles right before </body>.
@Miaoxingren If you want to get time of body loaded, you can try DOM events like  DOMContentLoaded, readystatechange or load

@Atinux In SPA mode, scripts of index.html generated are not using defer.
@clarkdo Thanks for the answer. What if I want to get time of head stylesheet loaded?
like this:
<!DOCTYPE html>
<html {{ HTML_ATTRS }}>
  <head {{ HEAD_ATTRS }}>
    {{ HEAD }}
    <script>window.ts_start=+new Date()</script>
    {{ HEAD_CSS }}
    <script>window.ts_css=+new Date()</script>
  </head>
  <body {{ BODY_ATTRS }}>
    {{ APP }}
    <script>window.ts_body=+new Date()</script>
   {{ APP_BUNDLE_SCRIPT  }}
    <script>window.ts_script=+new Date()</script>
  </body>
</html>

If I change inject of html-webpack-plugin to false in spa mode and use htmlWebpackPlugin.files to add resources in app.html, will it be harmful?

authors: Atinux Miaoxingren clarkdo


text:
nuxt generate with --no-build doesn't generate static routes

Version
v2.8.1
Reproduction link
https://codesandbox.io/s/codesandbox-nuxt-y4nlw
Steps to reproduce
Build an app with some static routes, like "pages/about.vue". Then set-up a build process where you run nuxt build and nuxt generate --no-build as separate commands. (In the sandbox, open a new terminal then yarn run build-then-generate)
What is expected ?
A page called "about.html" is generated.
What is actually happening?
Only pages registered in config.generate.routes are picked up. about.html is not generated at all.
Additional comments?
Running nuxt generate without the "--no-build" param is working fine.

This bug report is available on Nuxt community (#c9454)

no-build is meant to be used for incremental builds when you eg only wish to generate newly added dynamic routes. See the v1.0.0 changelog entry here (under features) but also the output of nuxt generate --help:
    --no-build         Only generate pages for dynamic routes. Nuxt has to be built once before using this
                       option

I guess the main issue here is that you dont need to built once but generate once with build

That makes a bit of sense, I guess if that is how it was designed the help text should be updated a bit to clarify ;)

You are right on this @FreekVR
We will improve it in upcoming releases :)

@FreekVR 	If you have an idea for a better help text, please send in a PR! We would appreciate it ☺

authors: Atinux FreekVR manniL pimlie


text:
DX utility for trailing slashes

Related PR: #6331
Suggested by @pimlie
When trailing slash handling is enforced (in any manner), it'd be great to have two things for improved DX:
Nuxt Link adaption
No matter how you input the links in your Nuxt link (be it as an object via named routes or via string), the component should enforce the set up trailing slash handling (adding or removing the slashes as needed).
Utility function for Nuxt modules
To ensure that all modules (like https://github.com/nuxt-community/redirect-module or https://github.com/nuxt-community/sitemap-module) have the same implementation of trailing slash handling, we should provide a utility for that.

So basically these DX tools could be an adaption of these utilities. Here are the corresponding unit tests.
They'd probably only need to be adapted to use a nuxt config setting of whether to enforce the trailing slash or not. @manniL feel free to copy what you need if you want to look in to this.

@dtmzr Nop it is still open. we will have to make a reusable utility across repos. We will keep here updated when published so we can use it on all random places doing url normalization. Including vue-app, vue-renderer and 3rd party modules :)

authors: manniL pi0 pimlie


text:
Base href not set in SPA mode

Version
v2.12.0
Reproduction link
https://codesandbox.io/s/spa-base-href-2761c
Steps to reproduce

Click the link to the subpage /foo/bar.

What is expected ?
The page should have <base href="/"> in <head> and the image should load correctly on both pages.
What is actually happening?
There's no <base> tag and the image on /foo/bar is not loaded.
Additional comments?
The base tag is only added if the mode is set to universal.

This bug report is available on Nuxt community (#c10443)

Hi @arildm !
I saw on the code that <base href=""> meta is only available into ssr mode but not in SPA.
So the base attribute isn't insert into <head> section.
It's not indicate into the official documentation (https://fr.nuxtjs.org/api/configuration-router#base).
I will purpose a PR :)

PR has been accepted and it will be available on next release 😉

authors: Geminii arildm


text:
Interface 'NuxtApp' incorrectly extends interface 'Vue' (typescript + Element-UI)

Version
v2.12.2
Reproduction link
https://jsbin.com/?html,output
Steps to reproduce
once I create a new nuxt.js project(typescript + Element-UI) and then run it, it's going wrong. Development and build are the same failure.
What is expected ?
no failure found.
What is actually happening?
nuxt:typescript 09:49:56rojects/test/node_modules/@nuxt/types/app/index.d.ts(119,18):
119:18 Interface 'NuxtApp' incorrectly extends interface 'Vue'.
Types of property '$loading' are incompatible.
Type 'NuxtLoading' is not assignable to type '(options: LoadingServiceOptions) => ElLoadingComponent'.
Type 'DefaultNuxtLoading' is not assignable to type '(options: LoadingServiceOptions) => ElLoadingComponent'.
Type 'DefaultNuxtLoading' provides no match for the signature '(options: LoadingServiceOptions): ElLoadingComponent'.
export interface NuxtApp extends Vue {
^
$options: NuxtAppOptions
$loading: NuxtLoading
context: Context

This bug report is available on Nuxt community (#c10545)

tsconfig.json: add "skipLibCheck: true" into compilerOptions


text:
when I use typescript in layout file, error raise on page reload.

/path/to/home/layouts/homepage.vue
<template>

    <nuxt/>

</template>

/path/to/home/page/homepage/index.vue
<template>

test

</template>

I try to use typescriot preprocessor in path/to/home/layouts/homepage.vue.
On first access to localhost:3000/homepage, brower can show page correctly.
But I reload brower and following error is displayed.
Nuxt.js Error:

TypeError: this._init is not a function
    at Object.VueComponent [as _homepage] (/path/to/home/node_modules/vue/dist/vue.runtime.common.js:4167:12)
    at Vue$3.loadLayout (App.vue:49:0)
    at Vue$3.boundFn [as loadLayout] (/path/to/home/node_modules/vue/dist/vue.runtime.common.js:166:14)
    at Object._callee$ (.nuxt/server.js:87:13)
    at tryCatch (~/regenerator-runtime/runtime.js:65:14)
    at GeneratorFunctionPrototype.invoke [as _invoke] (~/regenerator-runtime/runtime.js:303:0)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (~/regenerator-runtime/runtime.js:117:0)
    at step (~/babel-runtime/helpers/asyncToGenerator.js:17:0)
    at server-bundle.js:1271:13

Hi @tooppoo
Can you create a reproduction by forking https://glitch.com/edit/#!/nuxt-hello-world?

Yeah, still happening! I think even without ts ( Typescript ), in-general vue-class-component with layouts is giving error. Here is the repo with bug reproduced (https://github.com/piyushchauhan2011/nuxt-component/tree/error/layout-class-component)
Maybe we are missing something in constructor or component class related to child, not sure though.

It started to happen to me after I updated Typescript to v2.4

authors: Atinux jvbianchi piyushchauhan2011 tooppoo


text:
route to pages problem

Environment
Nuxt project info:                                                                                6:55:53 PM

Operating System: Windows_NT
Node Version:     v18.17.1
Nuxt Version:     3.7.4
CLI Version:      3.9.0
Nitro Version:    2.6.3
Package Manager:  npm@9.6.7
Builder:          -
User Config:      app, css, devtools, modules, runtimeConfig, plugins, vite, routeRules, pinia, imports
Runtime Modules:  @nuxtjs/tailwindcss@6.8.0, @vite-pwa/nuxt@0.1.1, nuxt-typed-router@3.3.1, @nuxtjs/robots@3.0.0, @nuxtjs/color-mode@3.3.0, nuxt-lodash@2.5.0, nuxt-swiper@1.2.2, (), nuxt-laravel-precognition@0.0.7, @morev/vue-transitions/nuxt@2.3.6, @nuxtjs/i18n@8.0.0-rc.5, nuxt-headlessui@1.1.4, @nuxt/image@1.0.0-rc.3, @pinia/nuxt@0.4.11
Build Modules:    -

Reproduction
need to explain what is this error
Describe the bug

when routing in any pages this error showing but i routing with nuxt-link with static pages and modules not used in this project please help.
thx
Additional context
No response
Logs
No response

and route not working correctly but if i refresh page route working when route to / or home page and refresh page route not working correctly. I disable modules and plugins for what happening but not

and route not working correctly but if i refresh page route working when route to / or home page and refresh page route not working correctly. I disable modules and plugins for what happening but not effective

my package.json
{
"name": "orise",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@date-io/jalaali": "^2.17.0",
"@mdi/js": "^7.2.96",
"@morev/vue-transitions": "^2.3.6",
"@nuxt/devtools": "latest",
"@nuxt/image": "^1.0.0-rc.3",
"@nuxtjs/color-mode": "^3.3.0",
"@nuxtjs/i18n": "^8.0.0-rc.5",
"@nuxtjs/robots": "^3.0.0",
"@nuxtjs/tailwindcss": "^6.8.0",
"@pinia-plugin-persistedstate/nuxt": "^1.1.2",
"@pinia/nuxt": "^0.4.11",
"@prettier/plugin-pug": "^3.0.0",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/jquery": "^3.5.20",
"@vite-pwa/nuxt": "^0.1.1",
"@vue/language-plugin-pug": "^1.8.15",
"jquery": "^3.7.1",
"nuxt": "^3.7.4",
"nuxt-headlessui": "^1.1.4",
"nuxt-laravel-precognition": "^0.0.7",
"nuxt-lodash": "^2.5.0",
"nuxt-swiper": "^1.2.2",
"nuxt-typed-router": "^3.3.1",
"pinia": "^2.1.6",
"prettier": "^3.0.3",
"prettier-plugin-sort-json": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.4",
"pug": "^3.0.2",
"pug-plain-loader": "^1.1.0",
"vite-plugin-vuetify": "^1.0.2",
"vue": "^3.3.4",
"vue-router": "^4.2.5",
"vuetify": "^3.3.19"
},
"overrides": {
"vite-plugin-inspect": "0.7.38"
},
"dependencies": {
"@persian-tools/persian-tools": "^3.5.0",
"aos": "^2.3.4",
"apexcharts": "^3.43.0",
"moment-jalaali": "^0.9.6",
"vue3-apexcharts": "^1.4.4",
"vue3-toastify": "^0.1.13"
}
}
nuxt config
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
head: {
title: process.env.NUXT_APP_NAME,
titleTemplate: '%s | ORISE',
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
meta: [
{ name: 'description', content: 'نرم افزار مدیریت شهودی کسب و کار' },
],
htmlAttrs: {
lang: 'fa',
dir: 'rtl',
},
link: [
{ rel: 'icon', type: 'image/x-icon', href: '~/assets/favicon.ico' },
],
},
},
css: ['~/assets/css/main.css'],
devtools: { enabled: process.env.NODE_ENV !== 'production' },
modules: [
'@nuxtjs/tailwindcss',
'@vite-pwa/nuxt',
'nuxt-typed-router',
['@nuxtjs/robots', { configPath: '~/config/robots.config' }],
[
'@nuxtjs/color-mode',
{
preference: 'system',
fallback: 'light',
storageKey: 'nuxt-color-mode',
classPrefix: '',
classSuffix: '',
},
],
'nuxt-lodash',
'nuxt-swiper',
(_options, nuxt) => {
nuxt.hooks.hook('vite:extendConfig', (config) => {
// @ts-expect-error
config.plugins.push(vuetify({ autoImport: true }))
})
},
'nuxt-laravel-precognition',
'@morev/vue-transitions/nuxt',
[
'@nuxtjs/i18n',
{ vueI18n: './config/i18n.config', strategy: 'no_prefix' },
],
'nuxt-headlessui',
'@nuxt/image',
'@pinia/nuxt',
// '@pinia-plugin-persistedstate/nuxt',
],
runtimeConfig: {
public: {
apiBase: process.env.NUXT_API_URL,
baseURL: 'http://localhost:3000/',
},
},
plugins: [
{ src: '~/plugins/vuetify-ui' },
{ src: '~/plugins/jquery.client', mode: 'client' },
{ src: '~/plugins/vue3-toastify.client', mode: 'client' },
{ src: '~/plugins/precognition.client', mode: 'client' },
{ src: '~/plugins/apexchart.client', mode: 'client' },
],
vite: {
ssr: {
noExternal: ['vuetify'],
},
build: { minify: true },
vue: {
template: {
transformAssetUrls,
},
},
},
routeRules: { '/': { prerender: true }, '/auth/login': { prerender: true } },
pinia: {
autoImports: [
'defineStore',
['defineStore', 'definePiniaStore'],
'storeToRefs',
'acceptHMRUpdate',
],
},
imports: {
dirs: ['./stores'],
},
})

Would you be able to provide a reproduction? 🙏
More info

yes but how?

repo: nuxt/nuxt


text:
Please update image generator 'http' to 'https'

The image generator 'dummyimage.com' has updated the protocol 'http' to 'https' now, please update '@image' function. HTTP service is no longer available now.

please tooooo

repo: nuysoft/Mock


text:
Workaround GCC 11.3 compiler bug

Description
Compiling on GCC 11.3 breaks due to this compiler bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103871. Using the workaround in this comment seems to fix the issue.
Tested on 11.3 locally. Changes should be benign. No way to test this in CI without adding GCC 11.3 to the build matrix.
Checklist

[x] I am familiar with the Contributing Guidelines.
[x] New or existing tests cover these changes.
[x] The documentation is up to date with these changes.

/merge

repo: nv-morpheus/MRC


text:
Lacking documentation on how to create the average latent file

The example configuration files (https://github.com/nv-tlabs/datasetGAN_release/tree/master/datasetGAN/experiments), ex. "cat_16.json" or "car_20.json", contain a field named "average_latent" and "annotation_image_latent_path". Both of these fields are paths to .npy files.
This repo does not describe how these files are generated. Even after one trains a StyleGAN model, one cannot then use DatasetGAN without these files. Please provide documentation on how to create this file for a custom dataset.
I imagine that you'd want to provide examples using your up-to-date repos, ex. https://github.com/NVlabs/stylegan2-ada-pytorch and/or https://github.com/NVlabs/stylegan2-ada.

You can take a look at issue #10 where there is more explanation of the more difficult parts to understand in relation to these configuration files. However, it is certain that in my opinion, it would be a good idea to have an official document about them.
Note that you will need to code some parts by yourself in order to get the "avg_latent_stylegan1.npy", "latent_stylegan1.npy" files and the converted weights file (Tensorflow to PyTorch) of the pre-trained StyleGAN (if you have trained your own StyleGAN) (see issu #1). (At least for now, there is no file related to all of these parts on this Github).

@PoissonChasseur, agreed that documentation on how to do these pieces, avg_latent_stylegan1.npy and latent_stylegan1.npy, would be good.
I trained my own StyleGAN using https://github.com/NVlabs/stylegan2-ada-pytorch, and it's not clear to me how I would go about getting or creating avg_latent_stylegan1.npy and latent_stylegan1.npy.
@PoissonChasseur, if you have any further advice---I already read issue #10 and #1---or experience, please do share. Otherwise, I hope NVIDIA will be able to improve the docs.

So from what was described in issue #10  and what I also used in my case with a StyleGAN V1 (this should also be valid for the StyleGAN V2, but I haven't read the research yet nor the code on the StyleGAN2-Ada-PyTorch):

avg_latent_stylegan1.npy : You have to calculate the average of (for example) 8 000 "Z latent code" (the latent code before the "mapping network" which will convert the "Z latent code" into "W latent code").

In the case of StyleGAN V1, as shown in the code of this Github (train_interpreter.py and the other files it uses), this "avg_latent" is only used when the model is initialized after loading the pre-trained weights. It is only used when using the "threshold" which will be used on the "W latent code" (so the StyleGAN V1 can work without this, but all images presented in the research of the StyleGAN V1 were using it).
As I haven't read the StyleGAN2-Ada-PyTorch yet, it's hard to say what this might correspond to, but I think the "avg_latent" might also be present in the StyleGAN V2 since this architecture still contains a "mapping network "as well as the threshold principle on the output of this sub-network.

latent_stylegan1.npy: This file simply contains all the "Z latent codes" (or "W" if we have captured these instead) linked to the training images of the DatasetGAN and which were also previously generated by the pre-trained StyleGAN.

The DatasetGAN uses as input the features (the activations of the outputs of the StyleGAN layers) linked to the images generated by the StyleGAN. Indeed, each pixel_classifier (the MLP of 3 layers) analyzes 1D vectors whose length is according to the dimension of the StyleGAN depth. For this reason, we need to be able to re-generate the images generated by the StyleGAN and that we have labeled manually, in order to train the DatasetGAN.
The “latent_stylegan1.npy” file therefore simply contains a 2D matrix of the form [Nb_img, 512] where 512 = the length of the latent code. Each row of this matrix corresponds to the latent code (the entry of StyleGAN V1) linked to the generation of one training image (by using the StyleGAN) for the DatasetGAN and for which we have also labeled manually (since we also need its corresponding mask).
It should be possible to do the same in the case of StyleGAN2-Ada-PyTorch since we simply need the inputs to give to the StyleGAN to obtain each images of training. However, it 's possible that the exact name used has changed. It is also possible (because I do not know the architecture of StyleGAN2-Ada-PyTorch) that more information is needed as input, in order to have a perfect reproduction of the initial images that were generated. Fixing PyTorch's Random Seed (Issue #15 ) will likely be needed as well.

Note that if your initial issue with deciding to choose StyleGAN2-Ada-PyTorch is the convertion of the file of the pre-trained StyleGAN between Tensorfkow and PyTorch, I had no issues related to this via the link provided in issue #1 .
But it is certain that the use of a better version of the StyleGAN will also add other elements to be adjusted in the code (for example, the fact that the DatasetGAN works with the features of the StyleGAN and not with the output images = the name and position of the layers to use will probably change). Anyway, I'll be interested to see the final code related to all of this once that's done, as probably a lot of other people :).
I hope that all my explanations will help you on certain points.

@PoissonChasseur, this is very helpful! I'm going to have to re-read what you wrote another 10 or 20 times, and then do more digging through the architecture. I'll probably reply later today with more questions.
Hopefully someone from NVIDIA will want to answer these questions.
Practically speaking, I still don't know how to generate avg_latent_stylegan.npy and latent_stylegan1.npy from any of the StyleGAN repos. It'd be very helpful to have working code/examples/documentation that shows how to generate these files from at least one of the four StyleGAN repos (shown below).

https://github.com/NVlabs/stylegan associated paper https://arxiv.org/abs/1812.04948
https://github.com/NVlabs/stylegan2 associated paper http://arxiv.org/abs/1912.04958
https://github.com/NVlabs/stylegan2-ada associated paper https://arxiv.org/abs/2006.06676
https://github.com/NVlabs/stylegan2-ada-pytorch same paper as above, but PyTorch

Overall, at least in the case of StyleGAN V1 ([https://github.com/NVlabs/styleganogén(url)) which I used and also using the same notation as in the code in the "train_interpreter.py" file from this Github:

Step 0: Train StyleGAN V1 with your own data set to get a pre-trained StyleGAN (or download instead a pre-trained StyleGAN provided by the Github of the StyleGAN V1 or any other sources)

Step 1: Follow the instructions in the link for [Tensor -> PyTorch] conversion of the pre-trained StyleGAN weights file in issue #1 . This will give you the ".pt" file you need to perform all of the following steps.

Step 2: avg_latent_stylegan1.npy:

First, you need to load the pre-trained StyleGAN you got in step 1. Initialization will however exclude the use of the threshold for this step (as is also done in Step 1 if you want to test the pre-trained StyleGAN).
You only need to use the "G_mapping ()" part (the mapping network) of "g_all" (the StyleGAN V1 set).
You need to do a for loop on "range (0, 8000)" where on each iteration: you compute a random "Z latent code" with "np.random.randn (1, 512)" (Gaussian distribution N(mean = 0 , std / var = 1)), send it as input to "G_mapping" and you capture its output (the "latent W code").
You then simply calculate the average of the 8,000 "W latent code" that you obtained. You then store this result in a Numpy file that you can name "avg_latent_stylegan1.npy" (or any other name).

Step 3: latent_stylegan1.npy + generation of fake images:

First, you need to load the pre-trained StyleGAN you got in step 1. However, this time you will include the threshold in the architecture since you now have the "avg_latent" you need for its initialization.
Make a for loop on "range (0, nb_img_you_want)" where at each iteration: you first create a random "Z latent code" ("latent = np.random.randn (1, 512)") then pass it in input to StyleGAN using the "latent_to_image" function (from the "utils.utils" file on this Github). During this loop, you must store the latent codes linked to the creation of each image since they will be saved in the "latent_stylegan1.npy" file. You also need to save the generated images as you will then need to label them manually (using, for example, LabelMe).
If you choose to label only a subset of all generated images, then "latent_stylegan1.npy" should contain only the "laten code" related to the images you have chosen - but this can be done later, a after you have manually labelled some images that were generated by the pre-trained StyleGAN.

Step #4: Manually label some fake images generated by the StyleGAN (by using, for example, LabelMe)

Step #5: Now that you have "avg_latent_stylegan1.npy", "latent_stylegan1.npy", the pre-trained StyleGAN and some pairs of (image, mask) for the DatasetGAN training dataset, you can perform the DatasetGAN training via the file " train_interpreter.py "from this Github. Some modifications might be necessary on some small parts (eg the files extension used for the images which could be different from ".jpg").

I hope you are now better able to implement your own implementation of all of these parts. If you haven't already, I strongly suggest that you read the StyleGAN V1 paper first, then read and understand all the code in the "train_interpreter.py" file on this Github, before you start implementing all of these steps.

Hello, I am also trying my hand at training StyleGAN/DatasetGAN for a custom dataset I have and wanted to share something. I don't know if it's the correct way to do it but it seems to have worked out quite fine for me. I think you can obtain the average latent code from a trained StyeGAN by doing a forward pass on any sample (i.e. random latent code) and getting what's stored in the appropriate variable as Gs.get_var('dlatent_avg') on tensorflow side. I did this once and saved the average latent code, converted the checkpoint to pytorch, initialized the pytorch cehckpoint using the saved average latent code, sampled a bunch of latent code, generated images on pytorch side then provided all of this to DatasetGAN. Let me know if you have any further questions.

@PoissonChasseur, that's also very helpful. Can you explain further on bullet 1 of step 2, e.g. how to load the pre-trained StyleGAN without the threshold? Code would be the most useful.

@PoissonChasseur, that's helpful. Can you please elaborate more about bullet 1 - 3 of step 2? Example code would be helpful.

@ericchansen : For step 2, bullet 1 and 3, like I said in step 1, you can look at what is done in this link: https://github.com/lernapparat/lernapparat/blob/master/style_gan/pytorch_style_gan.ipynb
If you compare the code in this reference with the one used in the DatasetGAN, you will see that most of the code related to the different layers is exactly the same. So, you can simply start from cell 11 ("In [11]:") and call on the StyleGAN layer classes which are defined in the DatasetGAN files (no need to copy and paste those defined in this reference to make it work and is also preferable to do so at my sense at this point). This reference also explains directly how to use the pre-trained StyleGAN to generate images using random "latent_code".
Extracting the part of the StyleGAN related to the "mapping network" (g_mapping) (see cell 11) should also be pretty clear there, as they also build the 3 main parts of the StyleGAN which you will need after that for the DatasetGAN.

To re-iterate the issue, this repo is currently missing documentation on two required input files. In the configuration files (https://github.com/nv-tlabs/datasetGAN_release/tree/master/datasetGAN/experiments), they're called "average_latent" and "annotation_image_latent_path". There is no documentation or example code on how to create these files.
Here is my close to working example (see code below). I didn't have enough time today to finish my function generate_latent_space_and_image_pairs. I'll update this thread when it's done. I think that the part that generates the average W latent code is working now. @PoissonChasseur, what do you think?
import argparse
import logging
import logging.config
import os
import sys
from collections import OrderedDict
from pathlib import Path

import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import yaml
from torch.cuda import random

STYLEGAN_DIR = "../models"
sys.path.append(STYLEGAN_DIR)
from stylegan1 import G_mapping, Truncation

logger = logging.getLogger(__name__)
with open("logging.yml", "r") as f:
    config = yaml.safe_load(f.read())
logging.config.dictConfig(config)

DEFAULT_RESOLUTION = 512
DEFAULT_PATH_AVG_LATENT = Path("avg_latent_stylegan1.npy")
DEFAULT_FILENAME_LATENT_STYLEGAN = "latent_stylegan1.npy"

# from train_interprer.py in nvidia's datasetgan repo. not sure if needed here
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
torch.manual_seed(0)

def load_stylegan_checkpoint(stylegan_checkpoint_path, average_w_latent_code=None):
    """
    Load the mapping network from the StyleGAN PyTorch checkpoints that NVIDIA
    provided.

    NVIDIA's PyTorch checkpoints can be downloaded here:
    https://drive.google.com/drive/folders/1Hhu8aGxbnUtK-yHRD9BXZ3gn3bNNmsGi
    """
    # load the mapping and truncation networks
    if average_w_latent_code is not None:
        assert (
            average_w_latent_code is not None
        ), "provide average latent with threshold"
        state_dictionary = torch.load(stylegan_checkpoint_path)
        mapping_and_truncation_state_dictionary = OrderedDict(
            list(state_dictionary.items())[:16]
        )  # remove everything besides the mapping and truncation network
        model = nn.Sequential(
            OrderedDict(
                [
                    ("g_mapping", G_mapping()),
                    ("truncation", Truncation(average_w_latent_code, device=device)),
                ]
            )
        )
        model.load_state_dict(mapping_and_truncation_state_dictionary)
    else:
        state_dictionary = torch.load(stylegan_checkpoint_path)
        mapping_state_dictionary = OrderedDict(
            list(state_dictionary.items())[:16]
        )  # remove everything besides mapping network
        model = nn.Sequential(OrderedDict([("g_mapping", G_mapping())]))
        model.load_state_dict(mapping_state_dictionary)
    model.eval()
    model.to(device)
    return model

def generate_random_z_latent_code(
    resolution: int = DEFAULT_RESOLUTION, device: str = "gpu"
):
    """
    TODO: Add documentation.
    """
    return torch.randn(1, resolution, device=device)

def generate_average_w_latent_code(
    model,
    path_to_save: Path = DEFAULT_PATH_AVG_LATENT,
    resolution: int = DEFAULT_RESOLUTION,
    num_w_latent_codes_to_generate: int = 2000,
    device: str = "gpu",
):
    """
    TODO: Add more documentation.

    By default, it will save the average W latent code as a NumPy binary.

    TODO: Check to see if the saved NumPy binary roughly matches the examples
          given by NVIDIA. I'll probably have to account for differences due to
          random number generation and sampling.

    NOTE: I tried to run this on a 3090, which has 24 GB VRAM, and it couldn't
          handle looping 8000 times as @PoissonChasseur recommended. If you're
          running out memory on your GPU, maybe try a lower integer for
          num_w_latent_codes_to_generate or try using your system RAM.
    """
    w_latent_code_list = []
    for i in range(0, num_w_latent_codes_to_generate):
        random_tensor = generate_random_z_latent_code(
            resolution=resolution, device=device
        )
        w_latent_code = model.g_mapping(random_tensor)
        w_latent_code_list.append(w_latent_code)
    average_w_latent_code = torch.mean(torch.stack(w_latent_code_list), dim=0)
    if path_to_save is not None:
        np_arr = average_w_latent_code.cpu().detach().numpy()
        np.save(path_to_save, np_arr)
    return average_w_latent_code

def generate_latent_space_and_image_pairs(
    model,
    output_image_dir: Path,
    num_images: int,
    output_latent: Path = Path(DEFAULT_FILENAME_LATENT_STYLEGAN),
    resolution: int = DEFAULT_RESOLUTION,
):
    """
    Generate image and latent space pairs.

    TODO: Code stuff.
    """
    for i in range(0, num_images):
        # create a random Z latent code
        # pass as input to StyleGAN using the `latent_to_image` function from `utils.utils`
        # img, latent = latent_to_image(random_tensor)
        image_name = "image_{i}.jpg"
        image_path = Path(output_image_dir, image_name)
        # save img
        latent_name = f"image_mask{i}.npy"
        latent_path = Path(output_latent)
        # save as numpy binary

def main(
    sylegan_checkpoint_path: Path,
    output_image_dir: Path,
    num_images: int,
    outpath_average_w_latent_code: Path = DEFAULT_PATH_AVG_LATENT,
    resolution: int = DEFAULT_RESOLUTION,
    device: str = "gpu",
):
    """
    Generate files needed to run DatasetGAN from a StyleGAN PyTorch checkpoint.

    TODO: Doesn't work.

    DatasetGAN repo:
    https://github.com/nv-tlabs/datasetGAN_release

    NVIDIA's PyTorch checkpoints can be downloaded here:
    https://drive.google.com/drive/folders/1Hhu8aGxbnUtK-yHRD9BXZ3gn3bNNmsGi

    TODO: Add documentation on the steps that occur, ex. generating random
          latent code, loading network using the latent code, etc.

    Images will be generated with the names "image_{i}.jpg". The matching mask
    should get the name "image_mask{i}.jpg".
    """
    if output_image_dir.exists():
        logger.debug(f"already exists: {output_image_dir}")
    else:
        output_image_dir.mkdir()
        logger.debug(f"mkdir: {output_image_dir}")

    # step 1: load mapping network
    mapping_network = load_stylegan_checkpoint(sylegan_checkpoint_path)

    # step 2: generate average w latent code from mapping network
    average_w_latent_code = generate_average_w_latent_code(
        mapping_network,
        path_to_save=outpath_average_w_latent_code,
        resolution=resolution,
        device=device,
    )

    # step 3.1: load mapping network and truncation network
    mapping_and_truncation_network = load_stylegan_checkpoint(
        sylegan_checkpoint_path, average_w_latent_code=average_w_latent_code,
    )

    # step 3.2: generate some images and vectors
    generate_latent_space_and_image_pairs(
        mapping_and_truncation_network, output_image_dir, num_images
    )

if __name__ == "__main__":
    device = "cuda" if torch.cuda.is_available() else "cpu"
    logger.debug(f"torch device: {device}")

    parser = argparse.ArgumentParser()
    parser.add_argument("checkpoint", type=Path)
    parser.add_argument("output_image_dir", type=Path)
    parser.add_argument("num_images", type=int)
    parser.add_argument(
        "--outpath_average_w_latent_code", type=Path, default=DEFAULT_PATH_AVG_LATENT
    )
    parser.add_argument("--resolution", type=int, default=DEFAULT_RESOLUTION)
    opts = parser.parse_args(sys.argv[1:])

    main(
        opts.checkpoint,
        opts.output_image_dir,
        opts.num_images,
        outpath_average_w_latent_code=opts.outpath_average_w_latent_code,
        resolution=opts.resolution,
        device=device,
    )

Also, since my code uses a logging configuration file, here's an example.
version: 1
formatters:
  simple:
    format: "[%(name)s][L%(lineno)d][%(levelname)s] %(message)s"
  complex:
    format: "[%(name)s][L%(lineno)d][%(levelname)s][%(asctime)s] %(message)s"
handlers:
  console:
    class: logging.StreamHandler
    level: DEBUG
    formatter: simple
  file:
    class: logging.handlers.TimedRotatingFileHandler
    when: midnight
    backupCount: 5
    level: DEBUG
    formatter: simple
    filename: debug.log
loggers:
  __main__:
    level: DEBUG
    handlers: [console]
    propagate: yes

In the meanwhile, @dcetin, do you have any working code?
@arieling, can you or someone else on the NVIDIA side provide working code and documentation?

For those out there who are wondering how they can use DatasetGAN with their own datasets, PR #21 should help.
I still think that

the code in the PR should be double checked before merging, and
NVIDIA should add some documentation on these steps

before we close this issue.

Hi, thank you for pointing this out.
We update the doc in the section "Create your own model" to explain the npy cache files.
A function datasetGAN/make_training_data.py is also updated to create the caches from scratch.

For those out there who are wondering how they can use DatasetGAN with their own datasets, PR #21 should help.
I still think that

the code in the PR should be double checked before merging, and
NVIDIA should add some documentation on these steps

before we close this issue.

For those out there who are wondering how they can use DatasetGAN with their own datasets, PR #21 should help.
I still think that

the code in the PR should be double checked before merging, and
NVIDIA should add some documentation on these steps

before we close this issue.

For your specific confusion about average_latent.npy.  This is used for sampling truncation. We dump the average latent code to .npy file mainly for academic reproduction reasons.
For your convenience, we implemented a simple function in https://github.com/nv-tlabs/datasetGAN_release/blob/master/datasetGAN/make_training_data.py#L81 to dump the average latent.
Please refer to StyleGAN V1 ( https://github.com/NVlabs/stylegan ) code and paper [1] for more details
[1] A Style-Based Generator Architecture for Generative Adversarial Networks, Tero Karras, Samuli Laine, Timo Aila

Good enough!

authors: PoissonChasseur arieling dcetin ericchansen


text:
Deletes temporary session history in bash

bash terminal only writes out to .bash_history when one closes the terminal. I don't know for sure but it probably temporarily stores the history for each tab separately somewhere, which is only accessible using the history command.
When I run fuck, all this temporary history is deleted, not just the last faulty command. Any workaround for this?
Using The Fuck 3.2 with Python 2.7.6 on bash 4.3.11

@nvbn Should I make a PR with https://github.com/nvbn/thefuck/issues/422#issuecomment-170240398 limited to bash? I haven’t figured out how to do something similar with zsh builtins though.

@mcarton I'm trying to build from your source but it keeps giving me this error:
error in thefuck setup command: Invalid environment marker: python_version<"3.4"
Doesn't thefuck dev version work with 2.7?

@udiboy1209: you better have setuptools upgraded (aka pip install - U setuptools) or maybe pip too.

@scorphus I just removed that line for a temporary fix. I'll try upgrading setuptools and pip. Thanks!

@mcarton it would be nice =)

authors: mcarton nvbn scorphus udiboy1209

repo: nvbn/thefuck


text:
🛑 Kubeflow ML Platform is down

In ebb36f1, Kubeflow ML Platform (https://kubeflow.lab.novaglobal.com.sg) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Kubeflow ML Platform is back up in 77bec53.

repo: nvgsg/lab-upptime


text:
🛑 PufferAI HPC Portal is down

In baebaf0, PufferAI HPC Portal (https://hpc.lab.novaglobal.com.sg) was down:

HTTP code: 503
Response time: 1271 ms

Resolved: PufferAI HPC Portal is back up in a259d72.


text:
🛑 NVIDIA AI Enterprise Hub is down

In b72cf65, NVIDIA AI Enterprise Hub (https://nvaie.lab.novaglobal.com.sg) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NVIDIA AI Enterprise Hub is back up in 12f1fec.


text:
Unicode_literals future import warning

This is fairly low priority, but anytime I run any of the pip-tools I get the below warning.
python2.7/site-packages/piptools/scripts/sync.py:28: Warning: Click detected the use of the unicode_literals __future__ import.
This is heavily discouraged because it can introduce subtle bugs in your code.
You should instead use explicit u"" literals for your unicode strings.
For more information see http://click.pocoo.org/python3/
  @click.argument('src_files', required=False, type=click.Path(exists=True), nargs=-1)

Not a big deal, but an annoyance. :) I'm running python 2.7.10, click 5.1 and pip-tools 1.1.3. Looks like click started throwing this warning starting with 5.0. http://click.pocoo.org/5/python3/#unicode-literals mentions two solutions one if you want to listen to the suggestion and another if you want to ignore it.
Thanks!

Yeah, it's super annoying. I've just pushed a fix for this to PyPI (pip-tools==1.1.4). Sorry about the delay here.

authors: ajkeys nvie

repo: nvie/pip-tools


text:
Bug: Lualine dont update when visual mode is ON

Self Checks

[x] I'm using the latest lualine.
[x] I didn't find the issue in exsisting issues or prs.

How to reproduce the problem

Add this function to lualine:
ins_right {
  function()
    local amount = vim.fn.strlen(vim.fn.GetVisualSelection())

    return ' ' .. amount
  end
}

Expected behaviour
Update while move the cursor ou visual mode.
Actual behaviour
The value only updates after exist visual mode
Minimal config to reproduce the issue

Config
<!--
  =================
  ### IMPORTENT ###
  =================
<p>You need to provide a way to reproduce the issue without influence
of other plugins.
Issues without proper format and a proper way to
reproduce might be ignored.
This script can help you with that.
https://github.com/nvim-lualine/lualine.nvim/blob/master/scripts/nvim_isolated_conf.sh
Create an isolated config directory with:
`nvim_isolated_conf.sh -c DirectoryName`

Then modify the DirectoryName/.config/nvim/init.vim
so you can reproduce the issue .
You can load the config to see if the issue is occuring with
`nvim_isolated_conf.sh -l DirectoryName`

Paste the DirectoryName/.config/init.vim without comments below
-->

Aditional information

What is this GetVisualSelection ? Are you sure it's updating in in visual mode ? Because if I put a simple counter it shows lualine is updating in visual mode.
local n = 0
require'lualine'.setup{
  sections = {
    lualine_c = {function() n=n+1; return n; end}
  }
}

What is this GetVisualSelection ? Are you sure it's updating in in visual mode ? Because if I put a simple counter it shows lualine is updating in visual mode.
local n = 0
require'lualine'.setup{
  sections = {
    lualine_c = {function() n=n+1; return n; end}
  }
}

Here:
function! GetVisualSelection()
    let [line_start, column_start] = getpos("'<")[1:2]
    let [line_end, column_end] = getpos("'>")[1:2]
    let lines = getline(line_start, line_end)
    if len(lines) == 0
        return ''
    endif
    let lines[-1] = lines[-1][: column_end - (&selection == 'inclusive' ? 1 : 2)]
    let lines[0] = lines[0][column_start - 1:]
    return join(lines, "\n")
endfunction

< & > marks only get updated after leaving visual mode. That's why lualine is showing you the lenght after you leaving visual mode.

authors: otavioschwanck shadmansaleh


text:
Tried to use neotest, but having a hard time to keymappings

I am having a hard time with figuring out the keybindings?  I have been using the vim-test and my configuration has been like so:
nmap <silent> <leader>t :TestNearest<CR> nmap <silent> <leader>T :TestFile<CR> nmap <silent> <leader>a :TestSuite<CR> nmap <silent> <leader>l :TestLast<CR> nmap <silent> <leader>g :TestVisit<CR>
How can I set the NeoTest to trigger to run tests?

Here's an example:
vim.keymap.set("n", "<leader>t", function() require("neotest").run.run() end)
vim.keymap.set("n", "<leader>T", function() require("neotest").run.run(vim.fn.expand('%')) end)

Or Vimscript:
nmap <leader>t :lua require('neotest').run.run()<cr>
nmap <leader>T :lua require('neotest').run.run(expand('%'))<cr>

I've tested the Lua but not the Vimscript.
To find more functions you could run, see:
:h neotest.run

In there, you'll see run_last and others.

authors: fnune sittim

repo: nvim-neotest/neotest


text:
Use Telescope cwd to project names

Telescope supports parameter cwd.
Current telescope-project.nvim does not use this paramter.
Proposal
Use value of cwd to limit list of projects only to those, which start with given directory.
Example
I have projects organized in folders:

~/sandbox
~/devel/tis
~/devel/ttr

If cwd=~/sandbox, only projects from this folder and subfolders shall be shown
If cwd=~/devel/tis, only projects from here shall be shown.
If cwd=~/devel, only projects from any subdirectory of ~/devel shall be presented.

@vlcinsky have you tried the base_dirs option in the readme for this? It adds all of the projects in specific folders automatically and will add any new ones that get added by scanning the base_dirs each time it opens

@claidler yes I tried and it was actually motivation for this idea.
I tried to configure base_dirs - I like the concept, but for some internal reasons (fighting with LunarVim configs on my machine) it failed. But I managed to generate the  ~/.local/share/nvim/telescope-projects.txt manually (using small python utility)  and it has 205 items. For this reason I would invite an option to filter the items using e.g. cwd.
Another options:

filter per base_dir (I am not aware of this option)
use the workspaces (which seem to be prepared)

Workspaces is a feature in progress, but not ready yet. It will allow you to filter your projects by applying them to certain workspaces.
It seems like the main problem here is that base_dirs isn't working for you. If it was working, I don't imagine you'd require this? I could be wrong, but it's not a feature I'd imagine the majority of people would care for.
Something I've recently realised is that the require('telescope').load_extension('project') line in your config needs to be after require('telescope').setup. I wonder if this is the problem you're having with base_dirs not working?

I have managed to run the project telescope with base_dirs configuration and it nicely and very quickly finds all the projects in given directories.
Anyway, my problem is, that I have a lot of projects - 205 at the moment.
As they are grouped per client, I would appreciate to filter these somehow, e.g. by root client project directory
Alternative option is to prefix project names with names from base_dirs. This way it is easy to filter by base_dir names first and then continue with filtering names from that group.
Indexing projects (using my python tool) generates lines as follows:
~/sandbox dany=/home/javl/sandbox/discord/dany=1
~/sandbox rg-test=/home/javl/sandbox/rg-test=1
~/sandbox one=/home/javl/sandbox/pycharm/one=1
~/devel/tis dpo-magnetky-install=/home/javl/devel/tis/_archive/dpo-magnetky-install=1
~/devel/tis dpo-magnetky-src=/home/javl/devel/tis/_archive/dpo-magnetky-src=1

As filtering is ignoring full path, but takes into account project name - with the prefix I have easy chance to filter per client.

@vlcinsky ah I see. This can be part of the workspaces feature I'm adding. Add entire directories to a workspace. I'll put it on the roadmap

@claidler very quick solution to my needs is to us full path (possibly normalized) as project title.
This way (as filter works on project titles) one can filter by directory part too, e.g. using devtisdpoinst to pick dpo-magnetky-install from ~/devel/tis/_archive directory.
Even better would be to put a space between (workspace) directory and project name as it allows to filter using project name if space is the first filter character, e.g. using <space>dpoinst

@vlcinsky I'm trying to use this with LunarVim. Since you mentioned you are also using LunarVim, and that you were able to get it to work, can you share your config ? More importantly where does the config go ? (which file?) I'm new to LunarVim and still getting used to.

authors: claidler mandarvaze vlcinsky


text:
zen-mode compatiblity

I'm using zen mode and it's z-index is set to 40. nvim-treesitter-context's z-index is 20 so context doesn't show up in zen mode. Can the zindex of nr be set to a value higher than 40, or will this have side effects?

Sorry don't use zen mode.

repo: nvim-treesitter/nvim-treesitter-context


text:
Issue when key is not generated automatically

Hi there
i have a issue when i do not want the primarykey is not autogenerated.
in my case i wanted to be the key as a string.
so i implemented this:
Program.cs
builder.Services.AddBlazorDB(options => {     options.Name = "ImageDB";     options.Version = 1;     options.StoreSchemas = new List<StoreSchema>()     {         new StoreSchema         {             Name = "Image",             PrimaryKey = "Id",             PrimaryKeyAuto = false,             Indexes = new List<string>             {                 "Id", "Content"             }         }     }; });
Model:
public class Image {      [Key] public string Id { get; set; }     public byte[] Content { get; set; } }
Insert Method:
storeName is filled with its correct store
Entity contains a model you can see above like
Id= "abc.png"
Content = anycontentbytearray
` public async Task<List> InsertAllAsync(List EntityList)
{
await EnsureManager();
try
{
foreach (var Entity in EntityList)
{
try
{
var record = new StoreRecord()
{
StoreName = storeName,
Record = Entity
};
await manager.AddRecordAsync(record);
var allItems = await GetAllAsync();
return allItems;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);

            }
        }
    }

`
and the error i get is the following:
Unhandled rejection: DataError: Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value. DataError: Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value. Error: Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value.
the issue isnt there when its autogenerated and the id Field is a long.
Could you give me some advice how to fix this issue??
Best Regards

Apparently the primary key name is converted to camel case, so try changing it to PrimaryKey="id". This worked for me.

authors: chandlerteigen clahoefle

repo: nwestfall/BlazorDB


text:
nw-builder download stuck

Issue Type

[x] Bug Report
[ ] Feature Request
[ ] Other

Current/Missing Behaviour
nwbuild({
  srcDir: "./temp",
  mode: "build", // "run" | "build"
  version: "0.82.0",
  flavor: "normal", // "normal" | "sdk"
  platform: "osx", // "linux" | "osx" | "win"
  arch: "x64", // "ia32" | "x64" | "arm64"
  outDir: "./out/osx64",
  cacheDir: "./cache",
  cache:true,
  downloadUrl: 'https://npm.taobao.org/mirrors/nwjs',
  // downloadUrl: 'https://npmmirror.com/mirrors/nwjs',
  glob: false,
  logLevel: "debug",
})

When executing nwbuild and downloading files, the progress is not displayed at all. I noticed a warning:
(node:43016) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.MAXLISTENERS() to increase the limit (Use node --trace-warnings ... to show where the warning was created)
I have added breakpoints in the code, but I found that none of them worked

Expected/Proposed Behaviour
download normally
Additional Info
WS-233.11799.229, JRE 17.0.9+7-b1087.7x64 JetBrains s.r.o., OS Mac OS X(x86_64) v13.6.1, screens 3840.0x2400.0; Retina

Package version: 4.4.2
Operating System: OS Mac OS X(x86_64) v13.6.1
Node version: v18.19.0/v20.10.0
NW.js version: none
Repro link:
...

I tried removing the downloadUrl and using the official url, and the download worked fine. I suspect that this getRequest did not handle the 301 redirect issue

I removed the downloadUrl and changed to download the zip package through the official url.
But now there is another problem. Here is the log:
[ DEBUG ] System Platform: darwin
[ DEBUG ] System Architecture: x64
[ DEBUG ] Node Version: v20.9.0
[ DEBUG ] Build NW.js Version: 0.82.0
[ DEBUG ] Build Flavor: normal
[ DEBUG ] Build Platform: osx
[ DEBUG ] Build Architecture: x64
[ DEBUG ] Start getting binaries
[ DEBUG ] No existing binaries
[ DEBUG ] Downloading binaries
[ DEBUG ] Response from https://dl.nwjs.io/v0.82.0/nwjs-v0.82.0-osx-x64.zip
[ DEBUG ] Response from https://dl.nwjs.io/v0.82.0/nwjs-v0.82.0-osx-x64.zip
 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 99% | ETA: 1s | 135359659/136336747[ DEBUG ] Binary fully downloaded
 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100% | ETA: 0s | 136336747/136336747
[ DEBUG ] unzip -o "/Users/wangbin/src/own/wang-devops/wang-devops/nwjs/cache/nw.zip" -d "./cache"
Archive:  /Users/wangbin/src/own/wang-devops/wang-devops/nwjs/cache/nw.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/wangbin/src/own/wang-devops/wang-devops/nwjs/cache/nw.zip or
        /Users/wangbin/src/own/wang-devops/wang-devops/nwjs/cache/nw.zip.zip, and cannot find /Users/wangbin/src/own/wang-devops/wang-devops/nwjs/cache/nw.zip.ZIP, period.
[ DEBUG ] Command failed with status 9

It seems that at the moment of decompression, the zip package failed to parse.

Does it fail on v4.5.0?

Does it fail on v4.5.0?

Yes, I tries 4.5.0 and 4.4.2-beta.4]

Sorry, this doesn't seem to be related to NW.js.
It seems to be an issue with my WebStorm environment.
I tried running it using the system's terminal, and everything works fine.
But when I run the js file directly in WebStorm or use the built-in terminal, errors happened again.

repo: nwutils/nw-builder


text:
Capacitor: Node modules removed after sync and open commands

Describe the bug
This issue was already open in previous repository https://github.com/nxext/nx-extensions-ionic/issues/6, I'm writing it here again for completeness. The bug is quite fixed, but in additional context section below I suggest how to improve this behavior.
When the nx run app-name:sync:android command is run, npm install is executed at the beginning, so it generates a node_modules folder in the application folder. Next, capacitor generates the capacitor.settings.gradle file in the Android project, which references the various capacitor packages in the application based on the node_modules folder in the application. Once the capacitor synchronisation command has been completed, nxext deletes the node_modules folder. This means that the relative paths in the capacitor.settings.gradle file refer to content which does not exist.
To Reproduce
At the root of your project, run :

nx run app-name:sync:android
nx run app-name:open:android
In Android Studio, try to build your application, you will get this type of error :

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve project :capacitor-android.
     Required by:
         project :app
      > No matching configuration of project :capacitor-android was found. The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.0.0' but:
          - None of the consumable configurations have attributes.

If you look to the file capacitor.settings.gradle, you will have this :
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')

Expected behavior
The file capacitor.settings.gradle must refers paths to the node_modules folder of the root, like this :
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../../../node_modules/@capacitor/android/capacitor')

Additional context
I found the option --preserveProjectNodeModules=true which preserves the node_modules folder, but in my opinion it's no good having to add a parameter for the whole process to work. This option should be applied to the command nx run app-name:sync:android as well as nx run app-name:open:android, because on the open command, an npm install is also executed as well as the deletion of the node_modules folder.
You think this could become the default behavior? This way we don't have to set the flag preserveProjectNodeModules again for every new project created.

Hi @mircopz thanks for reporting this issue and your suggestions. Great input. Will check on it. FIY @edbzn @DominikPieper - any thoughts about it?

authors: mircopz pawel-twardziak

repo: nxext/nx-extensions


text:
🛑 Harmony Bot Website is down

In 202cb97, Harmony Bot Website ($HARMONY_WEB) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Harmony Bot Website is back up in 05724e5.

repo: nxvvvv/uptime


text:
large buttons and large icon button should both be 40px high

per annie

Coverage remained the same at 87.789% when pulling 6f29ce1f122adf431452bf2c037d50617e49d69b on 1px-difference into 1d90ea955aca31c86551b29d6d2efbaa61946653 on master.

authors: coveralls yoshokatana

repo: nymag/clay-kiln


text:
CMMD dataset

Hi,
I am wondering how did you divide the train/test/validation for the CMMD dataset. Is there any file list that you can provide?
Cheers

Hi @Ch1kara, thanks for your question! We used full CMMD dataset for evaluation, i.e. all 1,775 studies. This is a relatively new dataset so none of the models in the meta-repository were trained using CMMD data. Please refer to the TCIA website for CMMD dataset details/download: https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=70230508.

Thank you so much for your explanation!

Hi Jwitos,
I am wondering if it's possible for you to share the data.pkl generator file for CMMD dataset?
Cheers


text:
Add signatureToHex in rosetta.js

accompanying PR for RFC #1406

looks like some sync artifacts. lemme try from a fresh fork


text:
Move the Circuit class to JS, in part as a wrapper

Right now, the Circuit class is created in OCaml: https://github.com/MinaProtocol/mina/blob/3faca1de030be8c43212cd3d59dd065164f511e2/src/lib/snarky_js_bindings/lib/snarky_js_bindings_lib.ml#L1593
Subsequently it is heavily monkey-patched in snarkyjs, to add functionality or wrap OCaml functions:
https://github.com/o1-labs/snarkyjs/blob/5c6ce17ba44467ca78e3d2d3e7593c748918f9a4/src/lib/circuit_value.ts#L942-L943
Also, the Circuit interface for writing simple (non-Pickles) circuits has its API surface (the class that users interact with) living in OCaml, which makes it hard to maintain and refine that surface. Which is probably why Circuit, at this moment, is not integrated with ZkProgram, and is neither properly documented nor used very often.
In summary, Circuit is a natural place to start the migration of the snarkyjs core (Field, Bool,..) from OCaml to JS.
How to migrate:

Some logic is already basically written in JS, just inside OCaml (which is ugly and unmaintainable), and/or is easy to write in JS on top of lower-level primitives like Field.mul, Field.add, Field.assertEquals. Functions like this should just be moved to JS entirely, using the lower-level building blocks. Examples:

Circuit.if
Circuit.toFields
Circuit.assertEqual

Some logic can be just replaced by equivalents we already re-built in JS, which will remove known bugs:

Circuit.inProver
Circuit.inCheckedComputation

Finally, some logic is more involved under the hood, like the circuit-writing interface with functions like Circuit.generateKeypair and Circuit.prove. Here, the API surface should be moved to JS, but it should still rely on access to a module-like object exposed from OCaml, which has functions like snarky's constraint_system and Keypair.generate on it.
Supporting classes like Keypair and VerificationKey should be moved to JS, while also relying on the low-level snarky-wrapping module from OCaml

Other goals:
One of the goals of this task is also to feel out what a minimal API surface from JS to the future snarky-rs needs to look like. This should inform the ongoing RFC process for speccing out snarky-rs and in particular its interaction with snarkyjs.

One important consideration as we start to think about this rewrite is that should be able to support writing circuit snippets in the snarky-rs layer and “seamlessly” using them from JS layer. There’s a lot of ways we could do this and different interpretations of seamless but just wanted to call it out to make sure it’s being considered.

That's a good point!

Mini-RFC: Renaming Circuit to Provable
I propose to split up

the Circuit class for creating proofs, and
the Circuit utility module with functions like Circuit.if, Circuit.witness, Circuit.array
into two different namespaces.

We rename the utility module to 'Provable', so it becomes

Provable.if, Provable.switch, Provable.witness, Provable.array

There should be a deprecation period, but I think long-term we want to get away from 'Circuit' as a term for provable code.

IRI: @shimkiv @Trivo25
Can we do a walk-through of changes during sprint review?

authors: bkase mitschabaude nicc


text:
Allow hosted-engine to be deployed on UEFI systems

Currently hosted-engine-setup creates VM with he_emulated_machine: pc and standard BIOS. oVirt 4.3.0 added Q35 support with UEFI.
Please consider adding Q35 chipset with UEFI setup for hosted-engine.

Reported in bugzilla at https://bugzilla.redhat.com/show_bug.cgi?id=1757300 as RFE.
Closing here, it will be tracked there.

authors: sandersr sandrobonazzola

repo: oVirt/ovirt-ansible-hosted-engine-setup