RotationListenerHelper stops listening after stream has started

Hello!
Thank you so much for such an amazing Library! I seem to be having some orientations issues.
The main issue is when using camera1, it stops changing orientation when the stream has started. But only if the stream is live. If you stop the stream the orientation of the camera responds to the RotationListenerHelper again. It's only while the stream is live.
A secondary issue which may be related is camera1.switchCamera() also has an issue with orientation when the stream has started. When I switchCamera() while the stream has started the camera goes into portrait mode even while the mobile device is still in landscape. The rest of the app constricted to android:screenOrientation="sensorLandscape" so getting camera1 in portrait mode is confusing.
I pulled this RotationListenerHelper from this Landscape Issue
public class MainActivity extends AppCompatActivity implements ConnectCheckerRtmp, SurfaceHolder.Callback {
    public interface rotationCallbackFn {
        void onRotationChanged(int lastRotation, int newRotation);
    }

    public class RotationListenerHelper {

        private int lastRotation;

        private WindowManager windowManager;
        private OrientationEventListener orientationEventListener;

        private rotationCallbackFn callback;

        public RotationListenerHelper() {
        }

        public void listen(Context context, rotationCallbackFn callback) {
            // registering the listening only once.
            stop();
            context = context.getApplicationContext();
            this.callback = callback;
            this.windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);

            this.orientationEventListener = new OrientationEventListener(context, SensorManager.SENSOR_DELAY_NORMAL) {
                @Override
                public void onOrientationChanged(int orientation) {
                    WindowManager localWindowManager = windowManager;
                    rotationCallbackFn localCallback = RotationListenerHelper.this.callback;
                    if (windowManager != null && localCallback != null) {
                        int newRotation = localWindowManager.getDefaultDisplay().getRotation();
                        if (newRotation != lastRotation) {
                            localCallback.onRotationChanged(lastRotation, newRotation);
                            lastRotation = newRotation;
                        }
                    }
                }
            };
            this.orientationEventListener.enable();

            lastRotation = windowManager.getDefaultDisplay().getRotation();
        }

        public void stop() {
            if (this.orientationEventListener != null) {
                this.orientationEventListener.disable();
            }
            this.orientationEventListener = null;
            this.windowManager = null;
            this.callback = null;
        }
    }

    private RotationListenerHelper rotationListenerHelper;
    private RtmpCamera1 rtmpCamera1;

I call the rotationListenerHelper in onCreate()
Here is the code for start/stopping the stream and switching the camera. As you can see I dont call switchCamera() while the stream is live due to the issue described above. Originally it just called switchCamera()
public void onRecordClick(View view) {
        if (configuredBool) {
            if (streamingBool) {
                rtmpCamera1.stopStream();
                statusMessage = "Offline. Ready to go Live.";
                TextView textView = findViewById(R.id.textView);
                textView.setText(statusMessage);
                streamingBool = false;
            } else {
                Toast.makeText(this, url + "/" + streamName, Toast.LENGTH_SHORT).show();
                streamURL = url + "/" + streamName;
                rtmpCamera1.startStream(streamURL);
                statusMessage = "Stream is Live!";
                TextView textView = findViewById(R.id.textView);
                textView.setText(statusMessage);
                streamingBool = true;
            }
        } else {
            statusMessage = "Please First Configure Stream";
            TextView textView = findViewById(R.id.textView);
            textView.setText(statusMessage);
            Toast.makeText(this, "Please First Configure Stream", Toast.LENGTH_SHORT).show();
        }
    }

    public void onSwitchClick(View view) {
        final int curOrientation;
        try {
            boolean wasStream = false;
            if (rtmpCamera1.isStreaming()) {
                rtmpCamera1.stopStream();
                if (rtmpCamera1.isFrontCamera()) {
                    resetPreview(CameraHelper.Facing.BACK);
                } else {
                    resetPreview(CameraHelper.Facing.FRONT);
                }
                rtmpCamera1.startStream(streamURL);
            } else {
                rtmpCamera1.switchCamera();
            }
        } catch (CameraOpenException e) {
            Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
        }
    }

My SurfaceHolder functions
@Override
    public void surfaceCreated(SurfaceHolder surfaceHolder) {
        rtmpCamera1.startPreview(Camera.CameraInfo.CAMERA_FACING_FRONT);
    }

    @Override
    public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
        rtmpCamera1.startPreview();
        rotationListenerHelper.listen(this, new rotationCallbackFn() {
            @Override
            public void onRotationChanged(int lastRotation, int newRotation) {
                if (rtmpCamera1.isFrontCamera()) {
                    resetPreview(CameraHelper.Facing.FRONT);
                } else {
                    resetPreview(CameraHelper.Facing.BACK);
                }
            }
        });
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
        if (rtmpCamera1.isStreaming()) {
            rtmpCamera1.stopStream();
        }
        rtmpCamera1.stopPreview();
    }

    private void resetPreview(CameraHelper.Facing cameraFacing) {
        rtmpCamera1.stopPreview();
        rtmpCamera1.startPreview(cameraFacing);
    }
}

And the full code
package edisonsplaygroundinc.broadcastingapp;

import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.hardware.Camera;
import android.hardware.SensorManager;
import android.hardware.camera2.CameraManager;
import android.os.SystemClock;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.OrientationEventListener;
import android.view.SurfaceView;
import android.view.SurfaceHolder;
import android.view.View;
import android.view.WindowManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;

import com.pedro.encoder.input.video.CameraHelper;
import com.pedro.encoder.input.video.CameraOpenException;
import com.pedro.rtplibrary.rtmp.RtmpCamera1;
import net.ossrs.rtmp.ConnectCheckerRtmp;

public class MainActivity extends AppCompatActivity implements ConnectCheckerRtmp, SurfaceHolder.Callback {
    public interface rotationCallbackFn {
        void onRotationChanged(int lastRotation, int newRotation);
    }

    public class RotationListenerHelper {

        private int lastRotation;

        private WindowManager windowManager;
        private OrientationEventListener orientationEventListener;

        private rotationCallbackFn callback;

        public RotationListenerHelper() {
        }

        public void listen(Context context, rotationCallbackFn callback) {
            // registering the listening only once.
            stop();
            context = context.getApplicationContext();
            this.callback = callback;
            this.windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);

            this.orientationEventListener = new OrientationEventListener(context, SensorManager.SENSOR_DELAY_NORMAL) {
                @Override
                public void onOrientationChanged(int orientation) {
                    WindowManager localWindowManager = windowManager;
                    rotationCallbackFn localCallback = RotationListenerHelper.this.callback;
                    if (windowManager != null && localCallback != null) {
                        int newRotation = localWindowManager.getDefaultDisplay().getRotation();
                        if (newRotation != lastRotation) {
                            localCallback.onRotationChanged(lastRotation, newRotation);
                            lastRotation = newRotation;
                        }
                    }
                }
            };
            this.orientationEventListener.enable();

            lastRotation = windowManager.getDefaultDisplay().getRotation();
        }

