TOML parsing can't handle [packages."discord.py"]

Pipenv cannot install the following (valid) Pipfile:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[packages."discord.py"]
git = "https://github.com/Rapptz/discord.py.git"

$ python -m pipenv.help output
Pipenv version: '11.10.0'
Pipenv location: '/usr/local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/local/opt/python/bin/python3.6'
Other Python installations in PATH:

2.6: /usr/bin/python2.6

2.6: /usr/bin/python2.6

2.7: /usr/bin/python2.7

2.7: /usr/bin/python2.7

3.6: /usr/local/bin/python3.6m

3.6: /usr/local/bin/python3.6

3.6: /usr/local/bin/python3.6

3.6.5: /usr/local/bin/python

3.6.5: /usr/local/bin/python

2.7.10: /usr/bin/python

3.6.5: /usr/local/bin/python3

3.6.5: /usr/local/bin/python3

PEP 508 Information:
{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '16.7.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 16.7.0: Wed Oct  4 00:17:00 PDT '
                     '2017; root:xnu-3789.71.6~1/RELEASE_X86_64',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'darwin'}

System environment variables:

TERM_PROGRAM
TERM
SHELL
CLICOLOR
TMPDIR
Apple_PubSub_Socket_Render
TERM_PROGRAM_VERSION
TERM_SESSION_ID
USER
SSH_AUTH_SOCK
__CF_USER_TEXT_ENCODING
LSCOLORS
PATH
PWD
EDITOR
LANG
XPC_FLAGS
RBENV_SHELL
XPC_SERVICE_NAME
HOME
SHLVL
LOGNAME
OLDPWD
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONUNBUFFERED

Pipenv–specific environment variables:
Debug–specific environment variables:

PATH: /Users/greysteil/.cargo/bin:/usr/local/heroku/bin:/Users/greysteil/.rbenv/shims:/usr/local/bin:./node_modules/.bin:.bundle/binstubs:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Library/TeX/texbin:/usr/local/sbin
SHELL: /bin/bash
EDITOR: subl -w
LANG: en_GB.UTF-8
PWD: /Users/greysteil/code/python-test

Contents of Pipfile ('/Users/greysteil/code/python-test/Pipfile'):

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[packages."discord.py"]
git = "https://github.com/Rapptz/discord.py.git"

