pythonPackages.sievelib: init at 1.1.1

Motivation for this change
Useful library that implements various RFC's.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

@costrouc : You were right, those were remnants that could be removed. They are gone now.

@GrahamcOfBorg build python3Packages.sievelib python2Packages.sievelib

Success on aarch64-linux (full log)
Attempted: python3Packages.sievelib, python2Packages.sievelib
Partial log (click to expand)
test_vacationext_with_multiline (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_vacationext_with_single_mail_address (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_set_command (sievelib.tests.test_parser.VariablesCommands) ... ok
/nix/store/50r722fpsrddi18x7jfwddfyhgbi1200-python3.6-sievelib-1.1.1

/nix/store/linar9mzwjyy118v3fh5360d0xbp9wsf-python2.7-sievelib-1.1.1
----------------------------------------------------------------------
Ran 76 tests in 0.089s

OK

Success on x86_64-linux (full log)
Attempted: python3Packages.sievelib, python2Packages.sievelib
Partial log (click to expand)
test_vacationext_with_multiline (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_vacationext_with_single_mail_address (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_set_command (sievelib.tests.test_parser.VariablesCommands) ... ok

----------------------------------------------------------------------
Ran 76 tests in 0.169s

OK
/nix/store/zvi771z337sk1nv9bddmx18lvqvxaw3x-python3.6-sievelib-1.1.1
/nix/store/4xwlxdwv3gzk5dgcka6ljkmdzlfp4yhv-python2.7-sievelib-1.1.1

@costrouc: Are the edits I made okay?

Yeah it looks great to me. I don't have permissions to merge PRs. @FRidh would be the one to do that.

@GrahamcOfBorg build python3Packages.sievelib python2Packages.sievelib

Success on aarch64-linux (full log)
Attempted: python3Packages.sievelib, python2Packages.sievelib
Partial log (click to expand)
test_vacationext_medium (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_vacationext_with_limit (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_vacationext_with_multiline (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_vacationext_with_single_mail_address (sievelib.tests.test_parser.ValidSyntaxes) ... ok
test_set_command (sievelib.tests.test_parser.VariablesCommands) ... ok

----------------------------------------------------------------------
Ran 76 tests in 0.078s

OK

Success on x86_64-linux (full log)
Attempted: python3Packages.sievelib, python2Packages.sievelib
Partial log (click to expand)
Test renamescript command simulation. ... ok
/nix/store/cy83grz2iz0bm72b0jmmi4b152fz7k9v-python3.7-sievelib-1.1.1
test_setactive (sievelib.tests.test_managesieve.ManageSieveTestCase)
Test setactive command. ... ok

----------------------------------------------------------------------
Ran 76 tests in 0.044s

/nix/store/p037vcf9i5r78ic7fghvn8nb2534rg4l-python2.7-sievelib-1.1.1
OK


View for projects needing closeout

Do we want to include those that are about to closeout in (x days) ?
Do we want this view?
If we add this view, add it as a button to the email.

@jSylvestre investigate to see if financial role has this ability


Add typing for LoggerConnector [2/3]

What does this PR do?
Part of https://github.com/PyTorchLightning/pytorch-lightning/issues/5023
Links:

#9269
#9271

Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting

[x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[n/a] Did you make sure to update the documentation with your changes? (if necessary)
[n/a] Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
[x] Did you list all the breaking changes introduced by this pull request?
[n/a] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

where do you get the stamina for this ...

I asked you guys to fully type any new pieces of code added.
Just trying to fulfill my own request.


Add parsltest option to discard output

We would like to have the option to run parsltest ifix without writing output.

I have modified the parsltest config to replace ifix with ifixw (same as old ifix) and ifixn (outout sent to /dev/null).

Push version 0.22.0 with above change.

Oops. Writing to /dev/null/xxx generates an error. We should instead just write to /dev/null.

I modified cpuburn to wriite directly to /dev/null if that values is supplied to outdir.
I also notice that tasks are call jobs in parsltest and changed this in many places.

I also added the task type ifix0 which makes not attempt to write at all (ifixn writes to /dev/null).

Changes pushed.

New version is 0.24.00


Plugin not working?

I installed the plugin and did the simple configuration and saved. The config shows:
{     "platform": "Wiz Lan" }
I can add the Bridge to Homekit, but the bulbs don't show up even though I can see them in the Wiz app?

I am also having same issue and I had been configured and working for last 6 months and now it doesn't work anymore. I wonder if there was a WIZ firmware upgrade

It may be specific to your setup. I just freshly installed the plug-in (uninstall, system restart, install, system restart) and everything works as expected. If there is a way to check what is my lights firmware version to confirm it for you, please let me know.

Check this out from @bwp91.  Worked for me.
https://github.com/hoobs-org/HOOBS/issues/1651

Does the latest update fix this?


Use Modal Query without useEffect and hide query jargon on hide

What does this PR do and why?
Provide a description of what this PR does. Link to any relevant GitHub issues, Notion tasks or Discord discussions.
Screenshots or screen recordings
If applicable, provide screenshots or screen recordings to demonstrate the changes.
Acceptance checklist

[ ] I have evaluated the Approval Guidelines for this PR.
[ ] I have tested this PR in all supported browsers.
[ ] I have tested this PR in dark mode and light mode (if applicable).

Current dependencies on/for this PR:

main

PR #2315

PR #2316

PR #2326

PR #2327

PR #2328   👈

This comment was auto-generated by Graphite.

Graphite Merge Job
Current status: ⏳ Queued to merge
This pull request is currently queued to be merged as part of a stack.
This comment was auto-generated by Graphite.

Job Reference: 5hnII290vum6FkNNUUml


[bazel] Unconditionally add tests to opentitan_functest test suites

When the list of tests passed to test_suite() is empty, it defaults to all non-manual tests in the BUILD file 0.
Because opentitan_functest() has been excluding manual tests from the test_suite it generates, it was possible to accidentally trigger this special case of test_suite(). Consequently, :e2e_bootup_success_otp_dev depended on every test in //sw/device/silicon_creator/rom/e2e instead of the tests generated by this one call to opentitan_functest()!
Signed-off-by: Dan McArdle<EMAIL_ADDRESS>

@drewmacrae or @cfrantz, could you merge this? Thanks!


Port forward hosted model to colab/local

Create API for inference of base model
Port forwarding the base model to local / google colab notebook for experiments

API Server was provided my llama.cpp server module. Port forwarding was done using SSH Tunneling.


Directly load SBML model in the Model constructor

Since Bioscrape XML is deprecated now, do you agree that Model("filename.xml") should assume that the passed file is an SBML and not a bioscrape XML?

Fixed with #160
sbml_filename is the first argument, so if keyword arguments are not passed, an SBML file is assumed. Documentation updated in #170


Option to skip empty roles

Closes #5
Introduces a key skipempty. If passed, roles without contributors are not displayed. Applies to both \insertcredit and \insertcreditstatement. There's no support for skipping roles in one but not the other.
Slowly learning latex.... :)
PS: Sorry for the dirty commit history

Very cool! Merging and squashing—no worries about the commit history.


out dates edge locations

Issue in ./help/c-intro/how-target-works.md
I believe this paragraph is referencing old edge locations (Amsterdam and Hong Kong). They aren't present on the map. I don't believe we have services in those locations anymore.

Customer site activity data is collected by the closest of seven Edge Clusters. This data is directed to a customer’s pre-determined Central Cluster destination (one of three locations: Oregon, Dublin, Singapore) for processing. Visitor profile data is stored on the Edge Cluster closest to the site visitor. Edge clusters locations include the Central Cluster locations and Virginia, Amsterdam, Sydney, Tokyo, and Hong Kong.

Thanks for the correction. Should be live within minutes.


Use name instead of message for counter name

Per spec https://leanplum.atlassian.net/wiki/spaces/ENG/pages/624394247/SDK+Counting
The arg is "name" for counter name, not "message".

I think we are creating params for LOG object or LOG method here, in which the name of the counter is the message of the log. I think that makes sense?


Fix Bug when adding/removing layer with no cache

https://github.com/openlayers/openlayers/issues/6962

Changes made

Thanks @cmortazavi. We'll need a CLA from you so we can merge this.

What is a CLA and how can I give you a CLA?

I think I figured out how to do this.  Does everything look correct?

Thanks @cmortazavi, everything looks correct.


Sample search: accessid

The accessid can be used to "aggregate" the current query with a former query's accessid.
However the beacon.py api does not seem to accept this parameter. It is also only returned in the handovers. Ideally it should be directly returned for further querying.

I'm on it. It is already implemented in the query execution library but I'll have to make it accepted as true query.

I guess this can be closed?


Secure login and password of BDD

Login and password of mariadb are saved in application.properties file. Find a solution to sacure that

https://github.com/pierrick-marie/pinattsu/commit/6f1d3954fc17e1d0626d9a9fbbba47a4aa90ea69
https://github.com/pierrick-marie/pinattsu-rest-server/commit/08e1cd59205866c2c75accaff31f5b5cb6c3bbaa


Option to disable workspace edit feature of cargo new

Problem
cargo new will unconditionally add the new crate to a cargo workspace when there is a Cargo.toml in the parent directory, even when that Cargo.toml is not intended as cargo workspace. For example I might create a new crate just to quickly test something or the build system can't handle the parent Cargo.toml being a cargo workspace for whatever reason.
Proposed Solution
Add an option to cargo new to stop it from adding the new crate to any cargo workspace. And maybe disable the auto adding when there isn't yet a cargo workspace.
Notes
No response

#13391 stops adding the package to  the "workspace" if there isn't already a [workspace].
cargo script will also be helping with these "quick experiment" cases.
For myself, I lean away with making this configurable.

https://github.com/rust-lang/cargo/pull/13391 stops adding the package to the "workspace" if there isn't already a [workspace].

Great! My nightly was just a bit too old for that, so I missed it.

With #13391, is this still relevant?


"SystemError: error return without exception set"

Ok, so take for example
def _buildXY():
  tan_train = [Task(np.random.randn, 100000, 528) for i in range(7)]
  tan_test = [Task(np.random.randn, 100000, 528) for i in range(5)]

  # xs, ys - lists of arrays
  def pad(xs, ys):
    maxT = max( x.shape[0] for x in xs )
    x = np.zeros((len(xs), maxT, xs[0].shape[1]))
    y = np.zeros((len(ys), maxT, ys[0].shape[1]))
    for ii in xrange(len(xs)):
      t = xs[ii].shape[0]
      x[ii,:t,:] = xs[ii]
      y[ii,:t,:] = ys[ii]
    return x, y

  y_train = [np.random.randn(100000, 5) for i in range(7)]
  y_test = [np.random.randn(100000, 5) for i in range(5)]

  train = Task(pad, tan_train, y_train)
  test = Task(pad, tan_test, y_test)

  return train[0], train[1], test[0], test[1]

_buildXY()

Running jug execute gives me the error:
CRITICAL:root:Exception while running tangent_lstm.pad: error return without exception set
Traceback (most recent call last):
  File "/gpfs/main/home/skainswo/Research/kaggle_gal/venv/bin/jug", line 5, in <module>
    main()
  File "/gpfs/main/home/skainswo/Research/kaggle_gal/venv/local/lib/python2.7/site-packages/jug/jug.py", line 415, in main
    execute(options)
  File "/gpfs/main/home/skainswo/Research/kaggle_gal/venv/local/lib/python2.7/site-packages/jug/jug.py", line 254, in execute
    execution_loop(tasks, options)
  File "/gpfs/main/home/skainswo/Research/kaggle_gal/venv/local/lib/python2.7/site-packages/jug/jug.py", line 163, in execution_loop
    t.run(debug_mode=options.debug)
  File "/gpfs/main/home/skainswo/Research/kaggle_gal/venv/local/lib/python2.7/site-packages/jug/task.py", line 95, in run
    self.store.dump(self._result, name)
  File "/gpfs/main/home/skainswo/Research/kaggle_gal/venv/local/lib/python2.7/site-packages/jug/backends/file_store.py", line 139, in dump
    encode_to(object, output)
  File "/gpfs/main/home/skainswo/Research/kaggle_gal/venv/local/lib/python2.7/site-packages/jug/backends/encode.py", line 77, in encode_to
    write(object, stream)
SystemError: error return without exception set

Ok, this was a fun one, it's not every day you run into a bona fide bug in the language interpreter.
It seems like it's a Python issue that has been fixed in newer versions of Python: https://github.com/numpy/numpy/issues/2396
Indeed on my machine, it gives me your error on 2.7 but works on 3.4, albeit consuming a lot of memory.
As an alternative to upgrading Python, if you can adapt the code, you might consider returning a single array at a time as numpy arrays are just saved as arrays on disk in numpy format.

Given the above analysis, I think I am closing this as a jug issue. The fundamental problem was a Python bug and I would consider a patch with a jug workaround, but, at the moment, it's not a priority.

@luispedro Great, thanks for the info! I'm amazed that this ended up being such a complicated issue.


AXP2101 using PWRON as EN mode

Hello, from the datasheet I read that the AXP2101 pin for EX/PWRON can be configured as "enable pin" so that we do not need the PWRKEY to be pressed every time.
from the library it is not clear to me how to setup the PMU so that it will simply turn on/off using the pin as an ENABLE signal.
could you please help ?
thanks

This is a chip customization function. It has been configured when the chip leaves the factory and cannot be changed through software.


[Question] Data API?

Hello, please close this if it's not appropriate but I wanted to know if we can expect an API to load our own data sources via a 3rd party?
I know that Sketch 52 is in beta but I'm really looking forward to being able to do this so would be great to know if we can expect to be able to do it by the time it's in the Stable branch.
Thank you!
:)

Yep! Have a look here: https://github.com/BohemianCoding/SketchAPI/blob/develop/docs/api/DataSupplier.md


Inconsistent Parse Error on exported project

Godot version:
3.2.1.stable
OS/device including version:
Windows 10, MacOS Catalina
Issue description:
When I export my project, I consistently get a parse error when preloading certain scenes with my game. I previously exported without issue using an earlier version (although I'm not sure which.)

The strange thing is, if I make a change to the file, delete the change and re-save it then I can export again and everything is fine... until I export the next time and the issues appears again :(
The file in question is rather simple, here is the contents:
extends "res://scripts/Player.gd"

func to_dict() -> Dictionary:
	var dict := .to_dict()
	dict.scene = "res://objects/Pignon.tscn"
	dict.ship = "Pignon"
	return dict

func _init():
	speed = 550
	set_max_health(4)

func _ready():
	if len(weapons) == 0:
		add_weapon("Charger", false)
		add_passive("Shield")
	emit_signal("switched_weapon", weapons[curr_weapon])

func _physics_process(delta):
	prev_vec = position - prev_pos
	prev_pos = position

I'm preloading this and another similar scene which extends the same script, but only this one gives issues.
This also happens with each of my level scenes (extremely frustrating) so I guess there is something in common with those.
Steps to reproduce:
Export my cursed project.
Minimal reproduction project:
This project has been upgraded starting from Godot 3.0.1 so possibly something went bad along the way...

could you upload a Minimal reproduction project, the error log seems like your resource ("Pigon.tscn") found but invalid.

Thanks for the comment. I was stripping down my project to try and create a minimal reproduction and I noticed the Pignon scene was using a script that was not in the folder I had thought it was in, so I moved it and then realised the .tscn file had a reference to a folder I must have renamed from capitalised to non-capitalised. I checked the level files, unlinked the scripts and reloaded then into the scenes and they had the same issue - I must have renamed the folders at some point after the last time I exported my project (and not via the Godot editor.)
I haven't confirmed this fixes the export yet, but I am 99% certain this was the cause. Not sure why re-saving the scripts before exporting was fixing the exported game though, that is a weird side-effect.


Ignore comment part from sysctl values

any chance of a unit test?

any chance of a unit test?

Added a comment in one of the existing fake data roots. Without this fix, the tests would fail with that comment. Is that sufficient?


[4.x] Simplify breadcrumb API

Currently the breadcrumb creation looks something like this:
\Sentry\addBreadcrumb(
    new \Sentry\Breadcrumb(
        \Sentry\Breadcrumb::LEVEL_INFO,
        \Sentry\Breadcrumb::TYPE_DEFAULT,
        'auth',                // category
        'User authenticated',  // message (optional)
        ['user_id' => $userId] // data (optional)
    )
);

I would like to be able to write this shorter, something like:
\Sentry\addBreadcrumb('auth', 'User authenticated', ['user_id' => $userId]);

// or with PHP 8:
\Sentry\addBreadcrumb(
    category: 'auth',
    message: 'User authenticated',
    metadata: ['user_id' => $userId],
);

This removed the need for creating new objects and setting the level and type so you only have to pass in a category (could maybe also be defaulted) and a message and optional metadata.
It was also suggested to have a global sentry() function (not namespaced) so it could be just sentry()->addBreadcrumb(...) but not sure if we want to go that far.
This is more of a discussion PR, curious to hear your thoughts! My main goal is to be able to add context and leave breadcrumbs as short and easy as possible to have users do it more and more easily.

No objections. I do like that we don't break for existing users, and the new way of adding breadcrumbs seems much easier, which is great.


Add  HessianDecode encode

What type of PR is this?

Check the PR title.

[ ] This PR title match the format: <type>(optional scope): <description>
[ ] The description of this PR title is user-oriented and clear enough for others to understand.
[ ] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):
(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

review later.

demo ,I will fix it this week

demo ,I will fix it this week


Update flavor-naming.md

added hyperlink to script
Signed-off-by: Ralf Heiringhoff<EMAIL_ADDRESS>

@garloff please check.

The script should have been moved to this repository as well. I'll open an issue regarding the migration of the old OpsDocs repository to this one.


FFTView poor performance as time passes

macOS Version(s) Used to Build
macOS 13 Ventura
Xcode Version(s)
Xcode 14
Description
I observe a decrease in frame rate for the FTTView as time passes. This can be observed in the cookbook example.
I attached a recording of the view performance after about 2 minutes of running. You can see the lag. Any ideas how to fix?
Crash Logs, Screenshots or Other Attachments (if applicable)
https://github.com/user-attachments/assets/4fcb597d-402f-41cc-a74b-03e5e29a4496

The bug is fully reproducible. Waiting for some more minutes even crashes the App. I'll have a quick look into the crash to gather more information.

Findings without looking at the code:

View uses 13% CPU on my blue iPhone even when no sound is playing. Partly to AURemoteIO and partly on main thread.
View uses roughly 50% CPU when sound is playing: Partly in SwiftUI.AsyncRenderer
When sound is playing: Memory footprint constantly increasest at a rate of 100KB per second
CPU usage constantly increases, to 100% in a about a minute. On main thread
Memory Graph:

There's a UICollectionView List with about 1200 Mutable Dictionaries. These dictionaries contain some runtime information (see below)
There are more than 3000 CFStrings lingering around, showing a orange icond with a drop. The contain all the same value eyJEQkd [...] Ijp0cnVlfQ==
The Mutable Dictionaires are inited by the CFPrefs and by a CGPath (moveto, quadto, lineto, ...)

View Hierarchy with clipped content shows a grotesque amount of ZStacks (see attached screenshot)
Xcode shows an Optimization Opportunity: "The layer is using dynamic shadows which are expensive to render. If possible try setting shadowPath, or pre-rendering the shadow into an image and putting it under the layer."

{
    "ALU instruction count" = 24;
    "Branch instruction count" = 0;
    "Compilation time in milliseconds" = "3.817916";
    "Constant calculation phase present" = 0;
    "Constant calculation temporary register count" = 0;
    "Device atomic instruction count" = 0;
    "Device load instruction count" = 0;
    "Device store instruction count" = 0;
    "FP16 instruction count" = 15;
    "FP32 instruction count" = 8;
    FragmentBufferPrefetch =     (
        promoted
    );
    "INT16 instruction count" = 0;
    "INT32 instruction count" = 0;
    "Instruction count" = 34;
    Remarks = "--- !Analysis\nPass:            prologepilog\nName:            StackSize\nFunction:        agc.main\nArgs:\n  - NumStackBytes:   '0'\n  - String:          ' stack bytes in function'\n...\n--- !Analysis\nPass:            asm-printer\nName:            InstructionMix\nFunction:        agc.main\nArgs:\n  - String:          'BasicBlock: '\n  - BasicBlock:      wrapper_exit\n  - String:          \"\\n\"\n  - String:          ''\n  - String:          ': '\n  - INST_:           '34'\n  - String:          \"\\n\"\n...\n--- !Analysis\nPass:            asm-printer\nName:            InstructionCount\nFunction:        agc.main\nArgs:\n  - NumInstructions: '34'\n  - String:          ' instructions in function'\n...\n";
    "Spilled bytes" = 0;
    "Telemetry Statistics" =     {
    };
    "Temporary register count" = 8;
    "Texture reads instruction count" = 0;
    "Texture writes instruction count" = 0;
    "Thread invariant spilled bytes" = 0;
    "Threadgroup atomic instruction count" = 0;
    "Threadgroup load instruction count" = 0;
    "Threadgroup memory" = 32;
    "Threadgroup store instruction count" = 0;
    "Uniform register count" = 8;
    "Wait instruction count" = 4;
}

Code analysis:

No Strings and dicts are explicitely created. Could it be due to some debugging stuff? will a release build also have the same problems?
Fresh FFT results might come too quick
.animation of AmplitudeBar and Cap View might interfere with fresh FFT data: the animation is running until the end even when fresh data is already shown
.drawingGroup (Metal rendering) is on HStack, it might be better on each bar (because of List View)
GeometryReader in a thight loop (ForEach fresh amplitude reading), this is discouraged by Apple

@mahal appreciate your insight on this! To me it seems SwiftUI rendering is messing something up, as you showed the huge amount of views rendered one on top of another... I bet that's the key area to look in.
In the mean time I just replace the rendering with Charts (iOS 16+) and it works perfect
    var body: some View {
        GeometryReader { geometry in
            ZStack {
                Chart(Array(0 ..< barCount), id: \.self) { index in
                    makeBar(
                        index: index,
                        amplitude: amplitude(at: index),
                        viewHeight: geometry.size.height
                    )
                }
                .chartYScale(domain: 0 ... 0.9)
                .chartXAxis(.hidden)
                .chartYAxis(.hidden)
            }
        }
        .onAppear {
            fft.maxAmplitude = self.maxAmplitude
            fft.minAmplitude = self.minAmplitude
            callbacks.update = fft.update(buffer:)
            callbacks.start = fft.start
            callbacks.stop = fft.stop
        }
        .background(backgroundColor)
    }

    private func makeBar(index: Int, amplitude: Float, viewHeight: CGFloat) -> some ChartContent {
        BarMark(
            x: .value("Frequency", String(index)),
            y: .value("Amplitude", amplitude)
        )
        .foregroundStyle(
            linearGradient.in(CGRect(x: 0, y: 0, width: 0, height: viewHeight))
        )
    }

    private func amplitude(at index: Int) -> Float {
        if index < fft.amplitudes.count {
            return fft.amplitudes[index]
        } else {
            return Constants.silence
        }
    }


Add scale method to QuadraticModelBase, with test

Implement scale method in QuadraticModelBase.
Adjust offset, linear biases, and interactions by a scale factor.
Add test to reflect addition.
Closes #833

Codecov Report

Merging #857 (83d9375) into main (42963ac) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #857   +/-   ##
=======================================
  Coverage   85.03%   85.03%
=======================================
  Files          71       71
  Lines        6027     6027
=======================================
  Hits         5125     5125
  Misses        902      902

Continue to review full report at Codecov.

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

Oh, sorry, one more (new) step to the process. Can you add the new method to the release notes? See https://github.com/dwavesystems/dimod#release-notes. Let me know if you have trouble or it's not clear. This is a brand new thing we're trying in dimod. See #848.

Oh, sorry, one more (new) step to the process. Can you add the new method to the release notes? See https://github.com/dwavesystems/dimod#release-notes. Let me know if you have trouble or it's not clear. This is a brand new thing we're trying in dimod. See #848.

Added the release note, let me know if it seems clear enough


TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

I'm using python 3.9 and this project requires at least python 3.10. Is this version too high, should I consider adapting to a lower version of python?

Ah this error is caused by alternative syntax for type annotations for Unions only supported by >=3.10. I can fix this to support 3.9 without losing type hinting functionality.
Fix will be out soon

Updated version out: https://pypi.org/proect/pymemuc/0.2.4/
Thanks for raising the issue! 😊


Add doxygen documentation

Do this the same way as phaseflow-dealii.

Now that I'm looking into this, doxygen might not be the preferred approach for a Python package. I'm going to start by following PEP-257 and just adding docstrings to all modules, classes, and functions.

This is complete as of commit 45d212f0a5b50ffbd74e46816d4deb811a7c2b67
We may want to consider using Sphinx to generate HTML docs, similar to what doxygen does. But for now it's okay that Phaseflow consistently has docstrings. We'll also want to somehow enforce PEP-8 and PEP-257 at some point.


Code snippet in Puppeteer documentation does not work as intended.

💥 Regression Report
The following code snippet from the documentation in Puppeteer.md does not work.
describe('Google', () => {
  beforeAll(async () => {
    await page.goto('https://google.com');
  });

  it('should display "google" text on page', async () => {
    await expect(page).toMatch('google');
  });
});

This is the error report.
Google
✕ should display "google" text on page (42ms)
● Google › should display "google" text on page
expect(received).toMatch(expected)

Matcher error: received value must be a string

Received has type:  object
Received has value: {"_accessibility": {"_client": [CDPSession]}, "_client": {"_callbacks": [Map], "_connection": [Connection], "_events": [Object], "_eventsCount": 27, "_maxListeners": undefined, "_sessionId": "D8CB5B8299FCBADB38BA3555A6A40F1B", "_targetType": "page"}, "_closed": false, "_coverage": {"_cssCoverage": [CSSCoverage], "_jsCoverage": [JSCoverage]}, "_emulationManager": {"_client": [CDPSession], "_emulatingMobile": false, "_hasTouch": false}, "_events": {"pageerror": [Function handleError]}, "_eventsCount": 1, "_frameManager": {"_client": [CDPSession], "_contextIdToContext": [Map], "_events": [Object], "_eventsCount": 3, "_frames": [Map], "_isolatedWorlds": [Set], "_mainFrame": [Frame], "_maxListeners": undefined, "_networkManager": [NetworkManager], "_page": [Circular], "_timeoutSettings": [TimeoutSettings]}, "_ignoreHTTPSErrors": false, "_javascriptEnabled": true, "_keyboard": {"_client": [CDPSession], "_modifiers": 0, "_pressedKeys": [Set]}, "_maxListeners": undefined, "_mouse": {"_button": "none", "_client": [CDPSession], "_keyboard": [Keyboard], "_x": 0, "_y": 0}, "_networkManager": {"_attemptedAuthentications": [Set], "_client": [CDPSession], "_credentials": null, "_events": [Object], "_eventsCount": 4, "_extraHTTPHeaders": [Object], "_frameManager": [FrameManager], "_maxListeners": undefined, "_offline": false, "_protocolRequestInterceptionEnabled": false, "_requestHashToInterceptionIds": [Multimap], "_requestHashToRequestIds": [Multimap], "_requestIdToRequest": [Map], "_requestIdToRequestWillBeSentEvent": [Map], "_userRequestInterceptionEnabled": false}, "_pageBindings": Map {}, "_screenshotTaskQueue": {"_chain": [Promise]}, "_target": {"_browserContext": [BrowserContext], "_closedCallback": [Function anonymous], "_defaultViewport": [Object], "_ignoreHTTPSErrors": false, "_initializedCallback": [Function anonymous], "_initializedPromise": [Promise], "_isClosedPromise": [Promise], "_isInitialized": true, "_pagePromise": [Promise], "_screenshotTaskQueue": [TaskQueue], "_sessionFactory": [Function anonymous], "_targetId": "36821A94B2C404C506E5848212F983A5", "_targetInfo": [Object]}, "_timeoutSettings": {"_defaultNavigationTimeout": null, "_defaultTimeout": null}, "_touchscreen": {"_client": [CDPSession], "_keyboard": [Keyboard]}, "_tracing": {"_client": [CDPSession], "_path": "", "_recording": false}, "_viewport": {"height": 600, "width": 800}, "_workers": Map {}}

  29 |
  30 |   it('should display "google" text on page', async () => {
> 31 |     await expect(page).toMatch('google');
     |                        ^
  32 |   });
  33 | });
  34 |

The issue could be that Google removed the text the function was expecting to see, toMatch doesn't parse text on the page, or simply that page is no longer the string it once was. I could also be misunderstanding how this example is meant to be used, in which case the example should be made clearer. In any case, this sort of error is discouraging to new users or people who aren't sure what they're doing.
Here is a suggested alternative. I create a corresponding pull request.
describe('Google', () => {
  beforeAll(async () => {
    await page.goto('https://google.com');
  });

  it('should be titled "Google"', async () => {
  	return page.title().then(title => {
		expect(title).toMatch('Google');
  	})
  });
});

This doesn't accomplish the same thing - it checks the title of the page as opposed to the text on it. However, for the purpose of the example, I think it does fine.

Thanks for reporting this documentation issue :) I think you forgot to open a PR with your suggested change (you just referenced this issue from your commit)

it should also be await expect(page.title()).resolves.toMatch('google'); instead of a then. Looking forward to the PR (remember to also update the versioned docs)

@jeysal whoops! @SimenB I've switched from a then to an await. What do you mean by updating the versioned docs?


chore(release): v1.6.0 🎉

:robot: I have created a release beep boop
1.6.0 (2024-08-01)
Features

sqs: distribute terraform queue module (f33a02c)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/ehmpathy/simple-async-tasks/releases/tag/v1.6.0 :sunflower:


Add support for guild time outs.

Summary
Discord has been experimenting with guild time outs lately, so I decided to try to implement it.
A few hours ago they added a new permission to add timeouts, so I guess this will actually be implemented.
TODO:

[ ] Add audit log.

new permission reference:
https://github.com/Discord-Datamining/Discord-Datamining/commit/35cb2c6becc8ceb4bfb0f612e6dd7c375d6b4189

Checklist

[x] If code changes were made then they have been tested

[x] I have updated the documentation to reflect the changes
[x] I have formatted the code properly by running black .

[ ] This PR fixes an issue
[x] This PR adds something new (e.g. new method or parameters)
[ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
[ ] This PR is not a code change (e.g. documentation, README, ...)

One change I'd like to propose is to change the (relatively long) name of communication_disabled_until to something like guild_timeout or just timeout, similar to the abstraction of rate_limit_per_user behind slowmode_delay; perhaps others can pitch in regarding this idea.

Hmm, sounds good to me, I would go with timeout, but I would like to hear other suggestions.

timeout function is not fully done, I forgot to add some things.

It seems that Discord finally added the audit log key.

Okay so, the PR should be ready for review, but I think it's worth to wait until it's released, basically to avoid possibly breaking changes.


Prevent $command from leaking outside of function

The $command variable currently sticks around after rbenv finishes executing, overwriting any previous value.
$ command=foo; echo $command; rbenv --help &> /dev/null; echo $command
foo
--help

This works in my environment

How embarrassing! Thanks for the patch.


DPL-153 cherrypick minimum volumes

Enforcing robot minimum cherrypicking volumes.

Looks good. This is very similar in functionality to the calculations I'm adding to Limber for tubes. I chose to use target_volume, target_molarity, minimum_pick and source_molarity for mine. I don't have to worry about source volume like this one does. My implementation seems to be a lot less complicated than this though. https://github.com/sanger/limber/blob/DPL-112-show-tube-qc-data/app/helpers/transfers_helper.rb

Thanks for reviewing. target is more succinct than my version. I like having robot in there as it explains why it's necessary. Do you have infinite source volume?! This is quite complicated, it seems over complicated maybe but I checked it in detail with Danni and she approves.

We've been told there will always be enough volume for this.  I expect that might change in future, but in our case it's not worth supporting an edge case you're told won't happen right now.


Numbers

Hi @lee-orr ,
When I try to add an extra cvs file and treat its information as generic segment a bunch of numbers show up along such segments and we do not know to take them off. See screnshoot below.

@Emilycm-97  Can you send me the CSV? I have a hunch, but I need a copy of it to verify

Of course!
anatolia_fault_map_arpat_and_saroglu_endpoints_only.csv

Thanks! The issue was the existence of a column without a name. I adjusted the code so that it will ignore any unnamed columns in when plotting data along a segment.

Thank you so much! It's working perfectly now.


fail to display RGB images

Hello all,
I am new to SimpleITK and have been trying to do some basic code. Currently, I am just trying to read a RGB image and display it. My code is as follows:
import SimpleITK as sitk
image = sitk.ReadImage('......./composite.jpg')
show image
sitk.Show(image, title="Tissue")
I get an error RuntimeError: Exception thrown in SimpleITK Show: C:\Users\dashboard\Miniconda3\conda-bld\simpleitk_1521730316398\work\Code\IO\src\sitkShow.cxx:495:
sitk::ERROR: No appropriate executable found.
I am using Python 3.6.5 with anaconda. I am able to import sitk. Also when I run 'print(image.GetDepth())', I get output as 0 whereas it should be 3. Anything wrong here? Any help is appreciated.

This is a SimpleITK issue, not related to SimpleElastix.
It's seems your image isn't read correctly.
Have you tried showing your image with another lib to confirm a reading issue?
For example like this
`
import matplotlib.pyplot as plt
arrayImage = sitk.GetArrayFromImage(image)
plt.figure
plt.imshow(arrayImage)
plt.show()
`

Thank you for the reply. The error is resolved in this post https://github.com/SimpleITK/SimpleITK/issues/485#issuecomment-395116013

Glad the error is fixed!


how to validate our ttl file

what method does QUDT use for validation?
against the schema? - possibly in protege, if so, which reasoner.
context: some existing QUDT units do not meet have all the required fields (listed in the guidelines). possibly "required" is not spec'd in the schema.

We rely on the SHACL reasoner for validation against the SHACL schema. On the OWL side, we have been working recently to eliminate all the errors found in Protege using either the Hermit or Pellet reasoners. We are almost finished!
You are probably correct that we may have not enforced all the "required" fields in the schemas.

Here is an online ttl validator: http://ttl.summerofcode.be/


Test on my data

Thanks for your great work! How can I use the trained model to test when I got the best model after training on my data？ Because it seems that the pre training model is still used in the inference stage?

Hi,
Thank you for your interest in our research.
If you trained TRACER with your own dataset, the model was saved to the results/your_own_dataset_name/TEX_0/best_model.pth (maybe you set the default exp_num).
If you had test GTs, just build with python main.py test --exp_num 0 --arch 0 --img_size 320.
Or not, build with python main.py inference --dataset custom_dataset/ --exp_num 0 --arch x --img_size xxx --save_map True.after modifying the line at inference.py to path = os.path.join(save_path, 'best_model.pth')
I guess it works.

THANKS! The number of my own data sets is too small. When the batch size is 32, the Val loss is always 0 (there are only 25 Val pictures).
I mistook it for the pre-train model that has been used for reasoning since the bad inference results. Now I get it!

When I modify the line at inference.py to use my model, there seems to be a problem

Please edit the self.model.load_state_dict(path) to self.model.load_state_dict(torch.load(path)).

Thanks for your patient reply!


TypeError: get_model() got an unexpected keyword argument 'ocr_languages'

Below is the code I am using to read.pdf files and extract data from tables
from typing import Any

from pydantic import BaseModel
from unstructured.partition.pdf import partition_pdf

# Get elements
raw_pdf_elements = partition_pdf(
    filename=path + "llava.pdf",
    # Unstructured first finds embedded image blocks
    extract_images_in_pdf=False,
    # Use layout model (YOLOX) to get bounding boxes (for tables) and find titles
    # Titles are any sub-section of the document
    infer_table_structure=True,
    # Post processing to aggregate text once we have the title
    chunking_strategy="by_title",
    # Chunking params to aggregate text blocks
    # Attempt to create a new chunk 3800 chars
    # Attempt to keep chunks > 2000 chars
    max_characters=4000,
    new_after_n_chars=3800,
    combine_text_under_n_chars=2000,
    image_output_dir_path=path,
)

Error Encountered
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[35], [line 7](vscode-notebook-cell:?execution_count=35&line=7)
      [4](vscode-notebook-cell:?execution_count=35&line=4) from unstructured.partition.pdf import partition_pdf
      [6](vscode-notebook-cell:?execution_count=35&line=6) # Get elements
----> [7](vscode-notebook-cell:?execution_count=35&line=7) raw_pdf_elements = partition_pdf(
      [8](vscode-notebook-cell:?execution_count=35&line=8)     filename=path + "llava.pdf",
      [9](vscode-notebook-cell:?execution_count=35&line=9)     # Unstructured first finds embedded image blocks
     [10](vscode-notebook-cell:?execution_count=35&line=10)     extract_images_in_pdf=False,
     [11](vscode-notebook-cell:?execution_count=35&line=11)     # Use layout model (YOLOX) to get bounding boxes (for tables) and find titles
     [12](vscode-notebook-cell:?execution_count=35&line=12)     # Titles are any sub-section of the document
     [13](vscode-notebook-cell:?execution_count=35&line=13)     infer_table_structure=True,
     [14](vscode-notebook-cell:?execution_count=35&line=14)     # Post processing to aggregate text once we have the title
     [15](vscode-notebook-cell:?execution_count=35&line=15)     chunking_strategy="by_title",
     [16](vscode-notebook-cell:?execution_count=35&line=16)     # Chunking params to aggregate text blocks
     [17](vscode-notebook-cell:?execution_count=35&line=17)     # Attempt to create a new chunk 3800 chars
     [18](vscode-notebook-cell:?execution_count=35&line=18)     # Attempt to keep chunks > 2000 chars
     [19](vscode-notebook-cell:?execution_count=35&line=19)     max_characters=4000,
     [20](vscode-notebook-cell:?execution_count=35&line=20)     new_after_n_chars=3800,
     [21](vscode-notebook-cell:?execution_count=35&line=21)     combine_text_under_n_chars=2000,
     [22](vscode-notebook-cell:?execution_count=35&line=22)     image_output_dir_path=path,
     [23](vscode-notebook-cell:?execution_count=35&line=23) )

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured\documents\elements.py:276](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/documents/elements.py:276), in process_metadata.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
    [274](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/documents/elements.py:274) @functools.wraps(func)
    [275](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/documents/elements.py:275) def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> List[Element]:
--> [276](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/documents/elements.py:276)     elements = func(*args, **kwargs)
    [277](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/documents/elements.py:277)     sig = inspect.signature(func)
    [278](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/documents/elements.py:278)     params: Dict[str, Any] = dict(**dict(zip(sig.parameters, args)), **kwargs)

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured\file_utils\filetype.py:551](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/file_utils/filetype.py:551), in add_metadata_with_filetype.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
    [549](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/file_utils/filetype.py:549) @functools.wraps(func)
    [550](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/file_utils/filetype.py:550) def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> List[Element]:
--> [551](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/file_utils/filetype.py:551)     elements = func(*args, **kwargs)
    [552](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/file_utils/filetype.py:552)     sig = inspect.signature(func)
    [553](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/file_utils/filetype.py:553)     params: Dict[str, Any] = dict(**dict(zip(sig.parameters, args)), **kwargs)

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured\chunking\title.py:211](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/chunking/title.py:211), in add_chunking_strategy.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
    [209](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/chunking/title.py:209) @functools.wraps(func)
    [210](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/chunking/title.py:210) def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> List[Element]:
--> [211](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/chunking/title.py:211)     elements = func(*args, **kwargs)
    [212](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/chunking/title.py:212)     sig = inspect.signature(func)
    [213](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/chunking/title.py:213)     params: Dict[str, Any] = dict(**dict(zip(sig.parameters, args)), **kwargs)

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured\partition\pdf.py:148](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:148), in partition_pdf(filename, file, include_page_breaks, strategy, infer_table_structure, ocr_languages, languages, max_partition, min_partition, include_metadata, metadata_filename, metadata_last_modified, chunking_strategy, links, **kwargs)
    [142](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:142)         languages = convert_old_ocr_languages_to_languages(ocr_languages)
    [143](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:143)         logger.warning(
    [144](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:144)             "The ocr_languages kwarg will be deprecated in a future version of unstructured. "
    [145](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:145)             "Please use languages instead.",
    [146](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:146)         )
--> [148](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:148) return partition_pdf_or_image(
    [149](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:149)     filename=filename,
    [150](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:150)     file=file,
    [151](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:151)     include_page_breaks=include_page_breaks,
    [152](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:152)     strategy=strategy,
    [153](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:153)     infer_table_structure=infer_table_structure,
    [154](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:154)     languages=languages,
    [155](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:155)     max_partition=max_partition,
    [156](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:156)     min_partition=min_partition,
    [157](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:157)     metadata_last_modified=metadata_last_modified,
    [158](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:158)     **kwargs,
    [159](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:159) )

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured\partition\pdf.py:271](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:271), in partition_pdf_or_image(filename, file, is_image, include_page_breaks, strategy, infer_table_structure, ocr_languages, languages, max_partition, min_partition, metadata_last_modified, **kwargs)
    [269](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:269) with warnings.catch_warnings():
    [270](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:270)     warnings.simplefilter("ignore")
--> [271](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:271)     _layout_elements = _partition_pdf_or_image_local(
    [272](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:272)         filename=filename,
    [273](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:273)         file=spooled_to_bytes_io_if_needed(file),
    [274](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:274)         is_image=is_image,
    [275](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:275)         infer_table_structure=infer_table_structure,
    [276](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:276)         include_page_breaks=include_page_breaks,
    [277](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:277)         languages=languages,
    [278](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:278)         ocr_mode="entire_page",
    [279](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:279)         metadata_last_modified=metadata_last_modified or last_modification_date,
    [280](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:280)         **kwargs,
    [281](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:281)     )
    [282](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:282)     layout_elements = []
    [283](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:283)     for el in _layout_elements:

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured\utils.py:159](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:159), in requires_dependencies.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
    [150](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:150) if len(missing_deps) > 0:
    [151](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:151)     raise ImportError(
    [152](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:152)         f"Following dependencies are missing: {', '.join(missing_deps)}. "
    [153](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:153)         + (
   (...)
    [157](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:157)         ),
    [158](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:158)     )
