Not able to interface odbc using pengines

Hi,
I was trying to interface ODBC with prolog using PostgreSQL, my predicates are working fine on command line tool (i.e using swipl),
but when I host a prolog server on a port & access that port using python-pengines then I am start getting error messages Error communicating with planner: HTTP Error 500: Internal server error append_args/3: Unknown procedure: '$messages':to_list/2 .
Please let me know how I can query ODBC commands using python-pengines
Thanks

It’s been a while since I looked at odbc. Can you post links to both the
working code and the pengines version?
On Thu, Apr 28, 2022 at 3:57 AM Lakshay Sharma @.***>
wrote:

Hi,
I was trying to interface ODBC with prolog using PostgreSQL, my predicates
are working fine on command line tool (i.e using swipl),
but when I host a prolog server on a port & access that port using
python-pengines then I am start getting error messages Error
communicating with planner: HTTP Error 500: Internal Server Error .
Please let me know how I can query ODBC commands using python-pengines
Thanks
—
Reply to this email directly, view it on GitHub
https://github.com/ian-andrich/PythonPengines/issues/24, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAMMOJUHRRSNFXEB3KOCFTVHJVKPANCNFSM5USABHPQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

This is the code I am using for ODBC connection
using default server.pl from Git Readme
% test_database.pl
create_db_connect :-
      odbc_connect('test', _,
            [ alias(mydb),
              open(once)
      ]).

disconnect_database :- odbc_disconnect(mydb).

I have created ODBC Data Source in /etc/odbc.ini
Earlier I was using swipl 8.4 & this error start appearing with pengines verison 0.1.8 (using python 2)
but after upgrading swipl to 8.5.10 , new error arised
Error:
Response string
{
  "code":"permission_error",
  "data":"No permission to call sandboxed `odbc_connect(_5598,_5600,_5602)'\nReachable from:\n\t  '3b8aca44-102e-4832-b3de-1349e90941a4':create_db_connect",
  "event":"error",
  "id":"3b8aca44-102e-4832-b3de-1349e90941a4"
}
Error communicating with planner: Error - probably invalid Prolog query?

ah, it's sandboxed - so you need to explicitly permit this, this may help
https://www.swi-prolog.org/pldoc/doc/_SWI_/library/pengines_sandbox.pl
apologies for brevity...
On Fri, Apr 29, 2022 at 3:49 AM Lakshay Sharma @.***>
wrote:

This is the code I am using for ODBC connection
using default server.pl http://server.pl from Git Readme
% test_database.pl
create_db_connect :-
odbc_connect('test', _,
[ alias(mydb),
open(once)
]).
disconnect_database :- odbc_disconnect(mydb).
I have created ODBC Data Source in /etc/odbc.ini
Earlier I was using swipl 8.4 & this error start appearing with pengines
verison 0.1.8 (using python 2)
but after upgrading swipl to 8.5.10 , new error arised
Error:
Response string
{
"code":"permission_error",
"data":"No permission to call sandboxed `odbc_connect(_5598,_5600,_5602)'\nReachable from:\n\t  '3b8aca44-102e-4832-b3de-1349e90941a4':create_db_connect",
"event":"error",
"id":"3b8aca44-102e-4832-b3de-1349e90941a4"
}
Error communicating with planner: Error - probably invalid Prolog query?
—
Reply to this email directly, view it on GitHub
https://github.com/ian-andrich/PythonPengines/issues/24#issuecomment-1113167209,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAMMOIIWGCKI3O4KRGOL3TVHO5CDANCNFSM5USABHPQ
.
You are receiving this because you commented.Message ID:
@.***>

Thanks @cmungall for looking into it, can you help me out how I can utilize this sandboxed predicates, I don't know how to implement this.
Thanks

ah, it's sandboxed - so you need to explicitly permit this, this may help https://www.swi-prolog.org/pldoc/doc/SWI/library/pengines_sandbox.pl apologies for brevity...

Thanks alot for referencing me this url , I was able to interface my database using sandbox predicates & now I can easily interact with my db using python-pengines
I am adding my source code , so that it will help others
% test_database.pl
:- module(mydb,
  [
  create_db_connect/0,
  disconnect_database/0
  ]
  ).

:- use_module(library(odbc)).
create_db_connect :-
  odbc:odbc_connect('fleet_orchestrator', _,
            [ alias(sqlobj),
              open(once)
      ]).

disconnect_database :- odbc:odbc_disconnect(sqlobj).

:- multifile sandbox:safe_primitive/1.

sandbox:safe_primitive(mydb:create_db_connect).
sandbox:safe_primitive(mydb:disconnect_database).
/* if you have arguments in predicates, use _ (underscore)
example: sandbox:safe_primitive(mydb:query_database(_,_).
*/


[Bug]:

Checklist

[ ]  I am not using Home Assistant. Or: a developer has told me to come here.
[X] I have checked the troubleshooting section and my problem is not described there.
[X] I have read the changelog and my problem is not mentioned there.

Deploy method
PKG executable
Zwavejs2Mqtt version
0.43.0
ZwaveJS version
0.1.61
Describe the bug
Fibaro FgK101 no longer work.
They were perfect before the last update.
I have many nodes but only FGK101 stuck during the interview process.
I've tried everything :
wakeup / exclude & reinclude , but nothing , the behavior is always the same (the interview stucks in an infinite loop).
Please avoid suggesting any actions described above. I have tried everything and more

.
To Reproduce
Update the software at the last release.
Expected behavior
This is clearly a bug. I expect everything to work as it did before the latest release.
Additional context
It would be much appreciated an option to abort the interview procedure.

What @robertsLando said.
And the information from previous interview shouldn't just get forgotten, which it did here. Looks like somehow your upgrade caused the cache files to get lost. I'd look into that if I was you.

zwavejs_2022-06-24.zip
Here the log file  for nodes 40 , 41 ,48

I don't know what you did to your log, but this only includes the raw serial data, no human-readable interpretation. If you have any filters on, disable them please and try again. Please delete the existing logfile before starting and make sure to re-interview at least one of the problematic nodes while the log is being made.

Ciao , what am I doing wrong ?
Thanks a lot

Remove these:

Ciao , as per your request I removed nodes 3 & 40 & tried to re-interviewed node 64.
I attach the log result.
I don't know where to check if the filer log is still working.
BR
antonio
zwavejs_2022-06-27(1).log

Ok, so the issue is that your devices report bogus alarm sensor types:
2022-06-27T11:05:45.096Z CNTRLR   [Node 064] [~] [Alarm Sensor] supportedSensorTypes: 8, [Endpoint 0] [internal]
                                  9,17,24,32,34,42 => 8,9,17,24,32,34,42
2022-06-27T11:05:45.097Z SERIAL » [ACK]                                                                   (0x06)
2022-06-27T11:05:45.098Z DRIVER « [Node 064] [REQ] [ApplicationCommand]
                                  └─[AlarmSensorCCSupportedReport]
                                      supported sensor types: unknown (0x08), unknown (0x09), unknown (0x11), un
                                  known (0x18), unknown (0x20), unknown (0x22), unknown (0x2a)
2022-06-27T11:05:45.101Z CNTRLR « [Node 064] received supported sensor types:
                                  · unknown (0x08)
                                  · unknown (0x09)
                                  · unknown (0x11)
                                  · unknown (0x18)
                                  · unknown (0x20)
                                  · unknown (0x22)
                                  · unknown (0x2a)

and these break a stricter validation of API method arguments I put in place a while ago. I'll just tone down the strictness of that check in the next release, don't think it makes much sense to work around this.


Check Installation Status

Thanks for your effort in creating a docker container for OverpassAPI. It works like a charm.
I'm currently setting up an instance (using a small country export of Austria only). After I ran the make command, everything went through without problem. I am also able to query the API.
Since my database folder is still growing in size (its currently around 11GB large after around 6-8 hours), i wonder if there is any possibility to check for the current state of the installation?
I.e. i would like to know when the installation is actually done or somehow find out approximately how long it will take and how much space it will take in the end?

Hi,
Thanks for your thank you. There are still some bugs on this image, I'll try to fix them up.
Actually, it would be possible to display a "Starting…Finished" display. Don't really know about current import status. I guess it should be implemented in Overpass first. I'll take a look.
Thanks


Got "no active CatalystInstance" related errors when loading a debug enabled apk on physical devices at the first time