Expected result
Successful install
Actual result
Traceback (most recent call last):
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==11.10.0', 'console_scripts', 'pipenv')()
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/cli.py", line 366, in install
    selective_upgrade=selective_upgrade,
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/core.py", line 1730, in do_install
    skip_requirements=skip_requirements,
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/core.py", line 608, in ensure_project
    if project.required_python_version:
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/project.py", line 180, in required_python_version
    required = self.parsed_pipfile.get('requires', {}).get(
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/project.py", line 378, in parsed_pipfile
    parsed = self._parse_pipfile(contents)
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/project.py", line 409, in _parse_pipfile
    return contoml.loads(toml.dumps(data, preserve=True))
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/patched/contoml/__init__.py", line 15, in loads
    elements = parse_tokens(tokens)
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 17, in parse_tokens
    return _parse_token_stream(TokenStream(tokens))
  File "/usr/local/Cellar/pipenv/11.10.0/libexec/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 32, in _parse_token_stream
    raise ParsingError('Failed to parse line {}'.format(pending.head.row))
prettytoml.parser.errors.ParsingError: Failed to parse line 6

Steps to replicate
pipenv install on the above Pipfile

Ah, I can see this is a dupe of https://github.com/pypa/pipenv/issues/1519. I'll close, as it's already been marked as low priority.

@greysteil we use a modified toml format (I wasn’t involved in the decision making behind this but we are too far down the road to undo it anyway— best we could hope for is supporting regular toml too someday)
Basically you should conform to our format which looks like this:
[packages]
“discord.py” = {git = “https://github.com/Rapptz/discord.py.git”}

Python really needs a TOML library that actually works.

I believe @frostming is the resident toml expert, he has a full python implementation I'm willing to bet works pretty well ;)

Do note we have made changes to contoml and prettytoml (see tasks/vendoring/patches)

👍 - dug into this and created https://github.com/pypa/pipenv/pull/2067, which is an improvement but not a fix.

Hmm, wait a minute, this actually works with ConTOML vendored in master. Many it’s fixed during the vendor update?

That's entirely possible - I couldn't get master running locally so tested my changes off of 11.10.0.  I get the following when I try to pipenv install anything with it:
from .pypi import PyPIRepository
  File "/Users/greysteil/code/pipenv/pipenv/patched/piptools/repositories/pypi.py", line 11, in <module>
    from notpip.index import PackageFinder
  File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/index.py", line 33, in <module>
    from notpip._vendor import html5lib, requests, six
  File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_vendor/requests/__init__.py", line 98, in <module>
    from . import packages
  File "/Users/greysteil/code/pipenv/pipenv/patched/notpip/_vendor/requests/packages.py", line 8, in <module>
    locals()[package] = __import__(vendored_package)
ModuleNotFoundError: No module named 'pip._vendor.urllib3'

Oh. If that’s current master that’s a problem — did you pip install -e?

I did - I went through each of the install steps in the .travis.yml.

I saw the exactly same error this morning but it was gone after I upgraded my pip. You can have a try.

No joy I'm afraid - I'm already on 10.0.1.

@greysteil latest version should fix this. Good catch. Meant to respond but got caught up in a few other things

Yep, works perfectly - thanks for the release!


Technological specs table should have flexible units

When opening the table for roof solar panels this is what is shown: 0 W and 0 km2

It would be better is the capacity was shown in W and the land use in m2, then users can for example calculate the W/m2 that we assume
Reassign somebody else when you want :)

@noracato do you think that it is possible to fix this before the deploy?


nogc related compilation error

I get the following error after the latest commit:
• dub
libdparse: ["libdparse"]
dfmt: ["dfmt", "libdparse"]
Target is up to date. Using existing build in /home/edwin/.dub/packages/libdparse-master/.dub/build/library-debug-linux.posix-x86_64-dmd-E198791B6673AEAE0964E351E0B4BB0A/. Use --force to force a rebuild.
Building dfmt configuration "application", build type debug.
Compiling...
src/dfmt.d(499): Error: @nogc function 'dfmt.TokenFormatter!(LockingTextWriter).TokenFormatter.expressionLength' cannot call non-@nogc function 'std.d.lexer.isBasicType'
src/dfmt.d(73): Error: template instance dfmt.format!(LockingTextWriter) error instantiating
src/dfmt.d(40): Error: function D main no return exp; or assert(0); at end of function
FAIL .dub/build/application-debug-linux.posix-x86_64-dmd-D80DC97764A9DF7D438DB64CB56228E4 dfmt executable
Error executing command run: DMD compile run failed with exit code 1

D version information:
• dmd
DMD64 D Compiler v2.066.1-devel
Copyright (c) 1999-2014 by Digital Mars written by Walter Bright
Documentation: http://dlang.org/

dfmt builds successfully for me with dmd and ldc. Can you confirm that you're still having build problems?

I now seem to get the following different error (still on 2.066.1). It might be interesting to get travis CI integrated to test the builds automatically. I'd be happy to submit a pull request with a travis file for that purpose.
 dfmt dub
WARNING: A deprecated branch based version specification is used for the dependency libdparse. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
Target libdparse ~master is up to date. Use --force to rebuild.
Building dfmt 0.2.2 configuration "application", build type debug.
Compiling using dmd...
src/dfmt/formatter.d(1373): Error: @nogc function 'dfmt.formatter.canFindIndex' cannot call non-@nogc function 'std.range.assumeSorted!("a < b", const(ulong)[]).assumeSorted'
FAIL .dub/build/application-debug-linux.posix-x86_64-dmd_2066-6D71006389B3841AD8C75F8D43E64D44/ dfmt executable
Error executing command run: dmd failed with exit code 1.

https://travis-ci.org/Hackerpilot/dfmt/builds
I even have the build status badge on the project's front page...

Sorry, am currently cursed with very slow network, so didn't take the time
to double check the front page :(
If it works on travis it should be fine for me (I am on linux as well).
Will try to hunt it down myself and report back.
On 21 April 2015 at 11:10, Brian Schott<EMAIL_ADDRESS>wrote:

https://travis-ci.org/Hackerpilot/dfmt/builds
I even have the build status badge on the project's front page...
—
Reply to this email directly or view it on GitHub
https://github.com/Hackerpilot/dfmt/issues/13#issuecomment-94729865.

for me using
dub build -b release --combined  made it work

The problem is that SortedRange.this is not nogc in -debug mode.
Because it calls dbgVerifySorted which calls uniform which is not nogc.
It may be worth removing the @nogc annotation from dfmt until this is fixed.

@yannick thanks, it helps.

I'm going to close this because the code works for me (and the CI system).


Add interoperator

Pull Request Test Coverage Report for Build 2065

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 89.154%

Totals

Change from base Build 2048:
0.0%

Covered Lines:
8290

Relevant Lines:
8998

💛  - Coveralls


fix the builds

Description

Should fix all currently failing builds because netcat is a valid package but apt can not decide on use  netcat-traditional or  netcat-openbsd
add a hacky way for libssl1.1 to still be their in the debian image
remove dotnet 5 from altv
revert to libicu66 on the debian image because it broke rage-mp

All Submissions:

[x] Have you ensured there aren't other open Pull Requests for the same update or change?
[x] Have you created a new branch for your changes and PR from that branch and not from your master branch?

Can this be merged before monday? Or at least reviewed. Because else some image will go back to debian 11 and some will just again fail to build.


Fix: Error Views on Linode and NodeBalancer Detail

Description
This PR fixes 3 issues

Previously, if a stats request on Linode Detail succeeded and the next one failed, an error view would appear
Previously, if a stats request on NodeBalancer Detail succeeded and the next one failed, an error view would appear
If the NodeBalancer detail polling first succeeded and the next one failed, an error view would appear.

Basically, we should not be removing the data state even if a subsequent request fails.
Type of Change

Non breaking change ('update', 'change')

Applicable E2E Tests
N/A

hello world


HTTP Error 422

Welcome to Poloniex Lending Bot
2017-03-24 23:32:17 Error: HTTP Error 422:  Requesting returnOpenLoanOffers
Caught HTTP Error 422:  Requesting returnOpenLoanOffers from Poloniex, ignoring.
There seems to be an issue with recent poloniex server changes for DDOS protection

You can ignore this, the bot will continue to operate after this message.
Let me know if that's not the case.

Maybe it's because Polo has been slammed with attacks lately, but the bot has been getting the same error since Friday. The only thing I've edited in the cfg file (other than adding my keys), was changing "xdays =2". Hope you can help. Thanks!

I'm getting the same error, I am also starting the webserver and it's not writing the botlog.json to the www folder (default settings).
Any ideas?


use adapter to inference

I use LORA to train the NER task, use crf for decoding, after saving adapter and head, the output dimension obtained by model.load_adapter() method when the model is called is 768, only after adding model.load_adapter() to model.load_head() to get the correct output dimension (equal to the number of tags in my category)

This issue has been automatically marked as stale because it has been without activity for 90 days. This issue will be closed in 14 days unless you comment or remove the stale label.

This issue was closed because it was stale for 14 days without any activity.


Strange invalid literal error..

Hi
I'm having a strange error, using code and an image which i've previously preprocessed before .. any advice would be really greatly appreciated.
Commands I am using are as follows. This is a snakemake pipeline running steinbock via singularity. Has always worked in the past ! Can't work out for the life of me what is wrong.
steinbock="singularity run -B /output_data/{wildcards.file}:/data --env STEINBOCK_MASK_DTYPE=uint32 docker://ghcr.io/bodenmillergroup/steinbock:0.15.0"
echo "Running preprocessing of external images"
$steinbock preprocess external images --img /data/ --imgout /data/images --infoout /data/images/images.csv
$steinbock segment deepcell --minmax --img /data/images  --panel /data/panel.csv -o /data/masks/
$steinbock measure intensities --img /data/images --masks /data/masks --panel /data/panel.csv -o /data/intensities/
$steinbock measure regionprops --img /data/images --masks /data/masks -o /data/regionprops/
The panel.csv file is in the structure of:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/app/steinbock/steinbock/__main__.py", line 17, in <module>
    steinbock_cmd_group(prog_name="steinbock")
  File "/opt/venv/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/app/steinbock/steinbock/_cli/utils.py", line 35, in wrapper
    return func(*args, **kwargs)
  File "/app/steinbock/steinbock/preprocessing/_cli/external.py", line 99, in images_cmd
    channel_indices = panel["channel"].astype(int).sub(1).tolist()
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/generic.py", line 5912, in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 419, in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 304, in apply
    applied = getattr(b, f)(**kwargs)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/internals/blocks.py", line 580, in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/dtypes/cast.py", line 1292, in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/dtypes/cast.py", line 1234, in astype_array
    values = values.astype(dtype, copy=copy)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/arrays/string_.py", line 453, in astype
    return super().astype(dtype, copy)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/arrays/base.py", line 584, in astype
    return np.array(self, dtype=dtype, copy=copy)
  File "/opt/venv/lib/python3.8/site-packages/pandas/core/arrays/numpy_.py", line 129, in __array__
    return np.asarray(self._ndarray, dtype=dtype)
ValueError: invalid literal for int() with base 10: 'C1'

Hi @paulrbuckley-kcl
Sorry for the late reply. To be honest I have not come across this bit of the steinbock code before. It appears to expect only numerical characters in the 'channel' column of the panel for external images. I am surprised that it worked before for you, since .astype(int) would fail if there are any characters in the column entries. You can get around it by removing the 'C's in your panel['channel'] entries. But then again that should not be expected format of panel['channel']. @jwindhager could you please comment?

This is a bug


Need help to use StatefulJ FSM

Hi all,
I would like to use StatefulJ FSM.
But example is light.
I usually use Libero from iMatix, and I want to try to implement one testcase from it with StatefulJ FSM.
Here is the sample (Example of Controlling a Telephone) : http://legacy.imatix.com/html/libero/lrintr3.htm
I think it would be possible but I do not understand how !.
Can anyone can help me doing that?
Thanks.
		// Events
		//
		String ok = "Ok";
		String error = "Error";
		String offhook = "Offhook";
		String onhook = "Onhook";
		String request = "Request";
		String digit = "Digit";
		String wholeNumber = "Whole Number";
		String accept = "Accept";
		String busy = "Busy";
		String reject = "Reject";
		String answer = "Answer";
		String release = "Release";

		// States
		//
		final State<Foo> afterInit = new StateImpl<Foo>("After-Init");
		final State<Foo> idle = new StateImpl<Foo>("Idle");
		final State<Foo> terminated = new StateImpl<Foo>("Terminated", true);

		// Actions
		//
		Action<Foo> waitForIncomingMessage = new HelloAction("Wait-For-Incoming-Message");
		Action<Foo> terminateTheProgram = new HelloAction("Terminate-The-Program");

		/* Deterministic Transitions */

		afterInit.addTransition(ok, idle, waitForIncomingMessage);
		afterInit.addTransition(error, terminated, terminateTheProgram);

		// In-Memory Persister
		//
		List<State<Foo>> states = new LinkedList<State<Foo>>();
		states.add(afterInit);
		states.add(idle);
		states.add(terminated);

		MemoryPersisterImpl<Foo> persister = new MemoryPersisterImpl<Foo>(states, afterInit);

You definitely can do this with StatefulJ - the question is whether or not
you need to persist this into a database and, if so, if you are using
Spring Data?

Andy

On Tue, Apr 7, 2015 at 11:17 AM, domiq44<EMAIL_ADDRESS>wrote:

Hi all,
I would like to use StatefulJ FSM.
But example is light.
I usually use Libero from iMatix, and I want to try to implement one
testcase from it with StatefulJ FSM.
Here is the sample (Example of Controlling a Telephone) :
http://legacy.imatix.com/html/libero/lrintr3.htm
I think it would be possible but I do not understand how !.
Can anyone can help me doing that?
Thanks.
—
Reply to this email directly or view it on GitHub
https://github.com/statefulj/statefulj/issues/6.

You're looking good so far.  You will need to now create the FSM and drive it.
There are step-by-step intstructions here:  http://www.statefulj.org/fsm/
Can you be more specific about how you are stuck?  Are you not sure what do after creating the persister?  Are you not sure exactly how to model the Telephone example?

Hello "statefulj" !
And thanks for your help.
Yes, I don't know how to model the Telephone example.
In a FSM, you are always in one state from predefined states.
In this state, a set of predefined events may happen.
For each event, you have a set of actions to perform.
The last one take you into another state.
How to code that with StatefulJ ?

You seem to be heading in the right direction - I included an example of building out more of the model:
final State<Foo> dialingFirst = new StateImpl<Foo>("Dialing-First");

Action startDialTone = new StartDialToneAction();  // Implements Action
Action resetDialTone = new ResetDialToneAction();  // Implements Action
Action waitForIncomingMsg = new WaitForIncomingMsg();  // Implements Action
Action dialCompositeAction = new CompositeActionImpl(Arrays.asList(new Action[] {
   startDialTone,
   resetDialTone,
   waitForIncomingMsg
}));

idle.addTransition(offhook, dialingFirst, dialCompositeAction);

After you're done with defining the states, events, actions and transitions - you just set up your persister (which you have done correctly), then setup your FSM and then call it with foo object.  Like so:
final FSM<Foo> fsm = new FSM<Foo>(persister);

Foo foo = new Foo();

State<Foo> state = fsm.onEvent(foo, ok); // After-Init/Ok -> Idle/waitForIncomingMessage

If you want to see more examples, checkout:
https://github.com/statefulj/statefulj/blob/master/statefulj-fsm/src/test/java/org/statefulj/fsm/FSMTest.java

Thanks for your help "statefulj".
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

import org.statefulj.fsm.FSM;
import org.statefulj.fsm.TooBusyException;
import org.statefulj.fsm.model.Action;
import org.statefulj.fsm.model.State;
import org.statefulj.fsm.model.impl.CompositeActionImpl;
import org.statefulj.fsm.model.impl.StateImpl;
import org.statefulj.persistence.memory.MemoryPersisterImpl;

public class App {

	public static void main(String[] args) throws TooBusyException {

		// States
		//
		final State<Foo> stateAfterInit = new StateImpl<Foo>("After-Init");
		final State<Foo> stateIdle = new StateImpl<Foo>("Idle");
		final State<Foo> stateDialingFirst = new StateImpl<Foo>("Dialing-First");
		final State<Foo> stateDialingNext = new StateImpl<Foo>("Dialing-Next");
		final State<Foo> stateSeizing = new StateImpl<Foo>("Seizing");
		final State<Foo> stateSeizingFailed = new StateImpl<Foo>("Seize-Failed");
		final State<Foo> stateRinging = new StateImpl<Foo>("Ringing");
		final State<Foo> stateTalking = new StateImpl<Foo>("Talking");
		final State<Foo> stateReleased = new StateImpl<Foo>("Released");
		final State<Foo> stateDefaults = new StateImpl<Foo>("Defaults", true);

		// Events
		//
		String acceptEvent = "Accept";
		String answerEvent = "Answer";
		String busyEvent = "Busy";
		String digitEvent = "Digit";
		String errorEvent = "Error";
		String offhookEvent = "Offhook";
		String okEvent = "Ok";
		String onhookEvent = "Onhook";
		String requestEvent = "Request";
		String rejectEvent = "Reject";
		String releaseEvent = "Release";
		String wholeNumberEvent = "Whole-Number";
		String terminateEvent = "Terminate";

		// Actions
		//
		Action haveDialedDigit = new HaveDialedDigitAction();
		Action resetDialedNumber = new ResetDialedNumberAction();
		Action sendOutgoingRequest = new SendOutgoingRequestAction();
		Action sendOutgoingRelease = new SendOutgoingReleaseAction();
		Action startRingingLocal = new StartRingingLocalAction();
		Action startRingingRemote = new StartRingingRemoteAction();
		Action startReleasedTone = new StartReleasedToneAction();
		Action startRejectTone = new StartRejectToneAction();
		Action startBusyTone = new StartBusyToneAction();
		Action startDialTone = new StartDialToneAction();
		Action stopLocalTones = new StopLocalTonesAction();
		Action stopRingingLocal = new StopRingingLocalAction();
		Action stopRingingRemote = new StopRingingRemoteAction();
		Action waitForIncomingMessage = new WaitForIncomingMessageAction();
		Action terminateTheProgram = new TerminateTheProgramAction();

		// Actions (Composite)
		//
		Action dialCompositeAction11 = new CompositeActionImpl(Arrays.asList(new Action[] { startDialTone, resetDialedNumber, waitForIncomingMessage }));
		Action dialCompositeAction12 = new CompositeActionImpl(Arrays.asList(new Action[] { startRingingLocal, waitForIncomingMessage }));
		//
		Action dialCompositeAction21 = new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, haveDialedDigit, waitForIncomingMessage }));
		Action dialCompositeAction22 = new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, sendOutgoingRequest, waitForIncomingMessage }));
		Action dialCompositeAction23 = new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, waitForIncomingMessage }));
		//
		Action dialCompositeAction31 = new CompositeActionImpl(Arrays.asList(new Action[] { haveDialedDigit, waitForIncomingMessage }));
		Action dialCompositeAction32 = new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, sendOutgoingRequest, waitForIncomingMessage }));
		//
		Action dialCompositeAction41 = new CompositeActionImpl(Arrays.asList(new Action[] { startRingingRemote, waitForIncomingMessage }));
		Action dialCompositeAction42 = new CompositeActionImpl(Arrays.asList(new Action[] { startBusyTone, waitForIncomingMessage }));
		Action dialCompositeAction43 = new CompositeActionImpl(Arrays.asList(new Action[] { startRejectTone, waitForIncomingMessage }));
		//
		Action dialCompositeAction51 = new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, waitForIncomingMessage }));
		//
		Action dialCompositeAction61 = new CompositeActionImpl(Arrays.asList(new Action[] { stopRingingLocal, waitForIncomingMessage }));
		Action dialCompositeAction62 = new CompositeActionImpl(Arrays.asList(new Action[] { stopRingingRemote, waitForIncomingMessage }));
		Action dialCompositeAction63 = new CompositeActionImpl(Arrays.asList(new Action[] { stopRingingRemote, waitForIncomingMessage }));
		//
		Action dialCompositeAction71 = new CompositeActionImpl(Arrays.asList(new Action[] { sendOutgoingRelease, waitForIncomingMessage }));
		Action dialCompositeAction72 = new CompositeActionImpl(Arrays.asList(new Action[] { startReleasedTone, waitForIncomingMessage }));
		//
		Action dialCompositeAction81 = new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, waitForIncomingMessage }));

		// Transitions
		//
		stateAfterInit.addTransition(okEvent, stateIdle, waitForIncomingMessage);
		stateAfterInit.addTransition(errorEvent, null, terminateTheProgram);
		//
		stateIdle.addTransition(offhookEvent, stateDialingFirst, dialCompositeAction11);
		stateIdle.addTransition(requestEvent, stateRinging, dialCompositeAction12);
		//
		stateDialingFirst.addTransition(digitEvent, stateDialingNext, dialCompositeAction21);
		stateDialingFirst.addTransition(wholeNumberEvent, stateSeizing, dialCompositeAction22);
		stateDialingFirst.addTransition(onhookEvent, stateIdle, dialCompositeAction23);
		//
		stateDialingNext.addTransition(digitEvent, stateDialingNext, dialCompositeAction31);
		stateDialingNext.addTransition(wholeNumberEvent, stateSeizing, dialCompositeAction32);
		//
		stateSeizing.addTransition(acceptEvent, stateRinging, dialCompositeAction41);
		stateSeizing.addTransition(busyEvent, stateSeizingFailed, dialCompositeAction42);
		stateSeizing.addTransition(rejectEvent, stateSeizingFailed, dialCompositeAction43);
		//
		stateSeizingFailed.addTransition(onhookEvent, stateIdle, dialCompositeAction51);
		//
		stateRinging.addTransition(offhookEvent, stateTalking, dialCompositeAction61);
		stateRinging.addTransition(onhookEvent, stateIdle, dialCompositeAction62);
		stateRinging.addTransition(answerEvent, stateTalking, dialCompositeAction63);
		//
		stateTalking.addTransition(onhookEvent, stateIdle, dialCompositeAction71);
		stateTalking.addTransition(releaseEvent, stateReleased, dialCompositeAction72);
		//
		stateReleased.addTransition(onhookEvent, stateIdle, dialCompositeAction81);

		// In-Memory Persister
		//
		List<State<Foo>> states = new LinkedList<State<Foo>>();
		states.add(stateAfterInit);
		states.add(stateIdle);

		MemoryPersisterImpl<Foo> persister = new MemoryPersisterImpl<Foo>(states, stateAfterInit);

		final FSM<Foo> fsm = new FSM<Foo>(persister);

		Foo foo = new Foo();

		// After-Init/Ok -> Idle/waitForIncomingMessage
		//
		State<Foo> state = fsm.onEvent(foo, okEvent);
	}
}