--> [159](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/utils.py:159) return func(*args, **kwargs)

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured\partition\pdf.py:356](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:356), in _partition_pdf_or_image_local(filename, file, is_image, infer_table_structure, include_page_breaks, languages, ocr_mode, model_name, metadata_last_modified, **kwargs)
    [353](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:353)         process_with_model_kwargs[key] = value
    [355](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:355) if file is None:
--> [356](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:356)     layout = process_file_with_model(
    [357](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:357)         filename,
    [358](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:358)         **process_with_model_kwargs,
    [359](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:359)     )
    [360](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:360) else:
    [361](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:361)     layout = process_data_with_model(
    [362](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:362)         file,
    [363](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:363)         **process_with_model_kwargs,
    [364](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured/partition/pdf.py:364)     )

File [c:\Users\PLNAYAK\Documents\Local_LLM_Inference\llms\lib\site-packages\unstructured_inference\inference\layout.py:482](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:482), in process_file_with_model(filename, model_name, is_image, fixed_layouts, extract_tables, pdf_image_dpi, extract_images_in_pdf, image_output_dir_path, **kwargs)
    [468](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:468) def process_file_with_model(
    [469](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:469)     filename: str,
    [470](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:470)     model_name: Optional[str],
   (...)
    [477](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:477)     **kwargs,
    [478](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:478) ) -> DocumentLayout:
    [479](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:479)     """Processes pdf file with name filename into a DocumentLayout by using a model identified by
    [480](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:480)     model_name."""