Description
If an apk is debug enabled, one out of 3 times, the first load on physical devices (Pixel 5, Samsung S20 Ultra, etc.) cause errors due to "no active CatalystInstance". It only happens on the first load. Sub-sequential loads have no issue.
First error call stack:
Unhandled SoftException com.facebook.react.bridge.ReactNoCrashSoftException: No active CatalystInstance, cannot emitUpdateDimensionsEvent 	at com.facebook.react.modules.deviceinfo.DeviceInfoModule.emitUpdateDimensionsEvent(DeviceInfoModule.java:94) 	at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.emitUpdateDimensionsEvent(ReactRootView.java:1075) 	at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.checkForDeviceDimensionsChanges(ReactRootView.java:1032) 	at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.onGlobalLayout(ReactRootView.java:916) 	at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1084) 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4302) 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3116) 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10885) 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301) 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309) 	at android.view.Choreographer.doCallbacks(Choreographer.java:923) 	at android.view.Choreographer.doFrame(Choreographer.java:852) 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283) 	at android.os.Handler.handleCallback(Handler.java:942) 	at android.os.Handler.dispatchMessage(Handler.java:99) 	at android.os.Looper.loopOnce(Looper.java:226) 	at android.os.Looper.loop(Looper.java:313) 	at android.app.ActivityThread.main(ActivityThread.java:8762) 	at java.lang.reflect.Method.invoke(Native Method) 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Second error call stack:
com.facebook.react.bridge.ReactNoCrashSoftException: Cannot get UIManager because the context doesn't contain an active CatalystInstance. at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:77) at com.facebook.react.uimanager.UIManagerHelper.getEventDispatcher(UIManagerHelper.java:128) at com.facebook.react.uimanager.UIManagerHelper.getEventDispatcherForReactTag(UIManagerHelper.java:106) at com.th3rdwave.safeareacontext.SafeAreaProviderManagerKt.handleOnInsetsChange(SafeAreaProviderManager.kt:39) at com.th3rdwave.safeareacontext.SafeAreaProviderManagerKt.access$handleOnInsetsChange(SafeAreaProviderManager.kt:1) at com.th3rdwave.safeareacontext.SafeAreaProviderManager$addEventEmitters$1.invoke(SafeAreaProviderManager.kt:28) at com.th3rdwave.safeareacontext.SafeAreaProviderManager$addEventEmitters$1.invoke(SafeAreaProviderManager.kt:28) at com.th3rdwave.safeareacontext.SafeAreaProvider.maybeUpdateInsets(SafeAreaProvider.kt:21) at com.th3rdwave.safeareacontext.SafeAreaProvider.onPreDraw(SafeAreaProvider.kt:39) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1121) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4442) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3116) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10885) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309) at android.view.Choreographer.doCallbacks(Choreographer.java:923) at android.view.Choreographer.doFrame(Choreographer.java:852) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8762) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
React Native Version
0.72.6
Output of npx react-native info
System:
OS: macOS 13.5.1
CPU: (10) arm64 Apple M1 Pro
Memory: 78.66 MB / 16.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 18.18.2
path: /opt/homebrew/opt/node@18/bin/node
Yarn: Not Found
npm:
version: 7.24.2
path: ???/node_modules/.bin/npm
Watchman:
version: 2<IP_ADDRESS>
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.1
- iOS 16.1
- macOS 13.0
- tvOS 16.1
- watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 14.1/14B47b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.17
path: /Library/Java/JavaVirtualMachines/jdk-11.0.17+8/Contents/Home/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: ^0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: false
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce

Build a debug apk with index.android.bundle
Side load the apk to a Samsung S20 Ultra or Pixel 5
Start the app
Observe if an error screen shows up
If no, delete the app and repeat step 2 to 4

Snack, screenshot, or link to a repository

Side load the apk to a Samsung S20 Ultra or Pixel 5

Is this specific to those 2 modules only?

I'm having the same issue on pixel 6a emulator

Side load the apk to a Samsung S20 Ultra or Pixel 5

Is this specific to those 2 modules only?

We found the same issue on pixel 6 pro, pixel 2 xl, pixel 4a, and Samsung s21

I'm having the same problem, and I don't think it is a device issue. Did you find any solutions?

Side load the apk to a Samsung S20 Ultra or Pixel 5

Is this specific to those 2 modules only?
@cortinico
We released our production build with RN 0.72.8. We found that 5% users got this crash with phased rollout. We also found a workaround to reduce the crash percentage to 0.15%. However, it is still too hight for us because our crash-free rate was about 99.95%. I guess the issue is coming from some race conditions could not being handled with RN Framework. It did not happen with RN 0.68. Here are some details. I can not reveal our source code. I am not sure if it necessary to create a separate project to reproduce this issue without my company's source code. Please let me know if you need more information.

Our code is sophisticated. We are using brown field approach to build our app. The home page has a native ViewPager to render 5 tabs. The 1st, 2nd, and 4th are rendered by RN fragements, the 3rd and 5th are rendered in native fragments. We used to set offscreenPageLimit to 4 to keep these fragments in memory. There is no issues with RN 0.68 and ealier versions.

The crash only happens 1~2 seconds after the app starts
The work around we found is to delay loading other fragments. So, when the activity being created, we set offscreenPageLimit to 1. After 100ms, we set  offscreenPageLimit to 4. With this tweak, we elimiated 97% crashes.
In debug mode and by setting break points on UIImplementation.java. I did not find registerRootView has been invoked for node 21. How node tag is generated? In RN souce code, allocateTag never generate a tag with value 21.

Callstack:
Caused by java.lang.AssertionError: Root node with tag 21 doesn't exist
   at com.facebook.infer.annotation.Assertions.assertNotNull(Assertions.java:19)

   at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:235)

   at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:419)

   at java.lang.reflect.Method.invoke(Method.java)

   at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)

   at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)

   at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)

   at android.os.Handler.handleCallback(Handler.java:958)

   at android.os.Handler.dispatchMessage(Handler.java:99)

   at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)

   at android.os.Looper.loopOnce(Looper.java:230)

   at android.os.Looper.loop(Looper.java:319)

   at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)

   at java.lang.Thread.run(Thread.java:1012)

Please let me know if you need more information.

We would need a reproducer as suggested by the bot

import static android.content.Context.VIBRATOR_SERVICE;

import android.app.Activity;
import android.app.PendingIntent;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.nfc.tech.IsoDep;
import android.os.Build;
import android.os.Bundle;
import android.os.VibrationEffect;
import android.os.Vibrator;

import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.WritableMap;
import com.github.devnied.emvnfccard.enums.EmvCardScheme;
import com.github.devnied.emvnfccard.model.Application;
import com.github.devnied.emvnfccard.model.EmvCard;
import com.github.devnied.emvnfccard.parser.EmvTemplate;

import java.io.IOException;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;

public class NativeModule extends ReactContextBaseJavaModule implements NfcAdapter.ReaderCallback {
    /**
     * Name of component so it can be accessed in JS
     */
    public static final String REACT_CLASS = "NativeModule";
    private Activity activity;
    private NfcAdapter mNfcAdapter;
    private Promise readNfcPromise;

    NativeModule(ReactApplicationContext context) {
        super(context);
        activity = context.getCurrentActivity();

        // For NFC reading
        mNfcAdapter = NfcAdapter.getDefaultAdapter(context);
    }

    @Override
    public String getName() {
        return REACT_CLASS;
    }

    @ReactMethod
    public void readNfc(Promise promise) {
        if(promise != null) {
            if(readNfcPromise != null) {
                promise.reject("Already reading", "Already reading");
                return;
            }
            if (mNfcAdapter != null) {
                this.readNfcPromise = promise;
                Bundle options = new Bundle();
                // Work around for some broken Nfc firmware implementations that poll the card too fast
                options.putInt(NfcAdapter.EXTRA_READER_PRESENCE_CHECK_DELAY, 250);

                // Enable ReaderMode for all types of card and disable platform sounds
                // the option NfcAdapter.FLAG_READER_SKIP_NDEF_CHECK is NOT set
                // to get the data of the tag after reading
                mNfcAdapter.enableReaderMode(this.activity,
                        this,
                        NfcAdapter.FLAG_READER_NFC_A |
                                NfcAdapter.FLAG_READER_NFC_B |
                                NfcAdapter.FLAG_READER_NFC_F |
                                NfcAdapter.FLAG_READER_NFC_V |
                                NfcAdapter.FLAG_READER_NFC_BARCODE |
                                NfcAdapter.FLAG_READER_NO_PLATFORM_SOUNDS,
                        options);
            } else {
                promise.reject("NFC reader not initialized", "NFC reader not initialized");
                return;
            }
        }
    }

    @RequiresApi(api = Build.VERSION_CODES.O)
    @Override
    public void onTagDiscovered(Tag tag) {
    }
}

I recently added NFC reading to my native module and I am getting this error now.
I think it's related to this line
       mNfcAdapter = NfcAdapter.getDefaultAdapter(context);

Please let me know if you need more information.

We would need a reproducer as suggested by the bot

I believe I found out why our app is carshing. We use the following code in our RN Fragment to update props when there are some data changes. If a such change occurs during the initialization of the RN App inside the RN Fragment, the error happens:
reactRootView?.appProperties = newProps
The only fix we can apply right now is delaying the appProperties update. We will try to use DeviceEventEmitter to update data from Native to RN to see if we can remove the issue completely.

import static android.content.Context.VIBRATOR_SERVICE;

import android.app.Activity;
import android.app.PendingIntent;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.nfc.tech.IsoDep;
import android.os.Build;
import android.os.Bundle;
import android.os.VibrationEffect;
import android.os.Vibrator;

import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.WritableMap;
import com.github.devnied.emvnfccard.enums.EmvCardScheme;
import com.github.devnied.emvnfccard.model.Application;
import com.github.devnied.emvnfccard.model.EmvCard;
import com.github.devnied.emvnfccard.parser.EmvTemplate;

import java.io.IOException;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;

public class NativeModule extends ReactContextBaseJavaModule implements NfcAdapter.ReaderCallback {
    /**
     * Name of component so it can be accessed in JS
     */
    public static final String REACT_CLASS = "NativeModule";
    private Activity activity;
    private NfcAdapter mNfcAdapter;
    private Promise readNfcPromise;

    NativeModule(ReactApplicationContext context) {
        super(context);
        activity = context.getCurrentActivity();

        // For NFC reading
        mNfcAdapter = NfcAdapter.getDefaultAdapter(context);
    }

    @Override
    public String getName() {
        return REACT_CLASS;
    }

