help with footpedal mapping / troubleshooting

Hello,
this is most likely not a problem with keyd, but I would appreciate if anyone can help me with setting it up.  Based on the information below I'd appreciate any ideas on what to do next:

lsusb output includes the following:

Bus 001 Device 094: ID 05f3:00ff PI Engineering, Inc. VEC Footpedal

sudo evtest output includes the following:

/dev/input/event263:	VEC  VEC USB Footpedal

and further down, when I select 263:
Select the device event number [0-263]: 263
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x5f3 product 0xff version 0x100
Input device name: "VEC  VEC USB Footpedal"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 184 (KEY_F14)
    Event code 185 (KEY_F15)
    Event code 186 (KEY_F16)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time<PHONE_NUMBER>.572902, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time<PHONE_NUMBER>.572902, type 1 (EV_KEY), code 184 (KEY_F14), value 1
Event: time<PHONE_NUMBER>.572902, -------------- SYN_REPORT ------------
Event: time<PHONE_NUMBER>.804905, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time<PHONE_NUMBER>.804905, type 1 (EV_KEY), code 184 (KEY_F14), value 0
Event: time<PHONE_NUMBER>.804905, -------------- SYN_REPORT ------------
Event: time<PHONE_NUMBER>.364898, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time<PHONE_NUMBER>.364898, type 1 (EV_KEY), code 185 (KEY_F15), value 1
Event: time<PHONE_NUMBER>.364898, -------------- SYN_REPORT ------------
Event: time<PHONE_NUMBER>.516893, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time<PHONE_NUMBER>.516893, type 1 (EV_KEY), code 185 (KEY_F15), value 0
Event: time<PHONE_NUMBER>.516893, -------------- SYN_REPORT ------------
Event: time<PHONE_NUMBER>.189125, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time<PHONE_NUMBER>.189125, type 1 (EV_KEY), code 186 (KEY_F16), value 1
Event: time<PHONE_NUMBER>.189125, -------------- SYN_REPORT ------------
Event: time<PHONE_NUMBER>.364979, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time<PHONE_NUMBER>.364979, type 1 (EV_KEY), code 186 (KEY_F16), value 0
Event: time<PHONE_NUMBER>.364979, -------------- SYN_REPORT ------------

/etc/udev/rules.d/10-vec-usb-footpedal.rules contains:

ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{idVendor}=="05f3", ATTRS{idProduct}=="00ff", ENV{ID_INPUT_KEYBOARD}="1"

/etc/udev/hwdb.d/60-usb-footpedal.hwdb contains:

evdev:input:b*v05F3p00FF*
 KEYBOARD_KEY_90001=f14
 KEYBOARD_KEY_90002=f15
 KEYBOARD_KEY_90003=f16

After the /etc/udev changes I rebooted.

default.conf is in /etc/keyd and contains the following (showing top only):

# Read "man keyd" for all the necessary documentation
[ids]
*
-1c4f:0002 # this is the second keyboard, reserved for macros
-05f3:00ff # this is the footpedal, which has its own config file

footpedal.conf is in /etc/keyd and contains:

[ids]

# PI Engineering, Inc. VEC Footpedal
05f3:00ff

# These only have three pedals, which are mapped to f14, f15 and f16

[main]
# test bindings only
f14 = a
f15 = b
f16 = c

# These are just in case they are mistakenly mapped to f22 through f24
f22 = d
f23 = e
f24 = f

sudo /usr/bin/keyd monitor generates the following output.  I expect to see the footpedal on this list, but it is not.
Also, nothing happens when I press the footpedals from left to right (but xev indicates keycodes 192 through 194, which should map to f22 through f24):

device added: 0fac:0ade keyd virtual keyboard (/dev/input/event8)
device added: 1050:0010 Yubico Yubico Yubikey II (/dev/input/event262)
device added: 045e:07a5 Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control (/dev/input/event16)
device added: 045e:07a5 Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control (/dev/input/event15)
device added: 045e:07a5 Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse (/dev/input/event14)
device added: 045e:07a5 Microsoft Microsoft® 2.4GHz Transceiver v9.0 (/dev/input/event13)
device added: 0000:0000 ACPI Virtual Keyboard Device (/dev/input/event260)
device added: 044e:120a DELL0810:00 044E:120A Touchpad (/dev/input/event25)
device added: 044e:120a DELL0810:00 044E:120A Mouse (/dev/input/event5)
device added: 062a:4101 MOSART Semi. 2.4G Wireless Mouse Consumer Control (/dev/input/event21)
device added: 062a:4101 MOSART Semi. 2.4G Wireless Mouse (/dev/input/event20)
device added: 062a:4101 MOSART Semi. 2.4G Wireless Mouse (/dev/input/event19)
device added: 046d:4051 Logitech M510 (/dev/input/event18)
device added: 0002:0008 AlpsPS/2 ALPS GlidePoint (/dev/input/event6)
device added: 0001:0001 AT Translated Set 2 keyboard (/dev/input/event0)

xev produces the following when I press the pedals from left to right:

KeyPress event, serial 36, synthetic NO, window 0x5600001,
    root 0x7bb, subw 0x0, time 3862197, (367,-38), root:(1238,425),
    state 0x10, keycode 192 (keysym 0x1008ff45, XF86Launch5), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x5600001,
    root 0x7bb, subw 0x0, time 3862397, (367,-38), root:(1238,425),
    state 0x10, keycode 192 (keysym 0x1008ff45, XF86Launch5), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x5600001,
    root 0x7bb, subw 0x0, time 3872268, (367,-38), root:(1238,425),
    state 0x10, keycode 193 (keysym 0x1008ff46, XF86Launch6), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x5600001,
    root 0x7bb, subw 0x0, time 3872452, (367,-38), root:(1238,425),
    state 0x10, keycode 193 (keysym 0x1008ff46, XF86Launch6), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x5600001,
    root 0x7bb, subw 0x0, time 3882348, (367,-38), root:(1238,425),
    state 0x10, keycode 194 (keysym 0x1008ff47, XF86Launch7), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x5600001,
    root 0x7bb, subw 0x0, time 3882476, (367,-38), root:(1238,425),
    state 0x10, keycode 194 (keysym 0x1008ff47, XF86Launch7), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

I've come up with a quick-and-dirty solution to the problem.
Right now, when I turn keyd off and run emacs describe-key it tells me
what keystroke it received and what function it is bound to in emacs.
In this case when pressing the footpedal, emacs tells me I pressed (in turn):
<XF86Launch5>
<XF86Launch6>
<XF86Launch7>

Which are apparently mapped from F14, F15 and F16 respectively on a (pc+us)
xkb keyboard.
When I change the bindings in the .hwdb file, emacs reflects the changed
bindings, so the .hwdb file works.
I was just having a problem with keyd seeing the footpedal.
keyd does detection of the keyboards and mice attached to the system, and when
I set KEYD_DEBUG to 2, I can see that my footpedal device, which is
/dev/input/event20, is not detected as a keyboard or a mouse.  There is a zero
code when the capabilities of the device are printed out in debug mode.
When I look at the code for resolve_device_capabilities I find that my
footpedal only has mask[5] == 0x7000000 set after the ioctl call.  So I hacked
it (minimalist fix shown below) to say (or lie) that the footpedal is a keyboard
(it makes sense because in a sense it is a keyboard that can only send three keycodes).
This makes keyd work as expected and now the footpedal configuration file
seems to work.
static uint8_t resolve_device_capabilities(int fd)
{
	const uint32_t keyboard_mask = 1<<KEY_1  | 1<<KEY_2 | 1<<KEY_3 |
					1<<KEY_4 | 1<<KEY_5 | 1<<KEY_6 |
					1<<KEY_7 | 1<<KEY_8 | 1<<KEY_9 |
					1<<KEY_0 | 1<<KEY_Q | 1<<KEY_W |
					1<<KEY_E | 1<<KEY_R | 1<<KEY_T |
					1<<KEY_Y;

	uint32_t mask[BTN_LEFT/32+1] = {0};
	uint8_t has_rel;
	uint8_t has_abs;
	uint8_t capabilities = 0;

	if (ioctl(fd, EVIOCGBIT(EV_KEY, (BTN_LEFT/32+1)*4), mask) < 0) {
		perror("ioctl: ev_key");
		return 0;
	}

	if (ioctl(fd, EVIOCGBIT(EV_REL, 1), &has_rel) < 0) {
		perror("ioctl: ev_rel");
		return 0;
	}

	if (ioctl(fd, EVIOCGBIT(EV_ABS, 1), &has_abs) < 0) {
		perror("ioctl: ev_abs");
		return 0;
	}

	if (has_rel || has_abs)
		capabilities |= CAP_MOUSE;

	if (has_abs)
		capabilities |= CAP_MOUSE_ABS;

	if ((mask[0] & keyboard_mask) == keyboard_mask)
		capabilities |= CAP_KEYBOARD;

	/* minimalist fix */
	const uint32_t footpedal_mask = 0x07000000;
	if ((mask[5] & footpedal_mask) == footpedal_mask)
		capabilities |= CAP_KEYBOARD;
	/* end of minimalist fix */

	return capabilities;
}

Obviously this solution will not work for everyone, and is strongly dependent
on the particular footpedal a person has.  I have only one footpedal so this
is the best I can do for now.  But it seems my own needs are met for now.
If (just based on your knowledge of the codebase) you can predict any technical problems with this fix (other than the fact that it does not handle all possible foot pedals), I'd appreciate if you can kindly let me know.  In any case I'll close this issue after a day or two.
Thank you!

ps.  Probably something along the lines of the following:
const uint32_t footpedal_mask = 1 << (KEY_F14 % 32) | 1 << (KEY_F15 % 32) | 1 << (KEY_F16 % 32);

would be better than defining 0x7000000 without explanation, but that is only necessary if the actual code base is going to be changed.


Relative Paths

As of now, some paths are hard-coded, we should change them to a relative or retrieved paths.

Path updated to relative paths


Specifying "latest" only works if at least one version of browser exists on a given OS

The results contains undefined entries when the browser does not exist.


Issues with async validation and wizard

Laravel Precognition Plugin Version
0.5.8
Laravel Version
11.0
Plugin
Vue w/ Inertia
Description
This is slightly similar to #95 but I'd like to highlight the issue I'm facing with wizard use-case.
In the below example from #69 & Laravle docs, onSuccess() wouldn't trigger if the inputs have already been validated
<Button
    @click="form.touch(['name', 'email', 'address', 'phone']).validate({
        onSuccess: () => nextPage(),
        onValidationError: () => notify('You have validation errors'),
    })"
>
    Next
</Button>