--> [482](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:482)     model = get_model(model_name, **kwargs)
    [483](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:483)     if isinstance(model, UnstructuredObjectDetectionModel):
    [484](file:///C:/Users/PLNAYAK/Documents/Local_LLM_Inference/llms/lib/site-packages/unstructured_inference/inference/layout.py:484)         detection_model = model

TypeError: get_model() got an unexpected keyword argument 'ocr_languages'

Name: unstructured
Version: 0.11.2
Summary: A library that prepares raw documents for downstream ML tasks.
Home-page: https://github.com/Unstructured-IO/unstructured
Author: Unstructured Technologies
Author-email<EMAIL_ADDRESS>License: Apache-2.0
Location: c:\users\plnayak\documents\local_llm_inference\llms\lib\site-packages
Requires: backoff, beautifulsoup4, chardet, dataclasses-json, emoji, filetype, langdetect, lxml, nltk, numpy, python-iso639, python-magic, rapidfuzz, requests, tabulate, typing-extensions, wrapt

Hi there!
It could be your unstructured_inference package is not up to date, it should be 0.7.15 with unstructured version 0.11.2.
Could you check your inference version with pip show unstructured-inference? also you can try pip install unstructured["pdf"]==0.11.2 to update it.

@yuming-long Please find the versions , they are uptodate. This issue is not encountered in google colab but when I work in windows in my local system.
(semistrutured) C:\Users\PLNAYAK\Documents>pip show unstructured-inference
Name: unstructured-inference
Version: 0.7.15
Summary: A library for performing inference using trained models.
Home-page: https://github.com/Unstructured-IO/unstructured-inference
Author: Unstructured Technologies
Author-email<EMAIL_ADDRESS>License: Apache-2.0
Location: c:\users\plnayak\documents\unstructured_rag\semistrutured\lib\site-packages
Requires: huggingface-hub, layoutparser, onnx, onnxruntime, opencv-python, python-multipart, rapidfuzz, transformers
Required-by:
(semistrutured) C:\Users\PLNAYAK\Documents>pip show unstructured
Name: unstructured
Version: 0.11.2
Summary: A library that prepares raw documents for downstream ML tasks.
Home-page: https://github.com/Unstructured-IO/unstructured
Author: Unstructured Technologies
Author-email<EMAIL_ADDRESS>License: Apache-2.0
Location: c:\users\plnayak\documents\unstructured_rag\semistrutured\lib\site-packages
Requires: backoff, beautifulsoup4, chardet, dataclasses-json, emoji, filetype, langdetect, lxml, nltk, numpy, python-iso639, python-magic, rapidfuzz, requests, tabulate, typing-extensions, wrapt
Required-by:
Any help to resolve the issue is much appreciated

Hi @plaban1981,
Are you running this on Jupiter Notebook locally? If so could you add a cell before your code with
from unstructured.__version__ import __version__ # also the same for unstructured_inference
print(__version__)

I still feel like this is a library version issue, could you remove unstructured from your environment and reinstall it? We just release a new unstructured version 0.11.5. Thanks!

I am thinking maybe unstructured_inference is not refreshed, I did tried to run 0.11.5  unst with 0.7.18 inference with no error. On another note, you are using VS code right? Sometimes even you reinstall package locally it might not show up in VS code env. Could you refresh VS code for me (I think the command is command + shift + P then Developer: reload Window) ?

close this for no response after a long time :)