    @ReactMethod
    public void readNfc(Promise promise) {
        if(promise != null) {
            if(readNfcPromise != null) {
                promise.reject("Already reading", "Already reading");
                return;
            }
            if (mNfcAdapter != null) {
                this.readNfcPromise = promise;
                Bundle options = new Bundle();
                // Work around for some broken Nfc firmware implementations that poll the card too fast
                options.putInt(NfcAdapter.EXTRA_READER_PRESENCE_CHECK_DELAY, 250);

                // Enable ReaderMode for all types of card and disable platform sounds
                // the option NfcAdapter.FLAG_READER_SKIP_NDEF_CHECK is NOT set
                // to get the data of the tag after reading
                mNfcAdapter.enableReaderMode(this.activity,
                        this,
                        NfcAdapter.FLAG_READER_NFC_A |
                                NfcAdapter.FLAG_READER_NFC_B |
                                NfcAdapter.FLAG_READER_NFC_F |
                                NfcAdapter.FLAG_READER_NFC_V |
                                NfcAdapter.FLAG_READER_NFC_BARCODE |
                                NfcAdapter.FLAG_READER_NO_PLATFORM_SOUNDS,
                        options);
            } else {
                promise.reject("NFC reader not initialized", "NFC reader not initialized");
                return;
            }
        }
    }

    @RequiresApi(api = Build.VERSION_CODES.O)
    @Override
    public void onTagDiscovered(Tag tag) {
    }
}

I recently added NFC reading to my native module and I am getting this error now. It's related to this line  mNfcAdapter = NfcAdapter.getDefaultAdapter(context);
If I comment that line out I don't get the error, but then nothing works because I need that line :)

Does NfcAdapter trigger any props update of your RN components? From my experience, props change causes this issue if the component is still loading/initialzing

The way I solved this was by moving mNfcAdapter = NfcAdapter.getDefaultAdapter(context); into a method that I would call from react-native along with using getReactApplicationContext() instead of the context that was passed in the constructor.
Now it is working fine.

+1

Bump

+1


A typo on paper

Hi Brcsomnath, I find that in your paper the Table 5 has a typo: the PMR should be Acc, right? This may lead to some misunderstanding.

Thanks a lot for bringing this to our notice. We will work on fixing it and update the arXiv version.


pkg/envoy: update generated files

This updates generated files with the development VM v106.
Signed-off-by: André Martins<EMAIL_ADDRESS>

This change is

test-me-please

@aanm out of curiosity, how did you make these files? Would be good to document updating these files in the future in case things get out of sync again.

Ideally yes, that should be backported. But it’s not critical since those files are regenerated on every build.

@ianvernon they just shown up after doing starting a development VM.

@aanm easy enough :-) thanks!


Plugin should allow using the FIPS AWS endpoint for FedRAMP compliance

For FedRAMP compliance with AWS, it's required to use the FIPS endpoints provided by AWS to create the lambda resources.
Currently there is no way to deploy a FedRAMP compliant AWS Lambda.
Context:

https://aws.amazon.com/compliance/fips/
https://github.com/spinnaker/clouddriver/blob/master/clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/ops/AbstractLambdaAtomicOperation.java (not way to provide endpoint)

I don't think it is a plugin issue. This appears to require a fix in how the Lambda driver is implemented in clouddriver.

This is not lambda specific . The clouddriver needs a way to configure AWS API to use FIPS endpoints for all communication in case of FedRAMP compliant deployments .

agreed. I think we should raise this as an issue in clouddriver repo.


Drop pybcpy dependency

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

@sarthakpati - how do I check that the LICENSE file is being packaged?


Make CI/CD is up to date

With the added React, the needed command line commands need to be changed. Should just need to change the npm install to npm run install:all and add a npm run build:webview.

I want to keep this open until we actually try to publish using the GitHub action.


Fix setters for compat with frameworks

I thought I did everything correctly with the custom element property setters but Svelte quickly informed me that I had in fact not.
I think the issue here is that Svelte has special handling for custom elements — if it sees that an attribute has a matching property it will pass it in as a property instead of an attribute. This is confusing because it does not do this for native DOM elements. ¯\(ツ)/¯
But anyway, this is probably a real bug with how I implemented the setter for offset. It should be possible to "unset" it by doing scene.offset = null but that crashes and burns right now.

I think the easiest answer here may be to just not reflect the offset property to the attribute. There's precedent for that in native elements. Could just store a reference to it locally at this._offset and use that if someone passes it in. Just let the attribute path be a helpful way to define your defaults in the markup.

Going to remove the bug tag from this because I don't think it's really a "bug" in the typical sense — this is on Svelte for trying to do something a little weird.


[Gally]: master <- dev

Automatically created by Git-Ally

:tada: This PR is included in version 1.10.87 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Is it possible to hide placeholder in multiple select after first selection or when disabled?

Placeholder can be dynamic so yes, you can just change it to '' whenever needed.

Thanks for the quick replay..
My question was asked because even when I set the placeholder value to empty string - it keeps taking place in the DOM:
Attached is an example:
With placeholder string:  http://prntscr.com/ekkbi8
With placeholder empty string:  http://prntscr.com/ekkbvd
Thanks...

Solved it with CSS for now...
Hiding disabled component placeholder: .multiselect--disabled  .multiselect__single {display: none;}
Hiding after first tag is selected:  .multiselect__tag ~ .multiselect__single {display: none; }

Och, okay. Glad you found a solution! If you think the placeholder functionality could use some enhancement - please create a feature request issue!

@yoavpe1 Can you please try to explain how you solved it, I tried this CSS with no luck. Thank you

@pushamaku
Hi,
To hide the placeholder when the component is disabled:
.multiselect--disabled   .multiselect__single {
display: none;
}
To hide the placeholder after first item is chosen:
.multiselect__tag ~  .multiselect__single {
display: none;
}
Make sure your css overwrite the component css. If it doesn't, try to add a parent class to the css
for example:
.your-class  .multiselect__tag ~ .multiselect__single {
display: none;
}
Hope it helps...

@yoavpe1
Thank you for your help. I have added this CSS, but there I still cannot get rid of the placeHolder when items are selected.

@pushamaku
It is difficult to help without seeing the code :)
I am attaching a screen print of the debugging tool with the relevant code.
Try to find this DOM element ( and add to it display: none in the developer tool to see that you are dealing with the correct element.
Then check that the css rule that you wrote applies to this element.
http://prntscr.com/f6kpn2

@yoavpe1
Yes, you're absolutely right, but THANK YOU so much for pointing me in the right direction, as I believe the issues is solved now, and no extra logic to mess with the placeholder was needed.
When I checked the DOM, it seems that in my version of this component the relevant element is actually multiselect__input and not multiselect__single
It works perfectly!

@yoavpe1 This could actually be worth a new feature. Something like HidePlaceholderOnSelect as a new boolean Prop. What do you mean?


quimage not available ?

this is a really useful code for working with u-root and plan9.
I am wondering if quimage, which is mentioned in the README, is available yet ?
I think it will  help me with cross testing

found it :)
will close..

My apologies, I fixed the link in the README :)

Yeah that was what put me off .
great project btw .


Multi port support

If my port 3000 is occupied, how can I run this program?

You can define PORT as an environment variable in the .env file.

such as PORT=3360 ?

my .env is here
[root@archlinux JabRefOnline]# cat .env
DATABASE_URL="postgresql://root:passwd@localhost:5432/jabref?schema=public"
PORT=3380

but it shows
[root@archlinux JabRefOnline]# yarn dev
yarn run v1.22.11
$ nuxt

 WARN<EMAIL_ADDRESS>is installed but >=4.2.0 is expected                                   23:34:30

ℹ Merging Tailwind config from ~/tailwind.config.js                           nuxt:tailwindcss 23:34:31

   ╭───────────────────────────────────────────────────────╮
   │                                                       │
   │   Nuxt @ v2.15.8                                      │
   │                                                       │
   │   ▸ Environment: development                          │
   │   ▸ Rendering:   client-side                          │
   │   ▸ Target:      server                               │
   │                                                       │
   │   Listening: http://localhost:3380/                   │
   │                                                       │
   │   Tailwind Viewer: http://localhost:3380/_tailwind/   │
   │                                                       │
   ╰───────────────────────────────────────────────────────╯