This means we cannot mix @change="form.validate('any') on an input alongside the button because all of the would have all been validated.
Also makes it difficult to have a previous button in a wizard.
This would have been a quick/clean thing to solve if form.valid() can validate an array instead of one key at a time or to have onValid() in validate.
Steps To Reproduce
function nextStep() {

    const formElements = [
        ["first_name", "last_name"],
        ["email", "password"],

    ];

    form.touch(formElements[activeStep.value]).validate({
        onSuccess: () => {
            activeStep.value += 1;
        }
    });

}

PR up for this one: https://github.com/laravel/precognition/pull/105


fft wrapper example

A couple of observations in testing, in case it is useful.
First, I notice that the first code block in
https://docs.sciml.ai/SciMLOperators/dev/tutorials/fftw/
runs fine. The second one is different and currently throws an error.
Second, making the obvious changes to the code that works to allow complex input, the tests pass provided I also make the x vector complex:
        n = 256
	l = 2π

	dx = l / n
	x  = range(-l/2, l/2, n+1)[1:n] |> Array
	u  = @. sin(5x)cos(7x)  + im*cos(x) |> complex
	du = @. 5cos(5x)cos(7x) - 7sin(5x)sin(7x)  - im*sin(x) |> complex

	k  = fftfreq(n, 2π*n/l) |> Array
	m  = length(k)
	tr = plan_fft(u)

         L = FunctionOperator(
					(du,u,p,t) -> mul!(du, tr, u), u,u,
                                          isinplace=true,
                                         T=ComplexF64,
					op_adjoint = (du,u,p,t) -> ldiv!(du, tr, u),
					op_inverse = (du,u,p,t) -> ldiv!(du, tr, u),
					op_adjoint_inverse = (du,u,p,t) -> ldiv!(du, tr, u),
                    )

	ik = im * DiagonalOperator(k)
	∂x = L \ ik * L

	Dx = cache_operator(∂x, complex(x))

	@show ≈(Dx * u, du; atol=1e-8)
	@show ≈(mul!(copy(u), Dx, u), du; atol=1e-8)

true
Is this the intended behavior? Could there be unexpected side effects of this complexification of the x vector? Just wondering about testing further with e.g. SplitODEProblem and ETDRK4.

Hi @AshtonSBradley , thanks for pointing out the error in the docs. I'll fix it. Regarding your second point, the operation L = cache_operator(L, u_input) creates copies of u_input so that operations like L * u, mul!(v, L, u, a, b) are cached and nonallocating. Here, u_input should be the similar to (same shape and type) the kind of array that you want to feed to L. Since copies of the input array are preallocated, you can only multiply L with arrays of the same kind (type and shape).
For your code block, you want to cache the operator with u as in
Dx = cache_operator(∂x, u)

as u (Vector{ComplexF64}) is the kind of array you want to multiply with Dx, not x (Vector{Float64}).

to clarify, no sideeffects of complexification. :)


Purify by chunk feature

As is stands right now, plugin assumes that there is only one entry point in webpack configuration. In that case, plugin will extract all provided html files, plus all dependencies and pass it to purify function.
Problem occurs, when there are multiple entry points, so there are separate bundles of js and css code. We don't want to provide all html and dependencies files to purify function, just files that are tied to specific chunk.
My suggestion is, if there are multiple chunks, execute purify for every chunk with files that are tied to that specific chunk. User has to specifies html entry paths for each chunk.
So, if we have configuration for entry like this:
entry: {
a: "./a",
b: "./b",
c: ["./c", "./d"]
},
Configuration for plugin would look like this:
plugins: [
new purify({
basePath: __dirname,
entryPaths: {
a: ["app/views/a/*.html"],
b: ["app/views/b/*.html"],
c: ["app/views/c/*.html"]
}
})
]
Plugin will execute purify in standard way if either one of this configuration is provided:

entry: "./a", entry: ["./a", "./b"] or entry: { a: "./a" }
entryPaths property is not provided.

Hi,
I have a friendly fork going on here. I pretty much redid the internals, but it would still be cool to port this work over there if you are still interested.
Instead of entryPaths I would piggyback on paths. I've also pushed globbing outside of the plugin (more versatile).

I merged this manually earlier (we moved the repo). That's why this got closed. I think we still may want to revisit the topic, though.

@nenadpnc I integrated the ideas to the master version. I still need to add some tests etc. but after that it's good to go once I get npm release rights from @IngwiePhoenix.


Request for project-references examples (if supported)

It's unclear to me whether https://www.typescriptlang.org/docs/handbook/project-references.html (incremental builds) are supported by just looking at the examples https://github.com/aspect-build/rules_ts/tree/d5842963bae0c1f0e83a77dabee595784418917b/examples.
I would have expected an example with multiple tsconfig.json's, with some tsconfig.json's referring to other tsconfig.json's via the references config (https://www.typescriptlang.org/tsconfig#references)
My main goal is to get yarn workspaces working with typescript and bazel
Edit: TLDR, my question is whether aspect ts rules support project-references

This is part of https://github.com/aspect-build/rules_ts/issues/23 - we should copy over https://github.com/bazelbuild/rules_nodejs/tree/stable/packages/typescript/test/ts_project/c which shows project references.

I reproduced that error you mentioned in https://github.com/microsoft/TypeScript/issues/37378#issuecomment-1273646070
The cause is that in a refactoring we lost these two lines
https://github.com/bazelbuild/rules_nodejs/blob/stable/nodejs/private/ts_project.bzl#L87-L88
which were the way that the tsconfig.json file of a referenced composite project was being provided as an input to tsc.


DOC: fix docstring for rolling volatility

While reviewing #564, I noticed a small error in the docstring for plot_rolling_volatility.

@twiecki just bumping on this :smiley:

Thanks :)


Expose Request and RequestMethods to public

Resolves #11

ჩემგან okay, დაველოდოთ ნატალის

Had to edit the naming as well due to incompatibility, re-review requested.
And whoops, edited your comment by mistake. Fixed.

good for go


Filters/SVdictTrainingSet_ST_Gr33a_dust_th0_10_averSubT2_binVar not found

Hi
I started to try to use your code to analyze some behavior (fish to start), but I run into a problem.
I manage to run video_to_ST_image_batch.py and got some ST-images for my video. But then, when I run ST_image_to_ST_feature_batch.py I get the error below:
traceback (most recent call last):
File "C:\deeplabcut\ABRS\ST_image_to_ST_feature_batch.py", line 125, in
STF_30_posXY_dict = project_to_basis_fun (dirPathInputSTfolder,dirPathU,dirPathOutput,numbFiles)
File "C:\deeplabcut\ABRS\ST_image_to_ST_feature_batch.py", line 23, in project_to_basis_fun
with open(UDirPathFileName, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\deeplabcut\ABRS\Filters\USVdictTrainingSet_ST_Gr33a_dust_th0_10_averSubT2_binVar'
Which makes sense because there is no folder named  "Filters", nor a file with that name anywhere.  What is that file and how do I get it/generate it?
Thank you for your time
Cristian Gutierrez-Ibanez

Hi Cristian,
Sorry for a belated response. I recommend using video_to_ST3C_image_batch instead. This batch produces the 3-color ST-images  (ST3C) directly from the video. You can then produce ethograms (behavior identification records) by running batch_3C_to_etho.ipynb (using the ST3C images as inputs). The batch_3C_to_etho.ipynb is recognizing behaviors from ST-images directly using convolutional neural networks (CNNs). Several trained CNNs are provided in the Model folder. I recommend using modelConv2ABRS_3C_train_with_descendingcombinedwithothers_avi_10 .
What you tried to use was the code that utilized "filters" for dimensionality reduction (described in the paper) to produce 30 features from video. These features could then be used by LDA to classify behavior. That works but is already a bit outdated so I would suggest using the CNN - based ABRS as described above.
Please let me know if you can run it and any issues that you encounter. Thank you for trying ABRS!
Primoz

Dear Primoz,
I am interested in using your code, it looks very interesting.
However, I want to use it in mice and for detecting a different behavior...do you think it is possible?
In order to do that, I wonder how those available CNNs were trained...do you provide the ability to train our own networks for use with ABRS? What are the differences between the CNNs provided in the Model folder?
Thanks,
A

Hi Augusto,
Yes, I think it may be possible to use ABRS with mice. At present, the system is optimized for flies but there is nothing particular about it that would limit it to just this animal model. In fact, my hope is to extend the ABRS to diverse animal models and behaviors.
Yes, the code (an example) for CNN training is provided: ConvNet_training.ipynb I am happy to help you with it. (We are working on documentation to make the whole system more accessible.)
When you load a model, run model.summary() to see the architecture of the neural net implementing the model. The models in the Model folder differ either in architecture or, perhaps more importantly, in the training data used. The most recent model is trained with highly diverse set of fly movies and it performs pretty well.
To adapt the ABRS for mice, you would first produce the 3-color ST-images ("ST3C" images or "3CST" images - sorry, our vocabulary is still evolving) from the raw videos using video_to_ST3C_image_batch. You'll need some behavioral labels and the corresponding training data (the ST-images). Next, you would run ConvNet_training.ipynb (load the labels and the training set and train the CNN). (The current (default) ST-images are 80x80x3 format. I suggest start with all the default settings. ) When the model is trained it will be saved in your ABRS main folder.
Shortly I will update the ConvNet_training.ipynb . The current version is just a skeleton (the simplest version that can be run) and I strongly encourage adding label-balancing (to ensure similar amounts of behaviors in the training data) and data augmentation (may help with generalization). (Both will be added to the next version shortly.) But even before adding those, you can play with the CNN architecture (kernel sizes and adding layers).
Please feel free to contact me with more questions! We can also have a Skype conference to go over the practicalities of implementation.
Thank you for using ABRS!
Warm regards,
Primoz

Hi Primoz
Thank you for your answer.  My next question was pretty much what Augusto asked, as I want to implement this in fish and birds! so thank you for that detailed answer too.  Also glad to hear you are working on documentation to make the whole system more accessible.
For the moment, and if you don't mind  I have some basic question: 1) how can you see the ST3C images? how would you produce one like the .png examples you provide?
2) how would you create behavioral labels? what should that file look like, what format is it?
Thank you for your time.
best,
Cristian

Thanks a lot for your answer, Primoz, and I join Cristian and look forward to the extended documentation. I think this system is very promising.
I have pretty much the same questions than Cristian to get started. What type of data (images or videos) does ConvNet_training.ipynb requires to train? How do you label that data?
Also, a fundamental one, do you train a network to identify only one specific behavior (for example, walking) or can you train the same network to recognize several different ones (for example, walking, drinking, grooming in mice)?
Thanks for your work and help here!
Cheers,
A