Project update

Bump Gradle to 6.8.3
Bump libraries to most recent versions
Fix Gradle build issue (fixes #8)
Other, minor cleanup

Might be cool to have some working CI in this project :)

Until this gets merged, you can fetch this via jitpack:
buildscript {
    repositories {
        maven("https://jitpack.io")
    }
    dependencies {
        classpath("com.github.realdadfish:stf-gradle-plugin:project-update-SNAPSHOT")
    }
}
apply(plugin = "stf-gradle-plugin")

Hello. Please excuse me for a long reaction. Thank you for the PR.


use cnn policy error

My observation data shape is (16,9,1), but when I use cnn policy for DQN agent, it gets following error:
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/deepq/dqn.py", line 94, in init
self.setup_model()
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/deepq/dqn.py", line 124, in setup_model
sess=self.sess
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/deepq/build_graph.py", line 364, in build_train
act_f, obs_phs = build_act(q_func, ob_space, ac_space, stochastic_ph, update_eps_ph, sess)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/deepq/build_graph.py", line 141, in build_act
policy = q_func(sess, ob_space, ac_space, 1, 1, None)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/deepq/policies.py", line 174, in init
layer_norm=False, **_kwargs)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/deepq/policies.py", line 103, in init
extracted_features = cnn_extractor(self.processed_x, **kwargs)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/common/policies.py", line 22, in nature_cnn
layer_2 = activ(conv(layer_1, 'c2', n_filters=64, filter_size=4, stride=2, init_scale=np.sqrt(2), **kwargs))
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/stable_baselines/a2c/utils.py", line 129, in conv
return bias + tf.nn.conv2d(input_tensor, weight, strides=strides, padding=pad, data_format=data_format)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 957, in conv2d
data_format=data_format, dilations=dilations, name=name)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
return func(*args, **kwargs)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3274, in create_op
op_def=op_def)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1792, in init
control_input_ops)
File "/Users/tdr/miniconda3/envs/py3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1631, in _create_c_op
raise ValueError(str(e))
ValueError: Negative dimension size caused by subtracting 4 from 3 for 'deepq/model/action_value/c2/Conv2D' (op: 'Conv2D') with input shapes: [?,3,1,32], [4,4,32,64].

