errors on latest version

hello i got a lot of erros after latest commit
such as BitmapFactory not imported
error here printBitmap(String encodedString, Int pixelWidth)
and here also     Bitmap scaledImage = Bitmap.createScaledBitmap(decodedBitmap, pixelWidth, (pixelWidth / w) *** h**, false);

hello i got a lot of erros after latest commit such as BitmapFactory not imported error here printBitmap(String encodedString, Int pixelWidth) and here also Bitmap scaledImage = Bitmap.createScaledBitmap(decodedBitmap, pixelWidth, (pixelWidth / w) *** h**, false);

i don't understand

Same for me.

hello sir, I installed it in the latest react native version, Please help me

To see the information is to add this

@Fharhanamrin The latest version 1.6.1 has been released, please update to 1.6.1 and try

solved, thanks sir

@Fharhanamrin ok.this is closed

@XFAISAL @dlwlrma00 The latest version 1.6.1 has been released, please update to 1.6.1 and try。.this is closed


Add abstract method generateOppositeCommand

Part of major enhancement: Overhaul of undo-redo functionality

Pull Request Test Coverage Report for Build 68

21 of 27 (77.78%) changed or added relevant lines in 10 files are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.3%) to 86.218%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/main/java/seedu/address/logic/commands/DeregisterPersonCommand.java
0
1
0.0%

src/main/java/seedu/address/logic/commands/UndoableCommand.java
1
6
16.67%

Files with Coverage Reduction
New Missed Lines
%

src/main/java/seedu/address/logic/commands/UndoCommand.java
2
77.78%

src/main/java/seedu/address/logic/commands/UndoableCommand.java
2
52.63%

Totals

Change from base Build 67:
-0.3%

Covered Lines:
1808

Relevant Lines:
2097

💛  - Coveralls

Looks good to me!


Split forge tests, so they can be filtered out

Introduced changes

split e2e and integration tests, so they can now be invoked separately:

cargo test integration --manifest-path ./starknet-foundry/Cargo.toml -p forge
cargo test e2e --manifest-path ./starknet-foundry/Cargo.toml -p forge

of course running all tests is still possible using the same command as prviously

Run e2e tests on separate runner, to decrease overall forge tests execution time

Breaking changes
None
Checklist

[X] Linked relevant issue
[X] Updated relevant documentation
[X] Added relevant tests
[X] Performed self-review of the code

This is kind of temporary measure and we perhaps consider more automatic solution, or a pattern of splitting those (cairo-lang has high granularity crates and the tests are blazingly fast :P)

100%, this is just temp solution :+1:

I think we should add information to readme

What info exactly do you have in mind? Things changed for CI, nothing changed from user PoV (the tests still can be run the same as previously)

Though I'm unsure about one thing: Each file in test directory is treated as separate create, I wonder if grouping them like that changes this behavior.

not sure about this either - basically I just renamed main to mod, so I think we should be good? but perhaps some better eperts can have a say

Though I'm unsure about one thing: Each file in test directory is treated as separate create, I wonder if grouping them like that changes this behavior.

not sure about this either - basically I just renamed main to mod, so I think we should be good? but perhaps some better eperts can have a say

cc @mkaput

I'm not up-to-date with the discussion but from my experiments in Scarb, the best gains I got by a) splitting integration tests into as many test binaries as possible b) extracting shared tests code to a separate private crate c) only running PR tests on Linux and d) using nextest and its partitioning feature to let it offload running tests on multiple runners.

I'm not up-to-date with the discussion but from my experiments in Scarb, the best gains I got by a) splitting integration tests into as many test binaries as possible b) extracting shared tests code to a separate private crate c) only running PR tests on Linux and d) using nextest and its partitioning feature to let it offload running tests on multiple runners.

Cool, I think this all should be doable here. For now though, we were mainly wondering about:

Though I'm unsure about one thing: Each file in test directory is treated as separate create, I wonder if grouping them like that changes this behavior.

not sure about this either - basically I just renamed main to mod, so I think we should be good? but perhaps some better eperts can have a say

any thoughts on that? @mkaput 🙏

Yeah, from what I see here you have coalesced all tests into a single crate there, because there is only one crate root now (a test named main defined by main.rs file)

I think we should add information to readme

What info exactly do you have in mind? Things changed for CI, nothing changed from user PoV (the tests still can be run the same as previously)

I was thinking we could add information on how to run integration tests and how to run e2e tests separately, not just altogether using cargo test.

I think we should add information to readme

What info exactly do you have in mind? Things changed for CI, nothing changed from user PoV (the tests still can be run the same as previously)

I was thinking we could add information on how to run integration tests and how to run e2e tests separately, not just altogether using cargo test.

Sure, makes sense. Added :+1:.


Got error after upgrade to Flutter 1.22.0 on Mac

AnimationController parameter has missing vsync

LinearGradient parameter has missing colors

All of these still available on Flutter 1.22.0 Stable Channel (Windows), but missing on Mac.
Here's my flutter doctor -v
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.6 19G2021, locale en-ID)
    • Flutter version 1.22.0 at /Users/user-pc/flutter
    • Framework revision d408d302e2 (6 days ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/user-pc/android-sdk
    ✗ Flutter requires Android SDK 29 and the Android BuildTools 28.0.3
      To update the Android SDK visit
      https://flutter.dev/docs/get-started/install/macos#android-setup for detailed
      instructions.
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.9.3

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for
      detailed instructions).

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

[✓] Connected device (1 available)
    • iPhone 8 Plus (mobile) • 90A2DC43-5E7C-4D08-93F0-C0CBC3D35556 • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)

! Doctor found issues in 2 categories.```

@husainazkas
There was similar issue describing your case, 67198.
From that issue, please see this and this comment and check if it works for you.
Thanks.

@husainazkas
There was similar issue describing your case, 67198.
From that issue, please see this and this comment and check if it works for you.
Thanks.

Thank you for your reference. I don't know how it happen, but my code was correctly worked now after I turn on back my computer today.


Bring back old features

Improve some print output

Bring back from previous master

Show number of balls on bot init
Ball type decision maker (CP > 300 Great Ball, CP > 700 Ultra Ball)

@earthchie your branch has conflicts with dev, please update from the original branch.

@douglascamata conflicts solved :)

@douglascamata oh wait. got some errors

@earthchie do you mind getting the latest dev code and add your modifications again (only "new" stuff)? I can clearly see the features you added, but I think somehow the merge request got messed up and there are a lot of things that shouldn't be there.

I did, I pulled from upstream everytime before I make a new commit.
but it still messed up. dunno why...

@douglascamata solved all conflicts again. tested. working now.

@earthchie just one last thing to merge!

@earthchie thank you very much and sorry for  being annoying, but that's the merge police duty. 👮

thanks. that's okay :)


Alternative Assembly Routine

This is to split off the alternative assembly suggestion of @tjjarvinen in #55  from the sendto issue.

From @tjjarvinen :
I would like to do chages for the whole parallel assembly.

Better way to do this would be to use a pipeline style parallelization
- Main process spawns a async task to fill `RemoteChannel` for job items
- Spawn Workers listen job item `RemoteChannel` for work
- One worker gets a job it calculates it and deposits to result `RemoteChannel`
- Main process listens results `RemoteChannel` and assembles results together

Do do this you need to do some thing like this

```julia
# jobs and results are RemoteChannels
# f is a function that is mean to be done parallel
function parallel_work(jobs, results, f)
    while true
        id, input = take!(jobs)
        x = f(input...)
        put!(results, (id,x))
    end
end

# Create RemoteChannels for the work
jobs = RemoteChannel(()->Channel(2*nworkers()))
results = RemoteChannel(()->Channel(2*nworkers()))

# Create a input feeding task
# as this is async it will go on background
# and execution continues
@async for x in inputs
        # build some id for the job
        put!(jobs, (id, x) )
end

# This spawns parallel workers that will do the work
for p in workers()
        remote_do(parallel_work, p, jobs, results, function_to_execute)
end

# Collect results and assemble them together.
for _ in allwork
     id, result = take!(results)
     # assemble result to correct place
end

This is what I have done earlier here, if you like to look for a reference.
You have to options on movin basis. One is to have it move in the RemoteChannel. The other to send it to all workers before the calculation. Latter is probably the best option here.
Also in my opinnion, the multithreaded version should do the same thing. Only change RemoteChannel to Channel and remote_do to @spawn, everything else can be the same.

From @wcwitt  :
Open to being persuaded, but I'm pretty reluctant to make this change without a compelling reason.

Main process spawns a async task to fill RemoteChannel for job items
Spawn Workers listen job item RemoteChannel for work
One worker gets a job it calculates it and deposits to result RemoteChannel
Main process listens results RemoteChannel and assembles results together

This is functionally identical to the current approach (right?), but with 2-3x more code and less readable for non-experts.

You have to options on movin basis. One is to have it move in the RemoteChannel. The other to send it to all workers before the calculation. Latter is probably the best option here.

The latter is what we do currently, but it fails because of a Julia bug for some basis types. Hence this issue.
Again, I'm open to being persuaded - and if there are performance issues we need to address them - but I spent a fair bit of time weighing the alternatives before choosing this pattern and I don't (yet) see how this change could improve performance.

Something to keep in mind when we do this please: In the past with multi-threaded assembly we sometimes had the problem that writing into the LSQ matrix ended up being a huge overhead (and bottleneck!). We thought this might be related to memory layout but never fully explored it.
EDIT:  ... and I'm noticing this again with the implementation in ACEfit - the processor load drops to around 100% (i.e. ~ 1 thread) even though all threads are still active...

I think the pmap implementation has a different problem: the training structures seem to get assigned randomly to the processes. This is very bad. For performance the training structures need to be assigned to processes by size of the structures. (large ones first)
julia> @everywhere f(n) = (sleep(1); (@info n));

