VSCode looses object variable (stops suggesting) when the variable has method that has a deafault param set as property of said variable

Type: Bug
Consider this code (that is inside plain .js file)
const a = {
   method(param = a.value) {
      console.log(param);
   },
};
a.value = "Some value";

When I hover over a it shows me nothing:

And when I type a. it suggest value:

When I remove the default (param or set it to anything else) things work as expected:

I think, the fact that it doesn't show (or suggest) the value property is normal - tracking down history of variables is computationally expensive I suppose.
Setting the value on the object before the method doesn't fix the issue:

Nor does using let or var instead of const. Nor does changing the definition method to property function (method: function(param = a.value) {) nor property arrow function (method: (param = a.value) => {);
I know that this code isn't best practice, but it is valid:

And I would like the IDE to understand that it is valid.
VS Code version: Code - Insiders 1.90.0-insider (ca688da9fb6dad00996cee7d5342490daa7bb1fb, 2024-05-31T01:05:41.342Z)
OS version: Windows_NT x64 10.0.19043
Modes:

System Info

Item
Value

CPUs
12th Gen Intel(R) Core(TM) i9-12900K (24 x 3187)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
31.79GB (14.51GB free)

Process Argv
--crash-reporter-id 97660555-8220-446a-8b3a-0a9e5071d1bd

Screen Reader
no

VM
0%

Extensions: none
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vsc_aacf:30263846
vscod805:30301674
vsaa593cf:30376535
py29gd2263:31024238
vscaac:30438845
c4g48928:30535728
2i9eh265:30646982
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30926734
pythonmypyd1:30859725
pythoncet0:30859736
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
666c4381:31064716
showvideot:31016890
chatpanelt:31014475
f3je6385:31013174
a69g1124:31018687
dvdeprecation:31040973
pythonprt:31036556
dwnewjupyter:31046869
nb_pkg_only:31057982
26j00206:31048877

The problem here is the circularity between the type of param and the type of a. There's not much we can do here - during the resolution of param's initializer, a is the thing being computed, so fetching a.value causes a circularity.

Can't such circular cases be caught by some try ... catch structure and default to the any type?

Can't such circular cases be caught by some try ... catch structure and default to the any type?

It's not a try/catch, but yes, that's already what happens, as you demonstrated


Need to do header and trailer validation on HDFS

When we switch to the upload service the files will be on HDFS so we will need to do the header and trailer validation from HDFS files.

Added code to permafrost that enables reading the first and last line from a HDFS file. https://github.com/CommBank/permafrost/pull/13


Update testing.md

The permify-validate-action github workflow version appears to be 1.0.0 and not v1

VS Code was complaining about @v1 not existing but works fine with @v1.0.0.


Unable to determine bundled Java version" for Android Studio version3.6

First I get error is android license status unknown .So I reinstall again. they thrown two error like the picture below
!] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio2
    • Flutter plugin version 49.0.1
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Java\jdk-15.0.2\bin\java
    • Java version Java(TM) SE Runtime Environment (build 15.0.2+7-27)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit
      https://flutter.dev/setup/#android-setup for detailed instructions.

[!] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio2
    • Flutter plugin version 49.0.1
    • Dart plugin version 192.8052
    X Unable to determine bundled Java version.
    • Try updating or re-installing Android Studio.

So ,may i know what problem is it? how i can solve it

Hi @Ieejiajia
Can you please provide complete flutter doctor -v, make sure you've the latest stable channel and Android SDK in your system environment, and Android SDK is located in SDK Manager in Android Studio.
[✓] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19042.870], locale en-US)
    • Flutter version 2.0.4 at C:\Users\Taha\Code\flutter_stable
    • Framework revision b1395592de (5 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.2)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31112.23
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      � https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      � https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.55.0)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19042.870]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 89.0.4389.114
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 89.0.774.68

• No issues found!

PS C:\Users\SCS\Code\easyshopping> flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version
10.0.19041.867], locale en-US)
• Flutter version 1.12.13+hotfix.8 at C:\src\flutter
• Framework revision 0b8abb4724 (1 year, 2 months ago), 2020-02-11 11:44:36
-0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\SCS\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Java\jdk-15.0.2\bin\java
• Java version Java(TM) SE Runtime Environment (build 15.0.2+7-27)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/setup/#android-setup for detailed instructions.
[!] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio2
• Flutter plugin version 49.0.1
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Java\jdk-15.0.2\bin\java
• Java version Java(TM) SE Runtime Environment (build 15.0.2+7-27)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/setup/#android-setup for detailed instructions.
[!] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio2
• Flutter plugin version 49.0.1
• Dart plugin version 192.8052
X Unable to determine bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code (version 1.55.0)
• VS Code at C:\Users\SCS\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.21.0
[!] Connected device
! No devices available

This full doctor-v and i dont know how solve this problem

@Ieejiajia
You're running a 1 year, 2 months ago old setup,  you need to upgrade the flutter setup along with Android Studio and Android SDK.
I recommend you follow https://flutter.dev/docs/get-started/install/windows and install everything latest
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

but i can run this setup before ,and suddenly cannot .Why ?

Hi @Ieejiajia
Can you please provide your flutter doctor -v with an update and screenshot of ANDROID_HOME and JAVA_HOME environment
Thank you


Sentinel API Data Connector - Create Permissions.

Morning,
I am currently trying to create a new data connector to O365 with the Sentinel API. Using the address https://management.azure.com/subscriptions/SUB_ID/resourceGroups/MYRG/providers/Microsoft.OperationalInsights/workspaces/WSNAME/providers/Microsoft.SecurityInsights/dataConnectors/GUID?api-version=2020-01-01.
If I send a PUT request with my auth token then the connector is created and works fine. If we send the request from a service principal login with full access to the Azure Management API and Office 365 I get an unauthorized response. I have used the documentation from https://docs.microsoft.com/en-us/rest/api/securityinsights/dataconnectors/createorupdate which does not indicate what permissions are required for a service principal account to access the API. Is there permissions that are not documented that are required for access to this API or is this a bug.

Adding @tianderturpijn @javiersoriano if there is an update on SPN work

fwiw, I'm experiencing this issue and haven't been able to find a fix for it.

Is there any update on this bug? It's been almost 3 years. Any sort of feedback on whether this is a bug and when it would be taken into account for a fix would be welcome.
I believe this is still an issue as this is not possible to add this with an User Assigned Managed Identity either using a bicep/arm template. It does not define what permissions are missing, neither could I find anything in the docs.

#assign:austinmccollum


SIP-8 Has wrong http: behaviour codified

Currently the snap.manifest.json is located under ./snap.manifest.json of the root HTTP url instead of ./ of the root url. We should update SIP-8 to track the actual current behaviour.
https://github.com/MetaMask/snaps-monorepo/pull/1019#discussion_r1038173712

Hey team! Please add your planning poker estimate with Zenhub @ritave @hmalik88 @FrederikBolding @Mrtenz @GuillaumeRx @david0xd


Metamask does not display

If I don't have MetaMask installed, it's a little illogical to choose not to display it

100%. Needs a fix

Agree, I think having Metamask as the first option to 'install' would make sense.

With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x
Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)
If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.


docs: Use pandas, PyArrow, and Polars eager in the DataFrame docstring examples

In the docstrings example in https://narwhals-dev.github.io/narwhals/api-reference/dataframe/, we always show the output for pandas and Polars
We should instead:

show pandas, Polars (eager), and Pyarrow
phrases such as "We can then pass either pandas or Polars:" should be rephrased to "We can then pass any supported library such as pandas, Polars, or PyArrow:"

If this is your first time submitting a pull request, please choose one function to start with, and only submit a pull request for that one function. You've got used to the process, feel free to submit changes for more functions together (e.g. in groups of 3-4 functions in the same PR)

Contributing guide: https://github.com/narwhals-dev/narwhals/blob/main/CONTRIBUTING.md
example PR: https://github.com/narwhals-dev/narwhals/pull/1010

I can take a stab at making a PR for one of the functions.

I will try the DataFrame.to_csv()

I can work do Expr.mean in expr.py. After this I might be able to do others in Expr.

Glad that the doc update for Expr.mean went smooth. Can now also pick up the other functions in Expr.

In the docstrings example in https://narwhals-dev.github.io/narwhals/api-reference/dataframe/, we always show the output for pandas and Polars
We should instead:

show pandas, Polars (eager), and Pyarrow
phrases such as "We can then pass either pandas or Polars:" should be rephrased to "We can then pass any supported library such as pandas, Polars, or PyArrow:"

This is very much personal taste, but what would you think about rendering the different outputs via mkdocs-material content tabs? Something like the following

=== "pandas"
    ```python

    func(df_pd)
    ```
    Output:
    ```
        a     b
    0  24.5  74.5
    ```
=== "Polars (eager)"
    ```python

    func(df_pl)
    ```
    Output:
    ```
    shape: (1, 2)
    ┌──────┬──────┐
    │ a    ┆ b    │
    │ ---  ┆ ---  │
    │ f64  ┆ f64  │
    ╞══════╪══════╡
    │ 24.5 ┆ 74.5 │
    └──────┴──────┘
    ```
=== "PyArrow"
    ```python

    func(df_pa)
    ```
    Output:
    ```
    pyarrow.Table
    a: double
    b: double
    ----
    a: [[24.5]]
    b: [[74.5]]
    ```

This is very much personal taste, but what would you think about rendering the different outputs via mkdocs-material content tabs? Something like the following

@AlessandroMiola I like the tabbed output much more as well, but I think the issue was compatibility with doctest. If you manage to figure out how to have both, I am absolutely happy to move to such output rendering

This is very much personal taste, but what would you think about rendering the different outputs via mkdocs-material content tabs? Something like the following

@AlessandroMiola I like the tabbed output much more as well, but I think the issue was compatibility with doctest. If you manage to figure out how to have both, I am absolutely happy to move to such output rendering

Ahh, right! I see, thanks @FBruzzesi


Fix copy-dataprocessings crashing

Fixes #15
Checklist