        public void stop() {
            if (this.orientationEventListener != null) {
                this.orientationEventListener.disable();
            }
            this.orientationEventListener = null;
            this.windowManager = null;
            this.callback = null;
        }
    }

    private RotationListenerHelper rotationListenerHelper;
    private RtmpCamera1 rtmpCamera1;
    private static final int REQUEST_PERMISSIONS_REQUEST_CODE = 34;

    public Boolean configuredBool = false;
    public Boolean streamingBool = false;
    public String url = "";
    public String streamName = "";
    public String statusMessage = "";
    public String streamURL = "";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        SystemClock.sleep(1000);
        setTheme(R.style.AppTheme);
        super.onCreate(savedInstanceState);
        getSupportActionBar().hide();
        setContentView(R.layout.activity_main);
        statusMessage = "Please Configure Broadcast";
        TextView textView = findViewById(R.id.textView);
        textView.setText(statusMessage);

        WebView myWebView = findViewById(R.id.chatWebView);
        myWebView.loadUrl("http://www.google.com");
        myWebView.setWebViewClient(new WebViewClient());

        if (!checkPermissions()) {
            requestPermissions();
            Toast.makeText(this, "Permission Requested", Toast.LENGTH_SHORT).show();
        }
        if (checkPermissions()) {
            SurfaceView surfaceView = findViewById(R.id.surfaceView);
            rtmpCamera1 = new RtmpCamera1(surfaceView, this);
            surfaceView.getHolder().addCallback(this);
        } else {
            Toast.makeText(this, "Camera Permission Not Granted", Toast.LENGTH_SHORT).show();
        }
        rotationListenerHelper = new RotationListenerHelper();
    }

    private boolean checkPermissions() {
        int permissionState = ActivityCompat.checkSelfPermission(this,
                Manifest.permission.CAMERA);
        return permissionState == PackageManager.PERMISSION_GRANTED;
    }

    private void requestPermissions() {
        ActivityCompat.requestPermissions(MainActivity.this,
                new String[]{Manifest.permission.CAMERA},
                REQUEST_PERMISSIONS_REQUEST_CODE);
    }

    public void onRecordClick(View view) {
        if (configuredBool) {
            if (streamingBool) {
                rtmpCamera1.stopStream();
                statusMessage = "Offline. Ready to go Live.";
                TextView textView = findViewById(R.id.textView);
                textView.setText(statusMessage);
                streamingBool = false;
            } else {
                Toast.makeText(this, url + "/" + streamName, Toast.LENGTH_SHORT).show();
                streamURL = url + "/" + streamName;
                rtmpCamera1.startStream(streamURL);
                statusMessage = "Stream is Live!";
                TextView textView = findViewById(R.id.textView);
                textView.setText(statusMessage);
                streamingBool = true;
            }
        } else {
            statusMessage = "Please First Configure Stream";
            TextView textView = findViewById(R.id.textView);
            textView.setText(statusMessage);
            Toast.makeText(this, "Please First Configure Stream", Toast.LENGTH_SHORT).show();
        }
    }

    public void onSwitchClick(View view) {
        final int curOrientation;
        try {
            boolean wasStream = false;
            if (rtmpCamera1.isStreaming()) {
                rtmpCamera1.stopStream();
                if (rtmpCamera1.isFrontCamera()) {
                    resetPreview(CameraHelper.Facing.BACK);
                } else {
                    resetPreview(CameraHelper.Facing.FRONT);
                }
                rtmpCamera1.startStream(streamURL);
            } else {
                rtmpCamera1.switchCamera();
            }
        } catch (CameraOpenException e) {
            Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
        }
    }

    public void onMicClick(View view) {
        Switch micSwitch = findViewById(R.id.micSwitch);
        if (micSwitch.isChecked()) {
            rtmpCamera1.enableAudio();
            Toast.makeText(this, "Mic Enabled", Toast.LENGTH_SHORT).show();
        } else {
            rtmpCamera1.disableAudio();
            Toast.makeText(this, "Mic Disabled", Toast.LENGTH_SHORT).show();
        }
    }

    /** Called to retrieve data from configuration activity */
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == 1) {
            if(resultCode == RESULT_OK) {
                configuredBool = data.getBooleanExtra(Configuration.configured, false);
                if (configuredBool) {
                    String statusMessage = data.getStringExtra(Configuration.STATUS);
                    TextView textView = findViewById(R.id.textView);
                    textView.setText(statusMessage);
                    url = data.getStringExtra(Configuration.URL);
                    streamName = data.getStringExtra(Configuration.STREAMNAME);
                    Toast.makeText(this, "Streamed Configured! Ready to go Live!", Toast.LENGTH_SHORT).show();
                }
            }
        }
    }

    /** Called when the user taps the Info button */
    public void infoActivity(View view) {
        Intent intent = new Intent(this, Info.class);
        startActivity(intent);
    }

    /** Called when the user taps the Config button */
    public void configActivity(View view) {
        Intent intent = new Intent(this, Configuration.class);
        startActivityForResult(intent, 1);
    }

    @Override
    public void onConnectionSuccessRtmp() {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(MainActivity.this, "Connection success", Toast.LENGTH_SHORT).show();
            }
        });
    }

    @Override
    public void onConnectionFailedRtmp(final String reason) {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(MainActivity.this, "Connection failed. " + reason, Toast.LENGTH_SHORT).show();
                rtmpCamera1.stopStream();
                statusMessage = "Connection Failed";
                TextView textView = findViewById(R.id.textView);
                textView.setText(statusMessage);
                configuredBool = false;
            }
        });
    }

    @Override
    public void onDisconnectRtmp() {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(MainActivity.this, "Disconnected", Toast.LENGTH_SHORT).show();
            }
        });
    }

    @Override
    public void onAuthErrorRtmp() {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(MainActivity.this, "Auth error", Toast.LENGTH_SHORT).show();
            }
        });
    }

    @Override
    public void onAuthSuccessRtmp() {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(MainActivity.this, "Auth success", Toast.LENGTH_SHORT).show();
            }
        });
    }

    @Override
    public void surfaceCreated(SurfaceHolder surfaceHolder) {
        rtmpCamera1.startPreview(Camera.CameraInfo.CAMERA_FACING_FRONT);
    }

    @Override
    public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
        rtmpCamera1.startPreview();
        rotationListenerHelper.listen(this, new rotationCallbackFn() {
            @Override
            public void onRotationChanged(int lastRotation, int newRotation) {
                if (rtmpCamera1.isFrontCamera()) {
                    resetPreview(CameraHelper.Facing.FRONT);
                } else {
                    resetPreview(CameraHelper.Facing.BACK);
                }

                /*final int curOrientation =  getWindowManager().getDefaultDisplay().getRotation();

                switch (curOrientation) {
                    case 1:
                        //. SCREEN_ORIENTATION_LANDSCAPE
                        if (rtmpCamera1.isFrontCamera()) {
                            resetPreview(CameraHelper.Facing.FRONT);
                        } else {
                            resetPreview(CameraHelper.Facing.BACK);
                        }
                        break;
                    //----------------------------------------
                    case 3:
                        //. SCREEN_ORIENTATION_REVERSE_LANDSCAPE
                        if (rtmpCamera1.isFrontCamera()) {
                            resetPreview(CameraHelper.Facing.FRONT);
                        } else {
                            resetPreview(CameraHelper.Facing.BACK);
                        }
                        break;
                    //----------------------------------------
                }*/
            }
        });
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
        if (rtmpCamera1.isStreaming()) {
            rtmpCamera1.stopStream();
        }
        rtmpCamera1.stopPreview();
    }

    private void resetPreview(CameraHelper.Facing cameraFacing) {
        rtmpCamera1.stopPreview();
        rtmpCamera1.startPreview(cameraFacing);
    }
}

Thank you so much again for your amazing Library and for the assistance.
Best

Hi,
rotationCallbackFn was a fast solution for a concrete feature in that post so it was not added to library because the use is so confuse and not really useful.
If you want rotate stream while you are streaming and activity is blocked I recommend you develop a class to detect it orientation change using sensors (rotationCallbackFn could be bugged) and use this method that can be used with camera1 on fly:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/rtplibrary/src/main/java/com/pedro/rtplibrary/base/Camera1Base.java#L346
The normal use in a stream and camera app is block activity rotation when you start stream or record, before start it, you can let user rotate device to select if they want use portrait or landscape mode. For this reason I have no plan to support this class.
It is used in all native camera app so I did it. You can record a video with your native camera and see that if you rotate your device the video result is rotated too.
About switch camera orientation error. Can you tell me view used? OpenglView, SurfaceView, TextureView, etc.

Thank you so much for your response!
That totally makes sense! Thank you again for such a great library!
I am using SurfaceView. I have found that once I start a stream even if the stream is stopped, switchCamera displays the view 90 degrees rotated incorrectly. The camera is still shooting like the camera is being held in landscape but the image is stretched and portrayed in portrait mode as the images show. As soon as surfaceDestroyed() is called and a new surfaceCreated() is called the new surface switchCamera works perfectly till a stream is started again and then the strange behavior resumes.

I originally did exactly what you said with setPreviewOrientation but every time I call this function my application crashes so I have avoided it.  I didn't troubleshoot it much if I am honest but it seemed to crash regardless of if a stream or preview had been started or not. The only solution I have found is to avoid using switchCamera() as well and reset the preview with the other facing camera
if (rtmpCamera1.isFrontCamera()) {
      cameraFacing = CameraHelper.Facing.BACK;
      resetPreview();
} else {
      cameraFacing = CameraHelper.Facing.FRONT;
      resetPreview();
}

private void resetPreview() {
rtmpCamera1.stopPreview();
rtmpCamera1.startPreview(cameraFacing);
}

It is working fine for me. Did you set camera orientation correctly in prepareVideo method?
CameraHelper.getCameraOrientation(context);

To make sure that it isn't a code problem. Copy this activity and let me know if you can reproduce it:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/app/src/main/java/com/pedro/rtpstreamer/defaultexample/ExampleRtmpActivity.java
I tested with this class in portrait and landscape without issue. Tested after and before stream.

Wow 100% on me!!! My call to prepareVideo and prepareAudio some how got removed in some edit or something.
Thank you again for the amazing library! switchCamera() works perfectly now.
The application is still crashing when I call setPreviewOrientation but is not essential for my application. If I can help you with some kind of troubleshooting for this I would be more than happy to but if it works for you then I dont need to take any more of your time and thank you so much again for your work and continued support! Let me know if you ever need light contribution.
Best


Headers parsed with added whitespace at the beginning

Operating System: Windows 10 x64
Node Version: 11.0.0
NPM Version: 6.4.1
csv-parser Version: 2.10

Expected Behavior
Example
    let pokemonDescData = [];
    fs.createReadStream('./data/csv/pokemon_desc.csv')
        .pipe(csv(
            {
              separator: '`',
              mapHeaders: (object) => console.log(object),
            }))
        .on('headers', (headers) => {
          console.log(headers);
        })
        .on('data', (data) => pokemonDescData.push(
            {
              pokemon_id: data.pokemon_id,
              p_desc: data.p_desc,
            }
        ))

CSV file example
pokemon_id`p_desc
1`Bulbasaur can be seen nappin
2`There is a bud on this

Expected headers should be:
{ header: 'pokemon_id', index: 0 }
{ header: 'p_desc', index: 1 }
Actual Behavior

The data that is returned from the parsing will not contain 'pokemon_id', but contain ' pokemon_id'.
If I use the mapHeaders function to trim() the headers then it works correctly.
Also, if I add an empty column with any dummy data, then the first column will have the whitespace, but the 2nd column, in this example 'pokemon_id' will be parsed correctly.
How Do We Reproduce?
Create a CSV file like:
pokemon_id`p_desc
1`Bulbasaur can be seen napping
2`There is a bud on this

Parse with
csv({ separator: '`' })

Not really sure on what planet using a backtick for a CSV separator would be a good idea, but none the less 😆
I just added a test for this and couldn't reproduce the bad data you're seeing. See this commit: ad85a8d860ba83d77943469b27fe82d5139b1731. The snapshot shows correct data. We've got a fair amount of tests that don't suffer from this issue as well, so I'm not ready to triage this as a problem with the module itself. It's more likely that this is an edge case due to your environment or a problem with your data source.

Yes I understand ` is not the usual separator, but the dataset has ',".
I zipped up the single row of the data along with the test.js file which is a super simple call to readstream, parse, and then output the header rows.
Maybe it has something to do with the dataset?  It does have commas, periods and single quotes, which is why I was using the `.  Thanks again.  Let me know if you need anything else.
test.zip

@DryWaters thanks for putting that zip together, but it would be awesome if you could put together a small repo that would duplicate the scenario, which could be forked. Not too keen on downloading a zip, and that's not super common on Github for issues.

@shellscape Figured out the problem, it was a data corruption error.
I could not see the character in Notepad++ or VSCode, but looking at the .csv file in a hex editor, I found a few scrambled characters.  Weird.
Sorry!