I find very heavy to create composite action before.
Is it possible to create them on fly ?

You can always implement your own Composite Action to do what you want - you don't have to use the provided CompositeActionImpl.  Just make yours implement the Action Interface
In fact you don't have to decompose the actions like it's expressed in the problem statement - it's really up to you on how you want to implement/compose the Actions.  All StatefulJ needs is an object that implements the Action interface

Can you give me an example please ?

Sorry, I didn't see your example of "creating on the fly" - yes you can do it like that if you want.

The "on the fly" is working. Cool!
I don't understand how to use your factory "statefulj" ?
Here is the FSM I want to implement:
After-Init:
    (--) Ok                           -> Idle
          + Wait-For-Incoming-Message
    (--) Error                        ->
          + Terminate-The-Program

Idle:
    (--) Offhook                      -> Dialing-First
          + Start-Dial-Tone
          + Reset-Dialed-Number
          + Wait-For-Incoming-Message
    (--) Request                      -> Ringing
          + Start-Ringing-Local
          + Wait-For-Incoming-Message

Dialing-First:
    (--) Digit                        -> Dialing-Next
          + Stop-Local-Tones
          + Have-Dialed-Digit
          + Wait-For-Incoming-Message
    (--) Whole-Number                 -> Seizing
          + Stop-Local-Tones
          + Send-Outgoing-Request
          + Wait-For-Incoming-Message
    (--) Onhook                       -> Idle
          + Stop-Local-Tones
          + Wait-For-Incoming-Message

Dialing-Next:
    (--) Digit                        -> Dialing-Next
          + Have-Dialed-Digit
          + Wait-For-Incoming-Message
    (--) Whole-Number                 -> Seizing
          + Stop-Local-Tones
          + Send-Outgoing-Request
          + Wait-For-Incoming-Message

Seizing:
    (--) Accept                       -> Ringing
          + Start-Ringing-Remote
          + Wait-For-Incoming-Message
    (--) Busy                         -> Seize-Failed
          + Start-Busy-Tone
          + Wait-For-Incoming-Message
    (--) Reject                       -> Seize-Failed
          + Start-Reject-Tone
          + Wait-For-Incoming-Message

Seize-Failed:
    (--) Onhook                       -> Idle
          + Stop-Local-Tones
          + Wait-For-Incoming-Message

Ringing:
    !  Events from local phone
    (--) Offhook                      -> Talking
          + Stop-Ringing-Local
          + Wait-For-Incoming-Message
    (--) Onhook                       -> Idle
          + Stop-Ringing-Remote
          + Wait-For-Incoming-Message
    !  Event from remote phone
    (--) Answer                       -> Talking
          + Stop-Ringing-Remote
          + Wait-For-Incoming-Message

Talking:
    !  Event from local phone
    (--) Onhook                       -> Idle
          + Send-Outgoing-Release
          + Wait-For-Incoming-Message
    !  Event from remote phone
    (--) Release                      -> Released
          + Start-Released-Tone
          + Wait-For-Incoming-Message

Released:
    (--) Onhook                       -> Idle
          + Stop-Local-Tones
          + Wait-For-Incoming-Message

Defaults:
    (--) Onhook                       -> Idle
          + Wait-For-Incoming-Message

And here is my work for the moment:
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

import org.statefulj.fsm.FSM;
import org.statefulj.fsm.TooBusyException;
import org.statefulj.fsm.model.Action;
import org.statefulj.fsm.model.State;
import org.statefulj.fsm.model.impl.CompositeActionImpl;
import org.statefulj.fsm.model.impl.StateImpl;
import org.statefulj.persistence.memory.MemoryPersisterImpl;

public class App {