julia> pmap(f, 1:16);
      From worker 5:	[ Info: 2
      From worker 2:	[ Info: 1
      From worker 3:	[ Info: 3
      From worker 4:	[ Info: 4
      From worker 3:	[ Info: 8
      From worker 4:	[ Info: 6
      From worker 5:	[ Info: 7
      From worker 2:	[ Info: 5
      From worker 4:	[ Info: 10
      From worker 3:	[ Info: 9
      From worker 2:	[ Info: 12
      From worker 5:	[ Info: 11
      From worker 3:	[ Info: 13
      From worker 4:	[ Info: 14
      From worker 5:	[ Info: 16

Let's look at #49 first

To me - what Teemu suggests looks natural and I like the idea of having an implementation that can naturally run distributed or multithreaded.

It's not that I find it unnatural - the basic pattern is quite sensible! My point is that it's nearly the same as an asyncronous map, for which both distributed and multithreaded implementations are available (although I haven't tested the latter much). And I prefer canonical routines, if feasible, over asking non-Julia-experts to wrap their brains around Channels.
The only substantive difference, as far as I can tell, is in this last part:
Main process listens results RemoteChannel and assembles results together

But do we really want to transmit all the matrix data back to the main process/thread for writing? Better, in my view, to ask the workers to do the writing themselves. No two processes/threads should ever touch the same memory, so data races aren't a concern (although I acknowledge the problems you've seen with the threaded).

Something to keep in mind when we do this please: In the past with multi-threaded assembly we sometimes had the problem that writing into the LSQ matrix ended up being a huge overhead (and bottleneck!). We thought this might be related to memory layout but never fully explored it.

Definitely agree this is something to keep in mind.

I think the pmap implementation has a different potential problem: the training structures seem to get assigned randomly to the processes. This is potentially very bad. For performance the training structures need to be assigned to processes by size of the structures. (large ones first)

But in recent versions we sort by size to address this? I don't love that solution, actually, because the cost seems to vary nonlinearly with structure size, meaning the estimated time remaining is nearly always an overestimate, but I don't have a better idea. (This is also why the latter phase of the assembly goes so quickly - the workers are zooming through the small structures.)

Hi Chuck - ok, no worries. Since you are clearly not too thrilled with this proposal, let's put it on ice for now. Let's explore my performance issues a bit first and then see if we need to come back to it.


Mouse support

Before adding new features and new modules, please go to issues to submit the relevant feature description first.
Write good commit messages and use the same coding conventions as the rest of the project.
Please commit code to dev branch and we will merge into master branch in feature
Ensure your edited codes with four spaces instead of TAB.

增加新特性和新模块之前，请先到issues提交相关特性说明，经过讨论评估确认后，再进行相应的代码提交，避免做无用工作。
编写友好可读的提交信息，并使用与工程代码相同的代码规范，代码请用4个空格字符代替tab缩进。
请提交代码到dev分支，如果通过，我们会在特定时间合并到master分支上。
为了规范化提交日志的格式，commit消息，不要用中文，请用英文描述。

I have merged it. Thanks!

Thanks! And sorry for the trouble I may have caused. Really happy for being able to contribute, though.
Regards!


maxTotalRows should be checked in DataSourceCompactionConfig before setting targetCompactionSizeBytes

Fixes https://github.com/apache/incubator-druid/issues/7356.
In auto compaction, maxTotalRows and maxRowsPerSegment are not supposed to set if targetCompactionSizeBytes is set. But, if targetCompactionSizeBytes and maxTotalRows are set to null, both are set to some default values which makes submitting compaction tasks failed. In this PR, I fixed this bug and added integration tests for auto compaction.

I removed new integration tests I added in this PR because they are flaky and I think it would take some time to fix them. I don't think it's important to block the release. I'll raise a follow-up PR for integration tests.

I ran unit tests and integration tests locally and they passed. I also tested the bug has fixed in my local cluster.

TravisCI is still having issues today, merging as TeamCity has passed and local UT/IT have passed.


refactor: Optimize pairing computation in blst_from_scratch/pairing_verify.

Add rand() method to FsG2
Add test for pairings_verify that checks blst::Pairing semantics
Replace pairing computation with more efficient implementation in kzg_proofs.rs

BLST offers an efficient Pairing engine which mutualizes the miller loop computation.
The API for this binding, blst_miller_loop_n is alas not public, but there is a public Pairing engine built for BLS12-381 signatures that is available and maps to this API. All it requires is passing a dst, for which a dummy parameter is chosen.
Result on my machine (using the eip_4844 benchmark):
verify_kzg_proof        time:   [809.05 µs 815.95 µs 826.04 µs]
                        change: [-13.766% -9.1251% -6.1879%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe

See also https://github.com/supranational/blst/issues/136

I just pushed a commit 2374c196a6bb9eb07a528673be98f482a310cedd that will run workflows on pull requests coming from forks (previously you had to enable them on your forked repository). Can you synchronize these changes?


[merge] OS/2 table Mixed Versions Crash

Got a crash in pyftmerge when merging several fonts with OS/2 tables that have mixed versions.
If a font with a v5 OS/2 table follows font(s) with v4 OS/2 tables, I get:
File "C:\App\Python37\lib\site-packages\fontTools\misc\loggingTools.py", line 375, in wrapper
return func(*args, **kwds)
File "D:\Kurinto\Bin\Bin_CG\kmerge.py", line 1196, in main
font.save(outfile)
File "C:\App\Python37\lib\site-packages\fontTools\ttLib\ttFont.py", line 173, in save
writer_reordersTables = self._save(tmp)
File "C:\App\Python37\lib\site-packages\fontTools\ttLib\ttFont.py", line 212, in _save
self._writeTable(tag, writer, done, tableCache)
File "C:\App\Python37\lib\site-packages\fontTools\ttLib\ttFont.py", line 633, in _writeTable
tabledata = self.getTableData(tag)
File "C:\App\Python37\lib\site-packages\fontTools\ttLib\ttFont.py", line 651, in getTableData
return self.tables[tag].compile(self)
File "C:\App\Python37\lib\site-packages\fontTools\ttLib\tables\O_S_2f_2.py", line 152, in compile
d['usLowerOpticalPointSize'] = round(self.usLowerOpticalPointSize * 20)
AttributeError: 'table_O_S_2f_2' object has no attribute 'usLowerOpticalPointSize'
Confession: I have not done any serious debugging here. I am hypothesizing the cause of the failure ... but it does seem reasonable given that, when I hacked my one font with a v5 OS/2 table to v4, the issue went away.

Hit this again trying to merge fonts A and B, with A and B having OS/2 table versions of 1 and 3, respectively.

I see that OS/2 v5 has a # TODO in fontTools.merge
https://github.com/fonttools/fonttools/blob/c89c9487f131d16a6b45b5280efdcafd8f842580/Lib/fontTools/merge.py#L298
we just need to handle the new attributes.

from what I can tell in https://docs.microsoft.com/en-us/typography/opentype/spec/OS2#lps, it should be enough that we take the min() of all the fonts' usLowerOpticalPointSize and the max() of the fonts' usUpperOpticalPointSize.

Hit this again trying to merge fonts A and B, with A and B having OS/2 table versions of 1 and 3, respectively.

@ClintGoss that's strange, v1 and v3 are supported and the merger should already take the maximum between the OS/2 versions. Can you provide a test font, the exact command you run and the error you got?

Ah I see.  The merger is not handling attributes like sxHeight, sCapHeight, usDefaultChar, usBreakChar that were only added in version 2 and are missing from version 1, so when merging v1 with v > 1 you get the AttributeError. I'll fix this

Glad you see the issue ... because it is actually difficult for me to isolate a demonstration case. I've got merge and pyftsubset running hundreds of times in a rather arcane and massive pipeline / build process.


Feature/add dex implementation

⚠ NOTE: Use notes like this to emphasize something important about the PR.
This could include other PRs this PR is built on top of; API breaking changes; reasons for why the PR is on hold; or anything else you would like to draw attention to.

Status
Type
⚠ Core Change
Issue

Ready/Hold
Feature/Bug/Tooling/Refactor/Hotfix
Yes/No
Link

Problem
What problem are you trying to solve?
Solution
How did you solve the problem?
Before & After Screenshots
Insert screenshots of example code output
BEFORE:
[insert screenshot here]
AFTER:
[insert screenshot here]
Other changes (e.g. bug fixes, small refactors)
Deploy Notes
Notes regarding deployment of the contained body of work. These should note any
new dependencies, new scripts, etc.
New scripts:

script : script details

New dependencies:

dependency : dependency details

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

15 of 108 (13.89%)  changed or added relevant lines in 6 files are covered.
13 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.3%) to 80.279%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/Solana.Unity.Wallet/PublicKey.cs
6
8
75.0%

src/Solana.Unity.Rpc/Core/Http/CrossHttpClient.cs
3
19
15.79%

src/Solana.Unity.Rpc/SolanaRpcClient.cs
0
24
0.0%

src/Solana.Unity.Rpc/TransactionUtils.cs
0
51
0.0%

Files with Coverage Reduction
New Missed Lines
%

src/Solana.Unity.Rpc/Types/ConnectionStats.cs
13
52.83%

Totals

Change from base Build<PHONE_NUMBER>:
-0.3%

Covered Lines:
5107

Relevant Lines:
6111

💛  - Coveralls


More bot training

This got through the bot. ban "/?r=" as that is the referral code syntax?

Looks like it was fixed by adding /?r that to the regexp.


Omnisearch

Would an omnisearch improve usability?
Omnisearch is a search box in the toolbar, which searches everything in the app. Selecting a suggestion in a pop-up list triggers an action.
Some examples, as a user:

I can search for known named tunings that are not in the current project, and when I select a result, the tuning displays as a new tuning.
I can enter a formatted name for a generated tuning (like 31-EDO), and when I select a result, the tuning displays as a new tuning.
I can enter the name of an interval. e.g. perfect fifth, P5, or G6. Two actions display for each matching interval name: Select notes, and Create notes. I can select these actions to execute.
I can enter an action name, e.g. delete, and resulting actions like Remove selected notes or Remove selected tunings display. I can select these actions to execute.

Possible architecture and initialization steps:

Create an engine service
Add search providers

When the user enters text, the engine service calls each of the search providers (async if needed), and collates results.
The search providers return a (paged if needed) array of result objects. Each result contains:

A formatted result
A score, which can determine the order or results
An action. If the user selects the result, the action performs. TBC: a list of actions?

Possible option: Order by

Relevance
Grouped (by provider)

Possible option: Filter by provider.


[validator-set] Allow validators to update their individual configs

This PR allows operators of individual validators to update their configs in the validator set directly and trigger the reconfiguration.
A new function got added to LibraSystem module:
update_config_and_reconfigure(operator_account: &signer, validator_address: address)
A new transaction script set_validator_config_and_reconfigure.move sets the config locally and updates it in the set triggering the reconfiguration and emitting a NewEpochEvent.
The bulk-updates functionality is removed (i.e. the function LibraSystem::update_and_reconfigure() with no parameters), and the transaction script reconfigure.move is removed as well.
Next PR will introduce the rate limits to the call update_config_and_reconfigure.
Motivation
Bulk updates were optimizing the system by inducing less frequent ad-hoc updates to the consensus keys, but rather encouraging regularly scheduled key rotations. This optimization though poses a risk, first because a lot of keys might be updating all at once and second because the admin of a operating node might not be online to watch the node successfully do the key rotation as there can be a significant time gap between scheduling the rotation and actually executing it. So this PR removes bulk updates and reintroduces individual config rotations.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
cargo xtest

:umbrella: The latest upstream changes (presumably 93c04b87f6ef17c5b220c90a95d51fa990ff804a) made this pull request unmergeable. Please resolve the merge conflicts.

:umbrella: The latest upstream changes (presumably 5630258ddc43b106ea3ee9b6646906e6e652aeb8) made this pull request unmergeable. Please resolve the merge conflicts.

:umbrella: The latest upstream changes (presumably e33d6e6def8b6ae4ca7112a4224e3c1e4b582557) made this pull request unmergeable. Please resolve the merge conflicts.

@bors-libra r=sblackshear

:pushpin: Commit 92f32f0 has been approved by sblackshear

:lock: Merge conflict

:umbrella: The latest upstream changes (presumably 4bcbbb2ad98cd3c0f7871ecdd1ad892fc7dd9078) made this pull request unmergeable. Please resolve the merge conflicts.

Second attempt, resolving the merge conflict :) @bors-libra r=sblackshear

:pushpin: Commit 2e6678e has been approved by sblackshear

:hourglass: Testing commit 2e6678edb3943ec3fe7e1b704fe4f910187f570c with merge 632f97b2d2a56fe4ae4c5604ef6f18e572b6a548...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: sblackshear
Pushing 632f97b2d2a56fe4ae4c5604ef6f18e572b6a548 to master...


UNARYTEST: belong to enum

Hi. Just simple question: var. enum comes from a DMN table. I just want to evaluate the (true) fact that A belongs to enum. 2nd ligne of code failed by requesting UNARYTESTS function (which is the case). In short, how to write this with imicros-feel-interpreter? Thanks.
const enum = '"A","B"';
const result = interpreter.evaluate(enum,{"?": "A"});

Test case:
https://nikku.github.io/feel-playground/?e=%22A%22%2C%22B%22&c=%7B%0A++%22%3F%22%3A+%22A%22%0A%7D&t=unaryTests&st=true

The unary test can be evaluated with value in (condition)
You can write your test as:
const cell = '"A","B"';
const result = interpreter.evaluate('a in (' + cell + ')',{a: "A"});

Thanks. This works...

Testing existing DMN files, I observe tiny problems ("doesn't work?"):
interpreter.evaluate('? in (' + '"A"' + ')',{'?': "A"}); // Could be replaced by equality test, but it's just singleton set "belongs to"
interpreter.evaluate('? in (' + '"A","B"' + ')',{'?': "-"}); // Hyphen meaning "any"...

Fixed with version 0.0.9
        it("should evaluate 5 in - -> true", () => {
            let result = interpreter.evaluate("5 in -");
            expect(result).toEqual(true);
        });
        it("should evaluate 5 in (-) -> true", () => {
            let result = interpreter.evaluate("5 in (-)");
            expect(result).toEqual(true);
        });


Auto path escape on windows

Instead of having to add ${VSI_PATH_ESC} on every _DIR_DOCKER variable, instead...

Add a variable, PROJ_AUTO_ESCAPE=PROJ_.*_DIR_DOCKER to automatically add ${VSI_PATH_ESC} if needed. This same pattern should be passed to docker_entrypoint.bsh/docker_convert_paths which currently uses JUST_NO_PATHCONV. These two variables should be named similar and work together in the end.
Make sure you don't add a third / if a second / was manually added (backwards compatibility)

This will potentially fix another issue I ran into. Double calling just double converts a path, making escaping it harder.
just -> python -> just -> python
//src   /src      /src    c:/Program Files/git/src

But if we have a PROJ_AUTO_ESCAPE, it would add the / both times just is loaded.
Might be able to use it other places, like when a temporary docker-compose file is written out. Currently the variables names are translated (switched) when going to a container by writing them to a yaml file. This file contains the double slash, but the could potentially be removed using PROJ_AUTO_ESCAPE. This is why some values in the yaml have two slashes, and some don't
@scott-vsi @drewgilliam


intel_adsp coherence fixups

There was a recent fix to a typo that unmasked a bunch of assertions in the coherence framework designed to catch situations where (incoherent) stack memory is being shared between CPUs.  Address the inevitable bitrot that crept in while these errors were hidden, and a handful of other related issues.
Fixes #32112

Rebase; seems like the previous CI run blew up with a disk full issue or something?

@andyross  there are actually many build errors like this:

/opt/sdk/zephyr-sdk-0.12.2/x86_64-zephyr-elf/bin/../lib/gcc/x86_64-zephyr-elf/10.2.0/../../../../x86_64-zephyr-elf/bin/ld: warning: orphan section `.user_stacks' from `app/libapp.a(main.c.obj)' being placed in section `.user_stacks'
--

Hm.. works for me here.  Same SDK... will investigate.

Build should be fixed.  Everything I was trying to test was a userspace platform, oops.


[FEATURE] Allow users to specify plugin behavior on cache refreshing failure

Is your feature request related to a problem? Please describe. 🐛
We implemented a PoC with your wonderful plugin and we would like to put it in production but we still have one remaining issue using stream mode (but using other mode don't change anything).
Crowdsec free deployment relies on some agents sending their decisions to a local API.
This LAPI can't be scaled by design as this will mean agents will potentially try to send their data to an LAPI they are not registered on.
Consequently, this means that's technically speaking we can "lose"  the LAPI for a given amount of time and it can be unavailable during the cache refresh. If it's the case then Traefik returns a 403.
Even if I tend to agree that it's a good security practice to block when their is a doubt on some services that's not really ideal. In my case, I need to allow users to access the service on such a failure.
Describe the solution you'd like ✨
Thus, I was thinking about either:

allow users to specify the behavior they want when the refresh fails
if the refresh fails, keep the last known state for a given grace period

I will be happy to contribute, just let me know your thoughts on this :-)
Additional context

crowdsec version: v1.6.0
crowdsec plugin version: v1.2.1
traefik version: v2.11.2

Hello,
Thank you for your feedback :-)
Looks good to me :-)
Thanks :+1:
Rémi

Hi,
We're almost done implementing it, I have tested basics behavior yesterday:

never block if UpdateMaxFailure=-1
block after first fail if UpdateMaxFailure=0 (default)
block after 10 failed attempt if UpdateMaxFailure=10

We should merge and release a beta version very soon.


Bug: play / pause work incorrect by seeking streamed audio, resulting in blank playback

When the audio seeking on the lock screen is used and the track is changed to different positions, than blank empty audio is played and the play/pause button cannot be triggered to pause and is always playing
moreover when enabling debug, i always get a bunch of
[DEBUG] AudioConverterErrors.swift:errorDescription:72:: Not enough data for read-conversion operation
no matter the source or the stream

i think its a bug when seekTo is used, the audio is paused, but the corresponding state is not updated
for the above, this quic fixed it (adding presenter.handlePlay())
        commandCenter.changePlaybackPositionCommand.addTarget { [weak presenter] event in
            guard let presenter = presenter else {
                return .commandFailed
            }
            if let positionEvent = event as? MPChangePlaybackPositionCommandEvent {
                presenter.handleSeek(toNeedle: Needle(positionEvent.positionTime))
                presenter.handlePlay()
                return .success
            }

            return .commandFailed
        }

note that also after seeking i have to also do play
        SAPlayer.shared.seekTo(seconds: Double(sender.value))
        SAPlayer.shared.play()

so it boils down to play / pause working incorrect when seeking
This is also the reason for the lock screen player to fails... as the audio is stopped, but the player keeps on playing blank audio

moreover there seems to be a race condition inside
seekHelperDispatchQueue(needle: Needle) when playerNode.stop() is called
the seekHelperDispatchQueue of the AudioStreamEngine looks flawed

the deadlock on
playerNode.stop()
seems to be fixed by using
playerNode.pause()
but still the lockscreen player runs into issues while seeking

i tried to battle this and modify the executions to prevent playerNode.stop() from causing a deadlock, but didnt found a solution

the thread issue may lie here, as the completion block of scheduleBuffer is executed on a different thread than anything else
self?.playerNode.scheduleBuffer(nextScheduledBuffer) {
                    self?.numberOfBuffersScheduledInTotal -= 1
                    self?.pollForNextBufferRecursionHelper()
                }

Fixed the thread issue here
https://github.com/tanhakabir/SwiftAudioPlayer/pull/56
other issues are still open :(

Ok, i am giving up on this project... the streaming is broken beyond repair, switching to https://github.com/tumtumtum/StreamingKit

Fixed in https://github.com/tanhakabir/SwiftAudioPlayer/pull/132


Ignore all forms of CMakeLists.txt.user

In some cases Qt Creator will create a CMakeLists.txt.user file with a short hash which should also be ignored. For example:
CMakeLists.txt.user.1fa15d5

@nocnokneo thanks!


Allow setting max_new_tokens = 0 in order to tokenize only

Feature request
Allow max_new_tokens = 0 rather than returning a "max_new_tokens must be strictly positive" error. Return all the prompt tokens in prefill as normal, but an empty tokens array, as the model was not actually executed.
Motivation
For prepending information to the beginning of the context window, it is vital to be able to properly tokenize the context rather than just guessing based on character length. However, right now, it seems impossible to only tokenize text using this server, because you MUST request at least one additional token, even if that token is not needed yet. That requirement could probably easily be lifted - then clients could use a zero-token request in order to obtain the tokens of the prompt, which can be further processed before sending the final prompt for generation.
Your contribution
This change sounds trivial enough that I might be able to open a PR without having to create a dev environment

For prepending information to the beginning of the context window,

Could you expand on what you are doing exactly ?
Currently, we think if a user need tokenization on the client (for instance to count tokens) it's actually better done using the tokenizer directly in the client (avoids network which is good in general when it can be avoided).
If you expanded a bit what's the current problem you're trying to solve we might have a better way of doing it than sending queries just to get tokenized.

Being able to operate an LLM running remotely is a tangible benefit of separating client from server, and I'd hate to lose that just for tokenization.

Yet you are willing to do a lot of manipulation locally before sending requests to the server.
I am really empathetic with what you're trying to achieve, yet I still think we shouldn't implement it on our end (nor the generate 0 tokens hack).
We're currently already feeling the feature creep, and new cool features pop up literally every week and yet we do not have the time to implement everything.
In the same vibe as your request we've been asked (even internally) to support chat format which we refused for the same reasons, and same for code/code-infilling. There's clearly a lot of clever pre-prompting that needs to be done to get the maximum out of LLMs, and yet the amount of possible ways to do this is exploding.
We feel it's not TGI's job to do them at all at this time. We're currently focusing on shipping things like new features/faster inference, more hardware support and that's already taking most of our time.
If said preprompting is relatively simple to do on the client side and doesn't hurt too much performance wise, we'd rather go with this. I hope you understand our stance.
Making the PR shouldn't be too hard btw, so if you want to create one and share it that could be a way for us to gauge interest and maybe merge later if there's enough demand.
Cheers !

Yet you are willing to do a lot of manipulation locally before sending requests to the server.

That's not the same thing. This is pretty general - it doesn't matter how the tokenizer is implemented as long as it translates text into tokens. I just don't want to have to special-case every possible tokenizer, and either implement them all or depend on piles of Python for what is in the end a Rust project (just like this one).
Again, I don't mind doing token manipulations locally but I simply can't expect to be able to support every possible tokenizer like this server does, and it would be incredibly annoying and a waste of time to do so.

If said preprompting is relatively simple to do on the client side and doesn't hurt too much performance wise, we'd rather go with this. I hope you understand our stance.

I have literally no idea how I am supposed to do this without implementing special cases for every possible model. This is not the same as assembling the prompts from pieces on the server, or supporting chat or anything - this is simply giving clients access to the tokenizer that is already running on the server, without forcing said clients to concern themselves with exactly which model is running and exactly which tokenizer they should run on their local machine in order to hopefully mirror the same tokenization that is happening on the server.

Hey, has any thought been put into this use-case lately? I want to be able to use this server for storywriting, but that won't be possible until there's an efficient way to use the full context, and that will require being able to tokenize the prompt. I don't want to have to add specialized client-side code for running the tokenizer locally when the server already has it loaded - even if this is not the best possible solution, it is certainly the easiest, as it would only require relaxing a single check that is stricter than it could be.
Is there anything else that you think could work, without causing undesirable feature creep / tech debt for the server?

With the details and decoder_input_detailsargs you get back the prompt tokens and completion tokens, so that's already a lot of info you can use.
My answer is the same as Nicolas: just write a WASM module that pings the /info route, get back the model ID and loads the corresponding tokenizer client side.
We have a tutorial here and you can just use Tokenizer.from_pretrained(model_id) to get the correct one.

With the details and decoder_input_detailsargs you get back the prompt tokens and completion tokens, so that's already a lot of info you can use.

that's not what I am asking. Yes it's true that I can get the prompt tokens after the model has already generated a completion. But I cannot even know what context to send to be completed without being able to tokenize it first. Because I need to ensure things are present at both the beginning and end of the context window, and it's impossible to do that without knowing the tokens.

My answer is the same as Nicolas: just write a WASM module that pings the /info route, get back the model ID and loads the corresponding tokenizer client side.

where does WASM come into this? This is a Rust client. I don't want to have to shell out to Python to run the tokenizer client-side when I should just be able to send a request to the inference server that already has the tokenizer loaded properly.
And then there's no possibility of desyncs where the client ever doesn't support the tokenizer that the server is using, because the server will always be the one doing the tokenization then.
Why is there so much pushback against this? BTW, if you're not going to solve my problem then mark the issue as won't fix, please.

I'm going to implement this anyway as it's necessary for my use-case.
if you don't want it because it's too much feature creep for the library then I don't care. I'll open a PR anyway, and you will be free to nuke it from orbit if you still think clients should still be required to do all the work themselves.
I just think it hurts the utility of an inference server if clients are still required to look up and download the models.

First, calm down.

I don't want to have to shell out to Python to run the tokenizer client-side

You don't have to. We have rust implemnetations of the tokenizers. You can bundle them in wasm or it seems you don't even have to build a WASM module, just use Transformers.js from my colleague @xenova.

where the client ever doesn't support the tokenizer that the server is using

We use the same library in the server.

The client should not have to care which model the server is using and load model-specific code! That's the server's job!

We disagree.
Pinging a remote server to run a tokenizer is non-sense. Also the tokenizer is shared between all users. We do not want a noisy neighbor situation were apps start bottlenecking everybody to tokenize.

download the models.

No, you only download a tokenizer.json file.

First, calm down.

this just doesn't make much sense to me. I don't want to duplicate this code in the client or be tied to only huggingface models. Or make the user specify a tokenizer.json manually. That's a huge amount of trouble for what could have been a simple api request.

We use the same library in the server.

Forward compatibility would not exist, because the client would only support the types of tokenizer that it was compiled with. And I don't want to check the server version and refuse to operate either, because that's also bad ux.
If another mistral appears, I don't want to have to update the client side tokenizers and recompile just because I want to add things to the end of the context window.

Pinging a remote server to run a tokenizer is non-sense.

well unless you'd allow an endpoint to download the tokenizer json directly from the server I don't want to spend time and ux just to try to keep the client in sync. The alternative of only allowing models already hosted on huggingface is also basically nonsense.

(btw please don't tell me to "calm down". it basically never actually helps)

No. You actually need to understand that maintainers are not here for you to vent your frustrations at, even if they don't share your viewpoint.
The client does not need to contain a specific tokenizer. The /info route gives you the specific tokenizer name that is currently running on the endpoint. Then you can dynamically load the tokenizer with for example Transformers.js.
Here's what I mean:
import { AutoTokenizer } from '@xenova/transformers';

// response = request on the /info route

let tokenizer = await AutoTokenizer.from_pretrained(response.model_id);

let { input_ids } = await tokenizer('I love transformers!');
// Tensor {
//   data: BigInt64Array(6) [101n, 1045n, 2293n, 19081n, 999n, 102n],
//   dims: [1, 6],
//   type: 'int64',
//   size: 6,
// }

Now, you can support any TGI endpoint, and you have forward compatibility + way better latency.

No. You actually need to understand that maintainers are not here for you to vent your frustrations at, even if they don't share your viewpoint.

I do, because I'm not venting. I'm trying to explain why I think this way and why I don't think that the solutions you are proposing will work for me. If I said nothing then you would probably not even talk to me at all because it would be unclear what my constraints even are.
If the tone was not calm enough for you then that is because you told me directly that my request is nonsense and all I need to do is duplicate the work on the client instead, which is expressly and exactly what I set out not to do. It is the complete opposite of what I need TGI to support.

The client does not need to contain a specific tokenizer. The /info route gives you the specific tokenizer name that is currently running on the endpoint. Then you can dynamically load the tokenizer with for example Transformers.js.

No, the model_id contains a HuggingFace repo identifier, and the client has to go download the json from huggingface & it has to be of an architecture that the client-side tokenizer actually supports. I'm aware that most tokenizers are basic BPE-esque stuff but if a new one ever pops up then the client won't support it until its library is updated and it is recompiled.
And if the tokenizer is not on huggingface or if it has been modified in any way, like when adding new tokens in finetuning, this won't work and it'll be impossible to actually get the json from the server anyway, so the best the client can do is complain I guess.

way better latency

When I ping the server it usually completes in under 1 frame (under 16ms) so the latency is not even that bad in the first place.


refactor rewrite visitors

This PR unify all rewrite visitors.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Good job, But don't forget the DRY rule.

Okey.

IMHO, we should maintain a development document to describe the appropriate use of various development infrastructure components and its design intentions.


[FEAT] Auth, Login, OAuth, create account with username and password #1653

Summary
Add login functionality. Supported methods:

user-id-only

the current (legacy) method
the usr (user id) from the url params is automatically removed

username-password

allow user to register * login with a username and password
an email is not required, but the user can configure one via SSO

google-auth - use google SSO
github-auth - use github SSO

The auth fields are documented in .env.example.
Based on the AUTH_ALLOWED_METHODS different Login/Register options will be available to the end user.
Login Page (all options)

Login Page (no usr allowed)

Google SSO:
https://github.com/lnbits/lnbits/assets/2951406/5f7ce5a7-7a9a-479b-b948-71c5cfbb39d4
On the Account Settings page the user can verify its email address via SSO (google and github at the moment).

Test Scenarios
Scenario 1 (backwards compatibility)

access with usr in URL query params
test Login with user ID
test Create New Wallet

Scenario 2

Register (username & password)
Login with the above username and password

Scenario 3

Logout

Scenario 4

Login with Google
Login with Github

Scenario 5 (Account Settings page)

set username (username cannot be updated)
update other values (first name, last name, picture, etc)

Scenario 6 (Change password)

on Account Settings click Change Password
if the user was registered via SSO the the old password is not required (only the new one)
otherwise the old password is required

Scenario 7 (add email)

an account that was created via the usr or Register flow has no email
it is possible for the user to attach a validated email using SSO:

go to Account Settings
if no email is present then the SSO options are available
select one of them and authenticate
at the end of the flow, the user should have the validated email configured
emails cannot be changed or manually edited

Scenario 8 (token expire)

set a low value (1 minute) for AUTH_TOKEN_EXPIRE_MINUTES
login and refresh after 1 min
the user should be redirected to the login page and a info message displayed

Dependencies

itsdangerous is required by from starlette.middleware.sessions import SessionMiddleware

Notes
Stuff that is still open but the PR can be reviewed without:

i18n
warning message on login/logout (if email not set)
find place for long description text on Login page
CI failures: nix and a regtest call

@prusnak this is a draft PR based on https://github.com/lnbits/lnbits/pull/1653
Many things are unfinished or inherited from the previous PR.
Please wait until I take it out of draft.

I just started from a fresh db, ran poetry run lnbits-cli superuser-url and opened the link, got the following:

It immediately redirects to the /wallet url without the usr param, but adding the wal param. If I know manually add the usr back to the url it works.

Question: @motorina0 When LNBITS_ALLOW_NEW_ACCOUNTS is set to False:

does it prevent creation of new users with username and password (username-password method)?
does it prevent creation of new users via Google SSO and Github SSO (google-auth and github-auth methods)?

Question: @motorina0 When LNBITS_ALLOW_NEW_ACCOUNTS is set to False:

does it prevent creation of new users with username and password (username-password method)?
does it prevent creation of new users via Google SSO and Github SSO (google-auth and github-auth methods)?

1: yes
2: yes


Add Base64 encoding support for Logagent patterns file environment variable

We had some issues with passing the Logagent patterns file via environment variable into the Sematext container. The environment variable inside the container would only include the first line of the patterns file.
We were able to get the patterns file working with the default -e LOGAGENT_PATTERNS="$(cat patterns.yml)", but we do not use this for our sematext agents. We use .env files with populated environment variables that are then passed in docker-compose with the env_file: directive. Because of this, we ran into issues where populating the .env file would result in issues where only the first line of the patterns file would make it to the sematext container.
An example of the issue:
cat test.sh
#! /bin/sh
cat << EOF > x.env
LOGAGENT_PATTERNS=$(cat ./patterns.yml)
EOF

cat x.env | head -10
LOGAGENT_PATTERNS=#
# PARSER DEFINITIONS FILE IN YML FORMAT
#
# Please use 'ts' as feild name for dates and time

# set originalLine to false when auothash fields
# the original line might include sensitive data!
originalLine: false
# default seperator for multiline logs,
# which don't have a blockStart property

In this case the logagent pattern would only be set to #
We fixed this by base64 wrapping the whole patterns file, and decoding it inside the container. We have done this before for some of our dockerized Tozny services internally. We have tested this on our own branch, and are currently running our custom build on a few servers with no issues. The patterns file is properly decoded inside the container without issue.
With base64 wrapping:
cat test.sh
#! /bin/sh
cat << EOF > x.env
LOGAGENT_PATTERNS=$(cat ./patterns.yml | openssl base64 -A)
EOF

LOGAGENT_PATTERNS=IwojIFBBUlNFUiBERUZJTklUSU9OUyBGSUxFIElOIFlNTCBGT1JNQVQKIwojIFBsZWFzZSB1c2UgJ3RzJyBhcyBmZWlsZCBuYW1lIGZvciBkYXRlcyBhbmQgdGltZQoKIyBzZXQgb3JpZ2luYWxMaW5lIHRvIGZhbHNlIHdoZW4gYXVvdGhhc2ggZmllbGRzCiMgdGhlIG9yaWdpbmFsIGxpbmUgbWlnaHQgaW5jbHVkZSBzZW5zaXRpdmUgZGF0YSEKb3JpZ2luYWxMaW5lOiBmYWxzZQojIGRlZmF1bHQgc2VwZXJhdG9 (continued)

This way the base64 contents are a single-line string that gets passed to the container without breaking on newlines, returns, bash interpolation, etc.
This code changes does not change the original functionality of the LOGAGENT_PARAMS environment variable, and is backwards compatible. If the LOGAGENT_PARAMS_BASE64 variable is set to "true", then the container will decode the environment variable with base64. Otherwise, it treats the environment variable as plaintext as before. This way users can continue to use command line LOGAGENT_PARAMS like -e LOGAGENT_PATTERNS="$(cat patterns.yml)" or can use base64 encoded version with .env files.

Also, I think I got the formatting for the manpage docs help.1 but could be off a bit. Please let me know if that formatting is correct. I wasn't quite sure how to test it.

Pleass note there are other options to pass patterns.yml  like mounting a volume or download via HTTP. On Swarm it might be possible using docker secrets. Anyhow i will check this PR on Monday.

@megastef I know of the other ways to pass patterns.yml file to the container, which are great they are supported. For our build, deployment, and orchestration system, environment variables works best for now. We could have setup a s3 bucket to host our patterns.yml file, but it is just one more thing to setup and maintain when it comes to adding and updating the patterns file. Adding this base64 support was the "easiest" thing to do.
I just took a look at the travis build, and am a bit puzzled by it. It looks like the container build fine, but the test.sh script is broken
log count in Logsene: null
expr: non-integer argument
./test.sh: line 36: [: ==: unary operator expected

It looks like the $result variable is not getting set, and therefore when comparing to 0 bash complains. See https://stackoverflow.com/questions/408975/compare-integer-in-bash-unary-operator-expected
I think quoting result like if [ "$result" == 0 ]; then should fix the bash operation error. While that may fix this issue, if doesn't fix the issue that $count doesn't seem to be getting set. This also seems like a general issue with the test.sh script, and not necessarily this PR.

We trigger builds manually after additional manual tests. Please pull sematext/sematext-agent-docker:dev image (git master) https://hub.docker.com/r/sematext/sematext-agent-docker/builds/. Once this works fine, we increase version number and add the new version to DockerHub and a bit later to Docker-Store and Red Hat container catalogue. Publishing in the certified stores might take a few days longer, because new security issue might appear during security scans and need to be fixed first (e.g. change Node version, base image, Linux libraries etc.)

Updated documentation:
http://sematext.com/docs/sematext-docker-agent/configuration/
https://github.com/sematext/docs/commit/17ee4e11244d9d030a7ec9f9322f4bb0a3c63068
We released sematext/sematext-agent-docker:1.31.39 as "latest".
@tgjamin Thank you for contributing this PR.


Increase HDFS space

My script failed with the error :
RemoteException: File /tmp/write-table-concatenated-g9Xt6exvKdKQqbtVx72sar/_temporary/0/_temporary/attempt_202107280834516532796308026131585_0735_m_000063_19/part-00063 could only be written to 0 of the 1 minReplication nodes. There are 2 datanode(s) running and 2 node(s) are excluded in this operation.

Which is likely due to running out of disk space.
This was confirmed in the metric explorer:

The error message in my log file does make it sound that way. The error message I posted from Zulip, though, does say the same thing ("2 datanode(s) running and 2 node(s) are excluded..."), and the HDFS storage utilization is maxed out. Hopefully this should solve things.


UX optimisation

There are several unwieldy UX issues that would be good to smooth out during development.
Growing list, here:
Minor

[ ] In some cases, clicking on facets resets any other filters (e.g. provider) - fix: the UX should offer a more intuitive way to manage the retention and removal of filters.
[ ] In some cases, results are not shown when dropdown filters are used (hard to reproduce, encountered with searching for a provider within Institutions pre-filtered for the Africa region)
[ ] Add a "report this result" button to each search result - clicking on this will autogenerate a report that links directly to the offending result and prompts the user to fill in more detail. The report will be sent to a designated email address for triage to this tracker.
[ ] Update the Contact element on the site to include feedback and optimisation mechanisms.
[ ] Add number of OIH sources searched per query (xref #59) and the number of sources in the result set

Major

[ ] Sort function after search completes: similar to the OBPS (example, here, not the "Sort" function on right). Essentially we should be able to leverage all used / populated metadata fields to sort results.

Add a "report this result" button to each search result - clicking on this will autogenerate a report that links directly to the offending result and prompts the user to fill in more detail. The report will be sent to a designated email address for triage to this tracker.

For example, this entry has/had incorrect coordinates (we assume) and a way to click on a button to flag the result so OIH can inform the provider a fix may be needed (can be automated too).

@pbuttigieg I think we should break this 'meta' ticket out into separate issues (easier for the dev to tackle one-by-one).

Sure - this was kept as a list during our editing process.


Registering sigaction on SIGCONT causes a bug in stdout

I have two programs, the first one called child is supposed to register a handle for SIGCONT, print a message, stop itself, and wait for someone to start it, then print another message and exit.
The code for child.c is:
#include <stdio.h>
#include <signal.h>
#include <string.h>

void continue_handler(int signal, siginfo_t* info, void* pointer){
    printf("Process continues, called by: %lu\n", (unsigned long) info->si_pid);
}

int main() {
    struct sigaction continue_action;
    memset(&continue_action, 0, sizeof(continue_action));
    continue_action.sa_sigaction = continue_handler;
    continue_action.sa_flags=SA_SIGINFO;

    if (sigaction(SIGCONT, &continue_action, NULL) == -1) {
        perror("Failed registering handle");
	return 1;
    }

    printf("Child about to stop\n");
    raise(SIGSTOP);
    printf("Child woke up\n");

    return 0;
}

The second program will execute child (in a separate process), wait a second for it to stop, and then signal it to continue with SIGCONT
The code for parent.c:
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>

int main() {
    int child_pid = fork();
    if (child_pid == 0) {
        // Child
        char *arguments[] = { "./child", NULL };
        if (execvp("./child", arguments) == -1) {
            perror("failed executing child");
            return 1;
        }
    }

    // Parent
    // Wait for child to stop
    sleep(1);

    // Continue child process
    kill(child_pid, SIGCONT);
    waitpid(child_pid, NULL, 0);

    return 0;
}

When executing parent, the out is:
Child about to stop
Child woke up
Child woke up
Process continues, called by: 210
Note that "Child woke up" is printed twice, this should never happen and indicates some buffering issue in the kernel code.
Also note that the parent is not necessary here, I just used it for convenience, you can also just execute the child process and manually continue the process with something like
kill -SIGCONT [pid]
And the double "Child woke up" will be printed as well.
My windows build number is:
10.0.16299.334

Can't prove it, but I think there is some tmux heisenbugs because of this one. Maybe motivating.

This is an issue with the delivery of SIGCONT and resuming of the thread. The SIGCONT signal should arrive before the thread starts running again, but currently this is not always the case. The double prints are an artifact of getting the signal while in the write() call of the printf. I didn't look through the glibc code but I suspect the assumption is that there is just unflushed data and the second printf appends to it. In reality of course the write() triggered by the first printf was already processed -- it just hasn't returned yet.

Seems fixed in 17713.

Nothing discernible in the release notes but when it works it works...


jdk8u-solaris-sparcv9-temurin : Unable to find a suitable JAVA_HOME to build the cyclonedx-lib

https://ci.adoptopenjdk.net/view/Failing Temurin jobs/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-solaris-sparcv9-temurin/65/console
22:10:41  Unable to find a suitable JAVA_HOME to build the cyclonedx-lib

Maybe Solaris machine needs a suitable JDK or environment setting?

i take a look


Got TypeError after saving watched file: unorderable types: NoneType() > int()

I used sniffer as usual and it worked as expected, when I got this Exception from sniffer:
FAILED (errors=1, failures=1)
Failed - Back to work!
[2015-08-10 14:56:44,183 pyinotify ERROR] add_watch: cannot watch /home/sebastian/dev/intelmq/build/bdist.linux-x86_64/egg/intelmq/tests/bots/parsers WD=-1, Errno=No such file or directory (ENOENT)
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/sniffer/main.py", line 87, in main
    test_args, options.debug)
  File "/usr/local/lib/python3.4/dist-packages/sniffer/main.py", line 48, in run
    scanner.loop(wait_time)
  File "/usr/local/lib/python3.4/dist-packages/sniffer/scanner/pyinotify_scanner.py", line 69, in loop
    self._notifier.loop(callback)
  File "/usr/lib/python3/dist-packages/pyinotify.py", line 1395, in loop
    self.process_events()
  File "/usr/lib/python3/dist-packages/pyinotify.py", line 1292, in process_events
    self._default_proc_fun(revent)
  File "/usr/lib/python3/dist-packages/pyinotify.py", line 932, in __call__
    return _ProcessEvent.__call__(self, event)
  File "/usr/lib/python3/dist-packages/pyinotify.py", line 657, in __call__
    return meth(event)
  File "/usr/local/lib/python3.4/dist-packages/sniffer/scanner/pyinotify_scanner.py", line 27, in process_IN_MODIFY
    self._scanner.trigger_modified(event.pathname)
  File "/usr/local/lib/python3.4/dist-packages/sniffer/scanner/base.py", line 42, in trigger_modified
    if mod_time > self._watched_files.get(filepath, 0):
TypeError: unorderable types: NoneType() > int()

I am using 0.3.5 from pip on Linux (inotify):
$ sniffer --version
sniffer 0.3.5
$ pip freeze | grep sniffer
sniffer==0.3.5

Hey @sebix, what are you doing to cause this bug to occur? I don't run linux these days, so I can't verify a fix ATM.

I got the error several times, but now I can't reproduce it for one month.
All I found out, that sniffer kind of "hangs" often in my case, it does not execute the tests anymore, just waits. Maybe has something to do with large tests and frequent changes. As I can't say more, I will close the issue here.

I can reproduce this fairly regularly with the same version.
My @runnable deletes and creates files in the watched directory. It seems like there is a race condition between checking for the existence of a file and checking its modification time.


making navbar and improving design of website

I will add beautiful and responsive navbar, will align the items and make website look beautiful, please assign me this issue under hacktoberfest 2022.

Can you assign me this issue?

Please assign me this issue


Update status component: new color and shape of indicator

Hey, I just made a Pull Request!
As my first contribution, I tried to fix Status component by applying changes described in https://github.com/spotify/backstage/issues/724.
Screenshots

:heavy_check_mark: Checklist

[x] All tests are passing yarn test
[x] Screenshots attached (for UI changes)
[x] Relevant documentation updated
[x] Prettier run on changed files
[ ] Tests added for new functionality
[ ] Regression tests added for bug fixes

Yay! Looking better!
Can we combine the status/label sections? The text label should always be paired with the status dot! 😄
And when the label is "N/A", the dot can be the same grey color that it is when the label is 'Aborted' or 'Disabled.'
Thank you!!

@katz95 Is there a use-case for a status component without a text or do we always want to include a label? Thanks!

We recommend always pairing it with a label! 😺


[huggingface.py: 1353] Failed to get model SHA for LLamaForCausalLM.....

Hiii, when I tried to run simple_evaluate on my finetuned peft model (codes below), the following bugs keep appeared: `2024-11-11:00:33:22,892 WARNING  [huggingface.py:1353] Failed to get model SHA for LlamaForCausalLM. Could you help me have a look on that? Thanks a lot!
###########Model Set Up######################################
model_path = "meta-llama/Llama-3.2-3B"
model = AutoModelForCausalLM.from_pretrained(
model_path,
device_map="auto",
torch_dtype=torch.bfloat16
)
device = torch.device(f'cuda:{local_rank}')
peft_model_id = "/home/wangz12/projects/RareDxGPT/checkpoints/RareDxGPT-orpo-3b50/checkpoint-19000"
lora_model = PeftModel.from_pretrained(model,
peft_model_id,
torch_dtype=torch.bfloat16
)
model = lora_model.merge_and_unload()
lm = HFLM(pretrained=model,
tokenizer=tokenizer,
dtype=torch.bfloat16,
max_length=tokenizer.model_max_length,
batch_size=args.batch_size,
trust_remote_code=True,
)
task_manager = TaskManager()
tasks = ["mmlu"]
result = simple_evaluate(
model=lm,
tasks=tasks,
num_fewshot=5,
task_manager=task_manager
)
 2024-11-11:00:33:22,892 WARNING  [huggingface.py:1353] Failed to get model SHA for LlamaForCausalLM(
(model): LlamaModel(
(embed_tokens): Embedding(128256, 3072)
(layers): ModuleList(
(0-27): 28 x LlamaDecoderLayer(
(self_attn): LlamaSdpaAttention(
(q_proj): Linear(in_features=3072, out_features=3072, bias=False)
(k_proj): Linear(in_features=3072, out_features=1024, bias=False)
(v_proj): Linear(in_features=3072, out_features=1024, bias=False)
(o_proj): Linear(in_features=3072, out_features=3072, bias=False)
(rotary_emb): LlamaRotaryEmbedding()
)
(mlp): LlamaMLP(
(gate_proj): Linear(in_features=3072, out_features=8192, bias=False)
(up_proj): Linear(in_features=3072, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, out_features=3072, bias=False)
(act_fn): SiLU()
)
(input_layernorm): LlamaRMSNorm((3072,), eps=1e-05)
(post_attention_layernorm): LlamaRMSNorm((3072,), eps=1e-05)
)
)
(norm): LlamaRMSNorm((3072,), eps=1e-05)
(rotary_emb): LlamaRotaryEmbedding()
)
(lm_head): Linear(in_features=3072, out_features=128256, bias=False)
) at revision main. Error: Repo id must be a string, not <class 'transformers.models.llama.modeling_llama.LlamaForCausalLM'>: 'LlamaForCausalLM(
(model): LlamaModel(
(embed_tokens): Embedding(128256, 3072)
(layers): ModuleList(
(0-27): 28 x LlamaDecoderLayer(
(self_attn): LlamaSdpaAttention(
(q_proj): Linear(in_features=3072, out_features=3072, bias=False)
(k_proj): Linear(in_features=3072, out_features=1024, bias=False)
(v_proj): Linear(in_features=3072, out_features=1024, bias=False)
(o_proj): Linear(in_features=3072, out_features=3072, bias=False)
(rotary_emb): LlamaRotaryEmbedding()
)
(mlp): LlamaMLP(
(gate_proj): Linear(in_features=3072, out_features=8192, bias=False)
(up_proj): Linear(in_features=3072, out_features=8192, bias=False)
(down_proj): Linear(in_features=8192, out_features=3072, bias=False)
(act_fn): SiLU()
)
(input_layernorm): LlamaRMSNorm((3072,), eps=1e-05)
(post_attention_layernorm): LlamaRMSNorm((3072,), eps=1e-05)
)
)
(norm): LlamaRMSNorm((3072,), eps=1e-05)
(rotary_emb): LlamaRotaryEmbedding()
)
(lm_head): Linear(in_features=3072, out_features=128256, bias=False)
)'.
fatal: not a git repository (or any parent up to mount point /mnt/isilon)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[rank0]:[W1111 00:33:26.906774961 ProcessGroupNCCL.cpp:1250] Warning: WARNING: process group has NOT been destroyed before we destruct ProcessGroupNCCL. On normal program exit, the application should call destroy_process_group to ensure that any pending NCCL operations have finished in this process. In rare cases this process can exit before this point and block the progress of another member of the process group. This constraint has always been present,  but this warning has only been added since PyTorch 2.4 (function operator())
`

Hi! This is just for logging purposes. Should just raise a warning letting you know it couldn't find a the model hash, but the script should still finish


[feature] Make description optional

🧩 Feature
Make the description field optional
Description
During code reviews I regularly add short notes as I read the code, hinting future me that something is going there.
This is super helpful as the title of the note is shown directly in the code.
The issue with that approach is that the description is a required field.
Currently my work around is just hitting my space bar to bypass the mandatory description.
It would be nice if the description field can be left empty when trying to make a not.
Thanks in advance, and thanks for the awesome tool!

all-contributors add @inconspicuous-username for ideas

@all-contributors add @inconspicuous-username for ideas


Fixed the bug of replacing img src with href text

After apply the fix:

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow


Support for PHP 8.1 enums

Feature Request

Q
A

New Feature
yes

RFC
yes

BC Break
no

Summary
We could add native support for PHP 8.1+ enums by adding a new parameter to the mapping that allows to define the enum class name like it's done in ORM: https://github.com/doctrine/orm/pull/9304

I'm already using this feature in the latest doctrine ORM. It would be great to have the same functionality for the ODM.

Referencing ORM's PR we could base our work on: https://github.com/doctrine/orm/pull/9304


Update sql-server-transaction-locking-and-row-versioning-guide.md

@brunom : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Thanks for the typo fix, @brunom!


Remove codeowners file

Change-type: patch
Signed-off-by: Fırat Gelbal<EMAIL_ADDRESS>

@balena-ci I self-certify!


Removes Tests.TestLogger and depends on nullean/vstest-pretty-logger instead

Integration tests still failing, unrelated new changes from the head of Elasticsearch master branch that needs to be tackled.
Opened https://github.com/elastic/elasticsearch-net/pull/5044 to address those.


Installation fails when zip is missing - consider adding requirements to install guidance

Is your feature request related to a problem? Please describe.
when running asdf install kiota latest it fails if zip is missing.
.asdf/plugins/kiota/bin/download: line 23: unzip: command not found

Describe the solution you'd like
We could either add a known issues section to the documentation here, or requirements, or a more explicit error messages.
Describe alternatives you've considered
While solving for this is trivial if you have a bit of experience on linux OSes, I'm afraid it might deter new comers.
Additional context
On ubuntu sudo apt-get install zip -y did the trick.

zip is already listed in the dependencies section.
But it's super easy to add an early check and a more explicit message.


Adding conditions of specific inverse trigonometric functions

I would like to add graph and condition of inverse trigo functions
example-sin^(-1)(2x/1+x^2) Like there are 3 conditions under which it is used and there are many more functions I would like to add.
Please assign this issue to me.

Go ahead
Deadline 28 March,2021 (11:59 PM IST)


set_authorizer callback is not called correctly

It seems to me that set_authorizer's callback is not called correctly. I'm not using the function or familiar with it but I spotted this while reading the code.
In sqlite-api.js, sqlite3.set_authorizer function, adapt calls cvtArgs which returns an array of converted args. This array is passed as the first arg to the callback, when it should probably be spread instead: https://github.com/rhashimoto/wa-sqlite/blob/160e2fb6812604cdf4748f169c298f5c4cb11a99/src/sqlite-api.js#L633
The tests don't currently check what the callback was called with, but we can make them fail if we check that iActionCode was a defined value:
it('should call authorizer', async function() {
  let rc;

  const authorizations = [];
  rc = sqlite3.set_authorizer(db, (_, iActionCode, p3, p4, p5, p6) => {
    authorizations.push([iActionCode, p3, p4, p5, p6]);
    return SQLite.SQLITE_OK;
  });
  expect(rc).toEqual(SQLite.SQLITE_OK);

  rc = await sqlite3.exec(db, 'CREATE TABLE t(x)');
  expect(rc).toEqual(SQLite.SQLITE_OK);

  expect(authorizations.length).toBeGreaterThan(0);
  expect(authorizations[0][0]).toBeDefined(); // <-- added this line
});

Thanks for the report! I'll take a look but might take up to a week before I can get to it.

In sqlite-api.js, sqlite3.set_authorizer function, adapt calls cvtArgs which returns an array of converted args. This array is passed as the first arg to the callback, when it should probably be spread instead:

Exactly right. Fix incoming.


AutoComplete OpenOnFocus did not load data correctly

Fix for issue #1645 where the OpenOnFocus opens an empty dropdown instead of showing all data

Thanks for the pull request @bert-algoet however we believe that it will be better to use DropDown component for such cases if you want to list initially all items.

@enchev the reason i'm not using the dropdown is because you cannot enter new values that do not exist yet. I'll see what i can do without this change.

Check this demo:
https://blazor.radzen.com/dropdown?theme=material3#editable-dropdown


find Pool ID regardless of number of subscriptions.

Packstack fails to find OSP Pool ID because shell scripting doesn't account for long subscription "Provides" lists.
This fixes that.
Also reported in LaunchPad: https://bugs.launchpad.net/packstack/+bug/1551424
Errant original code: https://github.com/openstack/packstack/blob/4ea165cafd8be903c87a2ac34dc0237d3a56e8bc/packstack/plugins/prescript_000.py#L1076
The above line fails because my subscription has a lot of available products:
root  ~  subscription-manager list --available | grep -m1 -A15 'Red Hat Enterprise Linux OpenStack Platform'
Subscription Name: Red Hat Enterprise Linux OpenStack Platform Standard Supported Business Partner NFR
Provides: Red Hat OpenStack Beta
Red Hat OpenStack Beta Certification Test Suite
Red Hat Software Collections (for RHEL Server)
Red Hat Ceph Storage Calamari
Red Hat Enterprise MRG Messaging
Red Hat OpenStack Certification Test Suite
Red Hat Beta
Red Hat Ceph Storage MON
Red Hat Ceph Storage
Red Hat OpenStack
Red Hat Enterprise Linux for Real Time
Red Hat Enterprise Linux High Availability (for RHEL Server)
Red Hat Enterprise Linux Server
Red Hat Software Collections Beta (for RHEL Server)
Red Hat Enterprise Linux Load Balancer (for RHEL Server)
[Errno 32] Broken pipe

Thank you for contributing to openstack/packstack!
openstack/packstack uses Gerrit for code review.
If you have never contributed to OpenStack before make sure you have read the
getting started documentation:
http://docs.openstack.org/infra/manual/developers.html#getting-started
Otherwise please visit
http://docs.openstack.org/infra/manual/developers.html#development-workflow
and follow the instructions there to upload your change to Gerrit.


graphql.config.yml missing ?

Would be useful to have the graphql.config.yml file inside the repo, as described in package.json scripts section.
 generate-ts-types: "graphql-codegen --config graphql.config.yml"
to run types generation when changing some models
Thank You.

@Lorezz Added on https://github.com/datocms/next-landing-page-demo/commit/183634fa551c7801fbb79173a630c85c4489e1a0
Thank you!


Module Resolution and Type Reference directive cache updates and its API changes

Api for module resolution cache that can update compiler options of current program (and handle redirects correctly) and clearing the cache
Api and implementation for type reference directive cache
Also add package json info cache that stores package json read result in cache till its cleared.
Related changes in ts-loader at TypeStrong/ts-loader#1287
Fixes #42670

@typescript-bot pack this

This broke TypeScript on Yarn v3 (rc) for me, it can't find modules anymore. @sheetalkamat Does it require custom changes to tsconfig.json now, or is this a bug in TypeScript, or yarn?

This should not be a break.. if you are experiencing issue, actual repro steps will help.. note we can diagnose issues with tsc, editor or repro using  api but not actual tools in most cases ...


Fix issue with user creation

Can't figure what this is supposed to fix, but looks to be related to this issue: https://github.com/jellyfin/jellyfin/issues/3199

I believe it should just be user there not JSON.user. cc @dkanada


[2012-08-01] Using $Debug in templates does not show the available methods, just variables/fields

created by: abyys
created at: 2012-08-01
original ticket: http://open.silverstripe.org/ticket/7731

Using $Debug inside a template does only list the available variables/fields. Public methods defined in the page model or controller classes will not be listed at all.

I would be curious to know if there is going to be any enhancements to this? I just happend to find this issue from Google and I see it's closed, but apparently without any solution. What I am looking for is a way to find out all template variables available at a given time. (I have read the Common Variables documentation but obviously that page cannot list all variables I have created in my custom code :) ). For example, $Debug does not seem to list any TemplateGlobalProvider variables. Is there any other way to achieve this? Thanks! :)


How do I use it in Kotlin?

@NotEmpty
@Email
private EditText emailEditText;
@Password(min = 6, scheme = Password.Scheme.ALPHA_NUMERIC_MIXED_CASE_SYMBOLS)
private EditText passwordEditText;
@ConfirmPassword
private EditText confirmPasswordEditText;
@Checked(message = "You must agree to the terms.")
private CheckBox iAgreeCheckBox;
Kotlin gets the xml id and uses view, how do you handle this part?

+1

any solution?

Using Butterknife I am able to compile:
    @NotEmpty
    @Email
    @BindView(R.id.emailTextField)
     lateinit var emailTextField: EditText

    @NotEmpty
    @BindView(R.id.passwordTextField)
    @Password(min = 8, scheme = Password.Scheme.ALPHA_NUMERIC_MIXED_CASE)
     lateinit var passwordTextField: EditText

But when I call validator.validate() I receive an exception on Validator.java line 549 (Annotation[] annotations = field.getAnnotations();):
{AnnotationFactory} Method threw 'java.lang.NullPointerException' exception. Cannot evaluate libcore.reflect.AnnotationFactory.toString()
Any help you can offer is appreciated.

Kotlin is not supported yet, would appreciate if someone sends a PR.


Save keys to password manager

Make the keys discoverable for password managers. Save and retrieve it.

Needs to investigate the bug that doesn't trigger the save action. Maybe do a platform channel to treat that natively and/or work in the flutter side to implement it.

This will be replaced with the new user keys saving flow.


validate-simcore 2 test is broken (unnoticed due to allowed failure)

This is according to the logs at least due to the python3.11 update in simcore, python3.11 is for now missing in the itisfoundation:ci-provisioned-ubuntu docker image. A new version of the docker image has to be built and tested I presume. The python update might cause other tests that use this docker image to fail, if :latest is used.

fixed by python version upgrade https://github.com/ITISFoundation/osparc-ops-environments/pull/795


Can't rip a game, if i add the assemblies, it works otherwise

When i rip the AssetBundle on its own, the ripper works just fine.
Except that it wont give me the GameObject script components or its values, i am assuming it's because it's missing the script references.
But when i put the assemblies, it just crash :-\
Granted the game has passed thro 3 unity version upgrades during its development, if i am not mistaken.
It is currently in 2018.2.10f1 but i am sure it was 2017 before this, not sure if this can cause the ripper to not understand the files.
I have the script source code ripped using ILSpy tho, it compiles ok in visual studio and in unity 2018, so i don't know whats going on.
Do you think it would help if i add the script source code instead of the dlls?
This is the error i am getting:
Error message: SerializedFile with index 10949 was not found in dependencies
Stack trace:    at uTinyRipper.SerializedFile.FindAsset(Int32 fileIndex, Int64 pathID, Boolean isSafe)
at uTinyRipper.Converters.ProjectAssetContainer.FindAsset(Int32 fileIndex, Int64 pathID)
at uTinyRipper.Classes.PPtr1.FindAsset(IAssetContainer file)    at uTinyRipper.Classes.PPtr1.ExportYAML(IExportContainer container)
at uTinyRipper.Game.Assembly.SerializableField.ExportYAML(IExportContainer container, Field& etalon)
at uTinyRipper.Game.Assembly.SerializableStructure.ExportYAML(IExportContainer container)
at uTinyRipper.Classes.MonoBehaviour.ExportYAMLRoot(IExportContainer container)
at uTinyRipper.Classes.Object.ExportYAMLDocument(IExportContainer container)
at uTinyRipper.Converters.YAMLAssetExporter.Export(IExportContainer container, IEnumerable1 assets, String path)    at uTinyRipper.Project.SceneExportCollection.Export(ProjectAssetContainer container, String dirPath)    at uTinyRipper.Converters.ProjectExporter.Export(String path, GameCollection fileCollection, IEnumerable1 files, ExportOptions options)
at uTinyRipper.GameStructure.Export(String exportPath, Func`2 filter)
at uTinyRipperGUI.MainWindow.ExportFiles(Object data)

Game files required

I can't share the game files, it would be illegal for me to do that, since it's a steam game. :-
Also it's around 3gb amount of data to transfer.


No pretrained liteflow model

When running python tools/video_inpaint.py --frame_dir ./demo/frames --MASK_ROOT ./demo/masks --img_size 512 832 --LiteFlowNet --DFC --ResNet101 --Propagation,it showed:
FileNotFoundError: [Errno 2] No such file or directory: './pretrained_models/sintel.pth'
It seems that i dont have the sintel.pth file.Could you help me?thx.

They are linked in the README:

Weights for LiteFlowNet are hosted by sniklaus: default, kitti, sintel.

Download one of them. You can parse it by adding --pretrained_model_liteflownet path_to_weights

Thank you very much, it works

The three links-sniklaus: default, kitti, sintel.is not work.Could you tell me how to handle this question?thx!

They work fine for me. Here they are in raw format

http://content.sniklaus.com/github/pytorch-liteflownet/network-default.pytorch
http://content.sniklaus.com/github/pytorch-liteflownet/network-kitti.pytorch
http://content.sniklaus.com/github/pytorch-liteflownet/network-sintel.pytorch

Thank you very much! I can download them now!


Fading an image programmatically

Hi there
I would like to use this library to programatically fade an image. The idea is to have an image fade in from one corner to another, or from the centre out. I'd like to do this programatically if possible, instead of overlaying an already faded image.
Could you suggest a way to implement this? Is this something this is capable of currently?
Thanks for the great library!

Hi,
There is no predefined function for "fade in" effect in imaging. You can try using a Clone function to convert an image to NRGBA type and manipulate its pixels using NRGBAAt and SetNRGBA methods (e.g. change an alpha channel or rgb channels depending on the pixel coordinates).
Here's a small example:
package main

import (
	"image"
	"log"

	"github.com/disintegration/imaging"
)

func main() {
	img, err := imaging.Open("branches.jpg")
	if err != nil {
		log.Fatal(err)
	}

	img = fadeIn(img)

	err = imaging.Save(img, "out.png")
	if err != nil {
		log.Fatal(err)
	}
}

func fadeIn(src image.Image) image.Image {
	dst := imaging.Clone(src)
	b := dst.Bounds()
	for y := b.Min.Y; y < b.Max.Y; y++ {
		m := float64(y-b.Min.Y) / float64(b.Dy())
		for x := b.Min.X; x < b.Max.X; x++ {
			c := dst.NRGBAAt(x, y)
			c.A = uint8(float64(c.A) * m)
			dst.SetNRGBA(x, y, c)
		}
	}
	return dst
}

Awesome, thanks!


Command line prepended with tab character.

Thank you for yet another excellent plugin.
Curiously, the plugin seems to cause the prepending of every command with a tab character (\t).
This tab is inserted both in the command line (upon pressing Enter) and in the history (as confirmed by hist l).
Any thoughts as to what the reason might be? Thank you once again.

Every command line? That’s weird. Can you please try the following?
$ cd $(mktemp -d)  # Create a temp dir and enter it.
$ ZDOTDIR=$PWD HOME=$PWD zsh -f  # Start a subshell in it without config files.
% source path/to/zsh-hist.plugin.zsh  # Source the plugin.
% # Insert here the steps you take to reproduce your bug.

Does the problem occur then, too?

Every command line? That’s weird. Can you please try the following?
$ cd $(mktemp -d)  # Create a temp dir and enter it.
$ ZDOTDIR=$PWD HOME=$PWD zsh -f  # Start a subshell in it without config files.
% source path/to/zsh-hist.plugin.zsh  # Source the plugin.
% # Insert here the steps you take to reproduce your bug.

Does the problem occur then, too?

@marlonrichert thank you for these troubleshooting steps.
Indeed, sourcing the plugin within a pristine shell solves the issue.
I'll try to identify the conflicting plugin—if I understand your intention correctly—and report back.

@marlonrichert thank you for these troubleshooting steps.
Indeed, sourcing the plugin within a pristine shell solves the issue.
I'll try to identify the conflicting plugin—if I understand your intention correctly—and report back.

UPDATE: The issue persists with the following bare-bones .zshrc:
export ZPLUG_HOME=~/.zplug
source $ZPLUG_HOME/init.zsh

zplug "marlonrichert/zsh-hist"
zplug load

In tandem with your troubleshooting steps above, this suggests that a conflict between zplug and zsh-hist is likely.
(Have been troubleshooting with both iTerm2 and Terminal.app on a Mac.)

UPDATE: The issue persists with the following bare-bones .zshrc:
export ZPLUG_HOME=~/.zplug
source $ZPLUG_HOME/init.zsh

zplug "marlonrichert/zsh-hist"
zplug load

In tandem with your troubleshooting steps above, this suggests that a conflict between zplug and zsh-hist is likely.
(Have been troubleshooting with both iTerm2 and Terminal.app on a Mac.)

Thanks for the info! I’ll have a look at what could be the problem.

Thanks for the info! I’ll have a look at what could be the problem.

Sorry, but I cannot reproduce this. Here's what I did:
> brew install zplug
> cd "$(mktemp -d)"
> ZDOTDIR=$PWD HOME=$PWD PS1='%~:%?> ' PS4='+%e %N:%I %?> %_ ' zsh -f
% export ZPLUG_HOME=/usr/local/opt/zplug
% source $ZPLUG_HOME/init.zsh
% zplug "marlonrichert/zsh-hist"
% zplug load

And then I tried out different kinds of commands. They all work correctly for me.

Sorry, but I cannot reproduce this. Here's what I did:
> brew install zplug
> cd "$(mktemp -d)"
> ZDOTDIR=$PWD HOME=$PWD PS1='%~:%?> ' PS4='+%e %N:%I %?> %_ ' zsh -f
% export ZPLUG_HOME=/usr/local/opt/zplug
% source $ZPLUG_HOME/init.zsh
% zplug "marlonrichert/zsh-hist"
% zplug load

And then I tried out different kinds of commands. They all work correctly for me.

@marlonrichert hmm… I'm not surprised. The issue is profoundly puzzling. Removing zsh-hist from my plugins list instantly fixes the issue. (Of course this doesn't prove that zsh is responsible for the issue!)
No less curiously, if I deliberately prefix a command with, say, N tab characters (N > 1), it is stored in the history with exactly one tab character. For a moment I hypothesized that HIST_REDUCE_BLANKS might be to blame, but no…
Any further thoughts would be much appreciated, though I realize that this might be specific to my setup.

@marlonrichert hmm… I'm not surprised. The issue is profoundly puzzling. Removing zsh-hist from my plugins list instantly fixes the issue. (Of course this doesn't prove that zsh is responsible for the issue!)
No less curiously, if I deliberately prefix a command with, say, N tab characters (N > 1), it is stored in the history with exactly one tab character. For a moment I hypothesized that HIST_REDUCE_BLANKS might be to blame, but no…
Any further thoughts would be much appreciated, though I realize that this might be specific to my setup.

Can you please do functions -T .hist.format, try again and paste the debug out here?

Can you please do functions -T .hist.format, try again and paste the debug out here?

@marlonrichert here you go. Your expertise in the area is much appreciated.
ls+.hist.format:1> setopt localoptions
+.hist.format:2> zstyle -t :hist: expand-aliases
+.hist.format:5> setopt NO_aliases
+.hist.format:7> REPLY=ls
+.hist.format:8> local -i ret=1
+.hist.format:10> functions[.tmp.]=ls
+.hist.format:11> [[ -n $'\tls' ]]
+.hist.format:12> REPLY='' ft+Tab to insert)
+.hist.format:13> local word chunk body=$'\n\tls'
+.hist.format:14> word=ls
+.hist.format:15> chunk=$'\n\tls'
+.hist.format:16> body=''
+.hist.format:17> prefix=$'\n\t'
+.hist.format:18> indent=''
+.hist.format:19> REPLY+=$'\n\tls'
+.hist.format:21> REPLY=$'\tls'
+.hist.format:22> ret=0
+.hist.format:25> [[ -v 'functions[.tmp.]' ]]
+.hist.format:26> unfunction .tmp.
+.hist.format:28> return ret
        ls
./
../
<…etc.>

@marlonrichert here you go. Your expertise in the area is much appreciated.
ls+.hist.format:1> setopt localoptions
+.hist.format:2> zstyle -t :hist: expand-aliases
+.hist.format:5> setopt NO_aliases
+.hist.format:7> REPLY=ls
+.hist.format:8> local -i ret=1
+.hist.format:10> functions[.tmp.]=ls
+.hist.format:11> [[ -n $'\tls' ]]
+.hist.format:12> REPLY='' ft+Tab to insert)
+.hist.format:13> local word chunk body=$'\n\tls'
+.hist.format:14> word=ls
+.hist.format:15> chunk=$'\n\tls'
+.hist.format:16> body=''
+.hist.format:17> prefix=$'\n\t'
+.hist.format:18> indent=''
+.hist.format:19> REPLY+=$'\n\tls'
+.hist.format:21> REPLY=$'\tls'
+.hist.format:22> ret=0
+.hist.format:25> [[ -v 'functions[.tmp.]' ]]
+.hist.format:26> unfunction .tmp.
+.hist.format:28> return ret
        ls
./
../
<…etc.>

UPDATE: I migrated my zsh from zplug to zsh-snap. It was every minute, but this particular issue persists.

UPDATE: I migrated my zsh from zplug to zsh-snap. It was every minute, but this particular issue persists.

@tekhnee If you do setopt extendedglob and then try again, does the problem go away?

@tekhnee If you do setopt extendedglob and then try again, does the problem go away?

@marlonrichert I meant to say that migrating was *worth every minute.
And yes indeed, setopt extendedglob does the trick — thank you! Is this option required by zsh-hist?

@marlonrichert I meant to say that migrating was *worth every minute.
And yes indeed, setopt extendedglob does the trick — thank you! Is this option required by zsh-hist?

And yes indeed, setopt extendedglob does the trick — thank you! Is this option required by zsh-hist?

No, it just means I need to set it inside the function. 🙂

And yes indeed, setopt extendedglob does the trick — thank you! Is this option required by zsh-hist?

No, it just means I need to set it inside the function. 🙂

Should be fixed now.

Should be fixed now.


Fix for pull request #248. Use only major version in Cartfile

This looks OK to me; not too «savy» on Carthage; but not providing the last part of the semver will still work and will pick up minor releases?

In my experience with Carthage, the last version (2.0.2) is picked up.

Thanks @aschuch.
I think it won't hurt to merge this change.
Thanks


Question about HDD update disabled

I have a question about disabling Synology update.
As far as I know, this update also serves to check for any new firmware on the individual HDs.
Attempting manual update fails (after running the script).
So we have to give up forever to any updates?
What do you think about?
Ty

Do you have drives that DSM supports for firmware updates?
I thought DSM only supported firmware updates on Synology drives.
You could restore the db update URL, do the manual firmware version check, then disable the db update URL.

Restore the drive db update URL:  sudo -i /path-to-script/syno_hdd_db.sh
Do the manual firmware check.
Then disable the drive db update URL again: sudo -i /path-to-script/syno_hdd_db.sh --nodbupdate

or sudo -i /path-to-script/syno_hdd_db.sh -n

OK thank you.
Yes, before running the script it happened that DSM found an updated firmware asking me to restart.
Many of the HDDs I have are Exos and Ironwolf therefore supported.  Thanks for the reply

HI,
I reopen the report because there is perhaps still some problem.
The script to re-enable the HDD update doesn't seem to work.
The first one says the parameter is wrong.
The second runs but does not produce the desired effect.
Trying to update from Synology site I get this error.
Trying to update by hand instead, it seems that the DB doesn't update.
Some idea?

I mistyped --nodbupdate. It should have been --noupdate
Both -n and --noupdate disable db updates.
Running the script without -n or --noupdate will re-enable db updates.

Restore the drive db update URL: sudo -i /path-to-script/syno_hdd_db.sh
Do the manual firmware check.
Then disable the drive db update URL again: sudo -i /path-to-script/syno_hdd_db.sh -n

Thanks Dave.
However, the problem remains that even by executing the script without parameters (therefore db update enabled), the Synology update check fails with the pop-up already attached to the previous message.
However, manually updating does not update the db.
Any idea?

Okay. I've found a bug in the code that re-enables db updates. I'm not sure how long it's been there because it used to work.
Until I can fix the script and upload the new version you can use this command to re-enable db updates:
sudo sed -i "s/drive_db_test_url=\"127\.0\.0\.1\"//" "/etc.defaults/synoinfo.conf"

Also after executing this script, syno update doesn't work. Same popup message

There's an updated version, v1.2.31, to fix your issue.
https://github.com/007revad/Synology_HDD_db/releases/tag/v1.2.31

Ty. It works now!


Update version to 1.1.19-5 on staging

Update version to 1.1.19-5

🚀 Deployed to staging by @OSBotify in version: 1.1.19-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @Julesssss in version: 1.1.21-1 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


support to release latest version of doc

Supports the latest branch and can generate development documents.
The design is as follows:
In the github interface you can pass in the parameter dev and use it to confirm whether your documentation should be set to the latest version. This value defaults to false. When it is false, the generated document will be judged based on whether the document version exists and whether it is a release version.
If this value is true, development documentation will be generated based on the current branch. Its format is v0.8.0 (dev) or v0.7 (dev). By the way, there will only be one development version document at a time, no matter what branch it is based on.

fix #2546