Ha, that is exactly what it was.  Thanks again Andrew.
The UTF-8 https://en.wikipedia.org/wiki/UTF-8 representation of the BOM
is the (hexadecimal https://en.wikipedia.org/wiki/Hexadecimal) byte
sequence 0xEF,0xBB,0xBF.
ef
bb
bf
On Fri, Nov 2, 2018 at 7:24 PM Andrew Powell<EMAIL_ADDRESS>wrote:

No worries! Might be that pesky Byte Order Mark
https://en.wikipedia.org/wiki/Byte_order_mark
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/mafintosh/csv-parser/issues/105#issuecomment-435553475,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APO-pO1shldUlI7DDDfa5ZJeKI_Jbo7Zks5urP54gaJpZM4YMBSA
.

--
https://www.watersjournal.com/
Daniel Waters408-807-0203 <(408)%20807-0203>
https://www.watersjournal.com/
https://www.linkedin.com/in/daniel-waters/
https://www.facebook.com/profile.php?id=100009561634855
https://github.com/DryWaters

This may be useful to you (and others) facing similar unknowns: https://github.com/sindresorhus/strip-bom-stream. Using that, a stream can be stripped of the BOM before piping to csv-parser.


Assessing performance of TinyLlama

I think it would be good to see how the performance of TinyLlama & TinyLlama-chat evolve over the checkpoint.
We can have this through the HL leaderboard but it is quite long.
What would you suggest to use as a benchmark to compare TinyLlama between versions ?

We have inlcuded the GPT4All benchmark results in EVAL.md

https://github.com/jzhang38/TinyLlama/blob/965a9de01fa217584bdb89cb05caa0b21729ec80/EVAL.md?plain=1#L30


3 ticket issues when creating event on OC

Thank you for taking the time to report an issue 🙏
The easier it is for us to reproduce it, the faster we can solve it.
So please try to be as complete as possible when filing your issue.

URL: https://opencollective.com/opencollective/events/a-new-way-of-sustaining-open-source-and-civic-tech-projects-811ev/#tickets
Logged in as: me (dimitri)
Error message if any: None
Expected result: I should be able to create ticket in (1) GBP, currently only in USD. (2) when I create ticket it cannot be free, minimum amount is 0.01 . (3) when I click on ticket, I am redirected to the bottom of the page, but I don't see any option to confirm the registration and buy ticket

Browser: Chrome
Bonus point if you can add a screenshot :-)
Thank you and have a wonderful day/evening!
(and sorry for inconvenience! We'll do our best to solve this ASAP)

closing this @Kilheure let us know if you still have issues.


Update private-endpoint-dns.md

Added additional zones for Kusto clusters

@asudbring
IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


removed pagination if no results

This PR removes the paginations links if no results are shown. I was unable to get no results as the search broke, so i couldnt take a screenshot. But it works, trust me :-)
Pages/Interfaces that will change
Businesses
Steps to test
Run locally and try and get no results

 On Business Page we need to hide pagination when no business are matched in search.

Looks like this fixes #211. Closing now.


Problems when writing in android

Let me explain. let's say I've written this mask 99/99/9999. If i write the sequence 1, 2, 3, 4, 5 , 6 etc in this order. The result is this 12/45/63. Because when come the time to put the divisor, the cursor back to back.

Any workaround?

The same problem here in Chrome on Android 6.0.
<.. mask="999 999 999" restrict="reject" minlength="9">
Typing 123456789 gives me 123 567 984
Damn, I need to fix it asap :/

The issue is: after fourth character - cursor is jumping at the end

Same problem over here. I did not find any solution on the internet, even though I searched exhaustively.

I'm getting same problem here. Any Solution??

I'm having the same issue here in the Android 5.1 Moto X.

Also having this issue with a Moto G, Android 5.1

check the issue #127

If anyone needs the fix asap and can't wait for #136 be merged, its possible to install the dependency directly from the commit. But this should be only a temp fix.
This should work both in npm and bower:
"ngMask": "git@github.com:candreoliveira/ngMask.git#a73544ca3a3a2b35558d25ad331235ff65c2fcb2",

@mathportillo I tried installing the plugin using that branch of ngmask, and it didn't work.  I had to add the code after line 142 as per this comment.  After I did that it worked perfectly on Android 7.0.


all: Refactor post verification

🗒 Description
This PR performs a refactor of the post-alloc verification in order to pave the way for a verkle-overlay tree verification.
The main difference is that we now convert the result from the t8n tool to an Alloc instance, and call the instance's method called verify_post.
🔗 Related Issues
None
✅ Checklist

[x] All: Set appropriate labels for the changes.
[x] All: Considered squashing commits to improve commit history.
[ ] All: Added an entry to CHANGELOG.md.
[ ] All: Considered updating the online docs in the ./docs/ directory.
[x] Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
[x] Tests: Included the type and version of evm t8n tool used to locally execute test cases:  e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
[ ] Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

Needs to be reworked on top of the pydantic PR, and re-evaluated since it's possible that is no longer necessary.
Closing for now.


error: option --cuda_ext not recognized

🐛 Bug

To Reproduce
Steps to reproduce the behavior:

Expected behavior

Environment
Please copy and paste the output from the
environment collection script from PyTorch
(or fill out the checklist below manually).
You can get the script and run it with:
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

PyTorch Version (e.g., 1.0):
OS (e.g., Linux):
How you installed PyTorch (conda, pip, source):
Build command you used (if compiling from source):
Python version:
CUDA/cuDNN version:
GPU models and configuration:
Any other relevant information:

Additional context

When I used this command " !python setup.py install --cuda_ext --cpp_ext"
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --cuda_ext not recognized
please help me!


Require 2.346.3 as minimum Jenkins version

Incomplete pull request.  Needs more changes.

[x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
[x] Ensure that the pull request title represents the desired changelog entry
[x] Please describe what you did
[ ] Link to relevant issues in GitHub or Jira
[ ] Link to relevant pull requests, esp. upstream and downstream changes
[ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue

@dnyanesh-nagre-blazerunner this is the beginning of the plugin modernization outlined in the "Improve a Plugin" tutorial.

Branch served its purpose.  Closing the pull request on the assumption that if someone wants it in the future, they can reopen it.


Availability to select fields on records

Enable field selection on records like GraphQL or even like what supabase does

We already have support for the fields query parameter.
await pb.collection("example").getOne("RECORD_ID", {
    fields: "id,created"
})

You can find more information in the Admin UI > API preview or in the general Web APIs docs.

Thank you very much for the quick reply!


About rust woff2

In PR #1, we used woff2-rs to render woff2 fonts, but the library is far from mature.
I understand that Google has finished migrating google/woff2 to Rust internally, @rsheeter can you help to ask your colleague if that project can be open sourced?
If so, it would make a lot of sense for web fonts!

Any news?

Getting it published is a bit of a process. I aspire to do it eventually but I'm not sure it will be soon.

Well, I understand that companies open source a project requires a lot of processes to be approved.
Thank you for pushing it forward, that's great news.

Hi @rsheeter, any progress?

No; we are currently focused on skrifa and fontc


Tutorial fails when instructions followed and CycloneDDS used on Iron

I followed the instructions for the MoveIt2 source build here:
https://moveit.ros.org/install-moveit2/source/
This involved using Cyclone DDS.
When I ran the following:
ros2 launch moveit2_tutorials motion_planning_python_api_tutorial.launch.py
I got a lot of errors (attached) and the arm didn't move.  When I removed the export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp line and used the default middle-ware for Ubuntu Iron binary installation, everything worked fine.  Perhaps this issue comes from mixing the Ubuntu 22.04 Iron ROS2 binary installation with a MoveIt2 source installation?
I'd suggest changing the instructions above to not recommend using the Cyclone DDS on an iron build.  The main ROS2 instructions I believe also don't recommend it for Iron.  This might be the cause of #866 and #804 as well.
failed.log

Iron is now EOL


Fix invalid json in log

What does this PR do?
Fix invalid json in log.
https://github.com/DataDog/datadog-agent/blob/6.4.1/pkg/forwarder/transaction.go#L140 uses %q for log URL, which uses " in the log message. However, the message is just passed to seelog without escape.
See cihub/seelog#161 - all changes are from it.
Motivation
It breaks JSON parsing in Logstash :(

BTW I couldn't set up local dev environment, and had no time to figure out how to add tests for this. So... any help on this would be appreciated.

Hi @chulkilee,
Thanks a lot for this PR and sorry for the very long response time. The issue was fixed in #4004 (which was included in 6.14.0).


modules: hal_nordic: Update nrfx to version 2.5.0

Update the hal_nordic module revision, to switch to nrfx v2.5.0.
Additionaly:

drivers: i2c_nrfx_twim: Remove extra path for zero-length transfers

nrfx 2.5.0 release includes the patch in the nrfx_twim driver that
fixes the driver behavior for zero-length transfers. No need to keep
the same fix in the shim layer.
This effectively reverts cb86a2b306517847420c4694f42881571bc507c4.

@anangl ready for SHA update

@anangl ready for SHA update

Rebased and updated.


Test Remote Meeting Tools

@lillythomas and @wildintellect should arrange a call mid Sept with ICIMOD to verify that MS Teams will work, and has all the features we need:

Video presentation
Long lived chat rooms for feedback and interaction
1:1 calls with desktop sharing for troubleshooting

MS Teams is what we are going with. There are a few quirks but we can work around them. We can initiate a video call from the Channels at any time, anyone in the team can join. In order to help multiple people at the same time we'll have additional channels A & B so that more calls can happen.
Chats from calls do end up back in the channels.
MS Teams desktop presenting seems adequate - will remind participants to leave video and mics off during presentations.


Edit: Telearuba

Channel ID (required)
Telearuba.aw
Channel Name
No response
Alternative Names
No response
Network
No response
Owners
No response
Country
No response
Subdivision
No response
City
No response
Broadcast Area
No response
Languages
No response
Categories
No response
NSFW
None
Launched
No response
Closed
No response
Replaced By
No response
Website
No response
Logo
No response
Notes
No response

Links must be added in iptv-org/iptv, not in here.


Incompatibility with Symfony 4.4.0-BETA1

Compile Error: Declaration of Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::find($ip, $url, $limit, $method, $start = NULL, $end = NULL)

must be compatible with

Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface::find($ip, $url, $limit, $method, $start = NULL, $end = NULL): array

Symfony 4.4.0-BETA1 and snc/redis-bundle: 3.1.1

looks like this might be fixed using dev-master ?

Yup dev-master is working with "just released" Symfony 4.4.0-BETA1  - please can you bump a release so we can peg to that?

Fixed in master yes.
3.2.0 will be released in few days.

Thank you !

I've a problem similar to this. I've version 3.2.1 and I get this error
Fatal error: Declaration of Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::find($ip, $url, $limit, $method, $start = NULL, $end = NULL) must be compatible with Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface::find($ip, $url, $limit, $method, $start = NULL, $end = NULL): array in /var/www/musement.com/current/vendor/snc/redis-bundle/Profiler/Storage/RedisProfilerStorage.php on line 29
[25-Feb-2020 08:28:54 UTC] PHP Fatal error:  Declaration of Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::find($ip, $url, $limit, $method, $start = NULL, $end = NULL) must be compatible with Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface::find($ip, $url, $limit, $method, $start = NULL, $end = NULL): array in /var/www/musement.com/current/vendor/snc/redis-bundle/Profiler/Storage/RedisProfilerStorage.php on line 29

Looking at 2 method I see that the one in this bundle is
public function find($ip, $url, $limit, $method, $start = null, $end = null)

while the SF one is
public function find($ip, $url, $limit, $method, $start = null, $end = null): array;

@hpatoio which version of Symfony are you using?


broken in latest web-browsers

http://oeasvg.com/bower_components/Hotdraw.js/index.html is broken in latest Chrome

Uncaught TypeError: this.getNode(...).getTransformToElement is not a function

A polyfill is required
SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(elem) {
    return elem.getScreenCTM().inverse().multiply(this.getScreenCTM());
};

https://github.com/cpettitt/dagre-d3/issues/202

Thanks @opcodewriter for reporting the issue and the suggested solution, .. it should work now.

wow, nice, thanks!

You might wan to checkout the console in Chrome, it still gives errors when playing around

    // Ignore keydown event if typing in an input box
    if ((document.activeElement.nodeName === 'INPUT'


Expose Sarama metrics through Prometheus

Problem
Sarama metrics are not exposed.
Persona:
Which persona is this feature for?
Exit Criteria
A measurable (binary) test that would indicate that the problem has been resolved.
Time Estimate (optional):
How many developer-days do you think this may take to resolve?
Additional context (optional)
Add any other context about the feature request here.
Metrics are documented there: https://godoc.org/github.com/Shopify/sarama

Agreed that this would be good - it's been on our (SAP) radar regarding the "distributed" KafkaChannel.  We have the beginnings of this (single metric) here...
https://github.com/knative-sandbox/eventing-kafka/blob/master/pkg/channel/distributed/common/metrics/stats_reporter.go

It's probably worth considering contributing upstream using opentelemetry (it's not GA though), there is sarama integration with only the tracing bits: https://github.com/open-telemetry/opentelemetry-go-contrib/tree/master/instrumentation/github.com/Shopify/sarama/otelsarama

/remove-lifecycle stale


FIX: Handle RSS feeds Publish Times

I have noticed that the RSS feeds are not parsed as datetimes and for that reason they were always been set to be published at crawl time. I have now handled this, where the struct_time is converted to datetime before being normalized to server time.

I have checked, we do not crawl in the future!
article_downloader.py checks if the date is in the future, and if so ignores that item from the feed.
However, we do see some RSS feeds where date is not correctly extracted, but the newspaper library does manage to get the text. Since we have the object anyway, we could check if the date parsed from the newspaper library is lower and if so, use that instead?
Something like this:

    ## Compare the newspaper parsed time with the RSS feed time
    ## If this is older, then it's likely the correct date.
    normalized_np_publish_date = normalize_to_server_time(np_article.publish_date)
    oldest_pub_date = (
        published_datetime
        if published_datetime < normalized_np_publish_date
        else normalized_np_publish_date
    )

    # Create new article and save it to DB
    new_article = zeeguu.core.model.Article(
        Url.find_or_create(session, url),
        title,
        ", ".join(np_article.authors),
        np_article.text,
        summary,
        oldest_pub_date,
        feed,
        feed.language,
        htmlContent=np_article.htmlContent,
    )

Cool. Thanks for double checking!
On Wed, 29 May 2024 at 17.00, Tiago Ribeiro @.***>
wrote:

@.**** commented on this pull request.
In zeeguu/core/feed_handler/feed_handler.py
https://github.com/zeeguu/api/pull/155#discussion_r1618945558:

@@ -11,9 +12,18 @@ def init(self, url: str, feed_type: int):
self.image_url_string = ""

 def get_server_time(self, article_date) -> datetime:

Okay, so I tested this by crawling all our sources, and I saw there are
some cases where it might be worse to always set the oldest date. There
might also be cases where a very old date is parsed by newspaper, I saw a
1975, in an article for this month, so let's just not do this for now. I
have shelved the changes if we ever want to revisit them in the future.
—
Reply to this email directly, view it on GitHub
https://github.com/zeeguu/api/pull/155#discussion_r1618945558, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AADRNB7PLA4I4TW6NSV5PHLZEXNOPAVCNFSM6AAAAABIMLE2Y6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAOBVGUYTGMRTHA
.
You are receiving this because you commented.Message ID:
@.***>


CUDA kernel errors when using local variable inside loop

I have been attempting to implement a CUDA kernel and come across some strange behaviour. The behaviour relates to the use of local variables inside loops within the kernel function. The heart of the matter is that kernel code (see numbered code below) gives different results to those calculated using Numpy (see test case code at the bottom of the post). Specifically:
a) Using the kernel code as listed below (and exercising it using the test case) results in the follow:
Result from CUDA kernel : -1394.3506603578408
Result from Numpy :<PHONE_NUMBER>7519816
b) Uncommenting line 26 of the kernel code causes the Numpy and CUDA kernel results to match.
Using the CUDA simulator generates results that match in both a) and b).
I am using Python 2.7.11, Anaconda 2.5.0 and Numba 0.25.0.
I have created this example in order to demonstrate the problem I am seeing in a different kernel implementation so my apologies for the contrivance.
Any help would be most appreciated!
Kernel code:
1   @cuda.jit(device=True)
2   def dev_sum(a, b):
3       return a + b
4
5   @cuda.jit
6   def cu_sum(a, num_to_sums, b):
7       sa = cuda.shared.array(shape=(512,), dtype=float64)
8       tx = cuda.threadIdx.x
9       bx = cuda.blockIdx.x
10      bw = cuda.blockDim.x
11      i = tx + bx * bw
12
13      sa[tx] = 0
14      if i < a.shape[0]:
15          num_choices = 200
16          num_to_sum = num_to_sums[i]
17          l_a = cuda.local.array(shape=num_choices, dtype=float64)
18
19          l_sum = float64(0.)
20          for j in xrange(num_to_sum):
21              l_a[j] = math.exp(a[i, j])
22              l_sum += l_a[j]
23
24          l_b = float64(0.)
25          # uncommenting line 26 means results match those expected (i.e. from Numpy)
26          #l_one = l_sum / l_sum
27          for j in xrange(num_to_sum):
28              # fails unless line 26 is uncommented
29              l_b += math.log(l_a[j]) * l_sum / l_sum
30
31          sa[tx] = l_b
32          cuda.syncthreads()
33          if tx == 0:
34              # Uses the first thread of each block to perform the actual reduction
35              s = sa[tx]
36              for j in range(1, bw):
37                  s = dev_sum(s, sa[j])
38              b[bx] = s