Hi Cristian,
If you have any examples of videos of fish and birds I'd be happy take a look.

After you run the video_to_ST3C_image_batch the ST3C images will be stored as files in the output folder you have defined (dirPathOutput).  When the bufferSize = 50 (should be by default), the files in the output folder will contain 50 ST3C images each. The files are dictionary structures containing other information as well (speech of body displacement, strength of signal - max amount of movement and other data). To visualize the images you can just read them from the dictionary files - I have just uploaded visualize_ST3C_images.ipynb which can do that for you (just select the name of the folder containing the ST3C image files and the number of the file you want to visualize).

Behavioral labels are stored as a vector (or a single row np array). There are eclectic ways of making the labels.  We used  VCode (Hagedorn, Joey, Joshua Hailpern, and Karrie G. Karahalios. "VCode and VData: illustrating a new framework for supporting the video annotation workflow." Proceedings of the working conference on Advanced visual interfaces. ACM, 2008.) but I personally prefer labeling frame by frame using cv2. But any method, no matter how "primitive", that lets humans assign a name of a behavior in each frame, will work. Just select a diverse enough set of behaviors and videos for the labels (to obtain good CNN model generalization).
We are now developing a "label maker" python program that will utilize the CNN models to make predictions of behavior in real-time and the user would just correct the predictions where they fail - thus speeding up the process of labeling.

Feel free to start a branch here and upload any code that could improve the ABRS and/or add new functionality, including solutions for label-making. Thanks!

Hi Augusto,
Please see my response to Cristian (above) to find answers to some of your questions. Regarding the training labels, as I mentioned to Cristian, there is no specific method that I could (highly) recommend at this time. You can try VCode but my issue with it is that the behavioral labels only contain the time-stamp, not the frame number (or I don't know how to get it). Also, it only runs on macs.
The ABRS can create ST3C images from AVI or MOV movie formats. In video_to_ST3C_image_batch  you can modify the line:
if (ext == 'avi' or ext == 'mov') == True:
to add new formats. We have been using 1024x1024 and 2048x2048 pixel frames with 30 Hz or 60 Hz sampling rates. By default the ST3C images will be 80x80x3. You train the CNN with the ST3C images, not with raw videos. (Fortunately the ABRS is fast enough to produce the images in almost real-time.) Please note that we are using ABRS for videos that contain 4 different animals per frame (each animal is in its own chamber). In typical videos you will probably just have one individual per frame. So please define fbList = [1,2,3,4] in video_to_ST3C_image_batch as just fbList = [1] (otherwise the ABRS will split each frame into 4 separate areas).
There is no upper limit to the number of behavioral classes to recognize (other than the total number of frames :) ). We are using ABRS to classify about 10 different behaviors in flies. All you need to do is expend the CNN output layer to the number of behaviors you are training it with - and, of course, make the labels with all the representative behaviors.
As I said to Cristian, you too are very welcome to start a new branch here.
Please let me know if you are making progress in implementing the ABRS and what other issues you encounter. Thanks!

Hi Primoz,
So I started to adapt the code to my videos (they are not square, only one animal inside, etc).
Regarding fbList=[1], it doesnt work, cause in the function getting_frame_record there is:
if fb == 1:
                rf = gray[0:200,0:200];

With fbList=[1], the code will still cut your 400*400 frame and keep just the upper left corner, so I needed to make fbList=[0] and create another condition there, but thats solved now.
Now I started to convert to ST3C images a video of mine, selected clipEnd=99 and clipsNumberMax=2, just to start figuring out the code but I am getting somethign weird for the first 15 frames of the movie:

The next batch looks good:

As you can see, frames starting on the 16th, look very similar to yours only that here I have a mouse recorded from the top (the thing on the right is the food tray), so that looks good. Now, frames before the 16th...what is going on there? I think it might be related to a warning I am getting in the console:
/home/auesro/anaconda3/envs/ABRS/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/auesro/anaconda3/envs/ABRS/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/auesro/anaconda3/envs/ABRS/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/auesro/anaconda3/envs/ABRS/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/auesro/anaconda3/envs/ABRS/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/auesro/anaconda3/envs/ABRS/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
0
/home/auesro/Desktop/ABRS Test/hour120.mp4
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:57: RuntimeWarning: invalid value encountered in true_divide
  cG = sFA/sF
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:139: RuntimeWarning: invalid value encountered in true_divide
  imDiffClNorm = imDiffCl/maxImDiffAbs
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:143: RuntimeWarning: invalid value encountered in true_divide
  imVarNorm = imVar/np.max(np.max(imVar))
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:145: RuntimeWarning: invalid value encountered in greater
  imVarBin[imVarNorm > 0.10] = 1;
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:165: RuntimeWarning: invalid value encountered in less
  imDiffClNeg[imDiffClNorm<0] = np.absolute(imDiffClNorm[imDiffClNorm<0])
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:166: RuntimeWarning: invalid value encountered in greater
  imDiffClPos[imDiffClNorm>0] = imDiffClNorm[imDiffClNorm>0]
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:168: RuntimeWarning: invalid value encountered in true_divide
  imDiffClNormNeg = imDiffClNeg/np.max(np.max(imDiffClNeg))
/home/auesro/Desktop/ABRS-master/ABRS_modules.py:169: RuntimeWarning: invalid value encountered in true_divide
  imDiffClNormPos = imDiffClPos/np.max(np.max(imDiffClPos))