[x] I have read the Contribution Guide ;
[x] I have read the Contributor License Agreement (CLA) and understand that the submission of this PR will constitute an  electronic signature of my agreement of the terms and conditions of DataGalaxy's CLA ;
[x] There is an approved issue describing the change when contributing a new feature ;
[x] I have added tests that prove my fix is effective or that my feature works ;
[x] I have added necessary documentation (if appropriate) ;

Short description of what this resolves:
We do not fetch dataProcessingItems for dataProcessing objects that have a DataFlow type as they cannot have DPI.
Changes proposed in this pull request:

Add condition on dataProcessing type

Please do a new release on merge to deploy the fix

@drscholly could you please rebase on main branch?


ArgumentException when using @inherits

Functional impact
If you try to override base page class using @inherits directive then page rendering fails in run-time with Argument exception during HTML helper contextualization:
ArgumentException: Property 'ViewData' is of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1[[WebApplication1.TestViewModel, WebApplication1, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null]]', but this method requires a value of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1[[System.Object, System.Private.CoreLib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
Parameter name: viewContext

Minimal repro steps

Create .NET MVC Core app from default template (VS2017, Community Edition)
Create base in app's root namespace as follows:

public abstract class MyPage<T> : Microsoft.AspNetCore.Mvc.Razor.RazorPage<T>
{

}

Open ~/Views/Home/About.cshtml and prepend it with the following line: @inherits MyPage<int>
Go to HomeController, in About action change return View(); to return View(15);
Launch application
Navigate to /Home/About

Expected result
Page renders as usual, replacing @Model with 15
Actual result
Exception from above
Further technical details
The root cause is Razor compiler that handles @inject directive incorrectly, generating
[RazorInject]
public IHtmlHelper<object> Html { get; private set; }

instead of
[RazorInject]
public IHtmlHelper<int> Html { get; private set; }

Most likely, ModelDirective.GetModelType returns "object" when being called from InjectDirective.ExecuteCore. ModelDirective's visitor collects @inherits directives but does not use them within GetModelType. I could fix, but do not have enough time and afraid of break something. Even cannot write test because dotnet restore fails on Razor project for some reason :(
UPD: Issue could be outdated since it is not possible to use @inherits along with @model in version 1.1.2, but in current "dev" branch I see tests with exactly such case.
Workarond
For example given above: @inject IHtmlHelper<int> Html explicitly

dotnet --version returns 1.0.3
Microsoft.AspNetCore.Mvc.Razor version is 1.1.2

@pavel-b-novikov this is a dup of https://github.com/aspnet/Mvc/issues/6291. We'll use the other work item for tracking since it's older.

Sorry, master. Dobby googled too bad :)

@pavel-b-novikov, here's the suggested workarounds for now:

https://github.com/aspnet/Mvc/issues/5397#issuecomment-253253761
https://github.com/aspnet/Mvc/issues/5397#issuecomment-253271809


update fails

Hey I tried to update my newly installed version 0.13.8 to 0.13.9 but somehow the udpate was killed. I dont know if this is a problem from your script or from factorio itself
[root@mail opt]# service factorio update
Checking for updates...
New version core-linux_headless64 0.13.9.
Wrote /tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip, apply with `factorio --apply-update /tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip`
Applying /tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip ...
Killed
   0.000 2016-07-18 17:05:01; Factorio 0.13.8 (build 23239, linux64, headless)
   0.000 Operating system: Linux
   0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--apply-update" "/tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip"
   0.000 Read data path: /opt/factorio/data
   0.000 Write data path: /opt/factorio
   0.000 Binaries path: /opt/factorio/bin
   0.023 Running in headless mode
   0.028 Loading mod core 0.0.0 (data.lua)
   0.034 Loading mod base 0.13.8 (data.lua)
   0.224 Checksum for core: 714099156
   0.224 Checksum for mod base:<PHONE_NUMBER>
   1.275 Custom inputs active: 0
   1.277 Factorio initialised
   1.292 Info Updater.cpp:389: Applying update /tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip

Error! Failed to apply update
You can try to apply it manually with:
su factorio -c "/opt/factorio/bin/x64/factorio --apply-update /tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip"

updating with the command given at the end did not work too.

The updater script merely downloads the latest patch for you, which is the line
Wrote /tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip, apply with `factorio --apply-update /tmp/factorio-update/core-linux_headless64-0.13.8-0.13.9-update.zip`

from your paste. Everything else is output from Factorio and from... something else (maybe Bisa's init script?). I couldn't tell you what killed what, but I doubt it was from this simple Python script.


Different score when using accelerate

I'm observing discrepancy between when running lm-eval with and without accelerate. I've only realized it just now.
With accelerate
hf (pretrained=lintang/t5-v2-base-sglue,truncation=True,max_length=512), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 1
|         Tasks          |Version|     Filter      |n-shot| Metric |Value |   |Stderr|
|------------------------|------:|-----------------|-----:|--------|-----:|---|-----:|
|super_glue-wsc-t5-prompt|      0|wsc_postprocessor|     0|accuracy|0.6346|±  |0.0474|

Without
hf (pretrained=lintang/t5-v2-base-sglue,truncation=True,max_length=512), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 1
|         Tasks          |Version|     Filter      |n-shot| Metric |Value |   |Stderr|
|------------------------|------:|-----------------|-----:|--------|-----:|---|-----:|
|super_glue-wsc-t5-prompt|      0|wsc_postprocessor|     0|accuracy|0.7308|±  |0.0437|

Could this be limited to seq-to-seq models?

@baberabb would you be interested to take a look into this?

Yeah I can take a look again. Do you have a suspicion about the main cause?


Potential issue with implementation of Dice Coefficient

Dear Scipy Team,
I would like to report a potential issue with the implementation of Dice Coefficient in Scipy.
According to Wikipedia (see section "Difference from Jaccard") and papers such as this (see Equations (8) and (9)), there is a direct relationship between the Dice Coefficient and the Jaccard Index.
However, when I calculated the Dice Coefficient using the Scipy package and compared with the results obtained by using this direct relationship with the Jaccard Index, the results doesn't match. I have also calculated Dice using the metrics from the Confusion Matrix (eg. TP, FP etc.), and the results doesn't match with the Scipy package.
I have included an example showing this here: https://github.com/leockl/Dice-Coefficient/blob/master/Dice.ipynb
Could someone have a look at this. Many thanks.
Scipy/Numpy/Python version information:
1.4.1 1.18.1 sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)

The functions in scipy.spatial.distance compute distances or dissimilarities.  The references that you gave are using the similiarity indices.  For dice and jaccard, you can convert from one to the other with similarity = 1 - dissimilarity.
For example.
In [52]: y_true = [1, 0, 1, 1, 0]

In [53]: y_pred = [1, 1, 0, 1, 1]

Compute the Jaccard and Dice dissimilarities, and convert to the corresponding similarities:
In [55]: JAC_dis = distance.jaccard(y_true, y_pred)

In [56]: JAC_sim = 1 - JAC_dis

In [57]: DICE_dis = distance.dice(y_true, y_pred)

In [58]: DICE_sim = 1 - DICE_dis

Verify that for the similarities, DICE = 2*JAC / (JAC + 1):
In [59]: DICE_sim
Out[59]: 0.5714285714285714

In [60]: 2*JAC_sim/(JAC_sim + 1)
Out[60]: 0.5714285714285715

Thanks @WarrenWeckesser for the clarification on this.
Do you think it would be beneficial to put a note on this in the documentation, as I think the similarity index is more commonly used than the dissimilarity index, and to avoid future similar questions on this?
If not, I am happy for you to close this issue.
Many thanks again.

@leockl, you're not the first person to make this mistake.  Suggestions for where and how to improve the documentation would certainly be appreciated.

@WarrenWeckesser, I have submitted a PR to include a note on computing Dice similiarity index:
https://github.com/scipy/scipy/pull/12211
Please review and close off any issues once completed. Thanks.

@WarrenWeckesser what about we add a flag to compute one or the other? Would default to the current behaviour OC. If you say that this is something recurrent. Or we move on with the PR (which should also add the same note for jaccard).

The cross-listed PR was merged with a tiny doc improvement for dice(), but leaving this open because there are some other helpful suggestions to consider above I suppose.

Can I work on the "flag" recommended by @tupui ?

Personally, I'm satisfied with the documentation fix.

Oh, it's okay. But I would suggest your team to remove this from "good first issue" :D I'll find other issue then, do you recommend a "good first issue" or not so hard one @rkern?

what about we add a flag to compute one or the other? Would default to the current behaviour OC.

I personally prefer to leave the functions to always return a dissimilarity, so that someone reading the code doesn’t have to check additional arguments to tell whether the results are “flipped”. Returning dissimilarity seems also more consistent with the other metrics such as euclidean.


timeout error fixed

while deploying with capistrano god terminate & restart command were throwing this error
00:13 god:restart
01 RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.7.1 $HOME/.rbenv/bin/rbenv exec bundle exec god terminate
01 Uncaught exception
01
01 undefined method `timeout' for God::System::SlashProcPoller:Class
01
01 (drbunix:///tmp/god.17165.sock) /myapp/shared/bundle/ruby/2.7.0/gems/god-0.13.7/lib/god/system/slash_proc_poller.rb:64:in `readable?'

This fix is a duplicate of https://github.com/mojombo/god/pull/262.
A forked version of this gem has been released, resurrected_god, with homepage https://github.com/mishina2228/resurrected_god. It's a drop-in replacement for god which includes this fix and supports ruby 3.1.


[REF-5919] add checks into argument java_mappings

when running in mlpiper, java mappings are not required
and system config is not provided.
Don't fail if there is no key in system config,
print warning.

There are keys in system config that supposed to be there in case the pipeline is consumer or producer. Take a look at _fix_pipeline function in mlpiper.py


Loading another page  from within the loaded page executes twice

Short description
I have an index.html with top left main panels.
The content is loaded in the following way
        w2ui['layout'].load('top', 'data/top.html')
        w2ui['layout'].load('left', 'data/left.html')
        w2ui['layout'].load('main', 'data/main.html')