	public static void main(String[] args) throws TooBusyException {

		// States
		//
		final State<Foo> stateAfterInit = new StateImpl<Foo>("After-Init");
		final State<Foo> stateIdle = new StateImpl<Foo>("Idle");
		final State<Foo> stateDialingFirst = new StateImpl<Foo>("Dialing-First");
		final State<Foo> stateDialingNext = new StateImpl<Foo>("Dialing-Next");
		final State<Foo> stateSeizing = new StateImpl<Foo>("Seizing");
		final State<Foo> stateSeizingFailed = new StateImpl<Foo>("Seize-Failed");
		final State<Foo> stateRinging = new StateImpl<Foo>("Ringing");
		final State<Foo> stateTalking = new StateImpl<Foo>("Talking");
		final State<Foo> stateReleased = new StateImpl<Foo>("Released");
		final State<Foo> stateDefaults = new StateImpl<Foo>("Defaults", true);

		// Events
		//
		String acceptEvent = "Accept";
		String answerEvent = "Answer";
		String busyEvent = "Busy";
		String digitEvent = "Digit";
		String errorEvent = "Error";
		String offhookEvent = "Offhook";
		String okEvent = "Ok";
		String onhookEvent = "Onhook";
		String requestEvent = "Request";
		String rejectEvent = "Reject";
		String releaseEvent = "Release";
		String wholeNumberEvent = "Whole-Number";
		String terminateEvent = "Terminate";

		// Actions
		//
		Action haveDialedDigit = new HaveDialedDigitAction();
		Action resetDialedNumber = new ResetDialedNumberAction();
		Action sendOutgoingRequest = new SendOutgoingRequestAction();
		Action sendOutgoingRelease = new SendOutgoingReleaseAction();
		Action startRingingLocal = new StartRingingLocalAction();
		Action startRingingRemote = new StartRingingRemoteAction();
		Action startReleasedTone = new StartReleasedToneAction();
		Action startRejectTone = new StartRejectToneAction();
		Action startBusyTone = new StartBusyToneAction();
		Action startDialTone = new StartDialToneAction();
		Action stopLocalTones = new StopLocalTonesAction();
		Action stopRingingLocal = new StopRingingLocalAction();
		Action stopRingingRemote = new StopRingingRemoteAction();
		Action waitForIncomingMessage = new WaitForIncomingMessageAction();
		Action terminateTheProgram = new TerminateTheProgramAction();

		// Transitions
		//
		stateAfterInit.addTransition(okEvent, stateIdle, waitForIncomingMessage);
		stateAfterInit.addTransition(errorEvent, null, terminateTheProgram);
		//
		stateIdle.addTransition(offhookEvent, stateDialingFirst, new CompositeActionImpl(Arrays.asList(new Action[] { startDialTone, resetDialedNumber, waitForIncomingMessage })));
		stateIdle.addTransition(requestEvent, stateRinging, new CompositeActionImpl(Arrays.asList(new Action[] { startRingingLocal, waitForIncomingMessage })));
		//
		stateDialingFirst.addTransition(digitEvent, stateDialingNext, new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, haveDialedDigit, waitForIncomingMessage })));
		stateDialingFirst.addTransition(wholeNumberEvent, stateSeizing, new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, sendOutgoingRequest, waitForIncomingMessage })));
		stateDialingFirst.addTransition(onhookEvent, stateIdle, new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, waitForIncomingMessage })));
		//
		stateDialingNext.addTransition(digitEvent, stateDialingNext, new CompositeActionImpl(Arrays.asList(new Action[] { haveDialedDigit, waitForIncomingMessage })));
		stateDialingNext.addTransition(wholeNumberEvent, stateSeizing, new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, sendOutgoingRequest, waitForIncomingMessage })));
		//
		stateSeizing.addTransition(acceptEvent, stateRinging, new CompositeActionImpl(Arrays.asList(new Action[] { startRingingRemote, waitForIncomingMessage })));
		stateSeizing.addTransition(busyEvent, stateSeizingFailed, new CompositeActionImpl(Arrays.asList(new Action[] { startBusyTone, waitForIncomingMessage })));
		stateSeizing.addTransition(rejectEvent, stateSeizingFailed, new CompositeActionImpl(Arrays.asList(new Action[] { startRejectTone, waitForIncomingMessage })));
		//
		stateSeizingFailed.addTransition(onhookEvent, stateIdle, new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, waitForIncomingMessage })));
		//
		stateRinging.addTransition(offhookEvent, stateTalking, new CompositeActionImpl(Arrays.asList(new Action[] { stopRingingLocal, waitForIncomingMessage })));
		stateRinging.addTransition(onhookEvent, stateIdle, new CompositeActionImpl(Arrays.asList(new Action[] { stopRingingRemote, waitForIncomingMessage })));
		stateRinging.addTransition(answerEvent, stateTalking, new CompositeActionImpl(Arrays.asList(new Action[] { stopRingingRemote, waitForIncomingMessage })));
		//
		stateTalking.addTransition(onhookEvent, stateIdle, new CompositeActionImpl(Arrays.asList(new Action[] { sendOutgoingRelease, waitForIncomingMessage })));
		stateTalking.addTransition(releaseEvent, stateReleased, new CompositeActionImpl(Arrays.asList(new Action[] { startReleasedTone, waitForIncomingMessage })));
		//
		stateReleased.addTransition(onhookEvent, stateIdle, new CompositeActionImpl(Arrays.asList(new Action[] { stopLocalTones, waitForIncomingMessage })));

		// In-Memory Persister
		//
		List<State<Foo>> states = new LinkedList<State<Foo>>();
		states.add(stateAfterInit);
		states.add(stateIdle);

		MemoryPersisterImpl<Foo> persister = new MemoryPersisterImpl<Foo>(states, stateAfterInit);

		final FSM<Foo> fsm = new FSM<Foo>(persister);

		Foo foo = new Foo();

		// After-Init/Ok -> Idle/waitForIncomingMessage
		//
		State<Foo> state = fsm.onEvent(foo, okEvent);
	}
}

What I'm suggesting that instead typing new CompositeActionImpl(Arrays.asList(new Action[]... over and over, you can simplify by adding the following method to the App class:
private Action buildComposite(Action actions...) {
   return new CompositeActionImpl(Arrays.asList(actions));
}

Then your code simplifies a bit:
stateTalking.addTransition(releaseEvent, stateReleased, buildComposite(startReleasedTone, waitForIncomingMessage));
```

	// Composite actions factory
	private static Action buildComposite(Action... actions) {
		return new CompositeActionImpl(Arrays.asList(actions));
	}

Yes, it is a bit simpler "statefulj" !
		// Transitions
		//
		stateAfterInit.addTransition(okEvent, stateIdle, waitForIncomingMessage);
		stateAfterInit.addTransition(errorEvent, null, terminateTheProgram);
		//
		stateIdle.addTransition(offhookEvent, stateDialingFirst, buildComposite(startDialTone, resetDialedNumber, waitForIncomingMessage));
		stateIdle.addTransition(requestEvent, stateRinging, buildComposite(startRingingLocal, waitForIncomingMessage));
		//
		stateDialingFirst.addTransition(digitEvent, stateDialingNext, buildComposite(stopLocalTones, haveDialedDigit, waitForIncomingMessage));
		stateDialingFirst.addTransition(wholeNumberEvent, stateSeizing, buildComposite(stopLocalTones, sendOutgoingRequest, waitForIncomingMessage));
		stateDialingFirst.addTransition(onhookEvent, stateIdle, buildComposite(stopLocalTones, waitForIncomingMessage));
		//
		stateDialingNext.addTransition(digitEvent, stateDialingNext, buildComposite(haveDialedDigit, waitForIncomingMessage));
		stateDialingNext.addTransition(wholeNumberEvent, stateSeizing, buildComposite(stopLocalTones, sendOutgoingRequest, waitForIncomingMessage));
		//
		stateSeizing.addTransition(acceptEvent, stateRinging, buildComposite(startRingingRemote, waitForIncomingMessage));
		stateSeizing.addTransition(busyEvent, stateSeizingFailed, buildComposite(startBusyTone, waitForIncomingMessage));
		stateSeizing.addTransition(rejectEvent, stateSeizingFailed, buildComposite(startRejectTone, waitForIncomingMessage));
		//
		stateSeizingFailed.addTransition(onhookEvent, stateIdle, buildComposite(stopLocalTones, waitForIncomingMessage));
		//
		stateRinging.addTransition(offhookEvent, stateTalking, buildComposite(stopRingingLocal, waitForIncomingMessage));
		stateRinging.addTransition(onhookEvent, stateIdle, buildComposite(stopRingingRemote, waitForIncomingMessage));
		stateRinging.addTransition(answerEvent, stateTalking, buildComposite(stopRingingRemote, waitForIncomingMessage));
		//
		stateTalking.addTransition(onhookEvent, stateIdle, buildComposite(sendOutgoingRelease, waitForIncomingMessage));
		stateTalking.addTransition(releaseEvent, stateReleased, buildComposite(startReleasedTone, waitForIncomingMessage));
		//
		stateReleased.addTransition(onhookEvent, stateIdle, buildComposite(stopLocalTones, waitForIncomingMessage));

Now, is it possible to group all these actions in a single Action class ?
        // Actions
        //
        Action haveDialedDigit = new HaveDialedDigitAction();
        Action resetDialedNumber = new ResetDialedNumberAction();
        Action sendOutgoingRequest = new SendOutgoingRequestAction();
        Action sendOutgoingRelease = new SendOutgoingReleaseAction();
        Action startRingingLocal = new StartRingingLocalAction();
        Action startRingingRemote = new StartRingingRemoteAction();
        Action startReleasedTone = new StartReleasedToneAction();
        Action startRejectTone = new StartRejectToneAction();
        Action startBusyTone = new StartBusyToneAction();
        Action startDialTone = new StartDialToneAction();
        Action stopLocalTones = new StopLocalTonesAction();
        Action stopRingingLocal = new StopRingingLocalAction();
        Action stopRingingRemote = new StopRingingRemoteAction();
        Action waitForIncomingMessage = new WaitForIncomingMessageAction();
        Action terminateTheProgram = new TerminateTheProgramAction();
```java

You can but why do you want to?  Looks like in your assignment, there isn't a requirement for a"Uni-Action" that combines everything.

In some case, it would be interesting to group actions. And I don't know how to do that.

Just create another CompositeActionImpl with the Actions you want to group.
Am I missing something?

Oh no ! Excuse me. I don't explain clearly.
What I want to know is if it is possible to group actions in one class and call them individually.
Something like that with an Action class "MyClassAction" for example:
Action haveDialedDigit = new MyClassAction("Have-Dialed-Digit");
Action resetDialedNumber = new MyClassAction("Reset-Dialed-Number");
Action sendOutgoingRequest = new MyClassAction("Send-Outgoing-Request");

Sure - just make sure your MyClassAction implements the Action interface

Is it something like that ?
import org.statefulj.fsm.RetryException;
import org.statefulj.fsm.model.Action;

public class MyClassAction implements Action {

	private String actionName;

	public MyClassAction(String actionName) {
		this.actionName = actionName;
	}

	public void execute(Object stateful, String event, Object... args) throws RetryException {
		if ("Have-Dialed-Digit".equals(actionName)) {
			execute1(stateful, event, args);
		}
		if ("Reset-Dialed-Number".equals(actionName)) {
			execute2(stateful, event, args);
		}
		if ("Send-Outgoing-Request".equals(actionName)) {
			execute3(stateful, event, args);
		}
	}