Hello,
Please use the issue template so we could properly answer your question.

Hi,
My input observation is really too small, so I reduced the number of layers of cnn network,
I directly commented "layer_2" and "layer_3"  of "nature_cnn" function, now my codes can work.

Yep, closing the issue then.
Btw, @tdr1991 for the next time you open an issue, please use the template.

I would rather recommend that you change the stride parameter, and create a custom policy:
from stable_baselines.a2c.utils import conv, linear, conv_to_fc
from stable_baselines.deepq.policies import FeedForwardPolicy

def modified_cnn(scaled_images, **kwargs):
    activ = tf.nn.relu
    layer_1 = activ(conv(scaled_images, 'c1', n_filters=32, filter_size=3, stride=1, init_scale=np.sqrt(2), **kwargs))
    layer_2 = activ(conv(layer_1, 'c2', n_filters=64, filter_size=3, stride=1, init_scale=np.sqrt(2), **kwargs))
    layer_3 = activ(conv(layer_2, 'c3', n_filters=64, filter_size=3, stride=1, init_scale=np.sqrt(2), **kwargs))
    layer_3 = conv_to_fc(layer_3)
    return activ(linear(layer_3, 'fc1', n_hidden=512, init_scale=np.sqrt(2)))

class CustomPolicy(FeedForwardPolicy):
    def __init__(self, *args, **kwargs):
        super(CustomPolicy, self).__init__(*args, **kwargs, cnn_extractor=modified_cnn, feature_extraction="cnn")