then in the left panel, Click on element a will load another page （ w2ui['layout'].load('main', 'data/another.html')）
but another.html is executed twice
What is current behavior
another.html is executed twice
What is desired behavior
another.html is executed once
Link to jsfidle/codepan with sample code
...
Steps to reproduce or sample
...
Thank you and I look forward to your comments

test code   testcode.zip

Can you please create a fiddle/pen/bin instead of posting your code as a zip file?

i try to create it, but it not work when click on element a
index.html   https://jsfiddle.net/wangxianshou/z95c2f7L
leftmenu.html https://jsfiddle.net/wangxianshou/wc7rt9oh
another.html https://jsfiddle.net/wangxianshou/g8k46y1e

test code testcode.zip

code works on the http server https://www.lighttpd.net/
if win10 os ,then http://lighttpd.dtech.hu/

Seems you're using w2ui 1.4.3 - which was released in 2015.
Can't you upgrade to the latest version?
The distribution with the most recent fixes can be downloaded here: https://github.com/vitmalina/w2ui/tree/master/dist (w2ui.js + w2ui.css - not  the files with 1.5 in the name)

Thanks for your comments
I tried the steps below
case1

Replace with new version for w2ui
result : The problem is still

case2

Replace with new version for w2ui
import leftmenu.js in index.html instead of leftmenu.html
result : The problem is still

case3

Replace with new version for w2ui
import leftmenu.js when leftmenu.html load success

    w2ui['layout'].load('left','leftmenu.html','slide-left',function(){
        $.getScript('leftmenu.js',function(){console.log('layout.left load after load leftmenu.js')})
        console.log('load leftmenu.html');
    });

result : The problem is still


feat(Lie): make CommutatorRing a NonUnitalNonAssocRing

This PR makes CommutatorRing a NonUnitalNonAssocRing, instead of just a  NonUnitalNonAssocSemiring

bors merge


can't see full build logs

Hi, I'm trying to use mybinder, building a docker image fails, but I'm not able to see entire build logs. The error message is long and I'm not able to scroll anything. I'm using Google Chrome on OSX,  any suggestions?

Heya! Thanks for posting the bug report!
Can you tell us which repository you were trying to build? Also if at all possible post a screenshot of what you are seeing? Last we checked things seem to be working on on Chrome OS X...

@yuvipanda Hi, I'm sorry for late answer, I came back to this only last Friday. The error itself was related to our Dockerfile, now it is fixed and it's working (this is the repo.
However, I was building various container for the last few days, and during some builds (I don't know maybe 10 or 20% of them) I was not able to scroll within the build log window.


[Vaesen-dodgepong] Translation files and small improvements request

Hello @dodgepong
Your card is pretty good, however would you mind having a look and improving it a bit? I have two requests, I hope those are small. At least the first one should be.

What do you think about adding in brackets information to which attribute given skill is connected? Like Agility [PH].

Translation files would make everything more fun. At least playable character sheets. Switching languages mid game always disrupts immersion.

Thank you and regards,
Maciek

Sadly my Vaesen game ended several months ago and I don't particularly have much interest in maintaining this anymore. Feel free to fork it and submit updates to the official repo!

I would love to do it, sadly I don't have a pro account.


⚠ GitLab Server has degraded performance

In fdf9559, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 6426 ms

Resolved: GitLab Server performance has improved in 101bce9.


Concurrent Search Bug

Describe the bug
Such as the title
To Reproduce
it's my test code
static void ConcurrentSearchTest()
{
    var client = new FhirClient("https://spark.incendi.no/fhir");
    // This request will return two resource: Encounter and Patient
    var hasResourceURL = "https://spark.incendi.no/fhir/Encounter?_id=2&_include=Encounter:subject";
    // This request has no resource returned
    var noResourceURL = "https://spark.incendi.no/fhir/Encounter?_id=22222222&_include=Encounter:subject";
    for (int i = 0; i < 500; i++)
    {
        var j = i;
        System.Threading.Tasks.Task.Run(async () =>
        {
            if (j % 2 == 0)
            {
                var bundle = (Bundle)await client.GetAsync(hasResourceURL);
                if (bundle.Entry.Count != 2)
                {
                    Console.WriteLine($"{j}---search has resource error");
                }
                else
                {
                    Console.WriteLine($"{j}---succeed");
                }
            }
            else
            {
                var bundle = (Bundle)await client.GetAsync(noResourceURL);
                if (bundle.Entry.Count > 0)
                {
                    Console.WriteLine($"{j}---search no resource error");
                }
                else
                {
                    Console.WriteLine($"{j}---success");
                }
            }
        });
    }
}

Expected behavior
all print {j}---success
Screenshots

I debugged the source code and found that the cause of the error was the concurrency problem in the  SnapshotPaginationProvider
https://github.com/FirelyTeam/spark/blob/6ac316e456848f35bc2427a3d27556a272c9f183/src/Spark.Engine/Service/FhirServiceExtensions/SnapshotPaginationProvider.cs#L15-L35
the Call chain is:
AsyncFhirService -> PagingService -> SnapshotPaginationProvider
Although SnapshotPaginationProvider is injected Transient, because AsyncFhirService is a Singleton, SnapshotPaginationProvider is also a Singleton.
https://github.com/FirelyTeam/spark/blob/212d071003bc1a57affe7aaceacef133108a9b00/src/Spark.Engine/Service/AsyncFhirService.cs#L370-L390
At present, I have changed AsyncFhirService to Transient to solve the problem temporarily, but I don't think this is the best way.

It was singleton in good old classic Spark (.NET FW), and probably therefore it is singleton in the .NET Core version of Spark. Actually I do not see a good reason for AsyncFhirService to be a singleton and I think we should consider making it transient instead.

But creating an AsyncFhirService is time consuming.
https://github.com/FirelyTeam/spark/blob/212d071003bc1a57affe7aaceacef133108a9b00/src/Spark.Engine/Service/AsyncFhirService.cs#L28-L43
This has a effect on Performance.

Yes, that is a concern. I have not measured the effect it would have on performance, but yes that would be the concern.

Hi,
I have the same problem.
If I query API at almost the same time, sometimes I got weird response different from what I expected.
So that I couldn't put this project into a production environment.
For example, I have 20 Device resource in DB.
If I query identifier<PHONE_NUMBER>01, I expect a result with same identifier.
Please see the following code, sometimes I got a random result.
Please help.
  testFhir(): void {
    for (let i = 0; i <20; i++) {
      this.http.get('https://esp32fhir.azurewebsites.net/fhir/Device?identifier=' + i.toString().padStart(12, '0'))
      .toPromise()
      .then((res: any) => {
        console.log(i, res.entry[0].resource);
      });
    }
  }

Andy

Hi @whyfate,
Could you tell me how you changed AsyncFhirService to Transient to solve the problem temporarily ?
Andy

@one0410  I modified the source code.
https://github.com/FirelyTeam/spark/blob/e130c88d83a462d82f2fae3bb127146ccffe7d2a/src/Spark.Engine/Extensions/NetCore/IServiceCollectionExtensions.cs#L85

@whyfate  how did that affect the performance?

@whyfate You are right, the performance is terrible.
@kennethmyhra Is this what you want ?
singleton:

transient:

@one0410, absolutely not. I haven't yet had time to look into the root cause of this. If any of you have time to do that it would be much appreciated. Anyways, I'll put it into the current sprint for the next release

I have an immature suggestion, which is to pass snapshot into the parameter of this method.
https://github.com/FirelyTeam/spark/blob/e130c88d83a462d82f2fae3bb127146ccffe7d2a/src/Spark.Engine/Service/FhirServiceExtensions/ISnapshotPagination.cs#L19
Bundle GetPage(Snapshot snapshot,int? index = null, Action<Entry> transformElement = null);

Replacing SnapshotPaginationProvider internal variables _snapshot with parameters
https://github.com/FirelyTeam/spark/blob/e130c88d83a462d82f2fae3bb127146ccffe7d2a/src/Spark.Engine/Service/FhirServiceExtensions/SnapshotPaginationProvider.cs#L29-L58
But emmm...bad code warning!!!

I've done some research and can confirm that I am seeing the error as well. I tried putting a SemaphoreSlim around the code in AsyncFhirService.SearchAsync (as a hot fix), it helps, but it slows it down since it forces the requests to run synchronously one-by-one.
I need to try and reproduce this with FhirServiceService to see if we had this problem before we added AsyncFhirService

This problem is Snapshot design, which has existed for a long time, not async.

This is fixed in both STU3 and R4. If you are compiling from source, please verify by pulling. If you are using the NuGet packages I will create a new release today
STU3 - https://www.nuget.org/packages/Spark.Engine.STU3
R4 - https://www.nuget.org/packages/Spark.Engine.R4
Summarized I split ISnapshotPaginationProvider and ISnapshotPagination into two implementations making sure as @whyfate pointed out that Snapshot is not affected by the singleton behavior of ISnapshotPaginationProvider. There is a more lengthy explanation in the commit/PR

Thank you very much. This do help me a lot. You are really amazing.

@kennethmyhra Hi,I saw your implementation,I don't think it's good to directly a new SnapshotPaginationService.
How about this?
services.AddTransient<ISnapshotPaginationProvider, SnapshotPaginationProvider>();

public class PagingService : IPagingService
{
    private readonly ISnapshotStore _snapshotstore;
    private readonly IServiceProvider _serviceProvider;

    public PagingService(ISnapshotStore snapshotstore, IServiceProvider serviceProvider)
    {
        _snapshotstore = snapshotstore;
        _serviceProvider = serviceProvider;
    }

    public ISnapshotPagination StartPagination(Snapshot snapshot)
    {
        return Task.Run(() => StartPaginationAsync(snapshot)).GetAwaiter().GetResult();
    }

    public ISnapshotPagination StartPagination(string snapshotkey)
    {
        return Task.Run(() => StartPaginationAsync(snapshotkey)).GetAwaiter().GetResult();
    }

    public async Task<ISnapshotPagination> StartPaginationAsync(Snapshot snapshot)
    {
        if (_snapshotstore != null)
        {
            await _snapshotstore.AddSnapshotAsync(snapshot).ConfigureAwait(false);
        }
        else
        {
            snapshot.Id = null;
        }

        var snapshotPaginationProvider = _serviceProvider.GetRequiredService<ISnapshotPaginationProvider>();
        return snapshotPaginationProvider.StartPagination(snapshot);
    }
    public async Task<ISnapshotPagination> StartPaginationAsync(string snapshotkey)
    {
        if (_snapshotstore == null)
        {
            throw new NotSupportedException("Stateful pagination is not currently supported.");
        }

        var snapshotPaginationProvider = _serviceProvider.GetRequiredService<ISnapshotPaginationProvider>();
        return snapshotPaginationProvider.StartPagination(await _snapshotstore.GetSnapshotAsync(snapshotkey).ConfigureAwait(false));
    }
}

@whyfate the plan is to do this in the next version. While I agree with you - right now the only downside is that you can't make your own implementation of the interface ISnapshotPagination which was the interface touched in this iteration
I also see now that you are referring to some other interface, IPagingService, which was not touched in this iteration. The whole infrastructure around snapshot pagination seems messy and unfinished which I also noticed when I started touching this part and therefore did not put too much effort into the infrastructure part at this point

I see,thanks.


Check permissions when disabling autoscanning

Currently the app crashes if autoscanning is disabled when permissions have been revoked. Check permissions before disabling autoscanning and if permissions are not available, just set the setting value to false and don't disable activity transition updates, which causes the crash

Fixed in master


CCMSPUI-411: Upgrade GOVUK Frontend to 5.7.1

Upgrading GOVUK Frontend from 5.3.1 to 5.7.1.
Changes
5.5.0: GOVUK Frontend includes updated colour palete
Not much change to frontend for this inclusion, rather using the colour palette directly in .scss where a colour is used.
5.6.0: Updated header to use the services component

5.7.0: Crest updated to use King Charles III logo
This change was partially done when CCMSPUI-408 was merged, however part of this PR it's been checked properly.
Before:

After:

Changes to GDS but not to project
Listing changes to GDS which did not effect the project but were worth noting as part of my findings.

5.4.1: Breadcrumbs to use nav instead of div and to add an aria-label which was introduced in.
5.5.0: There is a class now added which helps wrap longer words which would usually trail off screen. You can do this by wrapping the content with the class govuk-!-text-break-word.

I've just mereged my changes which has a new caab.js file. Are you able to merge the contents of that file into the all.js?

I've just mereged my changes which has a new caab.js file. Are you able to merge the contents of that file into the all.js?

@PhilDigitalJustice Not currently. Would need to implement webpack which could be looked into at a later date to combine and compile javascript files into one file
However you did highlight that gulpfile.js is copying all.js from govuk-frontend to the wrong location so have fixed that now


CUDA 11.2/TF 2.5.0 Failed to load libcudnn.so.8

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.10
TensorFlow installed from (source or binary): source
TensorFlow version: 2.5.0-dev20210218
Python version: 3.8.5
Installed using virtualenv? pip? conda?: pip
GCC/Compiler version (if compiling from source): 10.2.0
CUDA/cuDNN version: 11.2
GPU model and memory: NVIDIA GeForce RTX 2060 Super

I have gone through every installation guide, installed/reinstalled TF many times, as well as cuda and cudnn. But everytime i run:

import tensorflow as tf
tf.config.list_physical_devices()

I get:

2021-02-22 10:08:07.383300: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-02-22 10:08:11.985232: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-02-22 10:08:12.014912: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-22 10:08:12.015228: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1770] Found device 0 with properties:
pciBusID: 0000:03:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.695GHz coreCount: 34 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2021-02-22 10:08:12.015246: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-02-22 10:08:12.016727: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-02-22 10:08:12.016757: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-02-22 10:08:12.017340: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-02-22 10:08:12.032485: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-02-22 10:08:12.050575: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2021-02-22 10:08:12.051062: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2021-02-22 10:08:12.051213: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory
2021-02-22 10:08:12.051239: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1803] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...