Test case to exercise the kernel above and generate results for comparison:
import numpy as np

def test_cu_sum(self):
    n = 1000 # total length of vector to be summed
    np.random.seed(seed=1112)
    a = np.random.uniform(low=-100, high=100, size=(n, 200)).astype(np.float64)
    num_to_sums = np.random.randint(1, 200, n)

    # add up a different number of items from each dimension of n
    n_dim = 0
    numpy_sum_a = np.float64(0.)
    for num in num_to_sums:
        for i in xrange(num):
            numpy_sum_a += np.log(np.exp(a[n_dim, i]))
        n_dim += 1

    d_a = cuda.to_device(a)
    grid_size = n
    threads = 512
    threads_per_block = (threads, 1)
    blocks_per_grid = int(math.ceil(grid_size / float(threads)))
    b = np.zeros((blocks_per_grid,), dtype=np.float64)
    d_b = cuda.to_device(b)
    d_num_to_sums = cuda.to_device(num_to_sums)

    cu_sum[blocks_per_grid, threads_per_block](d_a, d_num_to_sums, d_b)
    d_b.to_host()
    sum_a = 0
    for result_index in xrange(blocks_per_grid):
        sum_a += b[result_index]

    self.assertAlmostEqual(sum_a, numpy_sum_a)

I have tried your code on both py2.7 and py3.5 but could not reproduce the error.  I have also used the CUDA simulator and cuda-memcheck but it works fine.   Can you tell us what OS and GPU you are running on?

I've been running under Windows 7 and using a Quadro K1200. Thanks for
trying to replicate the issue. Is there anything else I can try on my side?
On Friday, 20 May 2016, Siu Kwan Lam<EMAIL_ADDRESS>wrote:

I have tried your code on both py2.7 and py3.5 but could not reproduce the
error. I have also used the CUDA simulator and cuda-memcheck but it works
fine. Can you tell us what OS and GPU you are running on?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/numba/numba/issues/1891#issuecomment-220455631

Can you test with the CUDA simulator?  You can enable it by setting environment variable NUMBA_ENABLE_CUDASIM=1

Also, on line 26 where you have #l_one = l_sum / l_sum.  What if you put a cuda.syncthreads() in that line?  I wonder if there is a race condition that I couldn't see.

I have tried running the test case using the CUDA simulator (i.e. NUMBA_ENABLE_CUDASIM=1) and cannot replicate the difference in results. That is, results between those generated by Numpy and Numba match with the CUDA simulator enabled.

Putting a cuda.syncthreads() on line 26 does not alter the result and the differences between Numpy and Numba remain. The code (with the change) looks like this:
# uncommenting this causes results to be correct
#l_one = l_sum / l_sum
cuda.syncthreads()
for j in xrange(num_to_sum):
    # fails
    l_b += math.log(l_a[j]) * l_sum / l_sum

sa[tx] = l_b
cuda.syncthreads()

Again, thanks for the suggestions and the help!

@anthls thanks again for asking about this on the Numba issue tracker, even though it has been some years since you asked. It seems like we, the core devs, dropped the ball on this one so I'd like to apologize for that! Also, I'd like to re-visit this issue now to check and see if you have been able to resolve it in the meantime? If not, please do update the issue with your current status and we'll take another look. Thank you!

Closing this issue as no new information has been provided. It is assumed that the above resolved the reported issue, if this is not the case please reopen the issue with new information. Many thanks.


downsize TRANSCRIPTIONAL_PROGRAMS

==== Report for jobs that Use Less Memory than Requested ====
     mem_req     mem_used   mem_wasted partition    job_id       job_name
-------------------------------------------------------------------------------------
   128.00 GB      2.33 GB    125.67 GB shared       9691964      nf-BTC_SPATIAL_SPATIAL_BAYESTME_SPATIAL_TRANSCRIPTIONAL_PROGRAMS_(Visium_Human_Breast_Cancer-2)
   128.00 GB      2.24 GB    125.76 GB shared       9691975      nf-BTC_SPATIAL_SPATIAL_BAYESTME_SPATIAL_TRANSCRIPTIONAL_PROGRAMS_(Visium_Human_Breast_Cancer-1)
Total 2 jobs finished on 2024-09-18
Total RAM Reqested: 256.00 GB|Total RAM Used: 4.57 GB|Total RAM Wasted: 251.43 GB
RAM Efficiency: 1.79% of 256.00 GB
Please make your RAM request fit your job's actual needs so you don't waste RAM.

@jeffquinn-msk does that look credible the transcriptional programs need only ~2.5G RAM?

was this run in Cirro, and if so, can you link the resultant dataset?

This was run in Cirro, too. Interestingly it is similar pattern with many tools, I wonder if there is a smart way to address this, otherwise it looks we're wasting resources (I am sure the other pipelines too).

link to the dataset in Cirro

We can add selectable parameters for resource allocation to the pipeline forms and/or play with retry strategies, but I think we may be honing in on a greater need for a benchmarking strategy that makes some of this more predictable.


[IOTDB-4819] Record concrete failure info in FI State and pass it to client