	private void execute1(Object stateful, String event, Object[] args) {
		// TODO Auto-generated method stub
	}

	private void execute2(Object stateful, String event, Object[] args) {
		// TODO Auto-generated method stub
	}

	private void execute3(Object stateful, String event, Object[] args) {
		// TODO Auto-generated method stub
	}
}

I will try this.

Something strange when hit the third event:
		// Drive the FSM with a series of events
		//
		fsm.onEvent(foo, okEvent);
		fsm.onEvent(foo, offhookEvent);
		fsm.onEvent(foo, digitEvent);
```java

I get that:

00:17:21.287 [main] DEBUG org.statefulj.fsm.FSM - FSM(Foo)::After-Init(Ok)->Idle/telephone.MyClassAction@77827284
stopRingingRemote
00:17:21.345 [main] DEBUG org.statefulj.fsm.FSM - FSM(Foo)::Idle(Offhook)->Dialing-First/org.statefulj.fsm.model.impl.CompositeActionImpl@624b035d
startDialTone
resetDialedNumber
stopRingingRemote
00:17:21.346 [main] DEBUG org.statefulj.fsm.FSM - FSM(Foo)::After-Init(Digit)->After-Init/noop

It's wrong !?

Please print out the state value of foo between each of the onEvent calls

Many thanks "statefulj".
Iforgot to complete the list of states to alimente persister.
Now it's okay.
00:41:49.281 [main] DEBUG org.statefulj.fsm.FSM - FSM(Foo)::After-Init(Ok)->Idle/telephone.MyClassAction@2321ab80
stopRingingRemote
state=State[name=Idle, isEndState=false, isBlocking=false]
00:41:49.400 [main] DEBUG org.statefulj.fsm.FSM - FSM(Foo)::Idle(Offhook)->Dialing-First/org.statefulj.fsm.model.impl.CompositeActionImpl@7cf1bb78
startDialTone
resetDialedNumber
stopRingingRemote
state=State[name=Dialing-First, isEndState=false, isBlocking=false]
00:41:49.402 [main] DEBUG org.statefulj.fsm.FSM - FSM(Foo)::Dialing-First(Digit)->Dialing-Next/org.statefulj.fsm.model.impl.CompositeActionImpl@624b035d
stopLocalTones
haveDialedDigit
stopRingingRemote
state=State[name=Dialing-Next, isEndState=false, isBlocking=false]

whew
This has been quite a journey :-)

Yes !
But now I can understand how to use StatefulJ :)
Thank you "statefulj".


Parse and translate country

I'm working on an app that's a part of an existing system, where only the name of the country is stored in the database. I would like to be able to parse and translate this string to the localized name of the country, so that I can show the previously selected country in the app.
This is my take on a solution, and I wondered if this is something you would want to add to the package, since the package already provides the translations.
There are some things in there that may not be optimal, like the duplication of supported locale and mapping of translation files (see the ToDos). There may be some solution to this, but these methods are currently private or in another way not accessible inside the CountryLocalizations class. I also guess that the wrong country may be returned if two languages uses the same word for different countries. I have no idea if that might be the case.
I've ran the worst case scenario parsing, and it seems like it takes about half a millisecond on average over 100.000 runs on my Samsung Galaxy S10+. I'm guessing that we might see a couple of milliseconds of parse time on an older device, and more if a lot of translations are added down the line. There are probably some ways to make it more efficient, but i thought that the current solution is the most user friendly. It's probably best to leave the parsing out of the build method anyways.
Tips for changes and improvements are welcome.

@tverra Thank you for the PR, I will review it on the weekend.

@tverra You are right, are some things in there that may not be optimal but I thing we can add this to the package and try to fix them in a future version.

@tverra v2.0.4 is released


Can't find variable: WebViewJavascriptBridge,

Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: WebViewJavascriptBridge, WKJavaScriptExceptionSourceURL=https://www.fxiaoke.com/fsh5/form/5.4/index.html?fs_nav_fsmenu=false&fs_nav_title=#/forms/172078080536576000?url=https%3A%2F%2Fwww.fxiaoke.com%2Ffsh5%2Fithelpdesk%2F5.4%2Findex.html%3Ffs_nav_fsmenu%3Dfalse%23%2Fresult%3FappId%3DFSAID_1314034&notitle=1, NSLocalizedDescription=发生 JavaScript 异常, WKJavaScriptExceptionColumnNumber=24

this error sometimes occurs,can somebody give me a glue

Hi,
Please create a PR with a failing test case.
Try latest WVJB version 6.0.3 and feel free to reopen if you're still having issues.
Thanks!

Hi,
Please create a PR with a failing test case.
Try latest WVJB version 6.0.3 and feel free to reopen if you're still having issues.
Thanks!

+1


Onzestadapp.be proxy

https://onzestadapp.be/xxx doesn't redirect to https://ourcityapps.com/xxx, it just redirects to https://ourcityapps.com.
Eg. https://onzestadapp.be/aanvraag-demo-stad (which is the href of the "vraag stads-demo aan" button on our main page. I tried to update it to /aanvraag-demo-stad, but couldn't find where to update it.)

I was able to update the button on our main page.


[Issue] Module disables itself and half of the time it says that it cannot be enabled due to issue in required dependency

Sorry for the long title, but it clears the issue.
So basically most of the time when i log into the campaign i find the module disabled...if i try to "enable" it it says "Cannot enable due to issue in required dependency....BUT if i try to re update all modules (which find no updates) and try again then i can enable it.
This happens each time i log in...altho lately it does not work either way.
Any idea why is this?
If you need any sort of info i will happily oblige.

Problem seems to be somewhat resolved for now after i reinstalled all the modules, will report if the issue repeats itself after various restarts and sessions.

@Liviu50 The only module Party Resources is dependent on is Azzurite's settings extender module. Its latest release was 6 hours ago at the time of writing, and I see it's Foundry 11 compatible now. It might be your issue got resolved when it got updated.
Foundry 11 made a mess of a couple of things, but it's slowly starting to clear up.

oh i see. makes sense now, kept going off on its own and at times not working anymore.
ill try for a few more session and come back with new info. if the new version resolved everything ill simply closed the issue :) thx.

ok seems that the module stopped becoming off on its own and work properly after the last update from the settings extender. cheers!


Add: logseq-bonofix-theme

Submit a new Plugin to Marketplace
Plugin Github repo URL: https://github.com/Sansui233/logseq-bonofix-theme
Github releases checklist

[x] a valid CI workflow for Github releases. (Optional for theme plugin only)
[x] a legal package.json file.
[x] a clear README file.
[x] a license in the LICENSE file.

@Sansui233 Can't wait for it 🤣 .  The new logo is too beautiful!

Thanks! Aftering knowing about the market place I think I can't be so casual on the icon, so I take some time to make a new logo😂


update: fixed analytics

This PR introduces some fixes on the instrumentation code.

Adds and converts accepted_transaction_counter to UpDownCounter.
Registers response time in milliseconds instead of microseconds

Could you please add some clarifying information as to what this PR fixes? Also, I have had issues getting the Signoz dashboard running locally, is this pr related?

This PR is not related to Signoz.


sample_weight crashes the interpreter

Hi all,
today I encountered an issue with xgboost that crashed my python interpreter. I tried to  train a multi-class classifier with a sparse matrix. Without sample_weight, the process goes fine. When I set the parameter to the weights that I generated using sklearn.utils.class_weight, It crashed the interpreter.
Here's a sample code:
class_weights = list(class_weight.compute_class_weight('balanced', np.unique(y), y))
# X is a sparse csr_matrix
X_train, X_test, Y_train, Y_test = train_test_split(X, y, test_size=0.15, random_state=1338)

xgb = XGBClassifier(n_estimators=2000, max_depth=12,
                    objective='multi:softprob', nthread=4,
                    seed=1338, gamma=5.5, learning_rate=0.0001,
                   colsample_bytree=0.5, subsample=0.5,
                   num_class=len(np.unique(Y_train))

xgb.fit(X_train, Y_train, sample_weight=class_weights)

I'm thinking it could be due to the train test split, which could remove some low-occurrence classes and then we get a size mismatch - however this should not crash the interpreter. I will update the issue as I get more information.

@kjanko Could you please provide a self-contained script?

Also XGBoost version.

from xgboost.sklearn import XGBClassifier
from scipy import sparse, stats
from scipy.sparse import dok_matrix, csr_matrix, vstack
import numpy as np
from sklearn.utils import class_weight
test_mtx = dok_matrix((10, 10), dtype=np.int)

test_mtx[0, 1] += 1
test_mtx[1, 4] += 3
test_mtx[2, 3] += 7
test_mtx[3, 7] += 5
test_mtx[4, 8] += 5
test_mtx[5, 5] += 5
test_mtx[6, 2] += 5
test_mtx[7, 9] += 5
test_mtx[8, 7] += 15
test_mtx[9, 2] += 21

y = [1, 2, 3, 4, 1, 2, 2, 5, 1, 1]

xgb = XGBClassifier(n_estimators=2000, max_depth=12,
                    objective='multi:softprob', nthread=4,
                    seed=1338, gamma=5.5, learning_rate=0.0001,
                   colsample_bytree=0.5, subsample=0.5,
                   num_class=len(np.unique(y)))

class_weights = list(class_weight.compute_class_weight('balanced', np.unique(y), y))

xgb.fit(test_mtx, y, sample_weight=class_weights)

Here is a minimal, reproducible example.
This is the error

Kernel error:
In: c:\users\administrator\desktop\xgboost\include\xgboost../../src/common/span.h,     line: 489
const float &xgboost::common::Span<const float, -1LL>::operator[]<>(long long) const
Expecting: _idx >= 0 && _idx < size()

Version 0.82

@kjanko The weight is per-instance instead of per-class.  Will add a check for that for better diagnostic message.

@trivialfis I see - although it still shouldn't crash the interpreter but return an error message.

#4872 .

It should not crash though, seems to be multiple exceptions being thrown due to OpenMP loop.

@trivialfis All exceptions must not be allowed to escape OpenMP regions. Any uncaught exception inside OpenMP loops will cause the whole program to crash. See https://software.intel.com/en-us/blogs/2009/11/05/openmp-and-exceptions.
DMLC-Core offers a wrapper called dmlc::OMPException ((link)[https://github.com/dmlc/dmlc-core/blob/d06aceb92be200c9649258da726be6bb8e4d6556/include/dmlc/common.h#L53-L87]), where all exceptions are caught inside the OpenMP region and stored in a class variable.
Usage:
dmlc::OMPException omp_exc;
#pragma omp parallel for num_threads(nthread)
for (int i = 0; i < n; ++i) {
  omp_exc.Run([&] {
    // Loop body goes here
  });
}
omp_exc.Rethrow();

See (here)[https://github.com/apache/incubator-mxnet/blob/c6bb2cec919851afa04dbeda96bc1cab588c0fba/src/io/iter_image_recordio_2.cc#L346-L362] for an example of dmlc::OMPException in the MXNet codebase.

@hcho3 Thanks for the pointer.  Let me see how can I put it into our Transfrom function.

Can we close this now?


bug: Ionic Package Build Android

Type: bug
Ionic Version: 2.x
Platform: android 5.0 webview
Attempting to set app name
Setting App Name:  Törökbálint Ma
ANDROID_HOME=/usr/local/src/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.

What went wrong:
A problem occurred configuring root project 'android'.

You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

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

BUILD FAILED
Total time: 1.897 secs
Error: /home/package/workspace/apps-54624e0c-168/cordova/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

What went wrong:
A problem occurred configuring root project 'android'.

You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

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

This issue was moved to ionic-team/ionic-cli#2381


PIP-0007 Discussion - New Wallet GUI

Displaying the public key for each account could be usefull, especially if the public key is searchable. For example when users only know the public key but not the associated account number. This could be an extra column, Which could conventiently be re-sized or put in the back or disabled via a pop-up menu to select which columns to display.

This feature would require the grid to only load accounts into the grid for a certain range. Since converting public key's from binary to text takes a lot of computations.
(I would also like to see this feature in PascalCoin "current/complex" wallet.

I would like to see the account number and account checksum code either seperated into seperate columns. Or the -10 removed. I assume the -10 is a checksum.

Currently it looks like it's displaying some kind of aggretiate... a range from 0 to 10.
So 0-10 looks like it means account range 0 to 10. This is very deceptive and confusing to new users ! And even experienced users !

I believe it would also be a good idea to create an option that we choose minimization to tray or default standard minimization.


[opencolorio] installs incorrect CMake file

Installing opencolorio on Windows-64 installed these cmake files:
./installed/x64-windows/share/opencolorio/OpenColorIO-debug.cmake
./installed/x64-windows/share/opencolorio/OpenColorIO-release.cmake
./installed/x64-windows/share/opencolorio/OpenColorIO.cmake
But trying to use the package with find_package(OpenColorIO) looks for [ OpenColorIOConfig.cmake, opencolorio-config.cmake, or FindOpenColorIO.cmake ] according to CMake's output.  As a result, CMake fails to find the package.
Additionally, the instructions after a successful install say to use "opencolorio" with find_package(), but the cmake files on disk are named "OpenColorIO" with upper case letters.
Proposed solution
The .cmake files installed by installing the package should follow the persnickety naming rules of CMake.

Thanks again!

Thanks again!


Last activity time is not in sync with device twin information displayed in portal when using query language to perform a get all operation.

When trying to fetch all device twin entities using the recommended:
RegistryManger.CreateQuery() from the SDK.
Every retrieved fields seems to be in sync with the device twin information displayed in the azure portal device twin page except for the ["Last Activity Time"] which can be off by a couple of minutes.
Note: sometimes the values do match but gets offset later on.
However using the obsolete route
RegistryManager.GetDevicesAsync()  seems to be working flawlessly and as expected except it's obsolete.
  // old flow to get all devices
    var deprecatedGetAllDevicesRoute = await m_registryManager.GetDevicesAsync(1000);

   // this device will have Last Activity Time that is the same as the one we see in the device twin viewer
    Device specificDeviceFromOldRoute = deprecatedGetAllDevicesRoute.First(x => x.Id == "G13774100112221912A1");

    // new flow as recommended to get all devices
    var query = "SELECT * FROM devices";
    IQuery deviceTwinQuery = m_registryManager.CreateQuery(query);

    IEnumerable<Twin> newRoutesDevices = await deviceTwinQuery.GetNextAsTwinAsync();

    // this device may or may not have a Last Activity Time that is often behind the device twin viewer.
    Twin specificDeviceFromNewRoute = newRoutesDevices.ToList().First(x => x.DeviceId == "G13774100112221912A1");

   ...

This can easily be reproduce using the device twin watcher on a specific device and the query manager in the portal. Just need to have a device that pokes the iothub device at a constant rhythm and take a look at the retrieved values by pressing refresh (may take a couple of times, but at some point there is a discrepancy between the results of the query and the value from the device twin which do not happen with the obsolete route.).
For some reason, only the ["Last Activity Time"] seems to impacted. Other changes, are immediate
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c58bc573-ec3e-ed94-900d-1163a5700750
Version Independent ID: d83c0073-4a03-f46b-1855-4101b040d92c
Content: Understand the Azure IoT Hub query language
Content Source: articles/iot-hub/iot-hub-devguide-query-language.md
Service: iot-hub
GitHub Login: @kgremban
Microsoft Alias: kgremban

Hello @yvy777
Please send an email to<EMAIL_ADDRESS>with the below details, so that we can work closely on this matter.
Thread URL: Link to this thread.
Your Azure Subscription ID:
Email Subject : Attn Satish Boddu
Please let me know once you have done the same

Hi! you should have recevied an email i think. if something went wrong please tell me :)

Thank you we have received the email.

As we are working offline on this issue, we will come back later to update the status on this issue.
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.
Please also do visit Microsoft Q&A the home for technical questions and answers at Microsoft.


Remove metadata to a project that is already in the Archives

Same rationale as #55 but for the archives
Reasons to remove metadata after submission, due retraction of project or part of project if any sort of problem with it being public:
Data consent/privacy problem
Incorrect data identified later
Incorrect metadata identified until it’s resolved
Poor quality of either data and metadata, which doesn’t produce trustworthy dataset
Any other concern contributor may have

Story sliced the wrong way. Closing, and will re-think this.


Initial Implementation of RSC

Summary
This is an initial implementation of React Server Components (RSC). In this PR:

I add the necessary code to render to the RSC wire format using Node.js Streams.
I add a hook useRSC() and a React Component that extends react-router-dom's Route named RSCRoute to be used to route to RSC components.
I make sure to separate Server and Client functions because sometimes Server code requires somethings only available to Node.

Related to
https://github.com/shakacode/react_on_rails_pro/pull/346
Pull Request checklist
Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by ~.

[ ] Add/update test to cover these changes
[ ] Update documentation
[ ] Update CHANGELOG file
Add the CHANGELOG entry at the top of the file.

Other Information
Remove this paragraph and mention any other important and relevant information such as benchmarks.

This change is

Is this PR ready for review? If yes, May you please update the description to reflect the state of the PR?

@KhaledEmaraDev close this one?

@justin808 No, it's needed for the Pro version to work. I think it could be accepted as-is. I will not introduce new changes to it.


subscriptions on post comments

This is an initial draft how I am able to get CREATED, UPDATED, DELETED subscriptions working on post comments.
@vlasenko If you have some time, any feedback would be welcome.
Current TODO planed:

move code from subscriptions.js into separate file, like for schema and resolvers
figure out how to filter subscriptions if new comments are added (currently no filter is applied)
retrieve proper previousValue for UPDATED and DELETED (currently not really used, except for delete id)
make mutation field enum

@mitjade As a first iteration looks good to me. But feels like giving more thought to subscription logic might be needed to come up with more expressive solution.

Agreed. So for now, I will clean up a bit this approach and push. Later on we can improve on this.

@mitjade Yes, thank you Mitja, sounds great!

Comment subscriptions are now filtered by postId, extracted subscriptions into separate file and removed unused previousValue and replaced it with id needed for DELETE mutation.

Cool! Thank you Mitja!


Unable to install due to hard dependency on PyYAML ==3.13

After a project failed to install, with this warning:
Warning!!! Possibly conflicting dependencies found:
* moto==1.3.9
 - PyYAML [required: ==3.13, installed: 5.1.1]

I created a new virtual environment and installed python3.
then ran pip install pipdeptree and pip install moto.
then ran pipdeptree --packages moto to confirm that the pyyaml is set to 3.13.

The full output is in the attached file.
System Info
OS:   Windows 10, 1809
Python: Python 3.7.3,  from miniconda on a fresh virtual environment
Attached is a copy of the pipdeptree output.
moto_depends.txt

Additional note:   I just tried version 1.3.8. and PyYAML version is Any

I see this was fixed in an earlier commit, just not packed to pypi yet.


feat: support deepseek client

@sigoden
Sorry for such odd question, but I've been trying to get anthropic Claude Sonnet, OpenAI gpt3.5, and DeepSeek v2.5 to work on the free version with their API, but none of them seem to be working, with insufficient balance. Is that the default behavior, and if so, is there a way around it?


Results missing in engine.queryBindings

I've run into a problem using engine.queryBindings: I don't seem to get as many results back as I should.
I've created a repository with an MWE:
https://github.com/andrefs/quastore-mwe
Basically it loads an N-Triples file with 100 triples to a LevelDB db using quadstore. Then it queries them with SELECT * WHERE { ?s ?p ?o }. I only get 1 result back.
This example was boiled down from my initial use case where I was using the full WordNet file and a more complex query.
I'm not sure if this is an actual problem or if I'm doing something wrong (apologies in advance if that's the case).
If there is indeed a bug, I don't know if it is caused by quadstore, quadstore-comunica or even classic-level.
Please let me know if there's any more information that I can provide.

Hi @andrefs ! The problem in your code is that you are closing the store before the end of the stream as the await store.close(); sits outside of the callback handler for the end event. Simply move store.close() into the handler and you'll get all quads out.

:facepalm: Thanks! and sorry for opening the issue :sweat:

No worries :)


How to publish the Carla project compiled from source code into an executable file

CARLA Version：0.9.14
OS：Ubuntu 20.04
When I run "make package" and "make CarlaUE4Editor," the system return errors.
so, How to publish the Carla project compiled from source code on a Linux system into an executable file, without the need to open the editor every time the project starts？
thanks for your help

Hi,
It dependents of the error.
Can you post the output of the error message and post it here?
The error message can be in between the whole command line output.

You have to follow these steps to build CARLA from source. After compiling with make launch, you can use make package to create the executable package. As @PatrickPromitzer suggests, if you share the errors you get we could have more information on how to solve the problem.


Example of both Transmitting and Receiving  (IDFGH-3149)

Describe the solution you'd like
I would like the esp to do both Transmitting and Receiving of Bluetooth at regular intervals, to see if a device is in the area preferred using Bluetooth LE.  The end result would be to detect if another device is around.
https://github.com/espressif/esp-idf/blob/master/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c
I have seen this question asked before, and do not know if it can do the transmitting and receiving can be done or looping in time to detect both the transmitter and receiver.

Hi, Michaelleuer
I don't quite get your requirement? Do you mean that you want to scan(receiver) and advertising(transmitter) simultaneously?
You can start scan with the duration parameter set to 0 (means scan permanently). You don't need to stop scan if you want to do advertising then. The controller will allocate RF resource for both activities automatically.

So for the iBeacon example you showed, normally you can run the both IBEACON_SENDER mode and IBEACON_RECEIVER mode together.

Ok thank you I will try it out today enabling both today.

@michaelleuer Thanks for reporting, would you please help share if any updates? Thanks.

Worked great.

Thanks for sharing the updates, feel free to reopen.


Add support for EC2 measurement

EC2 launched SEV-SNP support on 2023-04-28 [1]. This patch adds support to regenerate measurements for SEV-SNP guests running in EC2.
Today, sev-snp-measure always expects QEMU's initialization logic and order. But EC2's measurement calculation is not 100% identical with QEMU's. In EC2, we set up tiny bits and pieces of initial register and memory state up differently.
This patch introduces a new EC2 CPU type and enlightens all places that are different to use the EC2 mechanism whe the CPU type is ec2.
[1] https://aws.amazon.com/about-aws/whats-new/2023/04/amazon-ec2-amd-sev-snp/

Thanks @agraf for this addition to support calculating expected measurements of SNP VMs on EC2 (strangely github marks you as a First-time contributor even though you already have a merged PR in this repo...).
I think for now adding these if is_ec2() statements in a couple of places is reasonable. As @fitzthum mentioned, if we end up with more types/flows of measurements for different VMMs (qemu, EC2, EC2-newer-VMM, Google Cloud?, ...), we might need to refactor this somehow so they are better separated. I don't think it's worth doing at the current stage.

A more general question -- how would an EC2 user use this to match a launch digest from their EC2 SNP attestation report? Does AWS publish the OVMF binary EC2 uses? I assume EC2 doesn't use direct kernel boot because the docs say:

The OVMF also finds and runs the boot loader provided in the AMI.

so only OVMF (and VMSAs per vcpu) is included in the measurement.
I also assume that all VMSAs are created and measured up front. For example, for an m6a.2xlarge EC2 instance one would need to specify --vcpus=8 to correctly calculate the expected measurement. Is that indeed the case?

Thanks @agraf for this addition to support calculating expected measurements of SNP VMs on EC2 (strangely github marks you as a First-time contributor even though you already have a merged PR in this repo...).

🤷♂

I think for now adding these if is_ec2() statements in a couple of places is reasonable. As @fitzthum mentioned, if we end up with more types/flows of measurements for different VMMs (qemu, EC2, EC2-newer-VMM, Google Cloud?, ...), we might need to refactor this somehow so they are better separated. I don't think it's worth doing at the current stage.

Yes, I think the only case I'm potentially worried about is what happens when QEMU also moves to an rdx=0 mode? How do we keep differentiating the 2 modes? And would --vcpu-type still be a mandatory option in that world?

A more general question -- how would an EC2 user use this to match a launch digest from their EC2 SNP attestation report? Does AWS publish the OVMF binary EC2 uses? I assume EC2 doesn't use direct kernel boot because the docs say:

Correct, EC2 only supports OVMF boot with SEV-SNP. The OVMF source and reproducibly buildable binaries are public: https://github.com/aws/uefi

The OVMF also finds and runs the boot loader provided in the AMI.

so only OVMF (and VMSAs per vcpu) is included in the measurement.
I also assume that all VMSAs are created and measured up front. For example, for an m6a.2xlarge EC2 instance one would need to specify --vcpus=8 to correctly calculate the expected measurement. Is that indeed the case?

Correct :). The launch measurement contains the initial VMSA content for each vcpu, so you need to specify the correct amount of vcpus that the EC2 instance receives to get a matching measurement.

Let me rework the patch to instead introduce a new --vmm-type parameter. I think that way we're much more future proof.

I looked up the reset state information in the AMD spec and turns out RDX is supposed to contain the family number. So QEMU follows the spec properly.
In EC2, we always provide BIOS/UEFI code, so we don't care. But QEMU has always aimed at implementing things to the spec. So I won't send a patch to remove its setting of RDX on boot.


error running the code: ModuleNotFoundError: No module named 'torch.mps'

Bug description
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-15-a0ddb8f37797>](https://localhost:8080/#) in <cell line: 44>()
     42
     43 # Setting the seed
---> 44 L.seed_everything(42)
     45
     46 # Ensure that all operations are deterministic on GPU (if used) for reproducibility

1 frames
[/usr/local/lib/python3.10/dist-packages/torch/random.py](https://localhost:8080/#) in manual_seed(seed)
     40         torch.cuda.manual_seed_all(seed)
     41
---> 42     return default_generator.manual_seed(seed)
     43
     44

ModuleNotFoundError: No module named 'torch.mps'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

What version are you seeing the problem on?
v1.8
How to reproduce the bug
i was implementing: https://lightning.ai/docs/pytorch/stable/notebooks/course_UvA-DL/05-transformers-and-MH-attention.html
and got error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-15-a0ddb8f37797> in <cell line: 44>()
     42
     43 # Setting the seed
---> 44 L.seed_everything(42)
     45
     46 # Ensure that all operations are deterministic on GPU (if used) for reproducibility

1 frames
/usr/local/lib/python3.10/dist-packages/torch/random.py in manual_seed(seed)
     40         torch.cuda.manual_seed_all(seed)
     41
---> 42     return default_generator.manual_seed(seed)
     43
     44

ModuleNotFoundError: No module named 'torch.mps'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

Error messages and logs
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-15-a0ddb8f37797>](https://localhost:8080/#) in <cell line: 44>()
     42
     43 # Setting the seed
---> 44 L.seed_everything(42)
     45
     46 # Ensure that all operations are deterministic on GPU (if used) for reproducibility

1 frames
[/usr/local/lib/python3.10/dist-packages/torch/random.py](https://localhost:8080/#) in manual_seed(seed)
     40         torch.cuda.manual_seed_all(seed)
     41
---> 42     return default_generator.manual_seed(seed)
     43
     44

ModuleNotFoundError: No module named 'torch.mps'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

Environment

Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
#- Running environment of LightningApp (e.g. local, cloud):

More info
No response

It's not clear to me from your error report where is torch.mps getting imported from. However, you should be able to avoid the error by upgrading to torch>=2.0

I can repro it on kaggle with:
pytorch-ignite                           0.4.12
pytorch-lightning                        1.9.5
pytorch-tabnet                           4.0
pytorch-tabular                          1.0.2
torch                                    1.13.1
torchaudio                               2.0.1+cpu
torchdata                                0.6.0
torchinfo                                1.8.0
torchmetrics                             0.11.4
torchtext                                0.15.1+cpu
torchvision                              0.15.1+cpu

This was fixed with https://github.com/pytorch/pytorch/pull/94417


Is test group class constructor overriding OK ?

Hi, Is it ok to override a constructor of the class created under the TEST_GROUP macro?
I want to create an object that will be shared between test cases and I need to call a specific constructor of that object so to avoid the most vexing parse I need to override the test group class constructor and call my specific object constructor in the initializer list like this:
TEST_GROUP(MyTestGroupName)
{
   SomeClass someObject; // Default constructor of SomeClass is deleted

    TEST_GROUP_CppUTestGroupMyTestGroupName() : someObject(0x1234)
    {
    }

/*
... Other code
*/
};

Is it ok or am I breaking something implicitly?

I think it should be fine. The TEST_GROUP object will be dynamically created and destroyed, so there shouldn't be any scope problems. I personally do not like to use constructors like this and prefer a default constructor in the SomeClass... but that is a different discussion.

Thank's!


forceDelete method

There is a similar method on forceDelete? https://laravel.com/docs/5.4/eloquent#soft-deleting

Yes just call forceDelete

Is this method forceDelete actually available?


update node, nuxt and @nuxtjs/tailwindcss

Node - 18.17.0 LTS
Nuxt - 2.17.0 (Latest release for nuxt 2 version)
@nuxtjs/tailwindcss - 5.3.5 (Latest version avaliable for nuxt 2 version)
What issue is this referencing?
Update node #149
Have you run the linting command in the README.md? [v ] yes! npm run lint-check
Have you taken a look at our contributing guidelines? [ v] yes!
My node version matches the one suggested when running nvm use? [ v] yes!

Thank you so much for doing this!


build: compile for Java 8; enable G1GC on Java 8

The G1GC is way faster and therefore often helps to reduce the memory usage when running Jadx wit Java 8. On Java9+ G1GC is already the default GC, therefore the G1GC flags don't change anything for that runtime platforms.
I had problems when compiling with OpenJDK 11. The created jadx-gui-dev.exe file said it requires Java 11 (and links to the Oracle Java 8 page) but it wasn't able to find the installed OpenJDK 11 version. With compilation target Java 8 it is at least able to find an installed Java 8 JRE.

:tada: This PR is included in version 0.9.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Default Date Set

How can we set the default date value? For instance, when the user loads the page it should show today's date, in whichever format selected, by default.

Ok so this is a little dirty but I got it working with:
//Select default date
$(window ).on('load', function(){

	$('.datepicker-days .selected' ).trigger('click');

} );

It would be great to have an option for this though :]

I agree too. It would be great to have that option.

The default value of a input element is the default date.

@fengyuanchen It would be great if we had an api to manually set the date after the datepicker is intantiated.

You can use autopick option in the v0.2.0 now.


No support for arm64

What happened?
➜  ./videoalchemy
zsh: exec format error: ./videoalchemy
➜  file ./videoalchemy
./videoalchemy: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=PlVDdAcT5MTs2n3-EztI/1myd8kU7lQ5CoEeVqSLJ/5JsYtQUUDikWFcFPQORB/iFxiWiX84cfiHjs8Ypj_, with debug_info, not stripped
➜  uname -a
Darwin macbook-pro 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec  6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000 arm64
What did you expect to happen?
Normal operation
How can we reproduce it (as minimally and precisely as possible)?
run on arm64
Anything else we need to know?
No response
VideoAlchemy version
1.0-RC1
OS
MacOS

@LanYunDev added build of arm64. please download from https://github.com/viddotech/videoalchemy/releases/tag/1.0.0-RC1


ipam: Provide ownership information of IP allocations

Keeps track of who owns an allocated IP and provides it as part of cilium
status:
IPv4 address pool:      13/65535 allocated from <IP_ADDRESS>/16
IPv6 address pool:      13/65535 allocated from f00d::a10:0:0:0/112
Allocated addresses:
  <IP_ADDRESS> (router)
  <IP_ADDRESS> (default/echo-79b5fcd4d9-2qlrn [restored])
  <IP_ADDRESS> (default/probe-7b4494bd59-m5222 [restored])
  <IP_ADDRESS> (default/echo-79b5fcd4d9-vwc6l [restored])
  <IP_ADDRESS> (loopback)
  <IP_ADDRESS> (default/echo-79b5fcd4d9-cfrgn [restored])
  <IP_ADDRESS> (default/echo-79b5fcd4d9-nk9ln [restored])
  <IP_ADDRESS> (health)
  <IP_ADDRESS> (default/probe-7b4494bd59-8rrs2 [restored])
  <IP_ADDRESS> (default/probe-7b4494bd59-whqv8 [restored])
  <IP_ADDRESS> (default/probe-7b4494bd59-pqvx4 [restored])
  <IP_ADDRESS> (default/probe-7b4494bd59-lcd9s [restored])
  <IP_ADDRESS> (default/echo-79b5fcd4d9-bxgw5 [restored])
  f00d::a10:0:0:1 (router)
  f00d::a10:0:0:13ba (default/probe-7b4494bd59-8rrs2 [restored])
  f00d::a10:0:0:19f5 (default/probe-7b4494bd59-m5222 [restored])
  f00d::a10:0:0:2601 (health)
  f00d::a10:0:0:69d6 (default/probe-7b4494bd59-whqv8 [restored])
  f00d::a10:0:0:71 (default/echo-79b5fcd4d9-bxgw5 [restored])
  f00d::a10:0:0:722c (default/probe-7b4494bd59-lcd9s [restored])
  f00d::a10:0:0:8e65 (default/echo-79b5fcd4d9-2qlrn [restored])
  f00d::a10:0:0:ab5e (default/echo-79b5fcd4d9-nk9ln [restored])
  f00d::a10:0:0:b3ec (default/probe-7b4494bd59-pqvx4 [restored])
  f00d::a10:0:0:ca90 (default/echo-79b5fcd4d9-cfrgn [restored])
  f00d::a10:0:0:d8d4 (default/echo-79b5fcd4d9-vwc6l [restored])

This change is

test-me-please

Coverage decreased (-0.05%) to 42.001% when pulling 83712a59532f48c8c8c8d30644b56837747a047d on pr/tgraf/ipam-info into b60d512501f089854e25370fbc6768f20c1656d6 on master.

K8sPolicyTest Basic Test Validate to-entities policies Validate toEntities Cluster failed due to connectivity problem to google.com

test-me-please

test-me-please


AttributeError: 'TransportSocket' object has no attribute 'close'

Exception ignored in: <function _SelectorTransport.del at 0x105807f60>
Traceback (most recent call last):
File<EMAIL_ADDRESS>line 844, in del
self._sock.close()
^^^^^^^^^^^^^^^^
AttributeError: 'TransportSocket' object has no attribute 'close'

The issue will be fixed in the next release of Python 3.11 (release 3.11.7), scheduled for December 4, 2023.


Make the error message for "ERROR failed to fetch remote resource: Forbidden" more useful

At least including the uri in the error message would help the user to figure out which resources they need to fix.
Locally I applied this patch to get some ideas what we have to fix as Twitter gave us some 403.
diff --git a/resources/resource_factories/create/remote.go b/resources/resource_factories/create/remote.go
index c2d17e7a5..9424fc5a0 100644
--- a/resources/resource_factories/create/remote.go
+++ b/resources/resource_factories/create/remote.go
@@ -138,7 +138,7 @@ func (c *Client) FromRemote(uri string, optionsm map[string]any) (resource.Resou

 				if res.StatusCode != http.StatusNotFound {
 					if res.StatusCode < 200 || res.StatusCode > 299 {
-						return nil, temporaryHTTPStatusCodes[res.StatusCode], toHTTPError(fmt.Errorf("failed to fetch remote resource: %s", http.StatusText(res.StatusCode)), res, !isHeadMethod)
+						return nil, temporaryHTTPStatusCodes[res.StatusCode], toHTTPError(fmt.Errorf("failed to fetch remote resource '%s': %s", uri, http.StatusText(res.StatusCode)), res, !isHeadMethod)
 					}
 				}

alternatively the error could bubble up to the caller location to make it easier to find the line location that caused this.
Encountered error "Forbidden" while fetching tweet ...

if we would let it bubble up it would also give the possibility to say "oh if rendering this failed i ignore it" and make the render a noop

updated patch for 0.127.0
diff --git a/resources/resource_factories/create/remote.go b/resources/resource_factories/create/remote.go
index 5f4879dfe..d1cc9ede1 100644
--- a/resources/resource_factories/create/remote.go
+++ b/resources/resource_factories/create/remote.go
@@ -212,7 +212,7 @@ func (c *Client) FromRemote(uri string, optionsm map[string]any) (resource.Resou
 		}

 		if res.StatusCode < 200 || res.StatusCode > 299 {
-			return nil, toHTTPError(fmt.Errorf("failed to fetch remote resource: %s", http.StatusText(res.StatusCode)), res, !isHeadMethod)
+			return nil, toHTTPError(fmt.Errorf("failed to fetch remote resource '%s': %s", uri, http.StatusText(res.StatusCode)), res, !isHeadMethod)
 		}

 		var (


Draw Png Image - TypeError: "this.value is undefined"

TypeError: "this.value is undefined"
    sizeInBytes http://...module.js:53721
    sizeInBytes http://...module.js:53145
    computeObjectOffsets http://...module.js:56546
    PDFObjectStream http://...module.js:56495
    withContextAndObjects http://...module.js:56552
    computeBufferSize http://...module.js:57267
    step http://...vendor.js:195594
    verb http://...vendor.js:195575
    fulfilled http://...vendor.js:195565
    invoke http://...polyfills.js:6016
    onInvoke http://...vendor.js:99209
    invoke http://...polyfills.js:6015
    run http://...polyfills.js:5781
    scheduleResolveOrReject http://...polyfills.js:6512
    invokeTask http://...polyfills.js:6048
    onInvokeTask http://...vendor.js:99190
    invokeTask http://...polyfills.js:6047
    runTask http://...polyfills.js:5825
    drainMicroTaskQueue http://...polyfills.js:6216
    invokeTask http://...polyfills.js:6126
    invoke http://...polyfills.js:6111
    timer http://...polyfills.js:8307

Stack trace shows drawImage() fails at PDFString.ts method:
sizeInBytes(): number {
    return this.value.length + 2;
  }

which was called from:
PDFDict.prototype.sizeInBytes = function () {
        var size = 5;
        var entries = this.entries();
        for (var idx = 0, len = entries.length; idx < len; idx++) {
            var _a = entries[idx], key = _a[0], value = _a[1];
            size += key.sizeInBytes() + value.sizeInBytes() + 2;
        }
        return size;
    };

Going into the second method, I have these values:
len: 14
key: { encodedName: '/V' }
value : { value: undefined }
entries and _a are arrays.
I'm not certain what the issue is. I'm working out of Angular 8 / typescript.
The relevant code:
const sigContractBytes = data.signatureContract;
const sigContractImage = await pdfDoc.embedPng(sigContractBytes as Uint8Array);
const sigContractDims = sigContractImage.scale(0.75);
...
pages[9]
    .drawImage(sigContractImage, {
      x: 90,
      y: 160,
      width: sigContractDims.width,
      height: sigContractDims.height
    });

Ok, in the course of trying to figure out what was happening, I defined all of my fields with values of 'undefined' and everything works as expected now. Not sure what to make of this, considering that I was trying to draw images and it turned out to be an undefined text field value, which is unrelated at first glance.

Adding a comment, somewhat related. I had a problem where embedded images were not appearing on all pages of the doc. I was embedding them per page on the doc as needed. I switched it to pre-embedding all of the images to be used on the doc immediately before drawing onto the subsequent pages. That seems to have worked out much better.
To be clear: two images, one per page of same doc. I would embed image 1 on page 1,  image 2 on page 2. When the PDF was generated, the image on page 2 was missing... so now I just embed both images to the doc right away, before I iterate over the pages and apply.


Modified error text when spreadsheet url is missing

Fixes #4102

Merging this in because it is a minor change and Github has been acting up all day.


Can't interact with the page content - Elementor

Hello, I'm using particles in elementor
When I add the code to the section and view it, I can't interact with anything in the section I add particles to it.
The section has buttons, I can't click on them or select the text.
Can someone please tell me where the issue is?

It is because particlesjs draws a canvas on top of your layout. You can decrease its z-index so as to bring the canvas backwards