Out[3]: [PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')]

I have three cuda folders in /usr/local/, cuda, cuda-11 and cuda-11.2 and they all have the 'libcudnn.so.8' file.

UPDATE:
2021-02-23 11:16:32.720482: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)
2021-02-23 11:16:32.739296: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency:<PHONE_NUMBER> Hz
Epoch 1/100
/home/anthony/anaconda3/lib/python3.8/site-packages/tensorflow/python/framework/indexed_slices.py:447: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradient_tape/model/sort_pooling/map/while/gradients/model/sort_pooling/map/while/GatherV2_grad/Reshape_1:0", shape=(None,), dtype=int32), values=Tensor("gradient_tape/model/sort_pooling/map/while/gradients/model/sort_pooling/map/while/GatherV2_grad/Reshape:0", shape=(None, None), dtype=float32), dense_shape=Tensor("gradient_tape/model/sort_pooling/map/while/gradients/model/sort_pooling/map/while/GatherV2_grad/Cast:0", shape=(2,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  warnings.warn(
2021-02-23 11:16:33.495332: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-02-23 11:16:33.762835: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-02-23 11:16:33.776293: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-02-23 11:16:37.745284: I tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Loaded cuDNN version 8100
2021-02-23 11:16:43.938366: W tensorflow/stream_executor/gpu/asm_compiler.cc:64] Running ptxas --version returned 256
2021-02-23 11:16:44.048594: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] Internal: ptxas exited with non-zero error code 256, output:
Relying on driver to perform ptx compilation.
Modify $PATH to customize ptxas location.
This message will be only logged once.

Please take a look at this related thread


Suppress query params in logs

A short explanation of the proposed change:
As discussed in this routing-release issue I have provided logic to redact query parameters of GET requests from getting logged to the access log.

An explanation of the use cases your change solves
There are three options:
none (default) retains the current behavior: All parameters are logged
all Removes all query parameters from the log
hash performs a SHA1 over the query parameters and logs only the hash sum.

Instructions to functionally test the behavior change using operator interfaces (BOSH manifest, logs, curl, and metrics)

Default behavior:

In gorouter BOSH job set property redact_query_parameters to none
bosh -d cf deploy
curl https://some-app.cf-app.com/?password=secret
bosh -d cf ssh gorouter
vi access_log
The access_log should say some-app.cf-app.com - [timestamp] "GET /?password=secret HTTP/1.1"

Log no query parameters:

In gorouter BOSH job set property redact_query_parameters to all
bosh -d cf deploy
curl https://some-app.cf-app.com/?password=secret
bosh -d cf ssh gorouter
vi access_log
The access_log should say some-app.cf-app.com - [timestamp] "GET / HTTP/1.1"

Log only hash of query parameters:

In gorouter BOSH job set property redact_query_parameters to hash
bosh -d cf deploy
curl https://some-app.cf-app.com/?password=secret
bosh -d cf ssh gorouter
vi access_log
The access_log should say some-app.cf-app.com - [timestamp] "GET /?hash=878830dc19ac17a15b189cad83b7809975bc525e HTTP/1.1"

Expected result after the change
GET query parameters are hidden or hashed if needed.

Current result before the change
GET query parameters are logged.

Links to any other associated PRs
tbd

[x] I have viewed signed and have submitted the Contributor License Agreement

[x] I have made this pull request to the main branch

[x] I have run all the unit tests using scripts/run-unit-tests-in-docker from routing-release.

[ ] (Optional) I have run Routing Acceptance Tests and Routing Smoke Tests on bosh lite

[ ] (Optional) I have run CF Acceptance Tests on bosh lite

Released! https://github.com/cloudfoundry/routing-release/releases/tag/0.209.0


2 Swi-prolog version regex errors

>>> from pyswip import Prolog
>>> prolog = Prolog()
>>> prolog.assertz("father(michael,john)")
Please enter you SWI-Prolog version in format "X.Y.Z": 8.1.15

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-12-629572b3dbd4> in <module>
----> 1 from pyswip import Prolog
      2 prolog = Prolog()
      3 prolog.assertz("father(michael,john)")

~/new_terminal_python/lib/python3.7/site-packages/pyswip/__init__.py in <module>
     27 __VERSION__ = "0.2.7"
     28
---> 29 from pyswip.prolog import Prolog
     30 from pyswip.easy import *

~/new_terminal_python/lib/python3.7/site-packages/pyswip/prolog.py in <module>
     26 import sys
     27
---> 28 from pyswip.core import *
     29
     30

~/new_terminal_python/lib/python3.7/site-packages/pyswip/core.py in <module>
    566 # Find the path and resource file. SWI_HOME_DIR shall be treated as a constant
    567 # by users of this module
--> 568 (_path, SWI_HOME_DIR) = _findSwipl()
    569 _fixWindowsPath(_path)
    570

~/new_terminal_python/lib/python3.7/site-packages/pyswip/core.py in _findSwipl()
    418
    419         if path is None:
--> 420             (path, swiHome) = _findSwiplMacOSHome()
    421
    422     else:

~/new_terminal_python/lib/python3.7/site-packages/pyswip/core.py in _findSwiplMacOSHome()
    340             path = os.environ.get('PLBASE')
    341             if path is None:
--> 342                 swi_ver = get_swi_ver()
    343                 path = '/Applications/SWI-Prolog.app/Contents/swipl-' + swi_ver + '/lib/'
    344

~/new_terminal_python/lib/python3.7/site-packages/pyswip/core.py in get_swi_ver()
    308     swi_ver = input(
    309                 'Please enter you SWI-Prolog version in format "X.Y.Z": ')
--> 310     match = re.search(r'[0-9]\.[0-9]\.[0-9]')
    311     if match is None:
    312         raise InputError('Error, type normal version')

TypeError: search() missing 1 required positional argument: 'string'

First error is this thing above, that the input has to be passed to the re.search as the second argument. Second error is that the regex needs to capture more than one digit on the version numbers with a + after each [0-9].

I wrote a fix for this and made a pull request: https://github.com/yuce/pyswip/pull/72
@yuce

This issue should be fixed by the last version of PySwip.


Null refinement not working with if check

Hi,
I have the following code:
function getValues(obj? : Object) {

    if (obj) {
        return Object.keys(obj).map(key => {
            return obj[key];
        });
    }

    return [];
}