As a side note, @araffin it would be good to detect this kind of error and warn the user about this, kind of like this:
def nature_cnn(scaled_images, **kwargs):
    """
    CNN from Nature paper.
    :param scaled_images: (TensorFlow Tensor) Image input placeholder
    :param kwargs: (dict) Extra keywords parameters for the convolutional layers of the CNN
    :return: (TensorFlow Tensor) The CNN output layer
    """
    assert scaled_images.shape[0] >= 76 and scaled_images.shape[1] >= 76, "Error: input shape too small"
    activ = tf.nn.relu
    layer_1 = activ(conv(scaled_images, 'c1', n_filters=32, filter_size=8, stride=4, init_scale=np.sqrt(2), **kwargs))
    layer_2 = activ(conv(layer_1, 'c2', n_filters=64, filter_size=4, stride=2, init_scale=np.sqrt(2), **kwargs))
    layer_3 = activ(conv(layer_2, 'c3', n_filters=64, filter_size=3, stride=1, init_scale=np.sqrt(2), **kwargs))
    layer_3 = conv_to_fc(layer_3)
    return activ(linear(layer_3, 'fc1', n_hidden=512, init_scale=np.sqrt(2)))

@hill-a thanks for your suggestion, I'll try create a custom policy.

@hill-a first of all thank you. I was reading through the custom policy documentation and attempted to create a custom cnn with keras but that didn't work.  Why keras can't be used for creating a custom cnn?


Update README.md

Fixing command to generate figaro files

Please merge this. Just got bit by the dated README bug

Changes Unknown when pulling 0bb23edb015e232eb8a7bd80df311d24775af811 on varunsrin:patch-1 into ** on laserlemon:master**.


Eip-191 conform signed messages

Rationale
Switch to signed messages that conform to the EIP-191 standard.
This PR builds on #1.
Implementation

Solidity

Use OpenZeppelin's ECDSA.toEthSignedMessageHash to convert hashes in MessageGenerator

Go

Port OpenZeppelin's ECDSA.toEthSignedMessageHash
Introduce a new function EthSign that uses conform messages
Use EthSign instead of Sign for message signing

Should Sign be deprecated?

My reading of EIP-191 is that it only requires the 0x19 prefix, and that personal_sign as implemented by ECDSA.toEthSignedMessageHash is consequently a subset of that. I don't think we should be limiting to the most specific functionality.
As for how we change eth.Signer(), we should definitely add PersonalSign() and probably even ERC191Sign(). Let's chat about whether we foresee raw signing being necessary in the future (for now we can always change Sign() to sign() to keep it around but not exposed).

Sorry I should have opened an issue for that, since the PR is somewhat outdated now.
I agree - let's not touch the raw signs and keep them around for now.
As far as I have understood, it is not only prepending 0x19 but also some version + version specific data like "\x19Ethereum Signed Message:\n" + len(message) in the case of personal signatures.
I'll update the PR, putting this into Signer.PersonalSign() for now.


Unexpected config change: Lower log level and add explanation

AFAIK we don't know how the config can change (.equals()) if the hashes are equal?


Get a verification code sent to your phone

Get a verification code sent to your phone<PHONE_NUMBER>

Get a verification code sent to your phone

Get a verification code sent to your phone<PHONE_NUMBER>


Jerusalem Institute of Health Sciences

https://jerusaleminstitutelira.ac.ug

@Abaliwano-Francis I have to close this request without merging, because you requested to add a non-existent domain to this repository: Host jerusaleminstitutelira.ac not found: 3(NXDOMAIN) Please ensure that you are familiar with this repository rules located at the bottom of this page and submit a new request with the correct information. Thank you for your understanding!

@Abaliwano-Francis Regrettably, this request has signs of fraud. I have to close it without merging.
It does not mean that something is wrong with the school. The issue is related to a combination of suspicious factors related to the domain itself.
Please feel free to apply for free educational license with an official document which proves that you are a student. You can do it using "OFFICIAL DOCUMENT" tab at https://www.jetbrains.com/shop/eform/students.
Thank you for your understanding!


"Building Block" concept documentation

Including requirements for new "building block" proposal/implementation.

Updated diagram in the concepts docs


Declared opportunities don't work on Python

I was try to use this manual: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/?tabs=python
And wrote this
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.edge.options import Options
webdriver_opt = Options()
webdriver_opt.add_argument('headless')
webdriver_opt.add_argument('disable-gpu')
driver = webdriver.Edge(executable_path="./msedgedriver.exe", options=webdriver_opt)
It gives me an error:
Traceback (most recent call last):
File "W:\Users\xxx\Desktop\venv\work_dir\jscrap\jscrap.py", line 38, in
webdriver_opt.add_argument('headless')
AttributeError: 'Options' object has no attribute 'add_argument'
even if I comment these lines below:
webdriver_opt.add_argument('headless')
webdriver_opt.add_argument('disable-gpu')
except this
driver = webdriver.Edge(executable_path="./msedgedriver.exe", options=webdriver_opt)
There will be such error:
Traceback (most recent call last):
File "W:\Users\xxx\Desktop\venv\work_dir\jscrap\jscrap.py", line 43, in
driver = webdriver.Edge(executable_path="./msedgedriver.exe", options=webdriver_opt)
TypeError: init() got an unexpected keyword argument 'options'

Closing this issue as this appears to be due to using Selenium 3. Feel free to re-open if the issue persists after upgrading to the latest version.

The problem was really in the version of product, but I faced with problem,
that selenium 4 does not work on python 3.7. There was a need to reinstall
python version higher than 3.7
ср, 27 апр. 2022 г., 20:05 Brandon Walderman @.***>:

Closing this issue as this appears to be due to using Selenium 3. Feel
free to re-open if the issue persists after upgrading to the latest version.
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftEdge/EdgeWebDriver/issues/14#issuecomment-1111251403,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AULZX7MMJXFLK5SIEAEMMMLVHFXXBANCNFSM5T4QAYVA
.
You are receiving this because you were mentioned.Message ID:
@.***>

And there is a problem with versions in Spyder IDE, the part of anaconda
environment
ср, 27 апр. 2022 г., 21:51 Youth Rise & Fade to Black @.***>:

The problem was really in the version of product, but I faced with
problem, that selenium 4 does not work on python 3.7. There was a need to
reinstall python version higher than 3.7
ср, 27 апр. 2022 г., 20:05 Brandon Walderman @.***>:

Closing this issue as this appears to be due to using Selenium 3. Feel
free to re-open if the issue persists after upgrading to the latest version.
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftEdge/EdgeWebDriver/issues/14#issuecomment-1111251403,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AULZX7MMJXFLK5SIEAEMMMLVHFXXBANCNFSM5T4QAYVA
.
You are receiving this because you were mentioned.Message ID:
@.***>


Use tiny-simple-peer

This migrates p2pcf to use a small fork of simple-peer I created called tiny-simple-peer, which drops all the node polyfills in exchange for removing the Peer's stream.Duplex API. This was based on the feedback in https://github.com/gfodor/p2pcf/issues/1
I'm not going to cut this as a major release even though it's technically a breaking API change, since this library is so new that I doubt we have any downstream consumers or ever will of the stream.Duplex API.

goated


WithContext not populated when a reload layer is used

Bug Report
Hi there. I am building a cli which may-or-may-not have opentelemetry enabled. We initialize tracing early on and conditionally enable opentelemetry based on some flags. We use reload layers starting with None to allow enabling layers later on. Everything works, except context propagation. If the layer is not present when the registry is init'ed, WithContext is not set up correctly meaning set_parent and friends silently fails due to not being able to downcast the subscriber (L142).
https://github.com/tokio-rs/tracing-opentelemetry/blob/5e3354ec24debcfbf856bfd1eb7022459dca1e6a/src/span_ext.rs#L139-L150
I can confirm this does not work as expected even if the reload layer is initialized with Some(T) either. The layer does work if you use a Some(T) without the reload layer, however.
 Removing the reload layer makes the downcast_ref() in set_parent() return Some(_) again.

I probably won't have time to look into this myself but happy to review a PR that tries to address this.

that bug is always exists

I am trying to investigate this issue
Discovered, the reload method. It will only downcast_ref NoneLayerMarker.
This is the code for tracing-subscriber:
    #[doc(hidden)]
    unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()> {
        // Safety: it is generally unsafe to downcast through a reload, because
        // the pointer can be invalidated after the lock is dropped.
        // `NoneLayerMarker` is a special case because it
        // is never dereferenced.
        //
        // Additionally, even if the marker type *is* dereferenced (which it
        // never will be), the pointer should be valid even if the subscriber
        // is reloaded, because all `NoneLayerMarker` pointers that we return
        // actually point to the global static singleton `NoneLayerMarker`,
        // rather than to a field inside the lock.
        if id == TypeId::of::<layer::NoneLayerMarker>() {
            return try_lock!(self.inner.read(), else return None).downcast_raw(id);
        }

        None
    }

According to my investigation, this function always returns None. It will never downcast_raw load WithContext. How can I modify it?


Avoid duplicate Action-runs after PR merges

Actions are a great feature, but one thing that has always annoyed me are duplicate Action-runs after PR merges.
A duplicate Action-run happens if an Action has successfully passed on a "feature branch", but the Action is then repeated on the "master branch" right after merging the "feature branch". Right after the merge, this repetition is unnecessary because the contents of the "feature branch" and the "master branch" are exactly the same (with some exceptions, see below for technical details).
Duplicate Action-runs do not only add noise to the Action-history, but also increase cost for enterprise users.
To understand the following explanation in detail, you need some expert knowledge about Git-internals (but this is something that I expect from GitHub):

I differentiate PR merges into trivial merges and non-trivial merges.
I define a trivial merge as a merge where the "master branch" ends up with the same tree hash as the merged "feature branch" (after the merge is done).
In contrast, a non-trivial merge is a merge where the "master branch" ends up with a different tree hash than the merged "feature branch". For example, this can happen if the "master branch" changed after the "feature branch" was submitted.
For non-trivial merges, it is necessary to repeat GitHub actions after the merge (GitHub does this correctly).
However, for trivial merges, repeating GitHub actions on the "master branch" is wasted time. Instead, a green checkbox should be instantly taken over from the merged feature branch.
A trivial merge is not necessarily a fast-forward merge. It is common to do squash-merges or rebase-merges that are still trivial merges. The only thing that matters is the resulting tree hash after the merge; not the exact details on how the merge is done.

Note that I refer to actions with a push trigger in their yml-file, like so:
on:
  push:
    branches:
      - '**'

Refined GitHub can't prevent what GitHub does on the server.
If you want to avoid some builds from happening, you can add some conditions in the workflow itself, like https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths

For now, I agree that this doesn't belong to refined-github.
Therefore, I published a new Action to solve the problem: https://github.com/marketplace/actions/skip-duplicate-actions


Add support for completionItem/resolve request on server