Remember to add UT for serde of FragmentInstanceFailureInfo

done


The author of this repo is too beautiful.  Too much perfection could distract the repository readers, and the code errors would pass unnoticed.

So, any development on this issue?


IO::Special not documented

Here is an example on how you can stumble upon it.
Code:
say $*IN.path

Result:
IO::Special.new(what => "<STDIN>")

It's a pain because it's just a fake IO::Path variant for the STDIO handles whereas it would be neater if the had some common antecedent.

It says:
This returns '<IN>', '<OUT>' or '<ERR>' as approriate.

However:
say $*IN.path.Str # <STDIN>

Then the class itself and/or how it is being used is broken.  And infact iit is:
[jonathan@coriolanus doc.master]$ perl6 -e 'say $*IN.path.r'
False

The r operator is supposed to return True for $*IN - and actually does test for $!what eq '<IN>'
All of the code in the module that cares is predicated on it being one of the values indicated.
I'll fix and then change the documentation.

I've fixed the class with https://github.com/rakudo/rakudo/pull/763 as it doesn't actually work as intended anyway right now, I'll fix the documentation before that goes in.


Xamarin.iOS app with EFCore 2.0 SQLitePCL.Batteries.Init()

A Xamarin.iOS app with EFCore 2.0 needs a call to
SQLitePCL.Batteries_V2.Init();

If the call is not made, the app initialization throws this error message.
You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init().

Like explained here
Steps to reproduce
Xamarin.iOS project working with EFCore 2.0. Solution with a common .NET Standard project which shares code between iOS and Android, using PackageReference.
Further technical details
EF Core version: 2.0.0
Database Provider: Microsoft.EntityFrameworkCore.Sqlite
Operating system: iOS
IDE: Visual Studio 15.4

Correct. I don't think Xamarin.iOS can handle the Assembly.Load() call.

I use the EF Core dependency assembly that gets added as a transitive dependency, and call that Init method, the app works correctly. In the project assets json, the Xamarin.iOS SQLitePCLraw package gets restored correctly.

We should probably document this on the Supported .NET Implementations page or thereabouts.

The documentation already stated that there are problems in Xamarin.iOS but there is no page that describes this (or other) workarounds.


Feature Request: Vector "File" interface

Just read in an old spaCy tutorial the following "Future versions of spaCy will allow you to provide a file-like object, instead of a location of a [vector bin] file."
Is this in place yet? Would love to replace standard vector file and in-memory loading with my own Redis (or any other "shared-memory-system") interface to allow a distributed cluster of spacy nodes to share the same "file". Would love to contribute, any pointers on where to start looking?

Yep, this should work: https://github.com/honnibal/spaCy/blob/master/spacy/vocab.pyx#L320
Thanks for mentioning this — I'll keep this open until we update the docs.

That's almost what I'm looking for but exactly like expected so can be closed once updated in docs, thx.
However I was more looking for a way to have spaCy avoid loading in the vectors in it's own memory and allow for an interface so that I can make this centralised in a shared memory solution. So pre-cook a "database" with vector lookups and each spaCy instance just calls class functions like find() and nearest() which can either be implemented as a "hashmap" (like it's currently) or a shared memory source. This makes spaCy much more useable for including in our docker environment where we literally have 100s of these containers running in parallel and memory is wasted for each instance.
I'll hopefully have some spare time soon and will write a little pull request now that I know where to look :-)

This makes sense.
I'd like to change the current set up, because I want to support vectors keyed by different information, e.g. vectors keyed by lemma and part-of-speech. This lets you see different vectors for take/VERB and take/NOUN. Digital Reasoning wrote a paper showing this got them good results, and early examination of the vectors is looking good to me too.

That's actually a really good idea! Could you link the papers here and I'll have a look at that as well. (thinking I might actually do this as part of my master thesis :P )
In a way this information is already contained in word vectors because two verbs will be seen in more similar contexts than adjectives but guess that by reducing ambiguity and "false positives" it could make quite a difference.
Do you have some form of basic class design for it yet which I should stick to or shall I just come up with something?

Here's the paper I mentioned, titled "sense2vec": http://arxiv.org/pdf/1511.06388.pdf

In a way this information is already contained in word vectors because two verbs will be seen in more similar contexts than adjectives but guess that by reducing ambiguity and "false positives" it could make quite a difference.

Not so! The most similar words to take/NOUN might be things like opinion|NOUN, while the most similar words to take/VERB might be give|VERB or put|VERB. In normal Word2Vec these two share a key, so there's no way to look at the two different "senses" separately.
I've been playing with an extension of this idea, where noun chunks and named entities are also merged. I've trained a model on one month of Reddit comments. The results at the moment are quite messy, and many of the phrases need to be pruned from the vocab. But there are also some interesting results in there too. Example:
>>> model = gensim.models.Word2Vec.load('np_ner_tag_reddit_2015_01-300d.model')
>>> model.most_similar(['take|NOUN'])
[(u'personal_stance|NOUN', 0.49355706572532654), (u'best_guess|NOUN', 0.48488736152648926), (u'personal_favorite_song|NOUN', 0.4821690320968628), (u'stance|NOUN', 0.48033151030540466), (u'favorite_track|NOUN', 0.47577959299087524), (u'personal_opinion|NOUN', 0.47202107310295105), (u'favorite_community|NOUN', 0.4700315594673157), (u'personal_view|NOUN', 0.4675809144973755), (u'overall_opinion|NOUN', 0.4594742953777313), (u'first_impression|NOUN', 0.458611398935318)]

The vectors for the verb and noun senses are quite different:
>>> model.similarity('take|NOUN', 'take|VERB')
0.13804844694430313

The nearest neighbour of take|VERB turns out to be a misspelling, that the POS tagger seems to often tag correctly:
>>> model.similarity('take|VERB', 'tale|VERB')
0.49611725495669901

I'll be writing more about these vectors, and of course releasing the code. I'd like to sharpen up one or two things and run it on more data first.
I can give you some code to get you started on the POS tagged vectors, though.
As much as I dislike dumping state to disk, it's the most practical way to do this. It'd be nice to have the multi-threading sorted out for spaCy, but for now multi-processing is okay, especially for the tagger, which is fast and low-memory. Example:
https://github.com/honnibal/spaCy/blob/master/examples/pos_tag.py
Here's how to train Word2Vec on the output:
from __future__ import print_function, unicode_literals, division
import io
import bz2
import logging
from os import path
import os

import plac
import ujson
from gensim.models import Word2Vec

class Corpus(object):
    def __init__(self, directory):
        self.directory = directory

    def __iter__(self):
        for filename in os.listdir(self.directory):
            text_loc = path.join(self.directory, filename)
            with io.open(text_loc, 'r', encoding='utf8') as file_:
                for sent_str in file_:
                    yield sent_str.split()

@plac.annotations(
    in_dir=("Location of input directory"),
    out_loc=("Location of output file"),
    n_workers=("Number of workers", "option", "n", int),
    size=("Dimension of the word vectors", "option", "d", int),
    window=("Context window size", "option", "w", int),
    min_count=("Min count", "option", "m", int)
)
def main(in_dir, out_loc, n_workers=4, window=5, size=128, min_count=10):
    logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
    corpus = Corpus(in_dir)
    model = Word2Vec(
        Corpus(in_dir),
        size=size,
        window=window,
        min_count=min_count,
        workers=n_workers
    )
    model.save(out_loc)

if __name__ == '__main__':
    plac.call(main)

That chunking experiment is fantastic. Love the take -> personal_stance.

Do you have some form of basic class design for it yet which I should stick to or shall I just come up with something?

I thought the answer was "no", but then I started writing out some "suggestions", and I guess I have a clearer idea than I thought :). Most of these things are demanded by consistency with the rest of the library. You can see examples of pretty much all of this in the Vocab and StringsTable classes:
Python API:

Use the __getitem__, __setitem__ and __iter__ special methods. You don't necessarily have to subclass dict.
All vectors in the same VectorTable must be the same length.
The table should allow the user to pass in a key function, which should take a spacy.tokens.Token object as an argument, and return a 64-bit unsigned integer (used to key the table)
The hash will be non-reversible, and it won't be possible to iterate over the keys and get back a useful representation of the integer key. This is okay. Otherwise we'll have to store the key strings, which could occupy a lot of memory.

Implementation details:

The data should be stored in a PreshMap instance.
The table should be keyed by a feat_t (64 bit unisnged integer), with values being weight_t*, i.e. raw C arrays of floats.
Allocate the memory using cymem.Pool

A few bonus queries on the chunked model.

The vector space seems like it'll give a good way to show compositionality:

"fair game" is not a type of game:
>>> model.similarity('fair_game|NOUN', 'game|NOUN')
0.034977455677555599
>>> model.similarity('multiplayer_game|NOUN', 'game|NOUN')
0.54464530644393849

A "class action" is only very weakly a type of action:
>>> model.similarity('class_action|NOUN', 'action|NOUN')
0.14957825452335169

But a class action lawsuit is definitely a type of lawsuit:
>>> model.similarity('class_action_lawsuit|NOUN', 'lawsuit|NOUN')
0.69595765453644187

Similarity between entities can be kind of fun.

Here's what Reddit thinks of Donald Trump:
>>> model.most_similar(['Donald_Trump|PERSON'])

[(u'Sarah_Palin|PERSON', 0.5510910749435425), (u'Rick_Perry|PERSON', 0.5508972406387329), (u'Stephen_Colbert|PERSON', 0.5499709844589233), (u'Alex_Jones|PERSON', 0.5492554306983948), (u'Michael_Moore|PERSON', 0.5363447666168213), (u'Charles_Manson|PERSON', 0.5363028645515442), (u'Dick_Cheney|PERSON', 0.5348431468009949), (u'Mark_Zuckerberg|PERSON', 0.5258212089538574), (u'Mark_Wahlberg|PERSON', 0.5251839756965637), (u'Michael_Jackson|PERSON', 0.5229078531265259)]
Discussion of Bill Cosby makes some obvious (and some less obvious) comparisons:
>>> model.most_similar(['Bill_Cosby|PERSON'])
[(u'Cosby|ORG', 0.6004706621170044), (u'Cosby|PERSON', 0.5874950885772705), (u'Roman_Polanski|PERSON', 0.5478169918060303), (u'George_Zimmerman|PERSON', 0.5398542881011963), (u'Charles_Manson|PERSON', 0.5387344360351562), (u'OJ_Simpson|PERSON', 0.5228893160820007), (u'Trayvon_Martin|PERSON', 0.514190137386322), (u'Adnan_Syed|PERSON', 0.49992451071739197), (u'rapist|NOUN', 0.49792540073394775), (u'srhbutts|NOUN', 0.49792492389678955)]