I get the following error with flow version 0.37.0:
 65:             return obj[key];
                        ^^^^^^^^ access of computed property/element. Computed property/element cannot be accessed on possibly undefined value
 65:             return obj[key];
                        ^^^ undefined

Am I making a mistake here, or should this code be null safe?
Thanks,
Daniel

Is it because someone could re-assign arguments[n]?
function foo(bar) {
  console.log(1, bar);
  arguments[0] = 'baz';
  console.log(2, bar);
}

foo('bar');
VM410:2 1 "bar"
VM410:4 2 "baz"

function getValues(obj_? : Object) {
    const obj = obj_;

    if (obj) {
        return Object.keys(obj).map(key => {
            return obj[key];
        });
    }

    return [];
}

Flow doesn't know when Array.prototype.map is going to call its callback. For all it knows by the time the callback is called the obj variable could have been assigned to undefined, so any narrowing done on that variable is undone inside the callback. Narrowing on a const variable sticks for good, because Flow knows it wont change.
You can also try adding experimental.const_params=true to the [options] section of .flowconfig, in which case your original code would have worked.

Thanks! experimental.const_params=true works perfectly. Appreciate the explanation and advice


Non-authors should not be able to add new languages through the kata editor

This "feature" defies the whole purpose of the translation process, and now one user is abusing it:

The fusc function -- Part 2
Sums of Perfect Squares
Sum of Intervals
Decode the Morse code, advanced
parseInt() reloaded
Count Squares In the Chess Board

All these translations were added directly, and as you can see from the comments, some of them are not well-made.

https://www.codewars.com/kata/57040e445a726387a1001cf7/discuss#5d627b3352f6e700143192aa
if he keeps that line of thoughts, his ability to edit/approve/contribute/... should be removed.

WTF, why are you two making a huge fuss over this? Just make adding language version restricted to kata author only like deleting language versions, and everything's done. Stop making pointless drama out of nowhere and make power users look bad.

As for the kata itself, if the kata intends O(log n) time complexity but some O(log n) solution can't pass, then the kata tests are overly restrictive and focused on micro-optimization (which is an issue) and they should be revised. After all, we shouldn't demand people to write exactly the same code as kata author's.
Can't you two spend your time more wisely and go fix the tests instead? 10000 tests is too much.

Just make adding language version restricted to kata author

Have you actually read the title?

(I'm wondering who's really making fuss, here.......)

Have you actually read the title?

Have you actually read the description you've written? Is your issue description actually talking about the issue?

Nobody's making PUs look bad.

Then perhaps stop biting everyone like a rabid dog at every single discussion on CW? There is a simple concept known as "de-escalation", you know right? Every conversion you have on CW looks like biting others instead of trying to fix the issue.
Not everyone exactly know how CW workflows work (everything is kinda opaque and potential pitfalls are all over the place). How hard it is to educate users how to do things properly instead of confronting them immediately? How hard it is to just be someone like me and fix stuff quietly? You know, doing the actual productive work?

This is not related to this particular issue, and AFAIK discussions about katas should happen in the kata discourse.

(I'm wondering who's really making fuss, here.......)

It's you two who've brought it up in this issue in the first place. Otherwise nobody care how does it come about; it's still a very blatant issue.
There is a line between "tight quality control" and "draconian quality control", and you're pretty much in the latter category. You're just slamming on everyone who didn't do a perfect job instead of attempting to rendezvous and make things work.
Yes, you're TRWTF.

For the record, the cause of this is #1919: the user wanted to do a translation but they couldn't because haven't solved the kata yet; the kata does not have a C# version and they only want to use C# on CW. Then they found out they can just edit the kata. Then they also found that they can translate it after that, but editing the kata to add a language version is much quicker than a translation so they did that. It's natural.
Source: personal conversation. I know that user.
The existing issue with the overly tight performance requirements is a separate issue.

There is a line between "tight quality control" and "draconian quality control", and you're pretty much in the latter category. You're just slamming on everyone who didn't do a perfect job instead of attempting to rendezvous and make things work.

Errrr... Is that "you" directed to me too? I that case just... "lol"...! You're in too, if I am. x)

... It's a natural thing to do.

but who decided that it's the good thing to do? you? You're not the owner of the place, iirc? ;)
I get your point on this, don't worry. But Everythng boils down to the very same usual problem: no actual group controlling users on CW to define a global direction so everyone want to do just like s/he thinks is good (and for the greater good). Except that will always provoke crashes between ideas/people.

Source: personal conversation. I know that user.

Mmmmh... That's why... I was surprised about your slight change compared to your usual behavior... x)

How hard it is to educate users how to do things properly instead of confronting them immediately?

Could you possibly explain how to educate people without confronting people and pointing out their issues?  IIRC you're the one saying that "people are neutral by default". If your friend is offended by words "if you don't understand what's the purpose of the kata or what is tested, you should not write translations", then I'm surprised he's been avoiding the harsh reality of Internet conversations for so long.

How hard it is to just be someone like me and fix stuff quietly?

That's not my work? Editing/fixing stuff on CW is a volunteered "job". Following this logic: why don't you fix the kata to end this conversation? YoU'rE bEiNg UnPrOdUcTiVe ToO.

There is a line between "tight quality control" and "draconian quality control", and you're pretty much in the latter category.

the user wanted to do a translation but they couldn't because haven't solved the kata yet

There's a line between following the established translation process, and abusing the bad site design. If your friend doesn't know a particular language, he can use his existing skills to come up with a solution and implement it googling "how to do X in Y". If your friend doesn't want to use any languages besides C#, he can forfeit the kata, copy-paste the top solutions so it counts as "completed", and translate it like everybody does.

oh, and btw:

the user wanted to do a translation but they couldn't because haven't solved the kata yet

@Blind4Basics

but who decided that it's the good thing to do?

...nobody said it's a good thing to do in the first place? :tropical_drink:
But nobody said it's a good thing to slam users every single time this happens either. I already lost count how many drama happens in various kata started by nobody but @FArekkusu out of similar happenings. In fact I stopped bothering to look at dashboard because every day it's him doing the same bashing all the time. It must be fun laying deadly landmines for inexperienced users to step into which they'll receive a horrible hate, right?
Bashing innocent users who doesn't quite know how the site works is not only counter-productive, but straight out draconian and hostile. If you want to bash someone, find people that actually deserve the bashing. Inexperienced users aren't appropriate targets.

I was surprised about this slight change, compared to your usual behavior

Yeah because your drama caused people to come bother me, so I stopped not caring and speak up here. Is that a problem? :trolleybus:

@FArekkusu

Could you possibly explain how to educate people without confronting people and pointing out their issues?

Are you an alien or something? Your mind seem to be incapable of conceiving anything else but two tones for conveying an idea to someone else: sugar-coated nonsense and harsh brutal nonsense. There is a third choice: don't do either of them :wink: just state the facts. I don't know how this is so difficult that unnecessary drama is happening every day on CW.

That's not my job? Editing/fixing stuff on CW is a volunteered. I fix my fuck-ups, and may fix some other kata if I feel like it; why should I forfeit the kata while the author of the problematic translation is sitting right there?

If you feel like you should bite at users every day because they aren't clairvoyent enough to see through everything, don't mind me bite at you every day because I think that's ridiculous too :trophy:, if you think that's that a good outcome for us both.

(But oh well, he doesn't understand what he's doing wrong which again leads us to "if you don't understand what's the purpose of the kata or what is tested, you should not write translations"...)

But, what is the right thing then? To a typical user who writes translations, they can only see the language versions they've solved in the translation kumite page. The translations list contains all the translations, but it doesn't necessarily mean those ones are up-to-date, or approved, or are actually the latest tests (since usually the subsequent issues are fixed by editing the kata itself).
So are you expecting every user who write translations to