/home/auesro/Desktop/ABRS Test/hour120.mp4
1`

Any idea how to fix this?

Thanks a lot!

P.S.: I tried with 4 different videos (recorded with different units of the camera) and it looks the same, always the first 15 frames of the video look like above.

Ok, I got why the first 15 frames look crappy. It has to do with the windowST=16, the number of frames across which you calculate stuff. Is this a sliding window with the current frame in the center or? When I set windowST=5 it is my first 4 frames that look crappy...I would expect only the first 2 frames in this case to look crappy (and actually only the first 8 when windowST=16)...I guess I am missing something.

Hi Augusto,
Nice progress! Yes, the first window (15 frames in this case) should be discarded. There is not enough data in the window yet at the beginning of each new batch.
(If you want to process several clips with a single batch just put them in the same input folder and set clipsNumberMax = numberOfClips In this case the beginnings and endings of the clips will be connected by the buffer so this will not be an issue. )
Yes, for the rf = gray[0:200,0:200] replace the magic 200 numbers with np.shape(gray)[0], np.shape(gray)[1] to get the entire frame. I will update the line after testing it. (And, of course, you can do it in your branch.) Thanks a lot for implementing the ABRS!

PS: the error message (just a warning) is not related to the above issue. There is a division with zero somewhere but it doesn't matter (nan values are converted to zeroes later).

Thank you for the answer Primoz,  I can now see the ST3C frames. Like Augusto, by setting fb=1, I am getting only the left upper corner. I tried to fix with what you mentioned but I keep getting an error,
cannot reshape array of size 160000 into shape (200,200)
I am probably doing something wrong. Augusto, if you could post the full code that would be great. If not ill just wait until Primoz posts it.
cheers

Hi Christian,
Of course, I just uploaded my latest version of Primoz files to my fork. I made them python files instead of jupyter notebooks, I am more familiar with. I have tried to make it as platform independent as possible (given my skills), I am on Linux so might want to check for platform-specific bugs.
The specific code to avoid the cropping is located in a couple of places. For me (videos with a single animal in the frame) the easiest was to make fbList = [0]; and then create a new condition in here.
Another issue is the shape of your videos, mine are not square so I decided to pad my frames with black to make them square by adding a piece of code here and here.
And then, as Primoz said, you need to be careful with all the 200 and 400 values out there. I made the newSize variable to be a parameter the user can set at the beggining which implied changing everywhere where the 200 or 400 appeared by something like newSize[0],newSize[1] or int(newSize[0])*int(newSize[1]) depending on the function.
If I can help, just ask!
Cheers,
A

Hi Primoz,
Thanks, it took me a whole weekend to understand the few things I have touched now!
More questions:
-The ROI of 80x80 pixels is a bit too small for my mice. I have tried the following: design a bigger ROI of 100x100 or 192x192 (doesnt matter the number) and then resize the frame with cv2.resize just before reshaping here. The issue is that I get a very ugly blue channel:

Where you can not see anything..the original frame is:

Red and green channels look good:

So I dont know why or where this is happening...
If you could shed some light it would be great, I could get more of the mice in the frame but still keep the 80x80 size and not modify a whole lot more of the code.
And another question now that you mention the clips: is there a way to make the code start looking at the movie at a defined frame, not the beginning?I tried setting clipStart at something other than 0 but the code still started from 0. It is time and space consuming to run the code through the whole movie file (108022 frames, 1 hour) just to select the frames where the interesting behaviour happens for the CNN training.
Thanks!
A

Hi Augusto,
So, as you can see, the whole ABRS code uses 80x80 ROI and the ST3C images are also 80x80. This needs to be made more flexible (of course). So if you can get it to work for 100x100 ROI (or other areas) that would be half of the work done. Note that 80x80 is the final size of the square cropped around the animal.
To change it, the lines before the cfr = rs[topEdge:bottomEdge,leftEdge:rightEdge]  have to be edited as follows: all the magic numbers 40 should be replaced by the desired ROI size (e.g. 100) * 0.5 (=50). This would produce 100x100 ROIs. (The cropping is done 50 pixels from the position of maximal movement - where the animal is probably located - in each direction.)
Next, in the lines following the cfr = rs[topEdge:bottomEdge,leftEdge:rightEdge]  the magic numbers 80 should be replaced by the desired ROI size (.eg. 100).
Finally, in the line cfrVect = cfr.reshape(1,80*80) the 80 should be replaced by the desired ROI size (e.g. 100).
This is just for the getting_frame_record function. Other functions that use the 80x80 ROI must also be updated. I will proceed doing that on my end and update the code on the Master. Of course, if you have already done so in your fork, we can merge it.
"The issue is that I get a very ugly blue channel:"
I'm not sure where the issue is but my best guess would be that the create_3C_image function is not working properly due to the same magic number bug. The updated function should take to ROI size as an argument and then all the 80 magic numbers in it should be replaced by that ROI size. Or better, the current input argument's shape ("cfrVectRec") already contains this information. So:
SizeROI = np.shape(cfrVectRec)[1] should be the new shape (to replace the 80 magic number in create_3C_image).
I hope this helps. I will address your other questions/comments shortly.

Hi Primoz,
Thanks for the explanation. Lookiing forward to your other replies.
Yes, I know where to change those 80 numbers and where they come from. The thing is if I do that, I can get bigger ROIs but  processing will take longer too, right?(By the way, I am getting dict3 files that are 7.7 mb for just 50 80x80 frames...is that normal?)
And then, I guess the CNN training is designed to work with 80x80 frames? Thats why I think it would be better if we can just resize from whatever ROI the user prefers, to the 80x80. The user will lose some resolution when you go from ROIxROI down to 80x80 but it will increase field of view to adapt the analysis to the size of the animal model of each user.
A

Hi Primoz,
I tried to run your model using my own video, but the result seems to be different from your example.
Why is the color of my test result opposite to yours, or is my test result wrong at all?
I would appreciate it if you could spare time to answer me.

Hi Primoz,
I tried to run your model using my own video, but the result seems to be different from your example.
Why is the color of my test result opposite to yours, or is my test result wrong at all?
I would appreciate it if you could spare time to answer me.

Hi Primoz,
I tried to run your model using my own video, but the result seems to be different from your example.
Why is the color of my test result opposite to yours, or is my test result wrong at all?
I would appreciate it if you could spare time to answer me.

张智亮 2019/10/28 19:02:48
Hi Primoz,
I tried to run your model using my own video, but the result seems to be different from your example.
Why is the color of my test result opposite to yours, or is my test result wrong at all?
I would appreciate it if you could spare time to answer me.

Hi Primoz,
I tried to run your model using my own video, but the result seems to be different from your example.
Why is the color of my test result opposite to yours, or is my test result wrong at all?
I would appreciate it if you could spare time to answer me.

Hi Augusto,
Sorry it took a while. Yes, you can start from any resolution or size of ROI and then reshape it to 80x80. I do realize that in current implementation you can only read a clip from frame 0. The batch was originally designed for processing many short clips rather than few long ones. I will try to update it soon as to make it more flexible. However, I have uploaded ABRS_labelMaker script which is essentially a condensed version of ABRS minus training. It reads movies from any given frame and converts them to 3CST images in real-time. It can also be used to make new labels but this is still in development so you can comment those lines out. I suggest using this script to create optimal 3CST images for your purposes. Once the images look good you can start the CNN training with them as well as adjust the batch with the new parameters.
Yes, the 3CST image files are huge, unfortunately. The images are not compressed the way the original movies are so it is not surprising that the size is big.
I am now also writing a much improved batch to convert 3CST images to ethograms and will upload it when ready (1-2 weeks). This batch is more in line with the old ABRS version, described in the paper, when it comes to post-processing of probability outputs of the CNN.
Thanks for your patience and for your efforts to make ABRS usable with other animals.

Hi CG66,
Your images actually look pretty good! The colors are reversed just in the visual display when you use cv2.imshow(). The 0th channel should be RED and 2th channel should be BLUE (so the background should be blue and movements should be red), however, cv2.imshow() has the blue and red channels inverted - as far as I can tell. This should have no effect on further processing and training.
It looks the right side of your images has been cut off. That's probably also okay. The ABRS is cropping images around the pixel with max signal (max movement) and when that pixel is too close to the edge of the original frame, ABRS fills the area over the edge with zeros.
I hope this helps. Thanks for using ABRS!
Primoz Ravbar

CG66,
The issue arises from initial cropping of the frame. (Please see the discussion above.) The ROI should be centered around the max movement. Make sure the frames are not cut into 4 areas, which is the default setting. This might have been the case for getting the edge too close to the interesting points.

@cgutierrez-Ibanez,
The images look good. Yes, the training will need a good sample size to generalize across different backgrounds. You can pre-process the movies to remove some of those but even if you don't, the CNN will learn to ignore them with enough training samples. Please let me know how it goes.
Thanks for using ABRS!

@CG66 follow the thread from here, specially the part regarding fb values.

Hi @AutomaticBehaviorRecognitionSystem ,
Thanks for your answer. I am looking forward to that labeler!

@AutomaticBehaviorRecognitionSystem，Thank you for your help. I am trying again. If there is any result, I will reply to you

@auesro ，I'll have a try, thank you

Thanks for your help. My previous problems have been solved.
But I still don't understand how to make my own training set. I just want to catch the insects cleaning the head at present.
I don't quite understand the labeling method you mentioned above, and my computer is not Mac. Can you tell me more about it, or I'm really looking forward to your update.

Hi @CG66 ,
Yes, that where I am stuck also at the moment. I decided to wait for Primoz to release a way to label frames apropriately.
Cheers,
A

Hi @AutomaticBehaviorRecognitionSystem
Any news regarding that labelling code? I think that would give you a boost in exposure and usability.
In my opinion, the main issue to run with ABRS is an easy way to: visualize the original frame, give it a label, transform all labelled frames to 3CST images. So far we need to transform whole videos to 3CST (huge size) and then manually go through them, select good frames for training and label them...
Cheers,
A

Hi Augusto,
Yes, that's exactly the idea. I am now close to being done with a "label maker" GUI. It will let you run through the movie frames in both directions, at any speed (which makes it easy to explore behaviors by eye). For each position in the movie you'll be able to see: the raw frame, the corresponding 3CST image, the automatically labeled behavior, the ethogram and the probability of the behavior. The user will then just correct the machine-label where the mismatch occurs.
At present the basic GUI is already working up to the stage where the label needs to be corrected. So I would say it's about 80% ready. Will publish it here as soon as a workable full application version is done and let you know.

Sounds great, Primoz, looking forward!
In the meantime, I have made the code compatible with any frame size and shape of video.
And I have separated the size of the ROI around the animal from the size of the final image to be fed to the CNN. Now you can specify any size of area around the subject and any size of final image (in case someone wants to modify the CNN training code).
Cheers,
A

I have updated the ABRS_modules file with some important changes.
In getting_frame_record(frRec, startWin, endWin, fb) function when you set fb argument to 0 the 3CST images will be made from the entire arena around the animal. If you record from split arenas (4 quarters) select the quarter 1-4 clockwise, starting from 1 being upper left quarter. For all other videos keep fb=0.
The GUI for semi-automatic label-making is almost ready. The first version is gonna be a bit messy but I hope other users will help develop it.
Primoz Ravbar

Ready to help!
Happy New Year,
A

Happy New Year
------------------ 原始邮件 ------------------
发件人: "Augusto<EMAIL_ADDRESS>发送时间: 2020年1月7日(星期二) 晚上8:04
收件人<EMAIL_ADDRESS>抄送<EMAIL_ADDRESS><EMAIL_ADDRESS>主题: Re: [AutomaticBehaviorRecognitionSystem/ABRS] Filters/SVdictTrainingSet_ST_Gr33a_dust_th0_10_averSubT2_binVar not found (#1)
Ready to help!
Happy New Year,
A
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

I have just uploaded the prototype of a GUI for making labels: ABRS_label_maker_GUI.py
It's basically working but please set the values on the bottom of the code file (paths where to output your labels and training data, path to the model and the first video source). In the code file, under class BufferRecord: (in the constructor function) set quadrant = 0 if you don't want to divide your video into quadrants.
Then run the code.
GUI window should open.
Go to File --> Open to select a video you want to label;
Next, select first frame and last frame (right panel of the GUI). I suggest starting with 1-50 frames;
Click ENTER and then click LOAD frames;
Wait for the frames to load. During this process the machine ethograms will also be created;
In the green panel you will see 2 ethograms: top: current working area; bottom: the entire ethogram of all frames labeled so far. The ethograms are only the suggested predictions of behaviors. To add your labels, select the area of the ethogram you'd like to label by clicking on the top ethogram. First click will draw a red line to indicate the beginning of the area to be labeled, the second click will draw a blue line to indicate the end. Since you don't have a good model yet, select the entire ethogram and label it "0" by entering "0" to the field to the right of the ethograms and then clicking the Correct It! You'll notice that the lines on the ethogram have shifted to the zeroth row (shifted all the way to the top of the ethograms);
Now you're ready for labeling. Scroll through the frames by the commands in the blue panel below the ethograms. You can also zoom in and out by clicking on the top ethogram and selecting the area you wish to zoom in and then clicking Zoom In. When you're scrolling through the frames (back and forth) the images of the animal will appear on the top of the GUI. Left is the raw image, right is the corresponding 3CST image (ST-image). Don't worry about new ethogram suggestions being created as you're exploring the movie. Only the corrected labels will be saved.
Find the behavior you wish to label. Scroll back and forth over the behavior to find its start and end. Indicate those on the top ethogram by clicking once for the starting point and again for the ending point (red and blue lines will be drawn). You can do this with the zoomed-in ethogram too. Now label the behavior with a numerical name, e.g. "8", and click Correct it! The ethogram will be updated accordingly;
When you are done with this section of the movie, click Save Labels. Both the labels (the ethogram) and the ST-images (the training data) will be saved into the folders you had selected (the bottom of the code file).
This prototype works but feel free to modify it right away on your forks. I will update a slightly more polished version soon. I uploaded this version because I wanted you to be able to start working on it ASAP, so please forgive its appearance and incomplete menu. In the next version the menu will be fully functional and hopefully no values will need to be set in the code file (everything will be done in the GUI).
Thank you for your patience and for using the ABRS!
Primoz Ravbar

Dear Primoz,
This is fantastic news! I hope to have some time to play with it next week!
Will report back on findings!
Cheers

Dear Primoz,
I started playing with it. I did not get very far. On pushing the Load frames button I get the following error:
Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/augustoer/anaconda3/envs/ABRS/lib/python3.6/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/home/augustoer/anaconda3/envs/ABRS/lib/python3.6/tkinter/__init__.py", line 749, in callit
    func(*args)
  File "/home/augustoer/ABRS/ABRS_label_maker_GUI.py", line 342, in update
    rawFrame = self.bufferObj.get_raw_frame(self.frameInd + self.startZoom)
AttributeError: 'tuple' object has no attribute 'get_raw_frame'

And I dont really know what to do here.
Also the variable modelPathName should be empty when starting for the first time, right? We dont have a model yet.
Cheers,
A

Hi Augusto,
For now just use any model - don't leave it empty. When you have the labels you will be able to train the CNN with them to create your own model. See if that helps with the error you're getting.
Cheers,

Hi Primoz,
I finally got some time to test the Label Maker GUI.
It works for me, meaning it outputs the ST3C images and labels in two separate files. You were right about not leaving the model path empty. However, if possible I would change something:
As it is right now, the GUI will save the images and labels for the whole stretch of video selected (from First Frame to Last Frame), it would be much more useful if it would save only the portion of frames that we label differently from 0. Otherwise, we need to label correctly all of the frames loaded if we dont know the exact frame numbers of the video where our behavior of interest is happening, right? Which I guess it is pretty normal, specially since knowing the exact frame numbers in a video is tricky.
Cheers
A
PS: are you still developing ABRS?

Hi Augusto,
I'm glad to hear the GUI is working for you. I am still developing the ABRS and will update it soon.
The Label Maker GUI is saving all the labels including those with 0 value. The frame number is now the index of the label. During the training with CNNs the zero labels will not be included so in effect this is the same as saving only the non-zero labels. I can make it so that just the non-zero labels (and the corresponding ST3C images) are saved. In that case we need to add the frame index to the saved data.
Let me think about it and I'll design a single file containing the images, the labels and the frame index. Will post it soon.

Hi Primoz,
Awesome to hear you are working on it!
Good to know about the CNN training ignoring 0 labels. In that case, yes, its just a waste of processing time and drive space to store all those images with labels=0, right?
Looking forward!

Hi.
I'm Japanese college student.
I want you to teach me about the following version of each packages.
・Keras
・Tensorflow
I tried to run your program(video_to_ST3C_image_batch.ipynb), I got the error.
So, please give me advice.
I am sorry for my unskillful English and question.
I'm looking forward to hearing from you.

Hi Primoz,
Any plans to update the GUI any time soon? Found your recent bioRxiv paper, so I guess you are still working with ABRS.
Cheers,
A

Hi Augusto,
Yes, indeed we are working on the GUI. It's now in a pretty good shape and we are finishing it up - finally. (I'm already using it to create semi-automatic labels and then use them as the training data set to improve the model.) Much of this GitHub will be revised too with easer installation instructions, improved documentation, and, of course, the GUI.
Primoz

That sounds great, Primoz!
Do you guys have any ETA for public release?
A

The new GUI is finally released. Please see the updated readme file. We added a user manual for the GUI as well. The training is now much improved by the implementation of ResNet-50 deep learning architecture.

Dear Primoz,
I got this error report, and the relevant raw video has been sent to you by email.Do you know how to solve it?
(Sorry for taking it too long,because these days the vpn was not well,I couldn't get in the github)

It looks like you’re using the GUI, the purpose of which is to produce training labels for creation of a new model. We noticed the same error when attempting to run the GUI without the quadrant selection (choosing "all" when setting up the protocol). It seems the code is still separating the movie frame into the four quadrants even when the user selects the "all" option, which is why the sizes don’t match. This is clearly a bug (we have tested the GUI with selecting quadrants but apparently not thoroughly enough with selecting the "all" option). Note: whenever you run the GUI afresh you need to delete the ABRS_cust.dat file created by the previous run.
Unfortunately we are currently NOT actively supporting the ABRS GitHub. This is because of the lack of resources (the person who developed the GUI is no longer with us and we do not have any other developers to actively work on the ABRS). However, we encourage you to proceed with the following:

Create a new "issue" here and copy/paste your post there. This way other users in the GitHub community could help with the bug.

Try running the GUI with a quadrant selected, e.g. select "1" instead of "all" when the dialog opens.

2a) If you can see the movie frames after loading them, then you know the bug was indeed in the quadrant selection.

Go through the GUI code and try to find the lines specifying the quadrant and make sure that when no quadrant is selected by the user (the "all" option) the movie frames are not cut into quadrants.

If you succeed in fixing this bug, please start your own fork here and update the GUI with the corrected version, in accordance with the GitHub rules and the software license.

Alternatively, you can still use the ABRS, following the instructions, with the models already provided here (so skip the GUI altogether).
Best of luck!

Thank you for your reply. Later I'll create an issue. I selected the left top,but it seems nothing change. And I've always used the model you provided at the first time.But I couldn't skip the GUI.So are there any other possible problems here.
Looking forward!


How to build ippsample on Windows

Using Visual Studio2019 to open ippsample.sln, compiling many errors, such as, extern bool cupsArrayAdd(cups_array_t *a, void *e) _CUPS_PUBLIC;  Browsing operations around this macro may fail. Please consider adding it to the prompt file.
Is there anything else that needs to be done?

Not sure what is generating these errors, but if you can include the error messages here I might be able to help you.


Fix README.md incorrect imports

The maven and gradle imports had lavasrc-protocol instead of lavasrc-plugin, as well as maven didn't have a id for repository.

not sure why the plugin would be of any relevance for lavaplayer

not sure if plugin is the correct import, i just saw that there were only 2 items within the repo (lavasrc, and lavasrc-plugin) so i assumed the name had changed from protocol to plugin for some reason.

there has just not been a release yet with the protocol module, its there because I was too lazy to create a new readme entry for lavalink with jvm clients


Fix for '--max-downloads' to stop immediately when reaching the limit.

Currently, the specifying a limit with --max-downloads doesn't cause youtube-dl to stop right after it has successfully downloaded that number of files.
Instead, it keeps iterating the playlist until another candidate file is found to download, only to then discovers that the limit was previously met. This unnecessary activity can actually take quite a while when a large playlist is already mostly downloaded.
This fix adds an additional tail-check on the _num_downloads condition so that it terminates immediately after finishing the last eligible file.

iterating the playlist until another candidate file is found...

To be clear, the problem case here typically happens with --playlist-random, but can even happen when downloading in sequential order, if the locally downloaded files are already scattershot for some reason.
And this situation in general also becomes worse when not using --download-archive.

@dirkf  Thank you. Sorry if my fork seems to have been deleted.

I made a very similar change using the fact that the parameter value was already in scope, so I didn't use yours.


chore: added type definition to generateInspectSettings

🎉 Thanks for submitting a pull request! 🎉
Summary
This is my first open source PR and I just wanted to help remove some of the ts-expect-error from the CLI. There's plenty of other types that need defining in this file, but I just wanted to start small!

For us to review and ship your PR efficiently, please perform the following steps:

[ ] Open a bug/issue before writing your code 🧑💻. This ensures we can discuss the changes and get feedback from everyone that should be involved.
[x] Read the contribution guidelines 📖. This ensures your code follows our style guide and
passes our tests.
[ ] Update or add tests (if any source code was changed or added) 🧪
[ ] Update or add documentation (if features were changed or added) 📝
[ ] Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

It looks like another PR was merged that did the same type conversion. Sorry we couldn't get this merged.
On a positive note, this has helped to identify a flakey test which we intend to fix. See PR


BUG: BookmarksObj.bookmarks_list should be current

The relation between bookmarks_list and bookmarks_dict should be more clear
Or, bookmarks_list should be a @property which iterates over the current state of bookmarks_dict.
For a composable chain of plugins, it should not be expected that changes to bookmarks_list will affect bookmarks_dict.
Currently, with the implemented plugins, it is assumed that bookmarks_list is always current,
which may not be the case when/if bookmarks_dict has been mutated (e.g. for the in-progress dedupe.DedupeBookmarksPlugin)

see: https://github.com/westurner/promiumbookmarks/commit/4df13c913b3b4acb72373c1dbaf40d098e1caca8


fixes the test for verifySig

The test for verifySig wasn't correct and using invalid data

LGTM!
One small nit: Could we add a test where we use crypto's sign function directly? I think it could help show how the outputs of sign can be used with the verifySig function.

Unit tests are meant to test just the functions themselves. If we test sign here as well the tests become less isolated so I don't want to add that test here.


Support building on macos-arm

GH's macos runner switched to arm by default.
x86_64 is still supported for the time being, but we should really try to figure out what stops it from compiling and fix it
Example log: https://github.com/randovania/randovania/actions/runs/8899395603/job/24438949675

@Miepee fixed by py-randomprime #50, yeah?

no. That PR just made everything consistent to macos-13, which is an x86_64 runner.

macos-14 is arm only. So our deadline is basically the deprecation of macos-13.

It's less macos-13 being dropped and more needing to straight up support arm. I expect macos-13 to be dropped only after all supported mac hardware being arm-only. (as in, I bet it's getting longer support)


How to use it

Hi, Thank you for writing this code. However, i believe the documentation is quite incomplete as i am not sure on how to use it/install it and couldn't find the documentation describing on how to install it.
It will be great if you can give us a directions on how to use it

Apologies for completely missing this.
I agree, the documentation is more or less nonexistent. I'm in the process of migrating this and hundreds of other repositories to a new organization, and I'm hoping to go through all of them and bring them up to a reasonable standard. One thing I would do for this repository is provide some kind of application distribution. Right now, you have to grab the cmdline -main jar from Maven Central and run it.


[Icon] add Title prop

oh wait this is close, my bad

no wait again, its merged but not closed... i'm confused @Y0moo =]

Title prop is being added in the monorepo
We will have individual logos in v2. i.e -> <Icon svg='ada'/> will be used like <Ada />
Also we will be using svgr to create icons from svg files rather making it ourselves 🙌🏻
Closing this for now #655


kafka: don't subscribe after consumer has been assigned

Tell us what you do here

fixing a bug (please link a relevant bug report)

Short description
See #450.
Don't subscribe after assigning partitions and offsets.
Related Issues

Fixes #450

Additional Context

@IlyaFaer take a look please

After every message consumed, offsets are moved further (both by Kafka and by dlt in pipeline's state). If a load failed, we are supposed to return offsets to the start of the failed load, which doesn't happen. This is why messages are lost.
So, I don't think it'll really solve the problem. assign() will still set offsets, taken from the pipeline state. Even if we take away assign(), and allow Kafka to track offset by itself, messages will still be lost, as Kafka also moves offsets after every consumed message (we basically duplicate this mechanism in dlt to add some high-level functionality like reading from a timestamp). We need to save offsets in the pipeline state only in case a load was successful - that's what supposed to solve the problem.
Taking a closer look at it...

@aksestok, @rudolfix, after all, you may be right. For all cases, Kafka returns offset -1001. That's a nasty constant, which is supposed to be an invalid offset.
Though it's marked invalid, Kafka actually accepts our offsets. But! In case subscribe() called, Kafka reverts offsets we just assigned. And even if I explicitly commit offsets, subscribe() still reverts to the previous offset (though -1001 is supposed to use the last committed offset, and we just committed it).
Seems to me the problem is in these -1001 (which comes from backend - in code we have normal digits). All the tests are passing without subscribe() (but they do not pass anymore with subscribe() 🫤 ), so I think we can merge it.

The craziest is that before and after subscribe(), Kafka has the same assignments and positions. Though they are not.

@IlyaFaer this also shows that we miss an essential test. could you extract the messages, drop the pipeline (to simulate state rollback) and run it again making sure the same messages are back?


Invalid Account warning shown when user has not yet selected an account

When an azure account picker dropdown is displayed to the user for example in arc deployments, if the account picker fields are optional then by default an empty string is the default selected value for an account. In this scenario, we show the following warning even when there is a valid account available for the user to select.
Error: Invalid account

I don't think this is an azure area issue - @ranasaria can you assign another label for this?

Closing older issues without current repro reports.


Supporting Sprites?

I don't know much about unity but are Sprites just a cropped area of a Texture2D? If so is there any way you can support exporting Sprites to png?

I'm not sure what you're talking about, sprite textures(Texture2D) can be extracted.

Hi,
I think he was talking about the unity object "Sprite", which is a cropped area of a Texture2D.
I added a quick support for visualization, it works well with assets from Hawk Freedom Squadron game (android).
Here : add-simple-sprite-support.patch.txt


issue with migration and underscore

I have created a scaffold with the model Order_Status.  There are two issues that seem to be generated.
First, the migration is created with
class CreateOrder_StatusesTable extends Migration but when I try to migrate I get the error
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'CreateOrderStatusesTable' not found
If I change the line to class CreateOrderStatusesTable extends Migration     the migration runs.
In the migration file, the generator is also putting double underscores in the create and drop table name
Schema::drop('order__statuses');

sorry.  This really should have gone under the laravel-generator.

@kirchaj try to use OrderStatus as model name.


Testcafe doesn't work locally when user's folder has whitespace in name

From what I'm seeing it seems like the library can't handle whitespace in the path. Seems like something similar to this issue although mine is fine for opening a browser.
What is the Current behavior?
It opens 3 Chrome windows and fails to run app.
What is the Expected behavior?
It would open a single window in the correct address and run test.

Your complete configuration file (if any):
{
  "src": "functionalTests/**.ts",
  "clientScripts": [
    "./node_modules/<EMAIL_ADDRESS>  ]
}

Steps to Reproduce:

Run env NODE_ENV=local yarn testcafe chrome in directory (via Gitbash on Windows 10)
Yarn prints "C:\Users\LL COOL J\SQUAREYES\mobile-web\node_modules\.bin\testcafe" chrome to the terminal
Then opens an alert dialog

Tries to open 3 windows and updates the URL to each part of string separated by whitespace e.g. LL, COOL, J
Fails to find localhost address to test
Exits

Your Environment details:

testcafe version:                   1.8.2
node.js version:                    v12.16.1
command-line arguments:  env NODE_ENV=local yarn testcafe chrome
browser name and version: Chrome
platform and version:          Windows 10
other:                                   Gitbash

@lloydstubber
Hello,
I wasn't able to reproduce the issue. My setup:
Windows 10<EMAIL_ADDRESS>Git Bash.
package.json:
{
  "name": "mobile-web",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "testcafe": "^1.8.2"
  }
}

./tests/test.js:
fixture `Fixture`;

test
    .page('http://google.com')
('test', async t => {
    const browser = t.browser;

    console.log('browser = ', browser);

    await t.expect(true).eql(true);
});

Result:

Could you please provide us with a complete example? We will examine it and check for a suitable solution.


changes to the list generation

here are my changes i added a modal to the html and created the list on the modal

Agreed lets ditch this one


fix(icon): swap wrapping div for a span

So Icons will be inline by default.

Thanks for doing this, @AlasdairSwan! 😃

Coverage remained the same at 98.986% when pulling 434c3bdb02c9008063d9f760ffbfa818175bf46b on alasdair/make-icons-inline into 8b8def446ea9fbf9477850ac796fcc895c39f939 on master.


Disappearing field when encoding dictionary

Hello,
I encounter a strange problem. Being new to Gloss, I may be using it the wrong way, but I'm puzzled by the way it works, so I wondered if it could be an issue.
Let's assume we have an encodable struct:
struct testStruct : Encodable {
    let attrib : String
    func toJSON() -> JSON? {
        return jsonify([
            "type" ~~> "TEST",
            "attrib" ~~> attrib
            ])
    }
}

The resulting json being an object containing two fields type and attrib.
Now let's create a dictionary of structs:
let dict = [
    "a":testStruct(attrib:"First"),
    "b":testStruct(attrib:"Second")
]

Finally I jsonify my final object with that code:
jsonify([
    "field" ~~> "Hello",
    "disapearingField" ~~> dict
])

Here what I get:
{
    "field": Hello,
    "b": {
        attrib = Second
        type = TEST
    },
    "a": {
        attrib = First
        type = TEST
    }
}

I was expecting something like that:
{
    "field": Hello,
    "disapearingField": {
        "b": {
            attrib = Second
            type = TEST
        },
        "a": {
            attrib = First
            type = TEST
        }
    }
}

So is that a functionality and I do not use Gloss the way it should be, or is that a bug?
Thanks in advance

apologies for the late response, couldn't dig into this until the weekend.
to achieve the desired effect, your model should look as such:
struct testStruct : Decodable, Encodable {

    let attrib : String

    init?(json: JSON) {
        guard let attrib: String = "attrib" <~~ json else {
            return nil
        }

        self.attrib = attrib
    }

    init(attrib: String) {
        self.attrib = attrib
    }

    func toJSON() -> JSON? {
        return jsonify([
            "type" ~~> "TEST",
            "attrib" ~~> attrib
            ])
    }
}

notice the additions - the model is now declared as Decodable and the required init?(json:) is defined.
i have to think through what the expected outcome of providing a dictionary with Encodable values without providing Decodable information should be. however, this should achieve your intention. hope that helps!


typescript declaration .d.ts files not being picked up

I'm getting TypeScript errors in my stryker output that are the same errors as if I didn't have certain global declarations in a .d.ts file in my src/ directory. So, I'm assuming for some reason the stryker typescript compilation isn't picking up my .d.ts file despite it being picked up during my normal webpack typescript compile. Is there just a configuration I'm missing?
stryker.conf.js
module.exports = function(config) {
  config.set({
    files: [],
    testRunner: "karma",
    mutator: "typescript",
    transpilers: ["typescript"],
    tsconfigFile: "tsconfig.json",
    reporter: ["clear-text", "progress"],
    testFramework: "jasmine",
    coverageAnalysis: "off",
    // logLevel: "trace",
    karmaConfigFile: "karma.typescript.conf.js",
    mutate: ["src/**/*.ts"]
  });
};

Update: with trace mode, I do see a line logged like "src/common/type-extensions.d.ts (included: true, mutated: true)"

Thanks for opening this issue! I was going to ask if you could post trace logging because I had a feeling that stryker was loading the .d.ts files but I see that you posted that in the update 👍
Could you add  '!src/**/*.ts' to our files array in the stryker.conf.js and then test if that changes anything?

No problem! Hopefully I can help figure out what's going on. After adding that to files I get an error for what looks like every *.ts file like "[2017-10-29 19:14:12.441] [ERROR] StrykerCli - an error occurred Error: Could not find mutate file "path/file.ts" in list of files."

Is that the actual file name? In either case, does it exist on disk and should it be mutated?

I get that error for every *.ts file (~400) so I was just using it as an example

I'm doing some debugging and I noticed by the time a LanguageServiceHost is created and passed into ts.createLanguageService() that the *.d.ts file is filtered out of the list of files that getScriptFileNames() expected to return. That filtering is happening here: https://github.com/stryker-mutator/stryker/blob/master/packages/stryker-typescript/src/helpers/tsHelpers.ts#L50
Idk if it's the correct intended behavior or not. Personally, when I removed the section of code that filters out *.d.ts I no longer saw the error, but instead saw a new error "error TS2300: Duplicate identifier". I know very little of the TypeScript compiler APIs and language service so trying to wrap my head around it 🙂

@mikehaas763 that sounds like an interesting usecase you've got there. So basically, you have your own d.ts included in your build? Sounds like that is not yet supported by stryker-typescript yet. As a workaround you could try to rename it to a .ts file, thats sometimes possible. The reason that you get duplicate identifier error is that some of your d.ts files are now included twice I think.
Thanks for your investigation.  I will have a look later today or tomorrow. A small repo that reproduces the issue could help speed up things even more.

@nicojs idk why but I subconsciously made the assumption that *.d.ts files had a special meaning to the compiler, maybe thought that it would automatically pick up the types from it. Seems I was wrong, that's not necessary. After renaming it to .ts I still get the same duplicate identifier error as I did from directly changing the code.
It seems it's because people on my team have added in their own module files code like declare var myDate: any; but I have since added types for that in my type-extensions.ts file to provide the types globally for all files. Although not ideal, I think it's a valid use case, as my normal typescript build doesn't complain about this, but it does when being built via stryker
I'll look into setting up a small repo that can reproduce this hopefully soon

I created a small project that reproduced this issue. You can see it here: https://github.com/stryker-mutator/stryker/tree/fix/support-header-files/packages/stryker-typescript/testResources/useHeaderFile
@mikehaas763 is this similar to your use case (but massively simplified)?
This project will be used as an integration test.


userinfo.php

Hey,
userInfo.php isnt updating any steam user info in my database. What have I done wrong?
The API key and others are all correct...

Any information? Error messages? How are you inserting the data into the database?

Ive got this in my < head>
require('steamauth/steamauth.php');
	if(isset($_SESSION["steamid"])) {
include_once('steamauth/userInfo.php');}

asks for this
<?php
ob_start();
session_start();
require ('openid.php');

function logoutbutton() {
    echo "<form action=\"steamauth/logout.php\" method=\"post\"><input value=\"Logout\" type=\"submit\" /></form>"; //logout button
}

function steamlogin()
{
try {
	require("steamauth/settings.php");
    $openid = new LightOpenID($steamauth['domainname']);

    $button['small'] = "small";
    $button['large_no'] = "large_noborder";
    $button['large'] = "large_border";
    $button = $button[$steamauth['buttonstyle']];

    if(!$openid->mode) {
        if(isset($_GET['login'])) {
            $openid->identity = 'http://steamcommunity.com/openid';
            header('Location: ' . $openid->authUrl());
        }
    //echo "<form action=\"?login\" method=\"post\"> <input type=\"image\" src=\"http://cdn.steamcommunity.com/public/images/signinthroughsteam/sits_".$button.".png\"></form>";
}

     elseif($openid->mode == 'cancel') {
        echo 'User has canceled authentication!';
    } else {
        if($openid->validate()) {
                $id = $openid->identity;
                $ptn = "/^http:\/\/steamcommunity\.com\/openid\/id\/(7[0-9]{15,25}+)$/";
                preg_match($ptn, $id, $matches);

                $_SESSION['steamid'] = $matches[1];
				include_once("set.php");
				$query = mysql_query("SELECT * FROM users WHERE steamid='".$_SESSION['steamid']."'");
				if (mysql_num_rows($query) == 0) {
					mysql_query("INSERT INTO users (steamid) VALUES ('".$_SESSION['steamid']."')") or die("MySQL ERROR: ".mysql_error());
				}
                if (isset($steamauth['loginpage'])) {
					header('Location: '.$steamauth['loginpage']);
                }
        } else {
                echo "User is not logged in.\n";
        }

    }
} catch(ErrorException $e) {
    echo $e->getMessage();
}
}

?>

It used to update userinfo on every login or logout, now it doesnt work anymore without changing anything.

What's the exact error?

Also you should be using mysqli not mysql.

Also The require steamauth.php statement has to be the very first thing in the file. Above any HTML code.

I wasnt getting any error but I was able to force the updates. But I'm now getting a weird error:
Fatal error: require(): Cannot redeclare class lightopenid in /home/mustiique/public_html/steamauth/steamauth.php on line 4

Glad to hear it!

Thanks for the help! ^SmItH197


Refactor for reactive inputs

full website with forecast and evaluations tabs as well as static pages
now inputs are reactive and the result is allowing the full set of models in the dropdown but only when they're available
right now, the reactions are based on some simple rules and conditionals. ideally we'll move to pulling the availabilities from the casts metadata file, but that's going to take additional work on the portalcasting side

@henrykironde let me know if you want to walk through this together on a call or anything
thanks!

I have gone through the code but let us go through it together when you get time.

I am getting an error Warning: Error in rodent_species: could not find function "rodent_species"

@henrykironde thats a portalcasting function, so presumably it means there needs to be a library(portalcasting) inserted somewhere. can you try putting one in the server_functions.R script (at the top, not in any function) and see if that works?

We need that line library(portalcasting) in ui.R

@juniperlsimonis thank you for the updates


[Bug?] How to call into JSInterop from SetParameters?

Now that calling JS is async it is problematic that SetParameters is still sync. In my case, I need to call a JS method inside of SetParameters before the call to _renderHandle.Render(Render);. Would it be possible to make _renderHandle.Render(Render); async as well?

In fact, I have been able to call the async code properly at all. Here is what I tried:
var updates = Task.Run(async () => await UpdateCss(css, debug, _classname, _attributesToRender)).Result;
if (updates != null) _classname = updates;
_renderHandle.Render(Render);

or as:
var updates = Task.Run(() => UpdateCss(css, debug, _classname, _attributesToRender)).Result;

in both case the Blazor app fails to load with no errors
another attempt was:
Task.Run(async () => {
   var updates = await UpdateCss(css, debug, _classname, _attributesToRender);
   if (updates != null) _classname = updates;
   _renderHandle.Render(Render);
});

Or
Task.Run(async () => {
   var updates = await UpdateCss(css, debug, _classname, _attributesToRender);
   if (updates != null) _classname = updates;
});
 _renderHandle.Render(Render);

Both these dont work either, but at least the app loads.
Is there a way to call JS from within SetParameters?

@SteveSandersonMS Sorry to bother you, but I think this is problematic, or am I missing something?

Maybe this will help https://github.com/aspnet/Blazor/issues/1240#issuecomment-410725576

I need to call a JS method inside of SetParameters before the call to _renderHandle.Render(Render);.

@chanan I think making the JS call from OnParametersSetAsync should do what you want.


v0.3 size calculations not stable

v0.3 doesn't correctly calculate window size, as left/width/height aren't always set correctly (may be a document.onload issue)

Still having some problems with the top offset, and depth with latest version


Add capability for a mirror url to print_rel_notes()

Add capability for a mirror url to print_rel_notes()

Adds the mirror url to the sample WORKSPACE stanza.
Adds a note to remind you to push to the mirror with a sample command.
The command assumes you use gsutil and want to match the path of URLs
in the same way the Bazel team does for their dependencies. This is an
incomplete solution, but it covers a lot of uses with minimal effort.

Example:
**WORKSPACE setup**

` ` `
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_pkg",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.3.0/rules_pkg-0.3.0.tar.gz",
        "https://github.com/bazelbuild/rules_pkg/releases/download/0.3.0/rules_pkg-0.3.0.tar.gz",
    ],
    sha256 = "c74b78ad96ad808a3231cc7fb13af4deb5d944d43de07fdff16b49bb9f5ead5d",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