Some queries produce more confusing results:
>>> model.most_similar(['Carrot_Top|PERSON'])
[(u'Kate_Mara|PERSON', 0.5347248911857605), (u'Andy_Samberg|PERSON', 0.5336876511573792), (u'Ryan_Gosling|PERSON', 0.5287898182868958), (u'Emma_Stone|PERSON', 0.5243821740150452), (u'Charlie_Sheen|PERSON', 0.5209298133850098), (u'Joseph_Gordon_Levitt|PERSON', 0.5196050405502319), (u'Jonah_Hill|PERSON', 0.5151286125183105), (u'Zooey_Deschanel|PERSON', 0.514430582523346), (u'Gerard_Butler|PERSON', 0.5115377902984619), (u'Ellen_Page|PERSON', 0.5094753503799438)]

I can't say the connection between Carrot Top and Kate Mara is obvious to me. I suppose this is true of most things about Carrot Top, so...Fair play.

Reddit talks about food a lot, and those regions of the vector space seem very well defined:

model.most_similar(['onion_rings|NOUN'])
[(u'hashbrowns|NOUN', 0.8040812611579895), (u'hot_dogs|NOUN', 0.7978234887123108), (u'chicken_wings|NOUN', 0.793393611907959), (u'sandwiches|NOUN', 0.7903584241867065), (u'fries|NOUN', 0.7885469198226929), (u'tater_tots|NOUN', 0.7821801900863647), (u'bagels|NOUN', 0.7788236141204834), (u'chicken_nuggets|NOUN', 0.7787706255912781), (u'coleslaw|NOUN', 0.7771176099777222), (u'nachos|NOUN', 0.7755396366119385)]

Some of Reddit's ideas about food are kind of...interesting. It seems to think bacon and brocolli are very similar:
>>> model.similarity('bacon|NOUN', 'broccoli|NOUN')
0.83276615202851845

Reddit also thinks hot dogs are practically salad:
>>> model.similarity('hot_dogs|NOUN', 'salad|NOUN')
0.76765100035460465
>>> model.similarity('hot_dogs|NOUN', 'entrails|NOUN')
0.28360725445449464

Just keep telling yourself that Reddit.

Haha that Donald Trump one is quite something.

Love the link between bacon and broccoli, wonder what adding sentiment into the mix would change about that :P
Implementation details:

The data should be stored in a PreshMap instance.
The table should be keyed by a feat_t (64 bit unisnged integer), with values being weight_t*, i.e. raw C arrays of floats.
Allocate the memory using cymem.Pool

Isn't this what we want to abstract away behind an interface so we can implement different ways of holding the vectors in memory, i.e. local vs central? Although to be honest...I'm starting to doubt my own idea in terms of if the speed tradeoff is even worth it.
Not so! The most similar words to take/NOUN might be things like opinion|NOUN, while the most similar words to take/VERB might be give|VERB or put|VERB. In normal Word2Vec these two share a key, so there's no way to look at the two different "senses" separately.

agreed, didn't really mean the information was usable or retrievable, rather that the scoring of vectors not using POS tagging is influenced by these "use cases" and that making this information explicit seems a natural extension. Bit hard to explain my brainfart...but just meant that your idea made sense :)
I'll read the paper and dig through some more code to get into it. But really love the work you're doing. Is there anything I can help out with straight away or you just want me to wait until you push your initial ideas?

Isn't this what we want to abstract away behind an interface so we can implement different ways of holding the vectors in memory, i.e. local vs central?

Hmm, maybe you're right. I was immediately thinking of how the C-level API would look.

Although to be honest...I'm starting to doubt my own idea in terms of if the speed tradeoff is even worth it.

We might end up with use-cases where the vectors data is many gigabytes. Like, think trigram vectors, or vectors for subject/verb/object triples. If this occurs, the architecture you had in mind would make a lot of sense to me. A worker takes a few documents off the task queue, aggregates the vocabulary, and asks the vectors service for all vectors active on the batch.

Yeah for large vector models it would be a necessity, question is though where supporting that is on your timeline & plans for spaCy. For me it would be brilliant, because I have 100+ Celery workers and the 100M for each instance to load the vector model makes it hard to scale across docker containers. And in the future when we want to load more advanced, and possible context dependant models, and on the fly language switching it would be even more necessary.
When you push your preliminary sense2vec setup I can have a look what I would like to "change" about it to acc my use case. Then you can see if there's other places in the spaCy code that would need to change in accordance and we can orchestrate something from there :)

I think there's a design problem here that should be fixed, so we may as well fix it sooner rather than later.
Send me an email<EMAIL_ADDRESS>.
For now the following work-around could help:

Remove the vec.bin file from your data directory, to avoid loading the vectors
Make your own similarity server, that does the central look-up for you
Avoid the .similarity() methods on the spaCy objects.

You might want to look into an approximate nearest neighbours library, to avoid the n**2 queries problem . Gensim recommends the annoy library. It seems good to me.

Hi guys, would appreciate your input on issue https://github.com/piskvorky/gensim/issues/527.
We're in the process of abstracting away particular vector stores (in-memory matrix, sharded on-disk store, approximate kNN index...) from gensim, behind a common API. What operations that API should support is an open question; knowing the use cases required by spacy or other tools would be extremely useful! How do you use such stores, what metrics do you employ, what API signatures?
We'd like to end up with something that is flexible enough to cover all standard use cases (give_me_vector_for_this_key, give_me_most_similar_key_to_these_other_keys, index_vector_for_this_key etc) but still concise and clearly scoped. This will be used throughout gensim (doc2vec, word2vec, docsim...).

Great!
Definitely want to get together on this. Will review.

Just to get enlightened: it seems great idea but does that mean that SpaCy and gensim will work together? Do we have a rough plan for the change of APIs?

I want spaCy and Gensim to interoperate sanely. But it's more important that both libraries stay internally consistent, and they have fairly different API norms. I'd also rather spaCy didn't depend directly on Gensim, because that drags in scipy, so in total it's a fairly heavy-weight dependency. I'm guessing Gensim would hesitate to depend on spaCy. Among other things, we support a narrower range of platforms.
So, I'd say it's more of a design thing. We'd like to figure out what sort of work-flows are required.

Yes. I hope to discuss what kinds of behaviour people expect from such "vector stores", so we can design sane a API.

We've been using an external server for word2vec for over a year now. It would be great to be able to plug it in spaCy. Currently we are accessing the vector space through the https://github.com/3Top/word2vec-api/ project. A HTTP query will return a base 64 encoding of the vector. If there is any interest, I would be glad to improve the service to enable communication with spaCy.