The LanguageServer trait is currently missing support for the completionItem/resolve request which is often used in conjunction with the textDocument/completion request (see #10).

Probably needs #100 because method must return a CompletionItem and I think it wouldn't be nice to return a CompletionItem::default().

We definitely would have to return a JSON-RPC error in that case, not a CompletionItem::default(), because doing so would be semantically incorrect.


[Threading] ThreadPool refactor, reduce allocation, fix wrong argument

PR Details
Title.
This PR has been benchmarked and, as expected given those changes, does not produce any performance difference besides faster initial run and slightly less allocation.
Description
Task.Factory.StartNew(ProcessWorkItems, TaskCreationOptions.LongRunning); maps to StartNew(Action(object), object) function signature instead of StartNew(Action(object), TaskCreationOptions) which, of course, didn't actually set the task as long running.
Cache the delegate we pass onto the task factory to reduce allocation.
Push as much stuff as possible outside of the lock.
Let exceptions fall into unhandled instead of ignoring them, if you have any better idea feel free to comment/start a review.
Related Issue
#302
Motivation and Context
Bug, alloc.
Types of changes

[ ] Docs change / refactoring / dependency upgrade
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Task.Factory.StartNew(ProcessWorkItems, TaskCreationOptions.LongRunning) is bad anyway, so better get rid of it entirely and use Task.Run() instead.
See https://blog.stephencleary.com/2013/08/startnew-is-dangerous.html

After careful reading, I don't even know why we have that custom ThreadPool implementation, I don't find any benefit to it. The same limiting effect could be achieved by a more simpler producer-consumer queue using semaphores (or even by using Task.DataFlow), or by limiting the number of threads in the framework thread pool (see ThreadPool.SetMaxThreads(Int32, Int32)).
@xen2 do you remember why we have this?

@Kryptos-FR The official ThreadPool is extremely slow compared to our implementation, ours can start working as soon as ~0.008ms on average after being given a job while the ThreadPool is closer to ~0.07ms minimum (tested on net core, fw is around 4 times slower than that).
Task.DataFlow will waste cpu time and introduce more allocations, those are really nice constructs for enterprise but aren't suited to how we're using it: tons of random jobs that lasts for far less than a millisecond.

@Eideren, we could fix that by just starting all those threads at the start of the game and still use the framework ThreadPool. It is a common occurrence in web server application.
Since, as you said, the threads are most likely waiting on the workAvailable EvantHandle, they won't be consuming any resources, until they make some job progress.
There are two ways of doing that: either starting the threads manually, or using ThreadPool.SetMinThreads(Int32, Int32) to set a higher value, so that the framework thread pool reserves/allocates a bit more threads at the beginning. We could even do a combination of both (probably the best approach).
I'm concerned, that:

our implementation might be missing some corner cases that could degrade performance
we won't benefit from future native/CLR/JIT optimizations on how tasks, threads, or parallelization in general are managed in .NET.
We have to maintain that code.

@Kryptos-FR What do you mean by

we could fix that by just starting all those threads at the start of the game and still use the framework ThreadPool.
Replacing new Task().Start() by ThreadPool.QueueUserWorkItem ? I don't think that the ThreadPool handles long running jobs well, users might also use it which would block their job, same thing goes for ThreadPool.SetMinThreads, users might also fiddle with that which might have repercussions on how the engine operates without them knowing so.
I'm probably off the mark here, could you expand on what you where mentioning above ?

You do realize that starting a Task here always goes to the ThreadPool, don't you?
That is because the default scheduler for task is pushing all the tasks in the thread pool (and we are not providing a different scheduler here, unless I'm missing something).
So TaskFactory.StartNew(), new Task().Start() or ThreadPool.QueueUserWorkItem (btw I recommend using ThreadPool.UnsafeQueueUserWorkItem instead) all end-up using the ThreadPool.  So again, what's the point of our implementation?

Why even use a Task if:

we bypass the task scheduler logic by using TaskCreationOptions.LongRunning
we only care about the number of threads running concurrently
we don;t support any of the Task feature such as continuation or cancellation

Won't it be more efficient to just start dedicated threads manually? Since that's what the default task scheduler ends-up doing anyway (source). We do pay the cost of using tasks, which has non-trivial execution logic (source), even when ran from a dedicated thread.

@Kryptos-FR What about the ThreadPool I thought that was what you wanted to go for even if I don't fully understand why.
I personally would have gone with threads since #302 , I kept it as is to avoid having to defend that position as it ultimately doesn't really matter when that code path is only hit 10 / 18 times over a whole game.
I'll let you create the PR to implement it however you see fit.

We didn't use Thread because it wasn't available in first versions of UWP/.NET Standard, so we had to work around it with long running tasks.
(it might be worth adding a small comment so that people are informed of those historical reasons when reading the codebase)
It would be fine to use Thread it and I would accept a PR in that sense (if properly tested).
However there's probably plenty of other more important things to do :)


docs: better semantic reading CONTRIBUTING.md

Changed line 94, to give a fuller explanation of the reason to 'run tests'
Thank you Emma Dawson @emmalearnscode , for the wording/phrasing for line 94

Fixes Issue

Changes proposed

Check List (Check all the applicable boxes)

[ ] My code follows the code style of this project.
[x] My change requires changes to the documentation.
[ ] I have updated the documentation accordingly.
[ ] All new and existing tests passed.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

I have closed this PR. Thank you for your support.
For future reference, I can invite collaborators by following these instructions in this GH doc?
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository

Do I now 'Delete branch' ?

Since this is not resolved do you mind if I open a new issue asking someone else to replace the text @goobric ?
__
  Summary: :question: I have a question

I selected 'Deleted Branch' and deleted it.
Now the message is asking "If you wish, you can delete this fork of EddieHubCommunity/LinkFree" in the settings!
I will delete the fork.
Very confused; as I am completely unaware if the proposed changes and have been agreed and implemented or not?!? :-/

@goobric this line still needs to be added as it didn’t get merged: The project runs automated tests when creating a PR. It tests components of the App. If you wish to run tests manually use the command ‘npm run cypress:run’ . If you need help to fix failing tests please comment on the PR asking for help.


Add mode

See: #452. This is a WIP because I'm not sure how to handle the fact that you can have no mode or multiple. This gets particularly hairy in a groupby scenario where each group may have different lengths (and thus would cause problems with other summary statistics like mean, median where you know the length will be 1).
Pandas:
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.mode.html
https://pandas.pydata.org/docs/reference/api/pandas.Series.mode.html#pandas.Series.mode
https://stackoverflow.com/a/54304691
R:
https://stackoverflow.com/questions/66972590/how-to-find-mean-median-mode-based-on-distinctive-groups-in-r
https://cran.r-project.org/web/packages/modeest/modeest.pdf

I think this is fine, because I think the computation is going to occur inside the group's context

Yes, between groups, but not within groups. So take the example where you summarise down to mean and mode. If mode is length 0 or >1, then you have a problem where within groups the aggregations are different lengths. Adding a test or two now to clarify as suggested 👍.

Well it clarified in a different direction: summarise w/ mode returns a single row per group -- a list row! We'll have to pick up #401 anyway.


Resolving compatibility issues with module _compat

I have started working on resolving compatibility issues, and have created a new module specifically for this purpose. Please let me know if there are any issues that need to be addressed by commenting on #1 .

@elisbyberi just as an FYI, I'm converting this project in a standard python library that I'm going to publish on pypi, since I plan on using it within my pypub as I mentioned before.
I'll move a copy of the current master branch into it's own codon branch to preserve any translations efforts in the works. Apologies for the inconvenience.

@imgurbot12 I will update you when the working version of Codon becomes available next week. My brother is currently working on some Python stdlib libraries for Codon. I will utilize these libraries to continue working on codon-xml. Once it's ready, you can test it in Codon.

@imgurbot12 I am closing this pull request. I have initiated a new project to develop a purely Python-based implementation of the library that doesn't rely on non-pure Python libraries. This implementation will work seamlessly with all Python implementations. As the project is still in its planning phase, I cannot provide an ETA at this time.
Please note that the "pyxml" library, while potentially being a pure Python implementation of the standard "xml" Python library, relies on non-pure Python libraries and is therefore incompatible with various Python implementations. Working on this pull request diverges from the main objective, which is to make "pyxml" compatible with Codon. This is because it's not "pyxml" itself that needs to be addressed, but rather its dependencies. It is much easier to implement it from scratch using only Python built-ins.

Alright, that's fair. I'd perhaps argue with you over your definition of "pure python" considering I believe python3 typehints to be critical components of the standard library, but I understand where you're coming from. Best of luck to you.

@imgurbot12 Quoting PEP 484 Non-Goals: "It should also be emphasized that Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention." Therefore, no Python implementation should be obligated to support type hints.
However, the issue at hand is not related to type hints. Instead, it concerns non-pure Python libraries that are part of the standard Python distribution and are implemented using Python C extensions. This is similar to using assembly code in C, which is not portable.
Furthermore, the lack of Unicode support in Codon exacerbates this issue. The pure Python library must be encoding-agnostic in terms of string data for performance reasons. Supporting Unicode would make the code unnecessarily slower (I always use "array.array()" for string manipulation because it is encoding-agnostic and the code remains unaffected by the string's encoding.)

@elisbyberi, I understand not requiring typehints. That's good, but not supporting them is another. I would assume and hope Codon seeks to be naively compatible and hot-swap-able between normal python and Codon. To not support python's standard type hints excludes their usage from any code base which severely limits what can be implemented. I dare say the adoption of Codon will be extremely low if Codon cannot maintain parity between the two.
In terms of using C-libraries, I'm not sure what you are referring to. The two libraries that I import and install are dataclasses and typing_extensions which are simply backports of features provided in the latest version of python 3.11. They're just parts of the standard-library. The features I'm using are cpython either. They're native python:
https://github.com/python/cpython/blob/3.11/Lib/dataclasses.py
https://github.com/python/typing_extensions/blob/main/src/typing_extensions.py

@imgurbot12 Examples of Python standard libraries implemented using C extensions include builtins (bytes, bytearray), and io, among others. Virtually every Python standard library relies on a C extension. It is not feasible to maintain a custom partial implementation of these modules specifically for the "pyxml" library. We may consider using them when they become a part of the Codon standard library, but until then, it is preferable to implement "pyxml" at a low level using Codon's List or Array.
"It is much easier to implement it from scratch using only Python built-ins." The reason for my statement is that due to the lack of proper error handling in Codon, it is more challenging to port an existing Python codebase to Codon as compared to building a new one from scratch. When starting from scratch, it is possible to trace back and forth to identify and resolve errors. However, when working with an existing codebase, it can be challenging to understand what is happening. Additionally, Codon currently lacks proper IDE support.

I'm sorry I'm a bit confused. I could understand an argument about performance maybe to instead write this using whatever underlying methods exist within codon, but if you don't intend to support builtin python types and functions then many of the projects taglines just seem blatantly false then:
A high-performance, zero-overhead, extensible Python compiler using LLVM
Codon is a Python-compatible language
both of these statements are simply not true if Codon cannot support normal python types and language builtins.
I assumed the intent was to enable performance improvements using static-typing, but if the static-typing is required to be different it's not longer python it's just python-like, even more so if things like bytes and bytearray aren't supported. bytes especially are used all over python3. It's one of the largest additions to python3 that caused a split between python2 and 3 in the way that they managed and handled strings. python2 has been deprecated for 3 years at this time. No one is coding in python2 anymore outside of very rare legacy exceptions. To not include python3 standard features is insanity.

@imgurbot12 The philosophy of Codon is to optimize slow Python code by compiling it down to machine code, while also offering extensive support for CPython. It is not intended to replace CPython but rather to complement it. Codon allows for seamless interaction between CPython and itself, and it is also possible to create Python C extensions using Codon.
Codon 0.y.z is still a work in progress, which means that there are things missing and that changes may occur. It is not feasible to implement partial libraries exclusively for the "pyxml" library, as these would be difficult to maintain while Codon is still under development.
In the case of implementing "xml" in Codon, it is not a priority because it already makes use of the pyexpat - Fast XML parsing using Expat library, which is implemented in C. Therefore, it is not of significant interest to the development of Codon at this time. Remember that it took Python 32 years to come at this point. Codon is just 1 year old.
Instead, I plan to create a version of "pyxml" in "codon" branch that is compatible with Codon. This will serve as a test case and a point of interest for Codon, but it is not intended to be added to the Codon standard library, as it requires heavy optimization.


Message: Bind failed on <IP_ADDRESS>:20477, error: Address family not supported by protocol family (47) on OpenBSD

Description
When Fano Framework web application run as daemon server on OpenBSD, it fails to bind to network address.
Message: Bind failed on <IP_ADDRESS>:20477, error: Address family not supported by protocol family (47)
Step to reproduce
Generate Fano web application project on OpenBSD. Compile and run
$ ./bin/app.cgi
Starting application at <IP_ADDRESS>:20477
Fail to bind socket.
Exception: ESockBind
Message: Bind failed on <IP_ADDRESS>:20477, error: Address family not supported by protocol family (47)

It is related to Free Pascal bug report 0038188.


event.test.before fires when running codecept shell in 2.6.10

What are you trying to achieve?
I want to be able to run npx codeceptjs shell and not have my global before test plugin run (although there is an easy work around). The code in question is something like this:
const event = require('codeceptjs').event;

module.exports = function () {
  event.dispatcher.on(event.test.before, function (test) {
    console.log('about to run a test!')
  });
};

What do you get instead?
The function is called with a mostly empty test object (looks like { title: '' } when running the codeceptjs shell
Work around is just to check the test object for the properties I care about before doing anything

Provide console output if related. Use --verbose mode for more details.

# paste output here

Provide test source code if related

// paste test

Details

CodeceptJS version: 2.6.10
NodeJS Version: 12.4.0
Operating System: macOS 10.15.7
puppeteer || webdriverio || protractor || testcafe version (if related)
Configuration file:

# paste config here

please try with 3.x version 😄

Hm actually @PeterNgTr looks like this still is an issue in 3.1.1. In codecept.conf.js:
    myCustomPlugin: {
      require: './custom_plugins/myCustomPlugin.js',
      enabled: true,
    },

In myCustomPlugin.js:
const event = require('codeceptjs').event;

module.exports = function () {
  event.dispatcher.on(event.test.before, function (test) {
    console.log('About to run a test!');
  });
};

In the terminal:
node_modules/codeceptjs/bin/codecept.js --version
> 3.1.1
node_modules/codeceptjs/bin/codecept.js shell
> String interactive shell for current suite...
> About to run a test!