read all the existing language version's code, which means they can read lots of programming languages
make an educated (and not wrong, or they'll get bitten!) guess on the kata's intent
write a perfect language version
from the first time they do this

? Now that's a bar of entry so high you're essentially depriving any opportunities of other users participating in the contribution process except a few very exceptional users, as well as any hope to train other users to help along as contributors. I hope you can see how ridiculous your idea is.

Following your logic: why don't you fix the kata and end this conversation? YoU'rE bEiNg UnPrOdUcTiVe ToO.

This issue is about adding permission restrictions to adding new languages, which I've already given my input.

And fixing the kata, well, as I've already mentioned, that the third separate issue about the kata itself. Fixing that doesn't fix any of the two problems above :tropical_fish:

If your friend doesn't want to use any languages besides C#, he can forfeit the kata, copy-paste the top solution so it counts as "completed", and translate it like everybody does.

Emmmmmmmm... copy-paste the top solution so it counts as "completed" is the worst idea ever. It's even more counter-intuitive, and make the user highly suspicious as a cheater.


Preparation for 0.1.0 release

@asvetlov, I'm going to merge this to publish initial release (v0.1.0) on PyPI tonight.

I found critical error in implementation: resource available through multiple routes is handled incorrectly.
I'll address it in a few days, until then I think it's not feasible to release aiohttp_cors.

I found critical error in implementation: resource available through multiple routes is handled incorrectly.
I'll address it in a few days, until then I think it's not feasible to release aiohttp_cors.

That's up to you. Using the same resource under different routes is very rare I believe.

Using the same resource under different routes is very rare I believe.

Maybe I incorrectly used term "resource", but access to the same path using different routes is actually very common in REST:
cors.add(app.router.add_route("GET", "/user/{name}", get_handler))
cors.add(app.router.add_route("PUT", "/user/{name}", put_handler))
cors.add(app.router.add_route("DELETE", "/user/{name}", delete_handler))

I need single OPTIONS handler for these three aiohttp routes (or at least single logic).

Got it. Yes, it's show stopper.

Would you merge the PR?
Fix for shared resources may be applied ad different patch.


Fix build break in appveyor

This resolves the first reason for a break. But even still, there's a CreatePkgDef.exe failure without a logged message.
@AlexEyler do you have cycles to investigate that failure? Feel free to add commits to this PR if you can fix it.

@AArnott I can look into it - I haven't seen a build failure with that though. Maybe this PR build will fail and then I can take a look.

Oh yeah I see it now - let me see.

(maybe updating the build tools reference will help - I can't repro locally).

maybe updating the build tools reference will help - I can't repro locally

Good idea. I couldn't repro locally either.

Yeah, that seemed to do the trick. Are there any other changes you want to do? Otherwise feel free to merge.

I don't have merge privileges. Please go for it!


What's causing: forbidden: User "system:anonymous" in some Cloud Providers

I deployed API-Server to Google's Managed GKE and Oracle's OCI via Terraform with Unmanaged k8s. The behavior on both these providers are exactly the same. Deploying through Helm would not succeed until adding a ClusterRole like this:
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
Once the API-Server is deployed and running, executing any kubectl command to the Custom Resource would fail:

kubectl get eventprovider
Error from server (Forbidden): eventproviders.auraevents.oracledx.com is forbidden: User "system:anonymous" cannot list eventproviders.auraevents.oracledx.com in the namespace "default"

Any ideas on what would be causing the user to be anonymous leading to this failure?

Most probably you have RBAC enabled, which means that, by default, your cluster won't allow full, unprivileged access any more.

Any suggestions on what can be done?

After reading this:
https://kubernetes.io/docs/admin/authentication/#anonymous-requests
then I tried this:
kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admin --user=system:anonymous
and it solved the problem.

@klustria that command you have executed uplifts all anonymous requests to super-admin level access.  If this instance is publically running your probs hacked by now. :/
https://twitter.com/GeoffreyHuntley/status/1004636307828629504

Well, sort of @ghuntley
This is concerning RBAC, not access to kubectl. The externally reachable apiserver endpoint has some other authentication mechanism (usually TLS client certificates, but things like OIDC are possible too). RBAC is an additional layer of security that many clusters don't even use. The command above is just a novel way to set --authorization-mode=NONE
Anyway, back to the issue. We faced this problem too. When RBAC is enabled, the aggregated apiserver somehow has to figure out what user is sending a request. It then asks the kubernetes-apiserver if that user is allowed to perform said action. If the mechanism to tell the aggregated server the user is not working, it defaults to user:anonymous, which is then rejected.
You need to add some flags to kubernetes-apiserver for this to work, check here

Appreciate the discussion still ongoing around this topic. I know that above approach I did is just a workaround and since we are not in production, I'm using it to get us going. @damongant, what exact flags from https://kubernetes.io/docs/tasks/access-kubernetes-api/configure-aggregation-layer/ did you use exactly to make this work for you?

apiserver:
      --requestheader-client-ca-file=/etc/kubernetes/ssl/ca.pem
      --requestheader-allowed-names=aggregator
      --requestheader-extra-headers-prefix=X-Remote-Extra-
      --requestheader-group-headers=X-Remote-Group
      --requestheader-username-headers=X-Remote-User

Yes

Thanks I will try it out. The challenge of course is if you are working with Managed Kubernetes Clusters where you would have little to no ability to change the flags for the APIServer. If I recall, GKE has this issue too and I'm not sure if these flags can be set there. Currently, I'm using Unmanaged Cluster via terraform so I can try out those flags to see if it will work for me.

i managed to create a workaround by applying this yaml:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: anonymous-logs-role
rules:
- apiGroups: [""]
  resources: ["nodes/proxy"]
  verbs: ["create", "get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: anonymous-logs-binding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: anonymous-logs-role
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: User
  name: system:anonymous

this way logs, exec and attach work and the api server doesn't expose any information, so this isn't as permissive as AllowAll. any drawbacks?

Hi @damongant, I added:
  --requestheader-client-ca-file=/etc/kubernetes/ssl/ca.pem
  --requestheader-allowed-names=aggregator
  --requestheader-extra-headers-prefix=X-Remote-Extra-
  --requestheader-group-headers=X-Remote-Group
  --requestheader-username-headers=X-Remote-User

into the K8s Masters Core APIServer and I'm still getting the same issue:
Error from server (Forbidden): error when creating "config/aieventprovider.yaml": eventproviders.auraevents.oracledx.com is forbidden: User "system:anonymous" cannot create eventproviders.auraevents.oracledx.com in the namespace "default"
Are there any other settings I need to set like in the extension API Server or anywhere else?

@klustria I also had to add:
--proxy-client-cert-file=<path to aggregator proxy cert>
--proxy-client-key-file=<path to aggregator proxy key>

as described here. Make sure the proxy certificate maps to a user with the correct permissions/rolebindings.

The problem is why it's annoymous user, though in both /etc/kubernetes/admin.conf and ~/.kube/config the current user is kubernetes-admin. How to set it to a named user?

The core apiserver still knows what user you are, but as soon as its proxied to the aggregated server it doesn't know anymore (because headers and TLS credentials don't "punch through") and the flags described above need to be set up for the aggregated server to not assume every request is anonymous.

After reading this:
https://kubernetes.io/docs/admin/authentication/#anonymous-requests
then I tried this:
kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admin --user=system:anonymous
and it solved the problem.

works for me.

kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admin --user=system:anonymous

this is not recommended since that it will grant extra privileges to any requests w/ anonymous access.
apiserver will be authenticating a request as "anonymous" only if you enabled --anonymous-auth(which is enabled by default) but didn't configure other authenticator like request proxy headers. this error message might be suggesting that you should configure at least one authenticator for ur aggregated server.

except for request header authenticator, you could also use delegated auth (via Authn/AuthzReview API)
note that things that use delegated authentication should have:

the extension-apiserver-authentication-reader role in the kube-system namespace
the system:auth-delegator clusterrole at the cluster scope

enabling anonymous auth is evil for aggregated server, linking recent CVE:
https://github.com/kubernetes/kubernetes/issues/71411
will disable that by default in this builder

Do not do what https://github.com/kubernetes-incubator/apiserver-builder-alpha/issues/225#issuecomment-370153428 is suggesting. Huge security hole....

The Kubernetes team considers some of the suggestions made in this thread to be harmful. Some suggestions recommend granting anonymous clients full access to the Kubernetes API and should not be considered as solutions to permission issues. While anonymous auth is useful in specific circumstances, it should only be applied with care and understanding of the Kubernetes API and permission model.
For more information on RBAC, please check out the following resources:
https://kubernetes.io/docs/reference/access-authn-authz/rbac/
https://www.cncf.io/blog/2018/08/01/demystifying-rbac-in-kubernetes/


autofocus in modal doesn't work a second time

Open a modal that has an autofocus text field
Note the field focuses
Open the same modal again.
Note the field doesn't focus.

This was fixed in #2273 but was not merged.

Still not working for me, I have AngularJS 1.2.28 !

Hi,
I am facing the same issue. Did you find any solution for this?
Thanks

Do we have any solution for this?

i am having this problem in chrome only
in safari it works fine


How to sign mix contracts transaction with Scatter

Hello James,
In eosjs GitHub (https://github.com/EOSIO/eosjs#calling-actions) , here support mix contracts in the same contracts. like below:
// mix contracts in the same transaction
await eos.transaction(['myaccount', 'eosio.token'], ({myaccount, eosio_token}) => {
myaccount.transfer('inita', 'initb', '1.000 TOK@myaccount', '')
eosio_token.transfer('inita', 'initb', '1.0000 SYS', '')
})
and it's very pleasure if u can support it in Scatter, since this is very useful feature to Dapps.
Thanks
Panda.X team

+1

22 days and no response? @nsjames - this is a serious issue.

fefc86f1195045c89230ebcbc09d9a4bed2e9780

Thanks @nsjames ，I'll test it later.


Trying to explaine a simple Neural Network using LIME

I am trying to explaine the following neural network trained on toy data
import keras
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from lime import lime_tabular
from lime.lime_tabular import LimeTabularExplainer

X = np.array([[(1,2,3,3,1),(3,2,1,3,2),(3,2,2,3,3),(2,2,1,1,2),(2,1,1,1,1)],
              [(4,5,6,4,4),(5,6,4,3,2),(5,5,6,1,3),(3,3,3,2,2),(2,3,3,2,1)],
              [(7,8,9,4,7),(7,7,6,7,8),(5,8,7,8,8),(6,7,6,7,8),(5,7,6,6,6)],
              [(7,8,9,8,6),(6,6,7,8,6),(8,7,8,8,8),(8,6,7,8,7),(8,6,7,8,8)],
              [(4,5,6,5,5),(5,5,5,6,4),(6,5,5,5,6),(4,4,3,3,3),(5,5,4,4,5)],
              [(4,5,6,5,5),(5,5,5,6,4),(6,5,5,5,6),(4,4,3,3,3),(5,5,4,4,5)],
              [(1,2,3,3,1),(3,2,1,3,2),(3,2,2,3,3),(2,2,1,1,2),(2,1,1,1,1)]])
y = np.array([0, 1, 2, 2, 1,1,0])

model = keras.Sequential([
    layers.LSTM(64, return_sequences=True, input_shape=(5, 5)),
    layers.Conv1D(64, kernel_size=3, activation='relu'),
    layers.MaxPooling1D(pool_size=2),
    layers.Flatten(),
    layers.Dense(128, activation='relu'),
    layers.Dense(3, activation='softmax')  # Adjust the number of output units based on your problem (3 for 3 classes)
])

model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
model.fit(X,y,epochs=10)

I want to use LIME to identify the most relevant feature and Iam using the following code
# Create a LimeTabularExplainer
explainer = LimeTabularExplainer(training_data=X, mode="classification", feature_names=[f"feature_{i}" for i in range(5)])

# Choose a specific instance for which you want to explain the prediction
instance_to_explain = X[0]

# Generate an explanation for the instance
explanation = explainer.explain_instance(instance_to_explain.flatten(), model.predict, num_features=5)

# Print the explanation
print(explanation.as_list())

But it keep giving me error that Iam not understanding.

@omaruno Were you able to make it work?


iTunes & Spotify issues

Hi,
First, great app!!
itunes version :  <IP_ADDRESS>
Spotify version : <IP_ADDRESS>
Yosemite 10.10.3
iTunes control works, but doesn't show song/album name on the Pebble.
Spotify nothing seem to works.
Any idea ?
Thanks!

Similar versions of Apps, iPhone 5S on Ios 9.0.1
Itunes control works except volume buttons, and no music info.
But, volume buttons from System article is working !


Unnest cargo-about configs for single target

I think this is a holdover from when the config had to be called about.toml.
Add two new labels: A-cargo-about and A-github-action.

labeler dry run:
🏃 Running GitHub Labeler
[dryrun] ✅ Skipping update for 'A-build' label. Same color and description
[dryrun] 🎨 Creating 'A-cargo-about' label with color 'f7e101' and desc 'Area: cargo-about installation and configuration.'
[dryrun] ✅ Skipping update for 'A-deps' label. Same color and description
[dryrun] 🎨 Creating 'A-github-action' label with color 'f7e101' and desc 'Area: GitHub Action API and configuration.'
[dryrun] ✅ Skipping update for 'A-performance' label. Same color and description
[dryrun] ✅ Skipping update for 'A-project' label. Same color and description
[dryrun] ✅ Skipping update for 'A-release' label. Same color and description
[dryrun] ✅ Skipping update for 'A-security' label. Same color and description
[dryrun] ✅ Skipping update for 'A-target' label. Same color and description
[dryrun] ✅ Skipping update for 'A-thirdparty' label. Same color and description
[dryrun] ✅ Skipping update for 'C-bug' label. Same color and description
[dryrun] ✅ Skipping update for 'C-docs' label. Same color and description
[dryrun] ✅ Skipping update for 'C-enhancement' label. Same color and description
[dryrun] ✅ Skipping update for 'C-quality' label. Same color and description
[dryrun] ✅ Skipping update for 'C-question' label. Same color and description
[dryrun] ✅ Skipping update for 'E-easy' label. Same color and description
[dryrun] ✅ Skipping update for 'E-medium' label. Same color and description
[dryrun] ✅ Skipping update for 'E-hard' label. Same color and description
[dryrun] ✅ Skipping update for 'E-help-wanted' label. Same color and description
[dryrun] ✅ Skipping update for 'E-needs-test' label. Same color and description
[dryrun] ✅ Skipping update for 'S-archive' label. Same color and description
[dryrun] ✅ Skipping update for 'S-blocked' label. Same color and description
[dryrun] ✅ Skipping update for 'S-do-not-merge' label. Same color and description
[dryrun] ✅ Skipping update for 'S-duplicate' label. Same color and description
[dryrun] ✅ Skipping update for 'S-invalid' label. Same color and description
[dryrun] ✅ Skipping update for 'S-postponed' label. Same color and description
[dryrun] ✅ Skipping update for 'S-speculative' label. Same color and description
[dryrun] ✅ Skipping update for 'S-stale' label. Same color and description
[dryrun] ✅ Skipping update for 'S-wip' label. Same color and description
[dryrun] ✅ Skipping update for 'S-wontfix' label. Same color and description
[dryrun] ✅ Skipping update for 'T-aarch64-apple-darwin' label. Same color and description
[dryrun] ✅ Skipping update for 'T-aarch64-unknown-linux-gnu' label. Same color and description
[dryrun] ✅ Skipping update for 'T-aarch64-unknown-linux-musl' label. Same color and description
[dryrun] ✅ Skipping update for 'T-i686-pc-windows-gnu' label. Same color and description
[dryrun] ✅ Skipping update for 'T-i686-pc-windows-msvc' label. Same color and description
[dryrun] ✅ Skipping update for 'T-i686-unknown-linux-gnu' label. Same color and description
[dryrun] ✅ Skipping update for 'T-x86_64-apple-darwin' label. Same color and description
[dryrun] ✅ Skipping update for 'T-x86_64-pc-windows-gnu' label. Same color and description
[dryrun] ✅ Skipping update for 'T-x86_64-pc-windows-msvc' label. Same color and description
[dryrun] ✅ Skipping update for 'T-x86_64-unknown-linux-gnu' label. Same color and description
[dryrun] ✅ Skipping update for 'T-x86_64-unknown-linux-musl' label. Same color and description


awq compression of llama 2 70b chat got bad result

I use awq to quantize llama 2 70b-chat by:
CUDA_VISIBLE_DEVICES="1,2,3,4,5,6,7" python quantize_llama.py

the codes of quantize_llama.py：
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer

model_path = '/nas/lili/models_hf/70B-chat'
quant_path = '/nas/lili/models_hf/70B-chat-awq'
quant_config = { "zero_point": True, "q_group_size": 128, "w_bit": 4, "version": "GEMM" }

# Load model
model = AutoAWQForCausalLM.from_pretrained(model_path, **{
                    "low_cpu_mem_usage": True,
                    "device_map": "auto"
                    })
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

# Quantize
model.quantize(tokenizer, quant_config=quant_config)

# Save quantized model
model.save_quantized(quant_path)
tokenizer.save_pretrained(quant_path)

And I serve it with:
CUDA_VISIBLE_DEVICES=0,1 python api_server.py --model /nas/lili/models_hf/70B-chat-awq/ --port 8005  --tensor-parallel-size=2

In my test data, orginal llama 2 70b-chat got 0.581 accuracy. But awq compressed model only got 0.094. What's wrong?
my system info:
autoawq                                0.1.8
transformers                           4.36.1
torch                                  2.1.2

This is unexpected as the testing on Llama models shows minimal accuracy drops.

Did you run your tests using vLLM and is it possible to reproduce the low accuracy in AutoAWQ?
Did you try with a custom dataset for quantization?

yes, I ran my tests using vLLM. I will try to use autoawq directly.
I just use the code above. I don't know what's the default dataset.

I tried to use autoawq directly:
    tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)

    model = AutoAWQForCausalLM.from_quantized(model_path,
                                               fuse_layers=True, device_map="auto",
                                               pad_token_id=tokenizer.eos_token_id
        )

still got 0.08 accuracy.

Hi @fancyerii, it seems the model you quantized did not turn out well. It's a different story for the official llama 2 70b models, so I am unfortunately not able to help you out with this issue.


Add a settings entry in pyls configurations

This PR adds a settings entry for pyls
I was trying to disable pyflakes warnings as they were annoying, I searched in the web, changed the settings such as:
{
  ...
  "settings": {
    "pyflakes": {
      "enabled": false
    }
  }
}

and
{
  ...
  "settings": {
    "plugins": {
      "pyflakes": {
        "enabled": false
      }
    }
  }
}

in various ways and gave up many times before stumbling upon the solution in a thread (I forget where)
and the trick was adding "pyls" entry like this:
{
  ...
  "settings": {
    "pyls": {
      "plugins": {
        "pyflakes": {
          "enabled": false
        }
      }
    }
  }
}

I think adding this entry commented will save many people a lot of time.

Coverage remained the same at 26.826% when pulling a1a1eda229451233c0338b59a8c1ecfac5a42476 on AmjadHD:master into cbf13fbe143f706dd406f9ea0b15eec0571a1312 on tomv564:master.

Oops. Sorry for this. I somehow submit review for a wrong PR.


Improve profile picture layout

At the moment, the profile pictures at the top, overflow when the screen is too narrow, or there's too many pictures!
This issue will need you to go through the CSS and make sure the website is responsive!

Can Me and @PAOK-2001 work on this?

Closed


Reset boundaries for vorticity stretching and laplacian filter 3d kernel

These kernels are currently not equipped with reset_ghost_zone feature. I can submit a PR for this.

I don't think this issue in its current form requires resolution:

Vorticity stretching approach doesn't work out numerically. In fact, please check the example cases to see what we actually use for the advection term, in order to avoid coding up unnecessary kernels. Soon I will remove the stretching option from the simulator altogether, hence we don't need this correction.
For the laplacian filter kernel is this option needed for the mpi side?

@bhosale2 Maybe partially it might.

I see. Sorry I did not notice this earlier. I thought we were using them, should've paid more attention to the kernels employed in the simulator and examples.
Yeah, initially I thought I would need it for the MPI side. After reading your comments, I think maybe you are right. In that case, the kernel would operate correctly in the inner cell (i.e. exclude ghost cell) and we will still get the correct resulting inner cell. Proceeding in the solver algorithm, we would call other kernels like compute flow velocity which in itself that kernel would ghost the inner relevant field as currently set up in sopht-mpi, so perhaps we won't run into an issue after all. Please confirm that my thought process is correct.

Again, sorry for the premature PR without prior discussion.

Hmm.. on second thought, for the laplacian filter, the boundary clearing may behave differently in the mpi context, since the boundary clearing is set to 1 cell here, while the mpi local domain has ghost_size typically set to 2, this means that the result may still be looking at different results if we use the kernel as is, right? Unless we are expecting sopht-mpi to adjust for this offset, but I'm not sure if that is the best workaround. What do you think @bhosale2 ?

An option to set a custom boundary clearing zone for the laplacian filter is added in 78af5ee. With this, I will now close the issue and corresponding PR.


Adding multiple Decoratorthe circle flickers and become oval

i have added the event to calendar ,after that added the decorator for weekend with event,weekend without event and change the background of today's color.
But adding such decorators event circle background is flickering like circle to oval many time.
Please suggest ho to resolve the problem

How did you solve it

i have added the event to calendar ,after that added the decorator for weekend with event,weekend without event and change the background of today's color.
But adding such decorators event circle background is flickering like circle to oval many time.
Please suggest ho to resolve the problem

me too


Write new PM2 deployment documentation

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

I'm submitting a ...
[ ] bug report
[x] feature request
[ ] question about the decisions made in the repository

Do you want to request a feature or report a bug?

I'm requesting updated documentation for PM2 deployment.

What is the current behavior?

The PM2 documentation is outdated.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

What is the expected behavior?

Updated PM2 deployment documentation.

What is the motivation / use case for changing the behavior?

I was trying to deploy with the documentation I wrote, but no luck.

Please tell us about your environment:

Angular version: 2.0.0-beta.X
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Angular verions 2.0.0 rc-4

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Done. Wrote it here: https://github.com/AngularClass/angular2-webpack-starter/wiki/How-to-serve-with-PM2


UITableView weird behavior/UI on scroll

Hi 👋
I've tried to use you library in my app but it seems like it's having a weird behavior when using a table view with sections.
The tableview UI looks fine until you go back to the top and start the pan gesture without finishing it. After that the cells sizes are wrong for some reason. It's hard to describe so I used your example project to reproduce it and here is a video of screen recording:
https://photos.app.goo.gl/BSgb5y4tP1GrxuSV7
I know it's an edge case and I don't know if it something easy to fix but I'd really love to use your library in my app. I'd be happy to help debugging, I can also share the code to reproduce the issue if you ever need it 👍
Thanks!

Hi, and thank you for opening an issue.
This is a known bug, unfortunately I haven’t found a fix yet that also retains the card-like appearance and bouncing behaviour as seen in the Music app. I appreciate any and all help with debugging.

Closing this issue; tracking in #62.

Hi, sorry I didn't see there was an existing issue 😨
I'll try to debug/help as much as I can then 👍


Does motion tracking work with this?

I don't have a capable device yet so I'm not able to play around with it, but I want to achieve something similar to this:
http://inkhunter.tattoo/
Is this possible?

react-native-arkit is based on https://developer.apple.com/arkit/
It's best at finding horizontal surfaces (tables, floors) and place 3d objects on them.
Inkhunter uses "marker-based ar", which is not yet supported directly in arkit: https://stackoverflow.com/questions/44817416/arkit-is-it-possible-to-track-objects-like-with-vuforia

i think we can close this?


pe.signatures[n].issuer not working at the lasts version

for version 4.0.2 the following code working well:
		for all n in (0..pe.number_of_signatures): 		(	 			not pe.signatures[n].issuer contains "Microsoft" 		)
but for version 4.5.1 it's not.
some for the 'subject' field, I do not know when it starts to fail.

Do you have a hash that triggers this?

e81f3632a177cc70e45b405c4383e4f11e4e1661158127dfb29615db769b68dd

Do you have a hash that triggers this?

e81f3632a177cc70e45b405c4383e4f11e4e1661158127dfb29615db769b68dd

Ah, I see what is going on here: pe.signatures array indexing starts at zero. In your example, the first time through the loop it will evaluate to true (it does not contain "Microsoft") but the second time through (when n is 1) not pe.signatures[n].issuer contains "Microsoft" is undefined.
What you want to do is for all n in (0..pe.number_of_signatures - 1): (not pe.signatures[n].issuer contains "Microsoft")
I'm guessing b7da5d2835cc4cf8a15027da30265addab1a4be5 has something to do with this change?

ha, so the "bug" belongs to the oldest versions, not the new ones, at the older version the contains operation returns true (?) for undefine so it "works", do I get it right?

I think so. Not entirely sure to be honest.

@wxsBSD tnx!


Enhancement: Artifact should offer a way to get the a URL and/or download the file

The Artifact class does not offer a #getUrl() method (just as JobWithDetails/BuildWithDetails). IMHO it would be a valuable feature to get the URL of the artifact to for further processing or allow a direct download.
I know there is "buildWithDetails#downloadArtifact(Artifact a)" but that offers only an InputStream and furthermore the build(WithDetails) is not always available (and there is no artifact.getBuild() - see #339)

after some investigation, this should be easily possible after fixing #337 & #339

How to download MavenArtifact?

How to download MavenArtifact?

I am also looking for this...


For a 0.20.15 release

#813

Codecov Report

Merging #814 (3dc0ebc) into master (08a1ff0) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master     #814   +/-   ##
=======================================
  Coverage   85.70%   85.70%
=======================================
  Files          36       36
  Lines        3505     3505
=======================================
  Hits         3004     3004
  Misses        501      501

Impacted Files
Coverage Δ

src/operations.jl
88.37% <0.00%> (ø)

Continue to review full report at Codecov.

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


Do not use 'Object.assign' as '_.defautls' equivalent

What is the reason for this? I think the only difference between both cases is using Object.assing the tplValues could have more properties. For example:
params = {a:1, b:2, c:3}
// assign
assign_params = Object.assign({a:11, b:12}, params)
// { a: 1, b: 2, c: 3 }
// If we could only need `a` and `b`, but we will have `c` too

Is it a problem?
Anyway, the new code also looks nice to me.

Object.assign doesn't work as we were expecting:
$ node
> const obj = Object.assign({ a: '', b: '' }, { a: 1, b: undefined });
undefined
> obj
{ a: 1, b: undefined }
> const { a = '', b = '' } = { a: 1, b: undefined };
undefined
> a
1
> b
''
>

Ok, good to know

Now, it's compatible with _.defaults:
$ node
> const obj = Object.assign({ a: '', b: '' }, { a: 1, b: undefined });
undefined
> obj
{ a: 1, b: undefined }
> const { a = '', b = '' } = { a: 1, b: undefined };
undefined
> a
1
> b
''
> const _ = require('underscore');
undefined
> const __obj = _.defaults({ a: 1, b: undefined }, {a: '', b: '' });
undefined
> __obj
{ a: 1, b: '' }
>


[Documentation] add installation instructions for Lazy

There are no docs here I could find. Bootstrapping standalone doesn't work, including Tangerine as a plugin in Lazy works, but it restricts using Lazy to Lua. It would be much appreciated if you added installation instructions for Lazy package manager.

Requiring Lazy with just require "lazy".setup {} does not affect Tangerine, but loading at least one plugin does.
Error message upon trying to run :Fnl with one plugin loaded in Lazy:
E5108: Error executing lua ...angerine/start/tangerine.nvim/lua/tangerine/api/init.lua:4: module 'tangerine.api.eval' not found:
	no field package.preload['tangerine.api.eval']
cache_loader: module tangerine.api.eval not found
cache_loader_lib: module tangerine.api.eval not found
	no file './tangerine/api/eval.lua'
	no file '/data/data/com.termux/files/usr/share/luajit-2.1.0-beta3/tangerine/api/eval.lua'
	no file '/usr/local/share/lua/5.1/tangerine/api/eval.lua'
	no file '/usr/local/share/lua/5.1/tangerine/api/eval/init.lua'
	no file '/data/data/com.termux/files/usr/share/lua/5.1/tangerine/api/eval.lua'
	no file '/data/data/com.termux/files/usr/share/lua/5.1/tangerine/api/eval/init.lua'
	no file './tangerine/api/eval.lua'
	no file './tangerine/api/eval/init.lua'
	no file '/data/data/com.termux/files/home/dotfiles/nvim/.config/nvim/fnl/tangerine/api/eval.lua'
	no file '/data/data/com.termux/files/home/dotfiles/nvim/.config/nvim/fnl/tangerine/api/eval/init.lua'
	no file '/data/data/com.termux/files/home/.config/nvim/fnl/tangerine/api/eval.lua'
	no file '/data/data/com.termux/files/home/.config/nvim/fnl/tangerine/api/eval/init.lua'
	no file '/data/data/com.termux/files/home/dotfiles/nvim/.config/nvim/lua/tangerine/api/eval.lua'
	no file '/data/data/com.termux/files/home/dotfiles/nvim/.config/nvim/lua/tangerine/api/eval/init.lua'
	no file './tangerine/api/eval.so'
	no file '/usr/local/lib/lua/5.1/tangerine/api/eval.so'
	no file '/data/data/com.termux/files/usr/lib/lua/5.1/tangerine/api/eval.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './tangerine.so'
	no file '/usr/local/lib/lua/5.1/tangerine.so'
	no file '/data/data/com.termux/files/usr/lib/lua/5.1/tangerine.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'require'
	...angerine/start/tangerine.nvim/lua/tangerine/api/init.lua:4: in function 'string'
	[string ":lua"]:1: in main chunk

Did you try bootstraping in ~/.config/nvim/init.lua instead of in plugin/ dir.

Yes, I did just that, but it seems to reset "packpath", which messes with loading Tangerine.

 I made sure Lazy doesn't load before Tangerine, so I can define plugins in Fennel.

@alexmozaidze so this snippet of code can be written in fennel or not?
like this:
(local lazy (require :lazy))

(lazy.setup ...plugins {:performance {:reset_packpath false}})

Yes. I am not sure what ... in this case does, but you get the right idea.

or do you just do something like this in init.lua:
-- ...bootstrap tangerine and lazy

tangerine.setup {}

lazy.setup {...}

Yes. I am not sure what ... in this case does, but you get the right

... was just a placeholder.


Window Freeze when click or moving the window on Windows platforms

On Windows systems, when the mouse is clicked on title bar of game window, or the game window is moved, the window contents will freeze. I know that this engine uses the Glew library to manage windows, and I know that this problem is a common problem of Glew on Windows systems. However, according to my idea, if multi-threading is used to separate the engine's main loop and Glew's monitoring mechanism, maybe this can be done? I made some attempts but failed. I was wondering if someone could consider completing this function. After all, similar engines such as Godot, MonoGame, Unity, and Unreal Engine have done this.
I am currently developing a game for the Windows platform using this engine. If the game content is not frozen when moving the window, it will bring a better experience to the user.

Not engine itself, but axmol support create render window as sub thread child window which x-studio UI editor does, it's create axmol window as mfc mainframe and rendering in a unique thread

Not engine itself issue, but axmol support create render window as sub thread child window which x-studio UI editor does, it's create axmol window as mfc mainframe and rendering in a unique thread
https://github.com/simdsoft/x-studio

Maybe a Q&A thema?

Well, after my series of research, this seems to be the problem of glfw. If I want to solve this problem, it seems that I can only try to put the engine into the native framework of different platforms for rendering. For example, in the MFC framework of Windows 10, perhaps not using glfw. I am not sure this will work or not, and this seems to lose cross-platform functionality.
This got me thinking, and I was curious whether x-studio did the same thing? Unfortunately, this IDE is not open source.

This should be a long story, I'm not sure if it will support in the future, so I convert to discuss at this time


Total no of cases overlapping with Active cases in mobile devices.

Total no of cases overlapping with Active cases in mobile devices.

Duplicates #1924