Re: fusion of SpaCy and gensim APIs, I personally find the current gensim API tree not as straightforward/simple as scikit-learn (don't mistake me, gensim is extremely uniquely useful, e.g LDA, wikicorpus, etc). I think it'd be great to introduce an API lineage of scikit-learn flavour.
As for SpaCy, I hope there's a portable way to train/retrieve the word embeddings across domains (pharma, legal, finance, etc) and natural languages. Could we make the underlying workings of word embeddings compositional/consistent as well (what if we need to do text analysis over legal+finance texts, or multi-lingual texts)?
Could SpaCy keep an eye on Apache Flink, Apache Spark, and TensorFlow's about-to-be-released distributed processing framework as well?
Please don't give up working on SpaCy. A versatile/portable/production-ready/modern NLP framework is never ever done before!

We're definitely not about to give up working on SpaCy! We're barely getting started.

Hi, I am new to spacy and NLP and ML. I was going through the documentation of spacy. I am trying to make a QnA system. Was wondering if spacy gives a direct method to find similarity between 2 sentences? I could only find sentence tokenizations and word similarities.


Create keyboardView for crosswordApp

It is used the stadard soft keyboard now. It has extra symbols for our purposes (digits and so on) So the best option is creation of a custom view. The most important minus is necessity to create keyboardView for all languages. https://developer.android.com/reference/android/inputmethodservice/KeyboardView https://github.com/0xe1f/ararat

It is really important because should solve this issue https://github.com/omen273/crosswordApp/issues/272 with custom keyboard for example Microsoft SwiftKey


Support string datatype declaration for numpy array creation

Hey!
When you have code like
arr = np.zeros((N, M), dtype='uint8')

you cant just put the jit decorator in front of the function because numba doesnt recognize the string declaration. What is working is from numba.types import bytes and use that type instead. Problem is, that this type declaration is only working with numba, not without. Means that numpy throws an error when there is no jit decorator anymore.
So i guess it would be cool if numba would recoginze string declarations of data type!

You can use the np.uint8 dtype (and other dtypes in the np module in general) to keep the code working with and without the decorator, e.g.:
from numba import njit
import numpy as np

@njit
def make_zeros_numba():
    return np.zeros(1, dtype=np.uint8)

def make_zeros_python():
    return np.zeros(1, dtype=np.uint8)

make_zeros_numba()
make_zeros_python()

compiles successfully.

Additionally, marking as a feature request for support for strings for the dtype name.

@mha-py thank your for asking about this. I will close this as it is a duplicate of (the long standing issue) #2201.


feat(operator): add timeout operator

This operator is highly polymorphic in it's current form. In particular that second argument that actually changes the behavior depending on the type it's passed. Seems like it should be split into two operators.

I ended up going with timeout and timeoutWith to split the differing behaviors of the timeout overloads. The former is for sending an error on timeout, the latter is for subscribing to a specified Observable on timeout.


CSV Node with single-lined csv does not correctly handle 'parts' property in message object

Current Behavior
There seems to be an issue with the CSV node when handling messages that include the msg.parts property. The msg.parts originates from a previous split node to parse multiple CSV files. I have identified four different test scenarios that demonstrate the issue, which I've detailed below.
Expected Behavior
The CSV node should process the single-lined csv and output the parsed data.
Steps To Reproduce

Test Scenario 1: Single Line CSV with msg.parts

Inject a message with a single line CSV payload and a msg.parts property originates from splitting multiple files.
Expected Result: The CSV node should process the line and output the parsed data.
Actual Result: No message is output from the CSV node.

Test Scenario 2: Single Line CSV with Deleted msg.parts

Inject the same message as Scenario 1, but delete the msg.parts property before it reaches the CSV node.
Expected Result: The CSV node processes the line and outputs the parsed data correctly.
Actual Result: The CSV node outputs the parsed data as expected.

Test Scenario 3: Adjusted msg.parts with Count = 1

Inject a message with a single line CSV payload and a msg.parts property where count=1 and index=0.
Expected Result: The CSV node should process the line and output the parsed data.
Actual Result: The CSV node outputs an empty array instead of the expected parsed data.

Test Scenario 4: Multi-line CSV

Inject a message with a multi-line CSV payload and a msg.parts property originates from splitting multiple files.
Expected Result: The CSV node should process the lines and output the parsed data for each line.
Actual Result: The CSV node functions as expected and outputs the parsed data for each line.

In all four test scenarios, the CSV node is configured to output one message for all rows ("multi": "mult").
Example flow
[{"id":"c8a655cce7872291","type":"inject","z":"c99a73116a9a3dfe","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":200,"wires":[["bb13fe4c6d68a33b"]]},{"id":"bb13fe4c6d68a33b","type":"function","z":"c99a73116a9a3dfe","name":"payload","func":"msg = {\n    \"payload\": \"one,two,three\\n\",\n    \"topic\": \"\",\n    \"parts\": {\n        \"id\": \"ec25ba94d947cd82\",\n        \"type\": \"array\",\n        \"count\": 19,\n        \"len\": 1,\n        \"index\": 6\n    },\n    \"_msgid\": \"c111ed6c939783c7\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":200,"wires":[["c9a9e2e7d2115b0a"]]},{"id":"b9e1917066925ff7","type":"debug","z":"c99a73116a9a3dfe","name":"doesnt work","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1170,"y":200,"wires":[]},{"id":"e04e920151d80810","type":"inject","z":"c99a73116a9a3dfe","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":260,"wires":[["9168eea8fe196d9b"]]},{"id":"9168eea8fe196d9b","type":"function","z":"c99a73116a9a3dfe","name":"payload","func":"msg = {\n    \"payload\": \"one,two,three\\n\",\n    \"topic\": \"\",\n    \"parts\": {\n        \"id\": \"ec25ba94d947cd82\",\n        \"type\": \"array\",\n        \"count\": 19,\n        \"len\": 1,\n        \"index\": 6\n    },\n    \"_msgid\": \"c111ed6c939783c7\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":260,"wires":[["4cec5c2e7d3055dd"]]},{"id":"27431f17081da278","type":"debug","z":"c99a73116a9a3dfe","name":"works","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1190,"y":260,"wires":[]},{"id":"4cec5c2e7d3055dd","type":"change","z":"c99a73116a9a3dfe","name":"delete parts","rules":[{"t":"delete","p":"parts","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":260,"wires":[["9c491b0724e749c0"]]},{"id":"a856435392afec31","type":"function","z":"c99a73116a9a3dfe","name":"payload","func":"msg = {\n    \"payload\": \"one,two,three\\none,two,three\\n\",\n    \"topic\": \"\",\n    \"parts\": {\n        \"id\": \"ec25ba94d947cd82\",\n        \"type\": \"array\",\n        \"count\": 19,\n        \"len\": 1,\n        \"index\": 6\n    },\n    \"_msgid\": \"c111ed6c939783c7\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":500,"wires":[["97ca567c09c37efc"]]},{"id":"285741dc1e1de769","type":"inject","z":"c99a73116a9a3dfe","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":500,"wires":[["a856435392afec31"]]},{"id":"97ca567c09c37efc","type":"csv","z":"c99a73116a9a3dfe","name":"","sep":",","hdrin":"","hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":false,"include_empty_strings":"","include_null_values":"","x":910,"y":500,"wires":[["1bb12280ddbfc201"]]},{"id":"1bb12280ddbfc201","type":"debug","z":"c99a73116a9a3dfe","name":"works","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1190,"y":500,"wires":[]},{"id":"7aeb2077d63f4706","type":"comment","z":"c99a73116a9a3dfe","name":"one row csv","info":"","x":330,"y":140,"wires":[]},{"id":"53c4123ca1f6e875","type":"comment","z":"c99a73116a9a3dfe","name":"two rows csv","info":"","x":330,"y":440,"wires":[]},{"id":"c9a9e2e7d2115b0a","type":"csv","z":"c99a73116a9a3dfe","name":"","sep":",","hdrin":"","hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":false,"include_empty_strings":"","include_null_values":"","x":910,"y":200,"wires":[["b9e1917066925ff7"]]},{"id":"9c491b0724e749c0","type":"csv","z":"c99a73116a9a3dfe","name":"","sep":",","hdrin":"","hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":false,"include_empty_strings":"","include_null_values":"","x":910,"y":260,"wires":[["27431f17081da278"]]},{"id":"95d104420ee392e5","type":"inject","z":"c99a73116a9a3dfe","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":320,"wires":[["25cbe31beca861af"]]},{"id":"25cbe31beca861af","type":"function","z":"c99a73116a9a3dfe","name":"payload","func":"msg = {\n    \"payload\": \"one,two,three\\n\",\n    \"topic\": \"\",\n    \"parts\": {\n        \"id\": \"ec25ba94d947cd82\",\n        \"type\": \"array\",\n        \"count\": 1,\n        \"len\": 1,\n        \"index\": 0\n    },\n    \"_msgid\": \"c111ed6c939783c7\"\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":320,"wires":[["4ae875d40670a42b"]]},{"id":"6544cb71b8738b2d","type":"debug","z":"c99a73116a9a3dfe","name":"count = 1 -> empty array","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1130,"y":320,"wires":[]},{"id":"4ae875d40670a42b","type":"csv","z":"c99a73116a9a3dfe","name":"","sep":",","hdrin":"","hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":false,"include_empty_strings":"","include_null_values":"","x":910,"y":320,"wires":[["6544cb71b8738b2d"]]}]

Environment

Node-RED version: 4.0.0-beta.3-1
Node.js version: 20.13.1
npm version: 10.5.2
Platform/OS: Alpine Linux, 3.19.1
Browser: Microsoft Edge, 126.0.2592.61

Do you know if these are scenarios that worked in 3.1 and this is a regression, or if these scenarios never worked so its a bug.
We were going to do the 4.0 release today. If this is a regression, we'll want to address it before release. If it's an existing bug, we can release 4.0 as-is and handle this as a bug fix.

I can try this in a 2x version of nodered, I will answer in around two hours

@dumdiedum its the 3.x stream I'm most interested in - not 2.x :)

@dumdiedum no problem - I'll run your flows in 4.x and 3.x and compare results.

The flows behaviour the same in 3.1.x as they do in 4.x. So this is not a regression in the CSV node (which received quite a few updates in 4.0).
As a preexisting issue, I'm not going to hold-up the 4.0 release today for it. We can address in a maintenance release.


Test Mac OS X on Travis

Squashed by @clue, originally from reactphp/socket#124

Resolves / closes #121

I've updated this to skip platform-specific (Linux) tests on other platforms (Mac OS X). This is now ready for review :shipit:

I've updated this to skip platform-specific (Linux) tests on other platforms (Mac OS X). This is now ready for review

Alternatively, you could mark the tests with @group and have the OSX build run with --excludeGroup. It's not quite clear why exactly these two tests should be run on Linux only (and not e.g. OSX)?

These two tests specifically test system behavior ("how does the server side react to when a client connection is started and aborted immediately without waiting for the connection to be fully established?") and do not really test things specific to this library at all. We know this is how Linux behaves but do not have any reliable source for other platforms, so I think it makes sense to just skip this for now other platforms until we have a better understanding of this.
Our library is known to work perfectly fine on Mac OS X and I think we should emphasize this (failing system specific tests give a wrong impression here). However, our resources to test this on other platforms are limited, I for one for not have a Mac at hand. Given how long this has gone unnoticed, I think it should be sufficient to rely on Travis to spot future regressions here.
@andig I think using a @group makes sense for tests that can/should explicitly be toggled. In this particular case I think it's a sane default to always skip this for Mac OS X :+1:

@clue @jsor Do we want to test against OS X on all our other packages as well?

@WyriHaximus I don't really have a use for this unless anybody brings up any issues, but if you feel it's worth it, I'd say for got it :+1:


about the example output,please!!!

The code is written very well and looks very comfortable. Thank you very much. However, I have a question. I trained using the default args on the SMD dataset, and the results obtained were quite different from the "example output". Is it possible that the training parameters for the two are different? If so, could you provide the parameters for the "example output"? Thank you very much.

I understand, it was my carelessness. The configuration parameters for "example output" have already been written in "config. txt"


Main table of contents  is not consistent with the one in sidebar.

Main table of contents is not consistent with the one in sidebar.

That's true. I'm expanding to new pages over time so there are gaps in how the topics are organized. I'm actually not concerned about this for now - I'll reorganize after more new pages are created. Will close this ticket for now.


ModuleNotFoundError: No module named 'active_projects'

when ever I try running a file in active projects directory I run into errors when a file imports something from active_projects.......
how am I supposed to run these files.

It seems that some folders have been renamed recently but the associated "import" sentences inside the relevant python files have not been renamed accordingly...


upate base repo to ssages

correct the base repo path

just pushing this trough.
we discussed it before


Empty menus should be hidden when copying items

When the user tries to copy items from another menu, but that menu is empty, nothing happens. No message, nothing. This is confusing for our users. It would be best to just hide empty menus and prevent users from selecting them.

Heya! This should now be fixed in release 7.1.2. :)


added DP problem Shops and candies

There's a conflict with the file binary_search.py

Please check now.


[azopenai] Updating to the latest 2023-12-01 API

Lots of changes, making areas that were somewhat weakly typed to be strongly typed:

Chat message types for requests and responses are now different, with fields that are relevant to each more clearly called out. For instance, fields relevant to only assistant type messages (like tools) are separated properly.
Strong types for OYD (ie, bring your own data) scenarios, instead of a any parameter.
General updates to just expose new features for models like Dall-E

Also, some general fixes and new tests for things like gpt-4-vision.

/azp run go - azopenai

/azp run go - azopenai

/azp run go - azopenai

/azp run go - azopenai


[Gmod] Error

I have this error in gmod console
No addons ...
New server, first time.

./srcds_linux: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
mercredi 3 juin 2015, 21:23:53 (UTC+0200): Server restart in 10 seconds
./srcds_linux: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
mercredi 3 juin 2015, 21:24:03 (UTC+0200): Server restart in 10 seconds

I think you might not of read the installation instructions correctly
https://github.com/dgibbs64/linuxgsm/wiki/Dependencies

Where ? I don't found. And i'm french and i don't speak very good english :/
2015-06-03 22:48 GMT+02:00 Daniel Gibbs<EMAIL_ADDRESS>
I think you might not of read the installation instructions correctly
https://github.com/dgibbs64/linuxgsm/wiki/Dependencies
—
Reply to this email directly or view it on GitHub
https://github.com/dgibbs64/linuxgsm/issues/415#issuecomment-108611949.

https://github.com/dgibbs64/linuxgsm/wiki/Dependencies#Source-Engine


Readme suggestion for setting test#runners isn't reload safe

I added a custom test runner as per the instructions here: https://github.com/janko-m/vim-test#extending.
This works, but if I ever reload my vimrc, then when I try to use vim-test, I get scary errors like this:
Error detected while processing function test#run[18]..test#base#build_position:
line    1:
E117: Unknown function: test#0#build_position
E15: Invalid expression: test#{a:runner}#build_position(a:type, a:position)
Press ENTER or type command to continue

I was able to work around this by only setting test#runners if it is not already set, but that doesn't feel like the best solution to me:
if !exists("test#runners")
    let test#runners = {'HonorJs': ['HonorRunner']}
endif

Hmm, yeah, that's definitely a bug. The problem is that the same test#runners variable gets extended when loading the plugin with all the other test runners. But it's obviously wrong to use the same test#runners variable, it would be better to use something like test#custom_runners. I'll make that change.

@janko was this bug fixed? I get the same error when simply setting test#python#runner = 'pytest' and running the tests by for example TestFile.


Couldn't import '''BertPreTrainedModel'''

I installed this lib by '''pip install pytorch-pretrained-bert''', and there are no problems when run the examples. However, when I import '''BertPreTrainedModel''', I use '''from pytorch_pretrained_bert import BertPreTrainedModel''', error occurs.
I want to write a new class like '''BertForSequenceClassification''', and in order to use the facility of constructing the instance of the class by "'from_pretrained('bert-base-uncased')''' . My new class need to inherit the class '''BertPreTrainedModel'''.
In another way, we need the config file to get the instance of the class like '''BertForSequenceClassification''', however, I couldn't find the file 'bert_config.json'.
Are there other ways to write a new class like '''BertForSequenceClassification'''?
Thanks all of you!

I guess you have to clone the repository. You just need to add all the classes you want to import in this line:
https://github.com/huggingface/pytorch-pretrained-BERT/blob/3fc63f126ddf883ba9659f13ec046c3639db7b7e/pytorch_pretrained_bert/__init__.py#L12
Then you can install from source:
pip install --editable .
Of course since you download all the code, you can directly add your own class in /pytorch_pretrained_bert/modeling_openai.py then install from source.

So sorry that I am not familiar with the lib installation in python.
Thanks for your suggestions. I know how to solve it.
Best Regards,
Chen Bingyu
On 2019-05-20 19:32, eveliao wrote:

I guess you have to clone the repository. You just need to add all the
classes you want to import in this line:
https://github.com/huggingface/pytorch-pretrained-BERT/blob/3fc63f126ddf883ba9659f13ec046c3639db7b7e/pytorch_pretrained_bert/__init__.py#L12
[1]
Then you can install from source:
pip install --editable .
Of course since you download all the code, you can directly add your
own class in /pytorch_pretrained_bert/modeling_openai.py then install
from source.
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [2], or mute the
thread [3]. [ { "@context": "http://schema.org", "@type":
"EmailMessage", "potentialAction": { "@type": "ViewAction", "target":
"https://github.com/huggingface/pytorch-pretrained-BERT/issues/615?email_source=notifications\u0026email_token=AFUNK24OFCY7KRHX6OVL4PTPWKD3BA5CNFSM4HNTFW5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVYQ2OA#issuecomment-493948216",
"url":
"https://github.com/huggingface/pytorch-pretrained-BERT/issues/615?email_source=notifications\u0026email_token=AFUNK24OFCY7KRHX6OVL4PTPWKD3BA5CNFSM4HNTFW5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVYQ2OA#issuecomment-493948216",
"name": "View Issue" }, "description": "View this Issue on GitHub",
"publisher": { "@type": "Organization", "name": "GitHub", "url":
"https://github.com" } } ]
Links:
[1]
https://github.com/huggingface/pytorch-pretrained-BERT/blob/3fc63f126ddf883ba9659f13ec046c3639db7b7e/pytorch_pretrained_bert/__init__.py#L12
[2]
https://github.com/huggingface/pytorch-pretrained-BERT/issues/615?email_source=notifications&email_token=AFUNK24OFCY7KRHX6OVL4PTPWKD3BA5CNFSM4HNTFW5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVYQ2OA#issuecomment-493948216
[3]
https://github.com/notifications/unsubscribe-auth/AFUNK24OKPGO4TJTYJ7SPZ3PWKD3BANCNFSM4HNTFW5A


delete() method missing from FontFaceSet interface

lib Update Request

Configuration Check

My compilation target is ES2020 and my lib is ["ES2018", "DOM"].
Missing / Incorrect Definition

The delete() method of the FontFaceSet interface is missing.
It has been available in Chrome since v35, Edge since v79, FireFox since v41, and Safari since v10.
Sample Code
const font = new FontFace("MyFont", "url(myFont.woff2)");
document.fonts.delete(font);

Documentation Link
https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/delete

See #51185. You need to include dom.iterable


Game not starting

The game doesn't start running the following command:
./truckersmp-cli -e -p -s -g '/mnt/sdb3/Steam_Games_Linux/steamapps/common/Euro Truck Simulator 2/' -o '/mnt/sdb3/Steam_Games_Linux/steamapps/common/Proton 5.0' -n Username -v   :(
** INFO **  Mod directory: /home/user/.local/share/truckersmp-cli/TruckersMP
** INFO **  AppID/GameID: 227300 (ets2)
** INFO **  Game directory: /mnt/sdb3/Steam_Games_Linux/steamapps/common/Euro Truck Simulator 2/
** INFO **  Prefix: /home/user/.local/share/truckersmp-cli/Euro Truck Simulator 2/prefix
** INFO **  Proton directory: /mnt/sdb3/Steam_Games_Linux/steamapps/common/Proton 5.0
** INFO **  Steam installation directory: /home/user/.local/share/Steam
** INFO **  Startup command:
SteamGameId=227300
SteamAppId=227300
STEAM_COMPAT_DATA_PATH=/home/user/.local/share/truckersmp-cli/Euro Truck Simulator 2/prefix
STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/user/.local/share/Steam
PROTON_USE_WINED3D=0
PROTON_NO_D3D11=1
LD_PRELOAD=/home/user/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
/usr/bin/python3 /mnt/sdb3/Steam_Games_Linux/steamapps/common/Proton 5.0/proton
run
/home/user/truckersmp-cli/truckersmp_cli/truckersmp-cli.exe /mnt/sdb3/Steam_Games_Linux/steamapps/common/Euro Truck Simulator 2/ /home/user/.local/share/truckersmp-cli/TruckersMP
** INFO **  Proton output:
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
fsync: up and running.
Setting breakpad minidump AppID = 227300
Steam_SetMinidumpSteamID:  Caching Steam ID:<PHONE_NUMBER>7997881 [API loaded no]
pid 28661 != 28660, skipping destruction (fork without exec?)
I'm running Arch Linux and the native version of steam.

Switching to the latest release instead of git clone solved it.


Return the UserInfo data correctly in _to_string()

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Minor code change


MNT: Updates to remain API compatible with conda >=4.1.0

Between 4.0.9 and 4.1.0, conda.install went through some significant API
changes. See conda/conda#2369 for the PR that introduced those changes.

Thanks @ericdill. I'm having connectivity problems and didn't see this before pushing #23.
Glad we converged on the same solution! :smile:


Passing back entered data to failed comment submissions, and pasking …

…back the #add-comment anchor for spam and duplicate content errors

Can one of the admins verify this patch?


Removed redundant extra 'the' in a few files

Sorry, I'll resubmit this with the correct git email.

#6149 has the correct commit. Apologies.


Add "yq" function

This change adds the "yq" function which can be used for patching resources using the powerful "yq" syntax.

Fixes #2


nested navigator or fixed component

Version
Tell us which versions you are using:

react-native-router-flux v4.0.0 (v3 is not supported)
react-native v0.56.0

Feature request or How to
I am trying to create a tablet application, and I want my layout to have a sidebar and then content inside but I'm not able to do that I tried searching for how to create a nested navigator that will work independently of its parent and render inside its parent but wasnt able to find any help about it anyone knows how to do that or if its possible to define a fixed component for all navigator children.
sorry if it wasnt clear

You can do this using Drawer, which is a togglable sidebar. Set it as your root, give it a component for contentComponent and put all your other Scenes within it.
<Drawer
    key={'root'}
    contentComponent={ContentForDrawer}
>
    <Scene key={...} component={...}/>
    <Scene key={...} component={...}/>
</Drawer>

Is this what you were looking for?


Removing unneeded .scss-lint.yml file as linting will be taken care of by stylelint and updating .gitignore to cater for changing the test file names

@kllevin please review.

LGTM


[Feature request]

Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md.

No 🛑: please wait to file a request until the functionality is available in the AWS provider
Yes ✅: please list the AWS provider version which introduced this functionality

Is your request related to a problem? Please describe.
I am testing an automatization for workloads in windows, when the module "aws-samples/windows-workloads-on-aws/aws//modules/managed-ad" create a secret by first time work, but when you recreate this secret terraform show this error.
Error: error creating Secrets Manager Secret: InvalidRequestException: You can't create this secret because a secret with this name is already scheduled for deletion.
status code: 400, request id: e4f8cc85-29a4-46ff-911d-c5115716adc5
Describe the solution you'd like.
You need only add recovery_window_in_days as variable.
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/secretsmanager_secret#recovery_window_in_days
Describe alternatives you've considered.
By the moment is possible to make more testing changing the name of the variable: ds_managed_ad_directory_name this solve the error, but in other execution is necessary changing again the name.
Additional context

Hello,
When re-running Terraform, did you check if the Directory Service was fully deleted? It takes more than 30min to be fully deleted.

Hello @marciogmorales
No, I didn't check, but if you can add recovery_window_in_days this alllow us more control over this secrets.

Fixed, thank you for the feedback.


how to ?

What should I put in ip, to give rank "user" to all players?

@gyeyoqu That doesn't really matter cause the user rank doesn't do anything special only admin and mod have special properties

But if you insisit
https://github.com/Megabyte918/MultiOgar-Edited/blob/master/src/PlayerTracker.js#L84
Change "GUEST" to "USER"

@gyeyoqu https://github.com/Megabyte918/MultiOgar-Edited/issues/48 should answer your question


Fix horizontal scroll bug

This fixes https://github.com/microsoft/azuredatastudio/issues/10378
Issue: horizontal scrolling and dynamic heights aren't supported simultaneously, and we had dynamic heights to true by default. So it would break if a user enabled horizontal scolling.
Fix: Look for user settings for horizontal scrolling and set dynamic height to its opposite.

LGTM! Great catch

Coverage increased (+0.04%) to 34.625% when pulling e55c38d46602fd1a2658ab82b720080181d52d44 on bug/horizontal into 62a0cb4dc9863b2ac399bc83b198df0d261c39d7 on master.