ℹ Preparing project for development                                                            23:34:33
ℹ Initial build may take a while                                                               23:34:33
node:events:371
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED <IP_ADDRESS>:6380
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1146:16)
Emitted 'error' event on RedisClient instance at:
    at RedisClient.on_error (/root/JabRefOnline/node_modules/redis/index.js:342:14)
    at Socket.<anonymous> (/root/JabRefOnline/node_modules/redis/index.js:223:14)
    at Socket.emit (node:events:394:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '<IP_ADDRESS>',
  port: 6380
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

You need to start redis as well

I have used systemctl to start and enable redis, but it still shows that
[root@archlinux JabRefOnline]# yarn dev
yarn run v1.22.11
$ nuxt

 WARN<EMAIL_ADDRESS>is installed but >=4.2.0 is expected                                   01:34:57

ℹ Merging Tailwind config from ~/tailwind.config.js                           nuxt:tailwindcss 01:34:58

   ╭───────────────────────────────────────────────────────╮
   │                                                       │
   │   Nuxt @ v2.15.8                                      │
   │                                                       │
   │   ▸ Environment: development                          │
   │   ▸ Rendering:   client-side                          │
   │   ▸ Target:      server                               │
   │                                                       │
   │   Listening: http://localhost:3380/                   │
   │                                                       │
   │   Tailwind Viewer: http://localhost:3380/_tailwind/   │
   │                                                       │
   ╰───────────────────────────────────────────────────────╯

ℹ Preparing project for development                                                            01:35:00
ℹ Initial build may take a while                                                               01:35:00
node:events:371
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED <IP_ADDRESS>:6380
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1146:16)
Emitted 'error' event on RedisClient instance at:
    at RedisClient.on_error (/root/JabRefOnline/node_modules/redis/index.js:342:14)
    at Socket.<anonymous> (/root/JabRefOnline/node_modules/redis/index.js:223:14)
    at Socket.emit (node:events:394:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '<IP_ADDRESS>',
  port: 6380
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[root@archlinux JabRefOnline]# systemctl status redis
● redis.service - Advanced key-value store
     Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2021-08-19 01:34:35 CST; 32s ago

in the package json I see that it uses a docker container to start redis on port 6300
https://github.com/JabRef/JabRefOnline/blob/08fd8d5e2ee3c7968f48d41568c6af6f6ecbe993/package.json#L26

That's so sad, I must need to install docker

Things seem okay, but the web shows ERR_CONNECTION_REFUSED
[root@archlinux JabRefOnline]# yarn dev
yarn run v1.22.11
$ nuxt

 WARN<EMAIL_ADDRESS>is installed but >=4.2.0 is expected                                   01:50:44

ℹ Merging Tailwind config from ~/tailwind.config.js                           nuxt:tailwindcss 01:50:44

   ╭───────────────────────────────────────────────────────╮
   │                                                       │
   │   Nuxt @ v2.15.8                                      │
   │                                                       │
   │   ▸ Environment: development                          │
   │   ▸ Rendering:   client-side                          │
   │   ▸ Target:      server                               │
   │                                                       │
   │   Listening: http://localhost:3380/                   │
   │                                                       │
   │   Tailwind Viewer: http://localhost:3380/_tailwind/   │
   │                                                       │
   ╰───────────────────────────────────────────────────────╯

ℹ Preparing project for development                                                            01:50:47
ℹ Initial build may take a while                                                               01:50:47
ℹ Discovered Components: .nuxt/components/readme.md                                            01:50:47
✔ Builder initialized                                                                          01:50:47
✔ Nuxt files generated                                                                         01:50:47

✔ Client
  Compiled successfully in 55.36s

ℹ Waiting for file changes                                                                     01:51:45
ℹ Memory usage: 500 MB (RSS: 733 MB)                                                           01:51:45
ℹ Listening on: http://localhost:3380/                                                         01:51:45
No issues found.                                                                               01:51:45

Did you init the postgres database?  That was my problem as well.
Run yarn prisma:migrate:dev to initialize the database. You may also want to use yarn prisma:seed to fill the database with some initial test data.
Then run and log in using the Test-User provided in the readme:
http://localhost:/user/login

I follow the readme, actually.
yarn install
yarn prisma:migrate:dev
yarn dev

run yarn prisma:seed to fill the database

same error exsit

I don't really understand your last comment. It seems that the development server runs successfully on localhost. Not sure why you would expect it to run on your domain. Did you try to run jabref online on your server as well?


Replace skia with node-canvas

This PR replaces skia with node-canvas, which hopefully has better platform support.

Looks like 62ea2217d8a3524091f49e4ae3b43b91f8daa766 accidentally dropped the dependency on glob.

Was glob used by anything?  I thought it was vestigal.

https://github.com/ZeLonewolf/openstreetmap-americana/blob/45456a9b45eeceadde8c5db9efa219d90064f81f/scripts/sprites.js#L14

Wowie color-namer sure is slow.

We could always just replace it with:
https://github.com/ZeLonewolf/openstreetmap-americana/blob/45456a9b45eeceadde8c5db9efa219d90064f81f/src/constants/color.js#L47-L59
but in reverse.

npm install fails on my M1 Mac with this change. Looks like there's no arm64 build of node canvas available.
npm ERR! code 1
npm ERR! path /Users/quincy/Documents/repos/osmus/openstreetmap-americana/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --update-binary
npm ERR! Failed to execute '/Users/quincy/.nvm/versions/node/v18.14.0/bin/node /Users/quincy/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/Users/quincy/Documents/repos/osmus/openstreetmap-americana/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/quincy/Documents/repos/osmus/openstreetmap-americana/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using<EMAIL_ADDRESS>npm ERR! node-pre-gyp info using<EMAIL_ADDRESS>| darwin | arm64
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v108-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.0/canvas-v2.11.0-node-v108-darwin-unknown-arm64.tar.gz

It looks like the released binaries for node-canvas only support newer versions of macOS. On an older system, I have to run npm install canvas --build-from-source so that the transitive dependency pixman can load without crashing.


[W6.2][T09-B3]Low Weng Fei

Accepting this PR without a review because another of your PRs for this tutorial was reviewed in detail.


How to suppress? Doc doesn't say

Currently neither https://github.com/rjmurillo/moq.analyzers/blob/main/README.md nor https://github.com/rjmurillo/moq.analyzers/blob/main/docs/rules/README.md explain how to suppress a rule.

Hi there! Thanks for your interest!
Moq.Analyzers can be configured via any of the existing analyzer configuration methods (.editorconfig, inline suppressions, etc.). Documentation is available here: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/suppress-warnings.
I'll make a PR now to add this to the README.


chore: move standard-version to root

Description
In preparation for the first release, I need to update the configuration for standard-version. With us moving to yarn workspaces I've:

Moved the standard-version and yarn run tag call to the root of the repository
Configured standard-version to only read and bump the ./plugin/package.json file
Configured standard-version to bump the ./example/package.json file

@jzempel I've updated the homepage attribute to be a relative path. If this released correctly in the netlify preview and gh-pages we should be ok.

https://zendeskgarden.github.io/tailwindcss/ is showing correctly now


Add new marker for notebook tests

As a part of this change, also separating unit tests and notebooks tests. The notebook tests are failing for some reason which is not easy to fix. So separating the unit tests and notebooks tests to make PRs can merge if unit tests pass.

Codecov Report
Patch coverage has no change and project coverage change: -3.89 :warning:

Comparison is base (ffa8e5c) 72.13% compared to head (81d01cf) 68.24%.

:exclamation: Current head 81d01cf differs from pull request most recent head 4dcb349. Consider uploading reports for the commit 4dcb349 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
- Coverage   72.13%   68.24%   -3.89%
==========================================
  Files          27       27
  Lines        3603     3603
==========================================
- Hits         2599     2459     -140
- Misses       1004     1144     +140

Flag
Coverage Δ

unittests
68.24% <ø> (-3.89%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


basic support for try except

Implements https://github.com/numba/numba/issues/4898#issuecomment-559110992

I'll add user docs in a different PR.

running through internal CI (numba_58)

CI is failing for Python 3.7 and 3.8 with one failing test:
[2019-12-09 10:30:34,437] {bash_operator.py:137} INFO - ======================================================================
[2019-12-09 10:30:34,437] {bash_operator.py:137} INFO - FAIL: test_unsupported_op_code (numba.tests.test_dataflow.TestDataFlow)
[2019-12-09 10:30:34,437] {bash_operator.py:137} INFO - ----------------------------------------------------------------------
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO - Traceback (most recent call last):
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\tests\test_dataflow.py", line 206, in test_unsupported_op_code
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     compile_isolated(pyfunc, (), flags=flags)
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler.py", line 180, in compile_isolated
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     flags, locals)
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler.py", line 541, in compile_extra
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     return pipeline.compile_extra(func)
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler.py", line 328, in compile_extra
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     return self._compile_bytecode()
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler.py", line 387, in _compile_bytecode
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     return self._compile_core()
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler.py", line 367, in _compile_core
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     raise e
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler.py", line 358, in _compile_core
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     pm.run(self.state)
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler_machinery.py", line 331, in run
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     raise patched_exception
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler_machinery.py", line 322, in run
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     self._runPass(idx, pass_inst, state)
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock
[2019-12-09 10:30:34,438] {bash_operator.py:137} INFO -     return func(*args, **kwargs)
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler_machinery.py", line 281, in _runPass
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     mutated |= check(pss.run_pass, internal_state)
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\compiler_machinery.py", line 268, in check
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     mangled = func(compiler_state)
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\untyped_passes.py", line 113, in run_pass
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     post_proc.run()
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\postproc.py", line 78, in run
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     self.func_ir.blocks = transforms.canonicalize_cfg(self.func_ir.blocks)
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\transforms.py", line 303, in canonicalize_cfg
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     return canonicalize_cfg_single_backedge(blocks)
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\transforms.py", line 232, in canonicalize_cfg_single_backedge
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     cfg = compute_cfg_from_blocks(blocks)
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\analysis.py", line 243, in compute_cfg_from_blocks
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     cfg.add_edge(k, target)
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -   File "C:\Users\ci\64\Miniconda3\envs\testenv_58951d2a-c31b-4813-9839-20eec3295a52\lib\site-packages\numba\controlflow.py", line 86, in add_edge
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO -     assert dest in self._nodes
[2019-12-09 10:30:34,439] {bash_operator.py:137} INFO - AssertionError: Failed in object mode pipeline (step: processing IR)

https://github.com/numba/numba/pull/4902#issuecomment-563327457 is because of empty try-except:
try:
    pass
except:
    pass

Fixing it now

Added checks to disallow storing the exception object into a user variable; i.e. Exception as e

I will be adding docs tmr

@sklam these could probably do with looking at https://github.com/stuartarchibald/numba/commit/c75ec26aa8f6a44b2dd770bc53c57c8723574886#diff-00b0797d8859391b8f407feea491d0b4R362-R494, one causes the CFG to break, the others are RuntimeErrors that shouldn't be. Thanks.

This:
def bar(x):
    return np.asarray(list(reversed(x.tolist())))

@njit
def test_objmode():
    x = np.arange(5)
    y = np.zeros_like(x)
    try:
        with objmode(y='intp[:]'):  # annotate return type
            # this region is executed by object-mode.
            y += bar(x)
    except:
        pass
    return y

gives:
numba/numba/interpreter.py", line 837, in op_CALL_FUNCTION_KW
    nkeys = len(keys)
UnboundLocalError: Failed in nopython mode pipeline (step: analyzing bytecode)
local variable 'keys' referenced before assignment

This:
@njit
def udt():
    x = 1
    y = 0
    try:
        x / y
    except Exception:
        pass

udt()

raises ZeroDivisionError when it shouldn't?

https://github.com/numba/numba/pull/4902/commits/f127335b25a66147fb643992aacde6b6952cc24f fixes https://github.com/numba/numba/pull/4902#issuecomment-564569632 and it's not an elegant way but will do the job before all the old-style impl is updated
https://github.com/numba/numba/pull/4902/commits/6af3ef1c727d1e5a09b43fbf823ddd023aa40d74 fixes https://github.com/numba/numba/pull/4902#issuecomment-564569632

now has conflict with master

🎉

i tried the code above :
@njit
def udt():
x = 1
y = 0
try:
x / y
except Exception:
pass
udt()
in numba version 0.47 and 0.48 and it still throws me error :  "UnsupportedError: Failed in nopython mode pipeline (step: analyzing bytecode)
'try' block not supported until python3.7 or later"
how to solve this issue?

@mobassir94 I just tried the snippet you suggested on the current Numba master 0.50.0dev0-7-g917f582433-dirty and it seems to be fine. Could you give it a try?

@esc which one?
i tried this :
`@njit
def udt():
x = 1
y = 0
try:
x / y
except Exception:
pass
udt()`
and it didn't work at all in kaggle kernel
another code that i was trying is this one :
%%time from langdetect import detect count = 0 noise = [] non_eng = [] for i in range(len(df_train_full)):     try:         lang = detect(df_train_full.comment_text[i])         if(lang != 'en'):             count +=1             non_eng.append(i)     except:         noise.append(i)
and the error comes for this line of code : lang = detect(df_train_full.comment_text[i])
i can't use this library : https://pypi.org/project/langdetect/ in try  block,will you please give it a try and see if you can make it work?
the dataset i was using is this one : https://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification/data

@mobassir94 thanks for following up. We appreciate your input in this matter. I am not sure what you mean "it didn't work at all in kaggle kernel"?! I just tried it again locally:
💥 zsh» cat foo033.py
from numba import njit

@njit
def udt():
    x = 1
    y = 0
    try:
        x / y
    except Exception:
        pass

udt()
💥 zsh» python foo033.py
💥 zsh» echo $?
0
💥 zsh» git desc
0.50.0dev0-7-g917f582433

As you can see I am not receiving any error message. Perhaps you could submit the full backtrace of the exception? Also, what Python version are you using? As can be seen on https://pypi.org/project/numba/ Numba only supports Pythonn 3.6 and later.
As for the issues with langdetect, only a subset of NumPy and Python functions/features are supported by Numba, documentation on those supported can be found here.

NumPy Features
Python Features

Effectively this means you can not use langdetect in functions that you would like to compile with  Numba.

@mobassir94 Could you please open an issue for further discussion please? It will also be helpful for you to report the numba version used in the Kaggle kernel, i.e. numba.__version__ - many thanks!

dear @gmarkall  as from last comment of @esc  it is clear to me that numba doesn't support outside package like langdetect,i was using langdetect in try block so it was not working,i guess the program i tried to execute on gpu can't be done using numba,thanks for your comment

Hello!
I run:
try:
    xx_inv = np.linalg.inv(xx)
except np.linalg.LinAlgError:
    return [np.nan], [[np.nan, np.nan]]

It gives:
numba.core.errors.UnsupportedError: Failed in nopython mode pipeline (step: analyzing bytecode)
'try' block not supported until python3.7 or later

I have python3.6, but in my case this is requirement. Is any way to use try on py3.6 with numba or replacement for try?


Remove some recursive table read locks

This pull requests removes recursive "t.mu" table read locks -- which
can deadlock -- from the functions the GenMutateStmt() function calls.
Refs #246

Simply removing the locking is perilous. This code path is executed during runtime when ddl queries are used. That makes it also a concern of data visibility and integrity not just about locking/deadlocking. This code path mutates the actual table structure which is read by the query executing path in other goroutines and will need memory fencing to ensure correctness.

@dahankzter the lock is still there, but only on the top-level function (GenMutateStmt). Only the nested recursive calls were removed.

Maybe that's enough but in genDDLSTatement the table is mutated.
t.Columns = append(t.Columns[:idx], t.Columns[idx+1:]...)

Which is now afaict not protected anymore which in best case scenario only bugs the race detector.

If it's not protected now then it wasn't protected before the commit. This commit doesn't change that. The RLock is still taken.
However, I see that it is protected:
func ddl(ctx context.Context, schema *gemini.Schema, sc *gemini.SchemaConfig, table *gemini.Table, s store.Store, r *rand.Rand, p gemini.PartitionRangeConfig, testStatus *Status, logger *zap.Logger) error {
	if sc.CQLFeature != gemini.CQL_FEATURE_ALL {
		logger.Debug("ddl statements disabled")
		return nil
	}
	table.Lock()
	if len(table.MaterializedViews) > 0 {
		// Scylla does not allow changing the DDL of a table with materialized views.
		return nil
	}
	defer table.Unlock()
	ddlStmts, postStmtHook, err := schema.GenDDLStmt(table, r, p, sc)

where

func (t *Table) Lock() {
	t.mu.Lock()
}

Locks are hard, please fix this lock asap:
        table.Lock()
	if len(table.MaterializedViews) > 0 {
		// Scylla does not allow changing the DDL of a table with materialized views.
		return nil
	}
	defer table.Unlock()

If it has a materialized view the lock will be kept in perpetuity since the code returns without unlocking the lock.

@dahankzter Good catch: https://github.com/scylladb/gemini/pull/258


Serving images

Simple API (single url) for serving random image from hard disk

Done serving image from static directory (hardcoded example.png)

TODO: Serve random file from disk or from database


GPG key

I was trying to use a wishlist for SSH on my server. I am using Yubikey as my SSH key to the server. When I ran it gave me a failed setup authentication method: failed parse private key". Do you have any solution for this? I appreciate your help.

closing for lack of response, feel free to reopen/ping if needed


Make xDS network policies per-endpoint instead of per-identity

Since there is endpoint-specific configuration which affects policy, this PR changes network policies to be applied per endpoint (via IPs) rather than per identity.
Fixes: #3122

test-me-please

test-me-please

I'd like to avoid duplicating policies for IPv4 and IPv6. I see that if we only have the packet's IP addressing to go by in the sidecar case this may be necessary, but then we should probably just add both of the IP addresses as fields in the NetworkPolicy, i.e. have two keys/indices for the same policy.
For the host proxy we can use whatever reference that uniquely identifies the endpoint. I've so far used the string representation of the endpoint ID, which is then configured into Cilium L7 filter configuration for the endpoint's redirect/listener. @rlenglet can we not do this for the sidecar too?

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

This PR will be superseded by #3151.


[BUG] Proxy Requests Not Timing Out

Please note your issue will be closed without comment if do not fill out the issue checklist and provide ALL the requested information.
yarn why http-proxy-middleware OR npm ls http-proxy-middleware output (mask private folder names with *****)
[1/4] 🤔  Why do we have the module "http-proxy-middleware"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found<EMAIL_ADDRESS>info Has been hoisted to "http-proxy-middleware"
info This module exists because it's specified in "dependencies".
info Disk size without dependencies: "176KB"
info Disk size with unique dependencies: "596KB"
info Disk size with transitive dependencies: "1.89MB"
info Number of shared dependencies: 15

Please verify that you've followed these steps
[x] - I've updated to latest http-proxy-middleware.
Describe the bug
The proxied request does not timeout after the specified time set in options.proxyTimeout passes
To Reproduce
If possible, please provide minimal example on CodeSandbox that demonstrates the issue. You can use the following template: https://codesandbox.io/s/http-proxy-middleware-44oc1
Step-by-step reproduction instructions
1. Add a proxyTimeout to the configuration object
2. Try the request

Expected behavior
I expect the request to timeout at the time specified in the proxyTimeout
http-proxy-middleware configuration
const proxyConfig = {
  changeOrigin: true,
  pathRewrite: {
    [`^/proxy`]: '',
  },
  logLevel: 'silent',
  proxyTimeout: tenSeconds,
}

router.use(
  ['/timeoutTest'],
  createProxyMiddleware({
// target goes to an endpoint with a very long request
    target: 'http://localhost:8081',
    ...proxyConfig,
  })
)

Server (please complete the following information):

OS: [MacOS]
NodeJS version: [e.g. 12.16.3]

Additional context
Add any other context about the problem here.

proxyTimeout is a configuration option from http-proxy.
If you experience issues with proxyTimeout it should be reported in that project:
https://github.com/http-party/node-http-proxy/issues


is this good for chat system?

i mean you now  its a chat it floods ..  example 10 user same ip . they chat .. does it counted ? ..

ddos_1.default is not a constructor

@Dj-jom2x Yes, it would be quite good for a chat system. However, the user who is flooding the system will need some kind of feedback on how long they have to wait. It's a good idea to provide that kind of information as a configurable option. Keeping this thread open as its a very good feature.


Skip adding file name

Description of Changes
Please check that the PR fulfills these requirements

[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
[ ] Add a changelog entry (for non-trivial bug fixes / features)
[ ] CI passes

Log Files
Logs / Second
CPU Average (%)
Memory Average (MB)

1
1000
3.1724799
27.308594

1
5000
8.241525
40.61894

1
10000
15.1037655
54.576508

1
50000
57.570232
189.36719

1
100000
113.25356
293.9433

10
100
6.0690403
28.616919

10
500
10.051977
41.512123

10
1000
17.224506
54.099678

10
5000
63.001823
144.43265

10
10000
117.16868
313.69504

Log Files
Logs / Second
CPU Average (%)
Memory Average (MB)

1
1000
2.4655373
27.37756

1
5000
6.413985
34.54445

1
10000
10.896756
41.837418

1
50000
38.948593
102.05833

1
100000
72.088905
178.1933

10
100
4.172478
28.681978

10
500
8.569209
38.074085

10
1000
12.000324
44.57597

10
5000
48.156216
114.282326

10
10000
81.20783
181.71565


Release Google.Cloud.RecaptchaEnterprise.V1 version 1.1.0

Changes in this release:

Commit 0790924: fix: Add gRPC compatibility constructors
Commit 0ca05f5: chore: Regenerate all APIs using protoc 3.13 and Grpc.Tools 2.31
Commit 6bde7a3: docs: Regenerate all APIs with service comments in client documentation
Commit f83bdf1: fix: Apply timeouts to RPCs without retry
Commit 947a573: docs: Regenerate all clients with more explicit documentation

Yay :)

Created release for Google.Cloud.RecaptchaEnterprise.V1-1.1.0


[MLLIB] Add reservoir sample for feature in RandomForest and fix other issues in tree

Reservoir sample for feature
Verify input rdd size > 0 when building DecisionTreeMetadata
Fix other formatting issues

Can one of the admins verify this patch?

Hey @AiHe this generally isn't how to propose changes. You're trying to intro a new feature and several changes that aren't quite related. Do you mind closing this PR and then review https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark ?

@srowen Sorry for this mixed RP. After reading the wiki, I guess I commit "Before proceeding, contributors should evaluate if the proposed change is likely to be relevant, new and actionable." I'll follow the wiki in feature's RP.


raise value.with_traceback(tb)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/http/client.py", line 1345, in getresponse
    response.begin()
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/datalad/miniconda3/envs/tinuous-dev/bin/tinuous", line 33, in <module>
    sys.exit(load_entry_point('tinuous', 'console_scripts', 'tinuous')())
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/mnt/datasets/datalad/ci/tinuous/src/tinuous/__main__.py", line 127, in fetch
    paths = obj.download(Path(path))
  File "/mnt/datasets/datalad/ci/tinuous/src/tinuous/github.py", line 313, in download
    self.client.download_zipfile(self.logs_url, path)
  File "/mnt/datasets/datalad/ci/tinuous/src/tinuous/base.py", line 141, in download_zipfile
    self.download(path, zippath)
  File "/mnt/datasets/datalad/ci/tinuous/src/tinuous/base.py", line 111, in download
    r = self.get(path, stream=True)
  File "/mnt/datasets/datalad/ci/tinuous/src/tinuous/base.py", line 85, in get
    r = self.session.get(url, **kwargs)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/requests/sessions.py", line 677, in send
    history = [resp for resp in gen]
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/requests/sessions.py", line 677, in <listcomp>
    history = [resp for resp in gen]
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/requests/sessions.py", line 237, in resolve_redirects
    resp = self.send(
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/home/datalad/miniconda3/envs/tinuous-dev/lib/python3.9/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

whenever fixed, please retry on a clone resetting a few commits back to see if somehow run into this with correct retries

@yarikoptic I tried to test #134 on a fresh tinuous configuration for datalad with "since" set to two days ago, but no connection error occurred.


Add --nbqa-find to help the users to troubleshoot issues where nbqa…

… is not able to run the command and raises ValueError: Command not found.
Changes to be committed:
modified:   nbqa/main.py
modified:   nbqa/cmdline.py
new file:   nbqa/troubleshoot.py
modified:   tests/test_runtime_errors.py
new file:   tests/test_troubleshoot.py

This change addresses https://github.com/nbQA-dev/nbQA/issues/321. I have introduced --nbqa-find flag to check if nbqa can locate the command.
Currently the command looks like nbqa flake8 --nbqa-find . . Notice we still need to provide a notebook path or directory for this command to run. I tried to get rid of passing atleast one path to the command. I tried creating using argument_parser.add_mutually_exclusive_group(), but no success.
I thought nbqa flake8 --nbqa-find looks better compared to nbqa flake8 --nbqa-find ..

would nbqa --nbqa-find flake8 be possible? I ran into problems in the past when trying to let root_dirs be optional

But making nargs="*" did not work and also that might not be correct too.

I have made this change ready for review. If we feel this solution is kind of ugly, I can close this PR.

Thanks for looking into this.
Why not just print a few more diagnostics in the
Command `{command}` not found.
            Please make sure you have it installed in the same environment as nbqa.

error message, such as the path of nbqa, python, and the command? This way we don't need to add a new flag, if it's not possible to do it in a way which we feel good about?

Thanks for looking into this.
Why not just print a few more diagnostics in the
Command `{command}` not found.
            Please make sure you have it installed in the same environment as nbqa.

error message, such as the path of nbqa, python, and the command? This way we don't need to add a new flag, if it's not possible to do it in a way which we feel good about?

I thought of that initially and ruled out in favor of keeping the error message less verbose. I even commented the same in the issue.  But now that seems to be better approach and simpler too.
if "No module named" in err:
        # Collect path of python that will be used by nbqa
        # nbqa version used
        # PATH env variable as seen by nbqa
        # Add these collected information to the ValueError message
        raise ValueError(
            f"Command `{command}` not found. "
            "Please make sure you have it installed before running nbqa on it."
        )

I even commented the same in the issue. But now that seems to be better approach and simpler too.

So I will make the changes and send next iteration.

While we should have useful debug messages, IMHO we don't need to force users to install the same tools in each venv (e.g. one global black is sufficient). Also, many users install all packages in a global fashion (e.g. conda base).
We can call any tool that is found by the shell, with using subprocess.run("command", shell=True)
Here is a small dummy example:
$ python -m venv venv1
$ source venv1/bin/activate
$ which python
/mnt/d/git/del_me/dummy/venv1/bin/python
$ which flake8
/home/dafuq/anaconda3/bin/flake8

So we got the venv python and flake8 installed globally.
Since flake8 isn't installed in the venv, this command fails:
$ python -c 'import subprocess; subprocess.run("python -m flake8 --help")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/dafuq/anaconda3/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/dafuq/anaconda3/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/dafuq/anaconda3/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python -m flake8 --help'

But if we use shell=True, this happens:
python -c 'import subprocess; subprocess.run("flake8 --help", shell=True)'
usage: flake8 [options] file file ...
... <rest of the help text>

@s-weigand that's a good point, I just wonder if we'd run into issues whereby we run the system installation of a tool, while python -m <command> would've run the one in the venv?
Not a blocker, but we'd need to special-case doctest, as that needs to be run as python -m doctest.
I see having separate environments as a good practice anyway, and possibly something I'd like to encourage anyway.
So, I'm not sure what I'd like most here, I need to do some more reading / thinking / experimenting, but thanks for having brought it up :+1:

From https://docs.python.org/3/library/subprocess.html :

If shell is True, the specified command will be executed through the shell. This can be useful if you are using Python primarily for the enhanced control flow it offers over most system shells and still want convenient access to other shell features such as shell pipes, filename wildcards, environment variable expansion, and expansion of ~ to a user’s home directory

When using shell=True, the shlex.quote() function can be used to properly escape whitespace and shell metacharacters in strings that are going to be used to construct shell commands.

OK, maybe it's fine then - we can use shlex.quote, and then, seeing as users would be running this on their own machines anyway, security is arguably less of an issue?

As far as I know, all venv implementations modify the PATH by prepending the env path (first found gets used).
A quick test with pip shows that the right version gets used in a venv.
$ python -c 'import subprocess; subprocess.run("which pip", shell=True)'
/mnt/d/git/del_me/dummy/venv1/bin/pip

Using shell=True, would also allow using none python tools.
E.g. I could think of wanting to use grep on notebooks, to find links that have changed (e.g. the master -> main renaming on github) and have a per cell formatting (not sure if it would work out of the box 😋 ).
shlex.quote takes care of shell injection (shell pondon for SQL injections), which IMHO is mainly a problem if you use it in a web context, where you don't want a user to be able to execute arbitrary shell commands on your server.
In the case of nbqa the user has already access to the shell, so I don't see that issue here (why would you want to do nbqa flake8; sudo rm -rf / when you can just do sudo rm -rf / 😅 ).
In case someone wants to use it in a web context (e.g. jupyter extension + jupyterhub) a --no-shell flag could be added.
But I see the main usage in local development and a CI context, where IMHO more freedom is mostlikely more desired by users.
Thus I think 'use tooling you would use on *.py files on *.ipynb files' is what I would want as a user (e.g. grep).

OK, those are some really good points! Thanks for having laid them out so clearly. @girip11 , thoughts?
I'm happy to go with shell=True, escaping using shlex, and special-casing doctest to run with sys.executable -m
Nonetheless, I feel like that belongs in a separate PR - these diagnostics may still be useful!

Totally agree

Nonetheless, I feel like that belongs in a separate PR - these diagnostics may still be useful!

Using shell=True, would also allow using none python tools.
E.g. I could think of wanting to use grep on notebooks, to find links that have changed (e.g. the master -> main renaming on github) and have a per cell formatting (not sure if it would work out of the box yum ).

Checkout jupytext.
Right now, I would like nbQA to be just a tool to run QA tools on notebooks. We could use tools like jupytext for scenarios like running a grep. jupytext has the capability to convert the notebook to various formats including to .py file. jupytext  a.ipynb --to py - | grep <something>. In my opinion, that would offer more flexibility.
The reason why nbQA is not suitable right now to run any tool, is nbqa modifies the source notebook replacing all the magics etc. Basically nbqa does a whole lot of preprocessing on the notebooks before applying the tools. Thus nbQA atleast for now should not diverge from what it is written for.

Also, many users install all packages in a global fashion (e.g. conda base).

If that's the case, then those users would most probably have installed nbqa at the same location because it is always better to group similar purpose tools at one single location(may be all dev dependencies can be installed globally instead of having it in each venv). If not haven't, then its better to do so.

I see having separate environments as a good practice anyway, and possibly something I'd like to encourage anyway.

I agree with @MarcoGorelli  on this.

So my conclusion regarding the shell=True, let users report issues on such kinds of usability issues and if there are many such complaints then we can seriously consider it. This will be an issue only in local development right?

Because I don't see folks installing the packages at different locations in CI.

Also there would not be any issue in using nbqa as pre-commit hook because additional dependencies take care installing those in a isolated environment(with the latest changes).

So we got the venv python and flake8 installed globally.
Since flake8 isn't installed in the venv, this command fails:

@s-weigand  This should not matter now right? Because if we are using  sys.executable then python is picked relative to that of nbqa because it uses argv[0] which is the script name in this case. Reason is if nbqa and flake8 are installed globally even if we have activated python venv, sys.executable called from nbqa will pick up global python executable right?

This will be an issue only in local development right?

Indeed, if we encourage this tool to be run via pre-commit (which IMO is the best way to run virtually any linter/formatter) then it won't be an issue. I'll try to make that a bit more explicit in the docs/readme

let users report issues on such kinds of usability issues and if there are many such complaints then we can seriously consider it

OK, let's go with this for now - most users don't report bugs, but still, it seems unlikely that someone would have a global installation of flake8 but a local installation of nbqa. Encouraging consistency on their side should help reduce surprises later on, which reduces the chances of them blaming our tool when something goes wrong

@girip11 You are right, there are no problems when run in the CI or via pre-commit.
The only problematic case is when run from a venv, while the tool is only installed globally.
But users who install all packages globally will also have nbqa globally (kinda missed that 😅 )

Codecov Report

Merging #356 into master will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #356   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           10        10
  Lines          463       468    +5
=========================================
+ Hits           463       468    +5

Impacted Files
Coverage Δ

nbqa/__main__.py
100.00% <100.00%> (ø)

nbqa/cmdline.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

@MarcoGorelli : This PR is ready for review. I addressed the comments.

Thanks @girip11 , looks great, and thanks for fixing my incorrect ValueError with ModuleNotFoundError!


[defmt-test] Not possible to show location of test functions in stdout logger

Problem
With the changes introduced in PR #765 it is not possible to show the location of test functions with the stdout logger.
Only (<test nr>/<nr of tests>) running <fn name> ... will be printed.
Cause
Since PR #765, prints are not formatted and only the print message is output to stdout.
See commit 431fb80 for the changes that caused this behavior.
According to PR #765, the decision to not format print statements was intentional.
The problem is that defmt-test uses println! to log the start of a test function (see https://github.com/knurling-rs/defmt/blob/main/firmware/defmt-test/macros/src/lib.rs#L410).
This log is not really useful without location information in my opinion.
Expected Solution
Display location information for test functions as shown in the README of defmt-test.
$ cargo test --lib
(..)
(1/1) running `it_works`...
└─ app::unit_tests::__defmt_test_entry @ src/lib.rs:33
all tests passed!
└─ app::unit_tests::__defmt_test_entry @ src/lib.rs:28
(..)
(HOST) INFO  device halted without error

Possible Fix
The easiest fix might be to use the info level instead of println to log the start of a test function.

I am not sure if we should add the path. The normal cargo test runner does not either.

This is also fine for me.
In that case the screenshots/samples should be updated, because I thought something was wrong in my setup.


draw_segmentation_instances

🚀 The feature
Development a function torchvision.utils.draw_segmentation_instances to draw just the external contour of a mask.
Motivation, pitch
For torchvision.utils we have draw_bounding_boxes, draw, draw_segmentation_masks, draw_keypoints but still need to do some extra preprocess for getting the instance segmentation. Would be great to have a function draw_segmentation_instances to get just the external area of the ROI.
Alternatives
Similar to draw_bounding boxes, a optional argument fill could be added into draw_segmentation_instances to achieve this behavior.
Additional context
As far as I know. We need to use other libraries to achieve this.

Can you post an example of what the output is expected? And how only contours will help?

Hello!
This is what we have with the current util function

With this request we would have as result just the width orange border of the mask.
This can help in order to have better visualization of what we are selecting. Similar as to have filled bounding boxes or just the contour

I agree that this might be useful for people who want more advanced viz options, but is TorchVision's util the right solution for them? Historically the focus of TorchVision was to offer basic utilities for people to check the results of the models. For more complex use-cases, there are better options out there. My worry is that offering such a functionality will lead to rather complex signature methods as one will need to provide not only colours for masks but also the contours.

I think is  straightforward as adding a fill attribute that by default is filled.
In this way you are improving to developer don't using other libraries.

Hi @mjack3 can you share the code that enabled you to do the same? Maybe someone looking for similar solution might open this issue and it may help them.

I haven't the code. I need to develop it

Yeah that's my doubt. How feasible and easy would it be to support this by adding fill param to draw_segmentation_masks.
Each feature comes with a cost. The cost is maintainability and ease of use.


prevent app_get_pass() from revealing cleartext password on syntax error

When a user of the OpenSSL CLI makes a syntax error with the password argument of any of the openssl apps, the whole argument is echoed on the console for diagnostic purposes. I find this a bit risky since this may reveal sensitive password contents on the screen or in logs.
This PR limits the diagnostic output to at most, e.g., 4 characters and does not echo the argument of the -pass option at all if it does not contain a ':' within the first 5 characters, indicating that a prefix like pass: or file: is missing.

ping @levitte - you looked at this one once before.

@levitte, can you approve/merge this?

Squashed into one commit, added some text to the commit message and merged.
62ca15650576f3953103b27e220e4ff4cc4abed5 prevent app_get_pass() from revealing cleartext password on syntax error


Don't modify dotfiles when install dir is already in PATH

This is a proof-of-concept for https://github.com/astral-sh/uv/issues/5576 and https://github.com/axodotdev/cargo-dist/issues/830: When the install dir is already in PATH, don't modify the user's dotfile.
For my use case, i set export PATH="$HOME/.cargo/bin/:$PATH" already and don't want to source arbitrary other files; I've had bad experiences with tools that would make intrusive changes to my shell by souring their slow script on every bash startup, and a single file configuration is much easier to debug.
Caveat: I have no idea how portable this code is.

Thank you! I gave this a try in dash, and confirmed it works. Should be compatible enough for us. I'll add the test snapshots.


StyleGAN2

What does 'Third_party' refer to in the stylegan2 implementation?

Because stylegan2 is a third_party to our project.


Expose debouncing property in loaded and loading templates

Currently a load trigger will instantly trigger a loading state or a reloading state, but the actual data loading isn't done until the trigger debounce has finished.
Developers should have the option to choose whether to show a loading indicator or not while debouncing.
<input ngModel #searchbox />

<ul *ngxLoadWith="getSearchResults as results; args: searchbox.value; debounceTime: 500; loadingTemplate: loading">
  ...
</ul>

<ng-template #loading let-debouncing="debouncing">
   <div *ngIf="!debouncing"> Loading... </div>
</ng-template>

Closing for now. It would make the directive fairly complicated. For now, users will have to debounce the load trigger themselves if they don't want to see the loading screen during the debouncing.


'WGCNA' object has no attribute 'top_n_hub_genes'

import PyWGCNA
pyWGCNA_5xFAD = PyWGCNA.readWGCNA("5xFAD.p")
pyWGCNA_5xFAD.top_n_hub_genes(moduleName="coral", n=10)
AttributeError: 'WGCNA' object has no attribute 'top_n_hub_genes'

Hi,
I'm not sure which version of the pickle file and pyWGCNA you have.
please try to install the latest version of PyWGCNA (1.2.4) and download the latest version of the pickle file (V3).
Hopefully, that solves your problems.

Thank you Narges! Installing the latest version of PyWGCNA (1.2.4) resolved the problem.


[SPARK-8373][PySpark] Remove PythonRDD.emptyRDD

This is a follow-up PR to remove unused PythonRDD.emptyRDD added by #6826

Merged build triggered.

Merged build started.

Test build #35085 has started for   PR 6867 at commit b66d363.

LGTM

Test build #35085 has finished for   PR 6867 at commit b66d363.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

merged into master, thanks!


Fix client side leak caused by Gauge

What changes are proposed in this pull request?
Fixes #14766
This change replaces two client side gauges with counters.
Why are the changes needed?

On the bottom right corner, it can be seen that the references of EpollGroup are from the metric Gauge lambda in DynamicResourcePool. Using () -> size() in lambda will implicitly leak the this reference or the mResources reference used in size()(Not sure if JVM just inlined that size()).
In my environment, the HMS can spend 40% heap on metrics due to this gauge.

In one user environment, the HMS can spend 50G on such metrics.
Does this PR introduce any user facing changes?
The metric to monitor will change

alluxio-bot, merge this please

@Xenorith could you help cherry picking this? Thx

alluxio-bot, cherry-pick this to branch-2.8 please


Colour Codes

Not really an issue - more a question. Do you know how to format the bot response string in PHP to send colour code information to change the foreground or background colour of IRC messages the bot sends to chat?
Your bot code has been very useful for me - thanks!

hi!
unfortunately no, i haven't spent any time towards that direction. i did some sniffing now to a channel, and here are my findings:

font color: you can add the "/me" prefix to the message. The nightbot is doing it somehow differently, i could see in the log some "binary" chars, displayed with ^A below:

<EMAIL_ADDRESS>PRIVMSG #streamer_channel :Sogomn -> The command "!score" has been edited successfully.
<EMAIL_ADDRESS>PRIVMSG #streamer_channel :^AACTION hugs Sogomn^A
<EMAIL_ADDRESS>PRIVMSG #streamer_channel :^AACTION pushes sogom away^A
<EMAIL_ADDRESS>PRIVMSG #streamer_channel :BacT's worst nightmare

Background color, you mean the message sent out from Twitch about new sub notification? the only message i captured from the bot is a USERNOTICE message:

:tmi.twitch.tv USERNOTICE #streamer_channel :I wanted to sub to Daut, don't know what happened
the rest of the message (username subbed for X months) doesnt appear captured, i guess its not sent via IRC?
hope these help!

OK, well twitch IRC certainly doesn't use any standard colour codes as documented in other irc server/clients.
I found this https://dev.twitch.tv/docs/irc
and tried something like this
$this->send_text_to_server('bot', '@color=#0D4200 PRIVMSG ' . $channel . ' :' . $message);
But it doesn't seem to do anything...

yes, i read the link you provided, and seems these are IRC v3 tags, and require "elevation" during initial connect.
CAP REQ :twitch.tv/tags
i added this command to the _login_to_twitch() function, i made a few attempts with the provided example for PRVMSG scenario, but didn't succeed to see it working. tag syntax you provided seems correct, but probably need to populate more fields. if you want to inspect further, modify login_to_twitch function:
$this->send_text_to_server('service', 'PASS ' . $this->oath_pass);
usleep(1000000);
$this->send_text_to_server('service', 'NICK ' . $this->nickname);
usleep(1000000);
$this->send_text_to_server('service', 'CAP REQ :twitch.tv/membership');
usleep(1000000);
$this->send_text_to_server('service', 'CAP REQ :twitch.tv/commands');
usleep(1000000);
$this->send_text_to_server('service', 'CAP REQ :twitch.tv/tags');
usleep(1000000);
$this->send_text_to_server('service', 'JOIN ' . $this->channel);
$this->logger->log_it('INFO', CLASS, FUNCTION, 'Login commands were sent. Bot is ready.');
//
return TRUE;
open the logs and you will see examples of the command syntax
hope it helps, please ping if you get any luck with it !

Well this is frightfully frustrating. I guess it is not possible to set the IRCv3 tags from the client.
I tried this for example:
$this->send_text_to_server('bot', '@badges=moderator/1;color=#FF0000;display-name=mybot;emote-sets=0;mod=1;subscriber=0;user-type=mod;user-type=<EMAIL_ADDRESS>PRIVMSG ' . $channel . ' :' . $message);
But then I see no response at all. The closest I have come is:
$this->send_text_to_server('bot', 'PRIVMSG ' . $channel . ' :/color red');
$this->send_text_to_server('bot', 'PRIVMSG ' . $channel . ' :/me ' . $message);
Which changes the client (bot) colour and then uses /me as you first suggested - but it's a pretty stoopid way of doing it if you ask me...

Will do, you can close this now.


getSelectedIndexes() works oddly

method this.dataframe.filter.getSelectedIndexes() works oddly
if you first open the filter and then open the viewer, it will output you the filtered indexes as it should
but if you first open the viewer and then open the filter, it will just output you all the indexes in the dataframe

P.S. happens with EChartViewer in Charts package

sorry, I was using the wrong event for filtering
i used onRowsFiltering, when I really had to use onRowsFiltered, which made it all up
the issue is closed so!


Advertise PodCIDR doesn't work on Ipv6

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
When enabling bgp podCIDR announcement it doesn't work when on ipv6
level=error msg="Failed to announce pod CIDRs" CIDRs="&[2001:19f0:6c01:12c:1::/80]" cidrs="&[2001:19f0:6c01:12c:1::/80]" component=MetalLBSpeaker.handleNodeEvent error="cannot advertise non-v4 prefix \"2001:19f0:6c01:12c:1::/80\"" labels="&map[beta.kubernetes.io/arch:amd64 beta.kubernetes.io/os:linux kubernetes.io/arch:amd64 kubernetes.io/hostname:worker-0 kubernetes.io/os:linux]" subsys=bgp-speaker

Cilium Version
1.11.2
Kernel Version
5.10.84
Kubernetes Version
1.23.4
Sysdump
No response
Relevant log output
level=error msg="Failed to announce pod CIDRs" CIDRs="&[2001:19f0:6c01:12c:1::/80]" cidrs="&[2001:19f0:6c01:12c:1::/80]" component=MetalLBSpeaker.handleNodeEvent error="cannot advertise non-v4 prefix \"2001:19f0:6c01:12c:1::/80\"" labels="&map[beta.kubernetes.io/arch:amd64 beta.kubernetes.io/os:linux kubernetes.io/arch:amd64 kubernetes.io/hostname:worker-0 kubernetes.io/os:linux]" subsys=bgp-speaker

Anything else?
BGP Config:
apiVersion: v1
kind: ConfigMap
metadata:
  name: bgp-config
  namespace: kube-system
data:
  config.yaml: |
    peers:
      - peer-address: "2001:19f0:ffff::1"
        peer-asn: 64515
        my-asn:<PHONE_NUMBER>
        password: XXXXXXXX
    address-pools:
      - name: default
        protocol: bgp
        addresses:
          - "2001:19f0:6c01:1323::/64"

Helm values:
bgp:
  enabled: true
  announce:
    loadbalancerIP: true
    podCIDR: true

k8sServiceHost: "2001:19f0:6c01:050c:5400:03ff:fee2:77f3"
k8sServicePort: 6443

# We're announcing pod CIDRs so no need for tunnel
tunnel: disabled
ipv4:
  enabled: false
ipv6:
  enabled: true
ipam:
  mode: kubernetes

enableIPv6Masquerade: false
enableIPv4Masquerade: false

# installIptablesRules: false
# installNoConntrackIptablesRules: true

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Another issue that I see arising in Ipv6-only is that there is no way to set the router-id for each node. Which is required to be set to a unique value in ipv6-only BGP

@arianvp - currently our MetalLB BGP integration does not support IPv6. However, within the next several releases we are going to migrate to a more modular BGP implementation (focusing on GoBGP first, then integrating other BGP backends). I'm woring on this currently. Keep an eye out on our releases to see IPv6 peering and IPv6 PodCIDR announcements coming soon.

@arianvp will do, I'll update this thread when we have further progress.

Will do next week.


Update to 4.0.0

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Add tabindex="0" by default

via #48 and more specifically this comment by @chrisbrownie55 https://github.com/11ty/eleventy-plugin-syntaxhighlight/issues/22#issuecomment-817145606

@zachleat I think it'd be more desirable than making all code blocks with scrollbars inaccessible to keyboard users and others that need to scroll without a pointer device. A possible alternative would be to use a ResizeObserver on code blocks and determine if a scrollbar is present by checking if element.scrollHeight > element.clientHeight and then apply tabindex="0" or remove it.
I think the most accessible solution would probably be a progressive enhancement where we start with tabindex="0" by default and then include a script that'll do the above ResizeObserver technique to remove or add tabindex="0" when a code block changes shape.


[BE] Add basic editorconfig and pre-commit hooks to enforce style for whitespaces

Motivation

Add configs and tools to ensure code style consistency.
Modifications

Add .editorconfig and some pre-commit hooks.

Ensure text files are ended with an empty line.
No tailing whitespaces in text files.

Checklist

[ ] Format your code according to the Contributor Guide.
[ ] Add unit tests as outlined in the Contributor Guide.
[ ] Update documentation as needed, including docstrings or example tutorials.

@XuehaiPan We have already used isort and black for the format

For other config file(yml, json, etc) and doc(rst, md, etc), use editor config is ok for me

@XuehaiPan Could you run the pre-commit locally to get a formatted version

@XuehaiPan We have already used isort and black for the format

black is not enabled due to incorrect types in pre-commit config: black: not files to check
$ git checkout main
$ pre-commit run --all-files
isort....................................................................Passed
black................................................(no files to check)Skipped
don't commit to branch...................................................Failed
- hook id: no-commit-to-branch
- exit code: 1


CMake  can not found JNI

Description:
in github actions, use
- name: Set up JDK 11
      uses: actions/setup-java@v3
      with:
        java-version: '11'
        distribution: 'temurin'
        cache: 'sbt'

to install java jdk and in the repo CMakeLists.txt, use
find_package(JNI REQUIRED)
include_directories(${JAVA_INCLUDE_PATH})
include_directories(${JAVA_INCLUDE_PATH2})

but meet the bug:
CMake Error at /home/runner/work/_temp/-1222185084/cmake-3.17.2-Linux-x86_64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
-- Configuring incomplete, errors occurred!
See also "/home/runner/work/FPS_spinalHDL/FPS_spinalHDL/src/test/cpp/DRAMsim3/build/CMakeFiles/CMakeOutput.log".
  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)

by the way, I install CMake by:
    - name: Get CMake
      uses: symbitic/install-cmake@master

Task version:
v3
Platform:

[x] Ubuntu
[ ] macOS
[ ] Windows

Runner type:

[x] Hosted
[ ] Self-hosted

Expected behavior:
CMake find JNI
Actual behavior:
CMake  NOT find JNI

sorry, I have solve this problem. I set an wrong JAVA_HOME after install JAVA, so cmake cannot find the jni