` ` `

**Using the rules**

See [the source](https://github.com/bazelbuild/rules_pkg/tree/0.3.0).
------------------------ snip ----------------------------
!!!: Make sure to copy the file to the release notes.
If you are using Google Cloud Storage, you might use a command like
gsutil cp bazel-bin/distro/rules_pkg-0.3.0.tar.gz gs://bazel-mirror/github.com/bazelbuild/rules_pkg/releases/download/0.3.0/rules_pkg-0.3.0.tar.gz

RELNOTES:
Add mirror_host attribute to print_rel_notes.
If specified, the example WORKSPACE stanza will contain a second URL in the
style used by most bazel packages. That is, if the package url is
https://github.com/bazelbuild/rules_pkg/releases/download/0.3.0/rules_pkg-0.3.0.tar.gz
then the mirror url will be
https://$MIRROR_HOST/github.com/bazelbuild/rules_pkg/releases/download/0.3.0/rules_pkg-0.3.0.tar.gz

friendly ping


Persistent Comm Connection

As I haven't received my Dygma Defy yet, I don't know the limitations.
Wanting to try and keep a comm connection established rather than connect-tx-disconnect, hopefully that won't stop the keyboard from taking inputs.
Will need someone to test keeping a connection established, and seeing if the keyboard can still be used.

Cannot have a persistent serial connection.

Cannot have a persistent serial connection.


Chronological activity feed

Added setting to order feed items chronologically. Also a button to reorder after auto-load
#473

Hmm. I was able to run npm package locally without any errors. Travis is complaining about not finding d3 though.

Nice one! Nice work! Thanks !!
Give me time to handle it, currently in vacation and lot of things on my return.
Thanks again !!!


[1.7.43] Failed setting TCP keep-alive interval with error code: 12018

Synopsis
All download operations by the TransferManager appear to log the following error:
Failed setting TCP keep-alive interval with error code: 12018

The download operations otherwise complete successfully, but the ERROR log line seems to hint at an internal problem in the SDK. This line specifically is logged inside the WinHttpSyncHttpClient:
// WinHTTP doesn't have option to turn off keep-alive, we will set a large interval to try our best.
DWORD keepAliveIntervalMs = config.enableTcpKeepAlive ? config.tcpKeepAliveIntervalMs : ULONG_MAX;
if (!WinHttpSetOption(GetOpenHandle(), WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL, &keepAliveIntervalMs, sizeof(keepAliveIntervalMs)))
{
  AWS_LOGSTREAM_FATAL(GetLogTag(), "Failed setting TCP keep-alive interval with error code: " << GetLastError());
}

When I reproduce this, I go with the default-constructed enableTcpKeepAlive and tcpKeepAliveIntervalMs from the ClientConfiguration struct.
This was tested on Windows 10 with SDK version 1.7.43, using the default WinHttpSyncHttpClient backend (see section on cmake arguments below).
Minimal C++ code that reproduces the issue.
using namespace Aws::S3;
using namespace Aws::Client;
using namespace Aws::Transfer;

std::string filename = "hello.txt";

std::string accessKeyId = "key";
std::string secretAccessKey = "secret";
std::string sessionToken = "token";
std::string bucketName = "bucket";
std::string region = "us-west-2";
std::string keyName = "keyname";

Aws::SDKOptions options;
Aws::InitAPI(options);

Aws::Auth::AWSCredentials credentials;
credentials.SetAWSAccessKeyId(accessKeyId);
credentials.SetAWSSecretKey(secretAccessKey);
credentials.SetSessionToken(sessionToken);

ClientConfiguration client_config;
client_config.region = region;
auto client = Aws::MakeShared<S3Client>("S3Client", credentials, client_config);

Aws::Utils::Threading::DefaultExecutor executor;
TransferManagerConfiguration config(&executor);
config.s3Client = client;
auto transfer_manager = TransferManager::Create(config);

auto transfer_handle = transfer_manager->DownloadFile(
    bucketName,
    keyName,
    filename);

transfer_handle->WaitUntilFinished();

Aws::ShutdownAPI(options);

SDK version
1.7.43
What platform/OS are you using?
Windows
What compiler are you using? what version?
Visual Studio 15 2017 (v141)
What's your CMake arguments?
Defaults except for:
* BUILD_SHARED_LIBS = false
* FORCE_SHARED_CRT = false
Can you provide a TRACE level log? (sanitize any sensitive information)
2019-02-07 19:18:54,105  INFO [21196]             AWS: [WinHttpSyncHttpClient] Creating http client with user agent aws-sdk-cpp/1.7.43 Windows/10.0.16299.15 AMD64 MSVC/1916 with max connections 16 request timeout 10000,and connect timeout 3000
2019-02-07 19:18:54,106 ERROR [21196]             AWS: [WinHttpSyncHttpClient] Failed setting TCP keep-alive interval with error code: 12018
2019-02-07 19:18:54,107  INFO [21196]             AWS: [ConnectionPoolMgr] Creating connection pool mgr with handle 000001F75832C3E0, and max connections per host 16, request timeout 10000 ms, and connect timeout in 3000 ms, enabling TCP keep-alive.
2019-02-07 19:18:54,109  INFO [25044]             AWS: [WinHttpConnectionPoolMgr] Attempting to aquire connection for foo.s3.us-west-2.amazonaws.com:443
2019-02-07 19:18:54,110  INFO [25044]             AWS: [WinConnectionContainer] Pool grown by 2
2019-02-07 19:18:54,110  INFO [25044]             AWS: [WinHttpConnectionPoolMgr] Connection now available, continuing.
2019-02-07 19:18:54,285  INFO [25044]             AWS: [TransferManager] Transfer handle ID [C4CF2A10-BE89-43F9-9127-A8F0E706FBAB] Updated handle status from [NOT_STARTED] to [IN_PROGRESS].
2019-02-07 19:18:54,287  INFO [25044]             AWS: [WinHttpConnectionPoolMgr] Attempting to aquire connection for foo.s3.us-west-2.amazonaws.com:443
2019-02-07 19:18:54,287  INFO [25044]             AWS: [WinHttpConnectionPoolMgr] Connection now available, continuing.
2019-02-07 19:18:54,319  INFO [25044]             AWS: [TransferManager] Transfer handle ID [C4CF2A10-BE89-43F9-9127-A8F0E706FBAB] Updated handle status from [IN_PROGRESS] to [COMPLETED].
2019-02-07 19:18:54,322  INFO [21196]             AWS: [WinHttpConnectionPoolMgr] Cleaning up conneciton pool mgr.

Tcp keep alive setting on WinHttp is actually not available.
We have updated the code and documentation: https://github.com/aws/aws-sdk-cpp/commit/b04549750d43dd8c6a369f772c2643a498941cb3

Thanks for addressing this.


Oracle -  ORA-01000: maximum open cursors exceeded

Environment
HikariCP version: 3.3.1
JDK version     : openjdk version "1.8.0_212"
Database        : Oracle Database 11g Express Edition Release <IP_ADDRESS>.0 - 64bit Production
Driver version  : ojdbc6-<IP_ADDRESS>

I have Hikari integrated with spring boot these are my configuration parameters
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@<IP_ADDRESS>:1521:XE
spring.datasource.username=user
spring.datasource.password=*secret*

# Hikari Connection Pool
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimumIdle=5
spring.datasource.hikari.maximumPoolSize=10
spring.datasource.hikari.idleTimeout=30000
spring.datasource.hikari.maxLifetime=1800000
spring.datasource.hikari.connectionTimeout=30000
spring.datasource.hikari.leak-detection-threshold=48000

I have several databases connected to my application, but with Oracle I'm getting this error. I have tested for example with MySQL with a thread applying a large cycle of database changes, but in case of oracle with
Currently, I have 300 value set as max cursors. Monitoring the user session overpass this number and at then raises the error. I ignore why is not closing the cursors or if I miss some configuration parameter in the configuration.
I have test checked to reduce the maximumPoolSize, but seems the problem does not come from there, it does the same. Might be I have some misconfigured parameter in Kikari or in Oracle? sincerally, after several hour looking for information about this issue, I'm stalled.
Thanks for your time.

Finally, I have found the issue what was not related to KikaryCP. The problem was in a method we are using what is outside spring transaction system and were not correctly closing the resultset in the right manner.
Really, setting HikaryCP in debug mode always was consuming a low number of connection. But because the error only was shown in Oracle we thougth may be poll issue. We had passed a huge testing with other databases, but the problem only has been visible in Oracle in a very specific scenario.
Thanks for your time and your great libray.


Deepen Superset Integration

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/3541
Originally created by @tayloramurphy on 2022-05-27 20:59:19

From https://gitlab.com/meltano/hub/-/issues/255 originally:
Ideally, Meltano would also be able to inject database connection strings corresponding to loaders directly into Superset so that these don't need to be managed in two places: https://superset.apache.org/docs/databases/installing-database-drivers, https://superset.apache.org/docs/databases/postgres. Possibly through the DB_CONNECTION_MUTATOR setting? https://github.com/apache/superset/issues/9045

I've made https://github.com/meltano/meltano/issues/6397 to focus on the Plugin Architecture with Superset as the first test case. I'm going to push this to August as deepening the integratoin needs to be sequenced after the refactor.

Closing as we're focusing on EL right now and the EDK gives us a good place to start to think more about this.


[NEW]: Taggr DAO breaks itself, but DFINITY patches Internet Computer to helpt hem out.

Date
2023-03-27
Description
After the Taggr DAO, controlling a social media platform on the Internet Computer, pushed a bad update the entire website went offline. Since the DAO is badly configured, there is no way to rescue it besides patching the Internet Computer itself. Thankfully DFINITY has deemed Taggr important enough that the CEO had to make a statement to explain to everyone why saving Taggr is critical to the success of Web 3.
Links
https://forum.dfinity.org/t/fixing-taggr-communitys-broken-update-issue-announcing-imminent-nns-proposal/19112
Agreement

[X] I irrevocably agree to release my contribution under the CC-BY 3.0 License

Attribution name
No response
Personal link
No response

If this is too niche, I get it. 😁


Web previews suddenly stop registering (incorrect number of active branches)

Before opening, please confirm:

[X] I have checked to see if my question is addressed in the FAQ.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

App Id
d3fdiq126p9gfo
Region
us-east-1
Amplify Console feature
Previews
Describe the bug
I have two apps that point to the same GitHub repository. Both use web previews, each pointing to different branches. I have confirmed that GitHub is sending the correct events from the webhooks log. The GitHub Amplify App is installed corectly.
Eventually, with no clear trigger or reasoning, Amplify Web Previews suddenly stop being created for pull requests. I have not found a workaround, we are without PR previews.
I have experienced this with my current Next.js SSR application as well as a separate create-react-app project in the past.

I chose to use two apps because of limitations in access controls settings. However, I can revert to using one app at this time if that's what's required.

Expected behavior
Web Previews consistently get created.
Reproduction steps
It's unclear how to reproduce this issue as there is no clear trigger. I have attached the appId for investigation.
Build Settings
version: 1
frontend:
  phases:
    preBuild:
      commands:
        # The scripting library zx requires Node 14.
        - nvm install 14
        - nvm use 14
        - yarn install
    build:
      commands:
        - yarn build
    postBuild:
      commands:
        - cd ./scripts && node ./on-post-amplify-build.mjs
  artifacts:
    baseDirectory: .next
    files:
      - "**/*"
  cache:
    paths:
      - node_modules/**/*
      - .next/cache/**/*

Additional information
I can send the other appId in an email to support if necessary.

I see: "Failed to create branch. You have reached the maximum number of branches in this app." We limit the number of branches to 50/app are you able to remove some of your branches?

Thanks for getting back to me! The remote GitHub repo has 21 branches and roughly 5-8 pull requests. Amplify recognizes 3 pull requests. Is there anything I can do on my end to help?

aws amplify list-branches --app-id d3fdiq126p9gfo returns a list of 3 branches. Does it seem like a bug in counting the number of active branches in Amplify? I even have scripts to clean up the underlying CloudFronts/SQSes/S3 buckets on PR closes.

https://github.com/aws-amplify/amplify-console/issues/1537 this might be related

I have filed for a service limit increase in the meantime, Case ID:<PHONE_NUMBER>

I see 3 branches, and 47 pr branches on my side ranging from 332-477. I notice that enable auto branch deletion is turned off for your app which may be causing this residue.  Would you like me to clean up some of these non-active branches so you can create new ones while I investigate?

Interesting, I will turn auto-deletion on. Yes, please remove all PR branches except 459. The only branch that should exist is develop (and master on another app).

If having the auto-deletion setting was the issue, I'd still probably consider this a bug where the end-user cannot purge these branches. If you agree, we can open up a different GitHub issue specifically focusing on that topic and close this one (assuming the auto-deletion setting resolves the issue).

I've manually cleaned up these branches.  We currently have an issue with PR requests and Next.js apps where it starts the deletion process, but doesn't completely clean up the branches.  Let's leave this open for tracking.

Thank you @behrooziAWS! Is there a way on our end to manually clean branches? When I do aws amplify list-branches --app-id {} it only returns the ones I can see on the console, not the ones that need pruning. I don't mind having to manually clean branches in the interim if it results in fewer AWS tickets until this is resolved.

Unfortunately the branches stuck in the "deleting" state aren't visible to the developer so you can't take action on your end.  I've raised your limit 100 in the interim.  There are a couple of quick things we can do on our side like ignore "deleting" branches in the limit check so even if we can't resolve the underlying issue quickly, we can make some surgical changes so you don't encounter this again.

There are a couple of quick things we can do on our side like ignore "deleting" branches in the limit check

That seems like a decent interim solution until the underlying issue is resolved. I can appreciate that it's not a "clean" approach and may result in other apps that have the same issue growing to a large amount of un-pruned branches. I suspect the deleting state issue is not a trivial fix. However, if there's a way on your end to do a "bulk" (i.e., across all Next.js SSR apps on Amplify) prune post-fix (or it just resolves itself), then, IMO, it seems like a good way to go. If there's not a bulk fix available, then it's not as clear.
Thank you for your work; I certainly appreciate it!

We have deployed fixes to omit "deleting" branches from being included in the limit check and a fix for the issue that was causing them to get stuck in deleting.  Please reopen if you see recurrence.


Adjusted entry mean

We what to manage adjusted entry means using BrAPI. This an aggregated phenotypic value, which is generated for each germplasm in a specific trial. It´s generated by statistical methods, averaging multiple observations (generated in different studies).
This issue is one special case of high interest of the issue #467
Thanks!

My humble opinion based on experience:
I do not think that storing derived data into your data base is generally a good idea. As soon as you start storing, e.g. means over mulitple studies for a germplasm the next question will be whether also BLUEs and BLUPs can be stored.
Normally you pull the data from the data base using BrAPI calls into your software and perform the analysis there. As Biometris we have had many clients requesting this as well. In the end it turns out that the calculation time was so low, that storing means/BLUEs/BLUPs makes no sense at all.

Good point, it often doesn't take a lot of time, but what about in larger breeding programs that are running analysis on 100s of trials in semi-automated pipelines? I  think it would b useful to  be able to store means/BLUEs/BLUPs and appropriate weights to use in a downstream second stage analyses. Thinking along the lines of the pipeline/analysis discussed in this paper https://acsess.onlinelibrary.wiley.com/doi/full/10.2135/cropsci2018.03.0182

I understand your point, but I do not think it is the task for BrAPI to facilitate storage of in between results. This should be handled by the pipeline. I have never spoken to a Breeding company that stores these in between results in their data base, to facilitate the calculations within their pipeline. Even those that run hundreds of studies (in BrAPI a program can contain may trials, where each trial can have mutiple studies) in semi automated pipelines.
We also apply the two-staged approach as written down by Hans Peter Piepho. The paper you site uses ASREML with models as proposed by Cullis et al. Generally these models are quite exhaustive and calculation intense. Have you tried the Biometris CRAN packages (statgenSTA, statgenGxE, etc.). The models may be "suboptimal" compared to what Brian preaches, but generally yield very similar and often the same results in much shorter calculation time.

I think it would be interesting for BrAPI to allow sharing of analytic models and analytic results.
The analytic models could define a model saved in the database and available for exchange. For example, trained regression models from R which can be .Rds files or trained convolution neural network models from Tensorflow which can be .hdf5 files.
The analytic models could indicate the model formula (e.g. mmer(Yield ~ 1, random=~vs(id, Gu=A) ) ) and other metadata about how the model was fit. Exchange of the fit model files (.Rds, .hdf5, etc) could be beneficial.
Then, when an analysis is run against such an analytic model, the results can be saved in the database using statistics related observation variables, and the results can be related to the analytic model.

@nickmorales something along these lines is currently implemented in BreedBase, right? I agree that it would be cool to have something like this in BrAPI, but it seems like it would be a challenge to get to a standard that people agree on!