text:
CPT's require parent nodes in alphabetic order

Hi Max,
thanks again for putting together hedgehog - great library with a great API.
I think there might be a small hiccup (or design choice?) in BayesNet.prepare(). Consider the following example:
import hedgehog as hh
import pandas as pd

edges = pd.DataFrame(
    {
        "Parent Node": ["Input A", "Input B"],
        "Child Node": ["Output", "Output"],
    }
)

bn = hh.BayesNet(*edges.itertuples(index=False, name=None))

bn.P['Input A'] = pd.Series({True: 0.7, False: 0.3})
bn.P['Input B'] = pd.Series({True: 0.4, False: 0.6})

# Manual input of a CPT with columns NOT ordered alphabetically
output_cpt = pd.DataFrame(
    {
        "Input B": [True, True, True, True, False, False, False, False],
        "Input A": [True, True, False, False, True, True, False, False],
        "Output": [
            True,
            False,
            True,
            False,
            True,
            False,
            True,
            False,
        ],
        "Prob": [1, 0, 0, 1, 0.5, 0.5, 0.001, 0.999],
    }
)
bn.P["Output"] = output_cpt.set_index(["Input B", "Input A", "Output"])["Prob"]

If we take a look at bn.P["Output"], we see that the probabilities are integrated correctly.
Input B  Input A  Output
True     True     True      1.000
                  False     0.000
         False    True      0.000
                  False     1.000
False    True     True      0.500
                  False     0.500
         False    True      0.001
                  False     0.999
Name: Prob, dtype: float64

Next, we call prepare():
bn.prepare()

After calling prepare(), we see that the index is sorted (which is completely fine) and the column names are mixed up during renaming, since the parent node names are stored alphabetically as attributes during __init__().
Input A  Input B  Output
False    False    False     0.999
                  True      0.001
         True     False     0.500
                  True      0.500
True     False    False     1.000
                  True      0.000
         True     False     0.000
                  True      1.000
Name: P(Output | Input A, Input B), dtype: float64

A quick workaround for this behaviour is to sort the parent nodes in the input CPT alphabetically. Nevertheless, this is not perfectly intuitive, and I think a better design choice would be to require a series with index names, so an explicit reference can be made. Unfortunately, I am also not able to use the query() method with several nodes specified in event without running prepare() beforehand (e.g., bn.query("Output", event={"Input A": True, "Input B": False}) will give ValueError: cannot join with no overlapping index names before running bn.prepare()).
Happy to get your feedback on this!
Best,
Daniel

Hello! Thanks for your interest. I read through the issue and ran the code.
What exactly is the problem? Would you prefer for the column names not to be sorted during prepare?

Hi Max, thanks for getting back to me so quickly!
Well, it's not really a preference, but the column names are assigned incorrectly (Input B is named Input A and Input A is named Input B during prepare). This leads to incorrect conditional probabilities.
Considering the CPT from above, the marginal probability for Output given {"Input B": False, "Input A": True} should be the following:
Output
False    0.5
True     0.5
Name: P(Output), dtype: float64

Instead, after running prepare, where the column names are mixed up, I get the following:
>>> bn.query("Output", event={"Input B": False, "Input A": True})
Output
False    1.0
Name: P(Output), dtype: float64

Hope this clarifies the matter.
Cheers!

By golly you're right.
I've added some logic to handle the case where the CPT has index names. So you can either provide it without names or with names. This provides the most flexibility. Forcing users to provide name the indexes of their CPTs could be worthwhile, but I would say that it's too restrictive.
Thanks for the detailed code examples! I've added them as a unit test.

Great, this looks perfect - thanks so much!

authors: MaxHalford danieljaeck

repo: MaxHalford/hedgehog


text:
smoll memory leak

I tested v1.1.0 against v0.10.0, and i found a small memory leak:

100 scores per 5 seconds, for 20 minutes = +40MB memory (20k+ processed scores)
2k scores per 5 seconds, for 13 minutes = +350MB memory (200k+ processed scores)

i dont know if it's wasm issue or my code missing some pieces

graphs:
https://github.com/user-attachments/assets/d6ce0e23-25e8-4eec-90b0-97cccb88a905
https://github.com/user-attachments/assets/950b26ad-02a3-4f5e-b23e-2f6ec6e9a14b
old version code
import { Beatmap, Calculator } from "@kotrikd/rosu-pp"; // versio 0.10.0

function sleep(ms) {
  return new Promise((resolve) => setTimeout(resolve, ms));
};

let total_processed = 0;
export function calculatePP() {
  const file_path = `./2.osu`;

  try {
    const beatmap = new Beatmap({
      path: file_path,
    });
    const calc = new Calculator({
      mods: 64,
      mode: 0,
    });

    const attr = calc.acc(100).mapAttributes(beatmap);
    const performance_now = calc
      .nMisses(10)
      .performance(beatmap);

    const performance_fc = calc
      .nMisses(0)
      .performance(beatmap);

    const result = {
      stars: +performance_now.difficulty.stars.toFixed(2),
      ar: +attr.ar.toFixed(2),
      od: +attr.od.toFixed(2),
      cs: +attr.cs.toFixed(2),
      hp: +attr.hp.toFixed(2),
      pp: +performance_now.pp.toFixed(2),
      fc: +performance_fc.pp.toFixed(2),
      max_combo: performance_now.difficulty.maxCombo,
    };

    total_processed++;
    return result;
  } catch (error) {
    console.log(error);
  };
};

async function main(param) {
  if (param == 'yo') await sleep(5000);

  let index = 0;
  while (true) {
    const result = calculatePP();
    index++;

    if (index % 100 == 0) console.log(total_processed, index, result);
    if (index > 100) break;
  };

  await sleep(5000);
  main();
};

main('yo');

new version code
import fs from 'fs';
import rosu from "rosu-pp-js";

function sleep(ms) {
  return new Promise((resolve) => setTimeout(resolve, ms));
};

let total_processed = 0;
export function calculatePP() {
  const file_path = `./2.osu`;

  try {
    const bytes = fs.readFileSync(file_path, 'utf8');
    const beatmap = new rosu.Beatmap(bytes);

    const current = new rosu.Performance({
      mods: 64,
      misses: 10,
    }).calculate(beatmap);

    const fullCombo = new rosu.Performance({
      mods: 64,
    }).calculate(current);

    const result = {
      stars: +current.difficulty.stars.toFixed(2),
      ar: +beatmap.ar.toFixed(2),
      od: +beatmap.od.toFixed(2),
      cs: +beatmap.cs.toFixed(2),
      hp: +beatmap.hp.toFixed(2),
      pp: +current.pp.toFixed(2),
      fc: +fullCombo.pp.toFixed(2),
      max_combo: current.difficulty.maxCombo,
    };

    beatmap.free();
    current.free();
    fullCombo.free();

    total_processed++;
    return result;
  } catch (error) {
    console.log(error);
  };
};

async function main(param) {
  if (param == 'yo') await sleep(5000);

  let index = 0;
  while (true) {
    const result = calculatePP();
    index++;

    if (index % 100 == 0) console.log(total_processed, index, result);
    if (index > 5000) break;
  };

  await sleep(5000);
  main();
};

main('yo');

used this map for testing: https://osu.ppy.sh/b/1179268

@kotrikd/rosu-pp in that build, means builded pp-update branch for node.

to clarify i used @KotRikD/rosu-pp with version 0.10.0 in old code

Nothing wrong is sticking out to me in the new code so can't say what's going on just yet, will have to take a deeper dive into this sometime later but I'm fairly busy at the moment, especially with the new pp update 😓

it's a small leak (hopefully, didn't test it in prod yet), I'll just occasionally restart the script when it hit certain memory usage

added repo for ease of testing https://github.com/cyperdark/rosu-test

source: gharchive/issue

authors: KotRikD MaxOhn cyperdark

repo: MaxOhn/rosu-pp-js

license: MIT

license_type: permissive

license_source: github-api


text:
Add email feature with multi factor authentication

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

please assign me this issue


text:
speed up analyze-outcomes stage

Improve perf of the analyse-outcomes stage of CI, which especially matters because it's a serial stage of the CI pipeline.
Currently, it takes around 247s to run xz on the CI.
Testing locally, current xz command takes 130s. With -0, it takes 15s (so expect ~28.5s on CI). This increases compressed size from 38 MB to 54 MB.
Using -T8 (8 threads) reduces it further to 2.6s locally (expect ~5s on CI). There's no penalty for going too big on thread count, but no benefit beyond about 8-16.
lzma, gzip, bzip2, zip are all worse.
Also, use grep instead of awk to extract failures, which saves a few more seconds.

CI is green
@gilles-peskine-arm are you happy enough with this now to approve?

@gilles-peskine-arm I have updated to use -T0, please review

Test run shows xz taking 15s https://jenkins-mbedtls.oss.arm.com/blue/rest/organizations/jenkins/pipelines/mbed-tls-pr-head/branches/PR-8530-head/runs/12/nodes/8129/log/?start=0

source: gharchive/pull-request

authors: daverodgman tom-cosgrove-arm

repo: Mbed-TLS/mbedtls-test


text:
Mise en place de la base de données

[x] Ajout du code SQL en accord avec le MCD
[ ] Instanciation de la BDD -> Initialisation des tables
[ ] insérer les données

Ajout du code SQL en accord avec le MCD DONE

Instanciation de la BDD -> Initialisation des tables

authors: FlexReflx longuebrayj

repo: McBaxck/cmdb


text:
request shield generator

i would like to ask to make the shield projector Opaque so that it renders the blocks next too it. I ask cuz i made custom model for it and now it looks a bit weird. furthermore its not really a building block so it shouldn't  make difference in performance. it could be a config option too.
Anyway thanks for your time.
a friendly supporter

Can you explain what you mean? I don't understand

Okay yours is the one on the left is the shield projector of your mod as you can see it doesn't show the block behind it. the one on the right is the same model but does show the block behind it. I understand you cant make all blocks like that but cuz this isn't a building block it shouldn't be a big problem.

That doesn't look like a screen projector from my mod. In fact I have never seen that block before.  Wrong mod?

Ah sorry you made a custom model . I missed that

sorry i should have stated it more clearly

I don't think this is supported even by vanilla blocks. I think that if you were to, for example, replace vanilla cobblestone with this model, the same thing would happen. Performance would tank if what was behind every block had to be rendered, just in case one of them was customized to not be solid anymore.

authors: McJty Varg95 josephcsible

repo: McJty/RFTools

license: mit

license_source: bigquery


text:
Right-alignment broken

Just updated the addon and noticed that it was defaulting to left alignment, so I went into the settings and ticked/untick the option for legt alignment, to try to get back to right, but now it's just broken, unfortunately. Picture attached to show what it looks like! Love the addon nonetheless, thanks for all your hard work!

Oh thanks! I'll try to get this fixed ASAP

v1.7.2 release is underway and has this fixed, thanks for your patience!

authors: Lunaeria Mctalian

repo: Mctalian/RPGLootFeed


text:
Could not detect PCM audio format in Wave file

I've attached an example Wave file that mediainfo does not detect as PCM encoded.
CBD6DCA3-22DE-42D2-A5AA-995051A8D0E5.zip
$ unzip -q CBD6DCA3-22DE-42D2-A5AA-995051A8D0E5.zip
$ mediainfo --version
MediaInfo Command line,
MediaInfoLib - v0.7.89
$ mediainfo CBD6DCA3-22DE-42D2-A5AA-995051A8D0E5.wav
General
Complete name                            : CBD6DCA3-22DE-42D2-A5AA-995051A8D0E5.wav
Format                                   : Wave
File size                                : 328 KiB

However, soxi correctly detects it as PCM:
$ soxi CBD6DCA3-22DE-42D2-A5AA-995051A8D0E5.wav

Input File     : 'CBD6DCA3-22DE-42D2-A5AA-995051A8D0E5.wav'
Channels       : 2
Sample Rate    : 8000
Precision      : 16-bit
Sample Encoding: 16-bit Signed Integer PCM

I'm running Fedora 24.
/cc @whenry

Due to buggy RIFF header in the file (it indicates a size of 8, which is wrong).
If I detect the buggy RIFF header and consider the first chunk as the unique one, result is:
General
Complete name                            : CBD6DCA3-22DE-42D2-A5AA-995051A8D0E5.wav
Format                                   : Wave
File size                                : 328 KiB
Duration                                 : 10 s 496 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 256 kb/s
BuggyHeader                              : WAVE

Audio
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 10 s 496 ms
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 8 000 Hz
Bit depth                                : 16 bits
Stream size                              : 328 KiB (100%)

(note that I added info about buggy header)
I guess I need to have a detection of the buggy file for

In next public version 0.7.90 or in next nightly 20161021.

authors: JeromeMartinez aevernon

repo: MediaArea/MediaInfo


text:
🛑 MediaNext is down

In 0b5d229, MediaNext (https://the-bot.thein321.repl.co) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MediaNext is back up in 027ab38.

repo: MediaPlay-Discord/status


text:
My Multiogar keeps crashing

Hi my multiogar keeps crashing when i open it any fixes?

Nvm i fixed it

But this is multiogar-EDITED, not original.

authors: AlexHGaming koda


text:
how to train with one GPU?

I used pods_train --num-gpus 1 , but I got error:
Traceback (most recent call last):
File "/home//anaconda3/envs/torch1.8/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home//anaconda3/envs/torch1.8/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home//.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/lib/python/debugpy/main.py", line 45, in
cli.main()
File "/home//.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
run()
File "/home//.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("main"))
File "/home//anaconda3/envs/torch1.8/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/home//anaconda3/envs/torch1.8/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/home//anaconda3/envs/torch1.8/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/media//D/05_source_code/01_torch/detection/cvpods/tools/train_net.py", line 124, in
args=(args,),
File "/media//D/05_source_code/01_torch/detection/cvpods/cvpods/engine/launch.py", line 56, in launch
main_func(args)
File "/media//D/05_source_code/01_torch/detection/cvpods/tools/train_net.py", line 110, in main
runner.train()
File "/media//D/05_source_code/01_torch/detection/cvpods/cvpods/engine/runner.py", line 271, in train
super().train(self.start_iter, self.start_epoch, self.max_iter)
File "/media//D/05_source_code/01_torch/detection/cvpods/cvpods/engine/base_runner.py", line 84, in train
self.run_step()
File "/media//D/05_source_code/01_torch/detection/cvpods/cvpods/engine/base_runner.py", line 185, in run_step
loss_dict = self.model(data)
File "/home//anaconda3/envs/torch1.8/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(input, kwargs)
File "/media//D/05_source_code/01_torch/detection/cvpods/playground/detection/coco/ota.res50.fpn.coco.800size.1x/fcos.py", line 218, in forward
gt_ious, box_cls, box_delta, box_iou)
File "/media//D/05_source_code/01_torch/detection/cvpods/playground/detection/coco/ota.res50.fpn.coco.800size.1x/fcos.py", line 383, in losses
dist.all_reduce(num_foreground)
File "/home//anaconda3/envs/torch1.8/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 1168, in all_reduce
default_pg = _get_default_group()
File "/home/*/anaconda3/envs/torch1.8/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 347, in _get_default_group
raise RuntimeError("Default process group has not been initialized, "
RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
how to train with one GPU?
Thank you

one GPU don't need norm_sync...

repo: Megvii-BaseDetection/OTA


text:
Add compression level to the configuration

Describe your idea
I suggest that the setLevel method be exposed in the configuration. Backups on my server are taking 2 minutes but not much disk space, I'd like to trade some cpu time for some disk space by reducing the compression level.
https://docs.oracle.com/javase/9/docs/api/java/util/zip/ZipOutputStream.html#setLevel-int-
It's been some time since I dove into Java so I'm hesitant to get started on it myself.

That was fast! Thanks :)

repo: MelanX/SimpleBackups


text:
Python GUI for Melissa

I believe that it is time to build a python GUI for Melissa. Any discussions on which GUI Framework we should select?

Do you have any ideas on a UX design?

Hey @srukle! The high level view is to implement a simplistic UI which shows the commands that have been given to Melissa and her responses (perhaps we can do that in a combination of black and blue?), displays the notes that the user have stored in a section, a graphical representation of the weather, music list display and maybe more stuff later on :D

Python GUI tools
wxPython and tkinter
Python GUI Programming: wxPython vs. tkinter
The page says that tkinter is a better choice for a Raspberry Pi application regarding compute usage. Whereas for a common user computer this is not a factor.
The page also says that coding is a little easier under tkinter but my impression of the results are that they are not as nice as for wxPython
I am now studying Building a basic GUI application step-by-step in Python with Tkinter and wxPython.
PyQt
About PyQt
Looks like PyQt requires a GPL (version 2 or 3) license that will not likely work for the preferred Melissa licensing.

Glad to hear about your developments @neilnelson! Thank you for your efforts :D

Tanay's note above on Feb 18 is a good direction. I am looking at RPyC - Transparent, Symmetric Distributed Computing as a way of connecting the GUI to the current Melissa engine/server. Melissa's current screen output would be redirected to the GUI through RPyC, and GUI, and keyboard instructions would be provided to the Melissa server through RPyC using the current keyboard interface. The STT and keyboard interfaces in the Melissa server will need to be changed to run concurrently. This design will allow complete user freedom of GUI action without blocking by Melissaa and concurrent Melissa processing while the user works the GUI.

Very interesting indeed @neilnelson :D

Why aren't you making the UI Web/REST/Javascript/Angular based? The only thing I think will be an issue of the top of my head are the voice commands. Because all said and done Web and mobile will give you best control over look and feel (excluding PyQT). If someone can pull off voice commands through a browser I think that would be the best bet. No?

Completely agree with you, but then there's the problem of STT :P I've tried Electron as an interface but yeah eventually everything boils down to the same set of problems.

Having worked with tkinter and wxPython previously, I found wxPython easier to work with, malleable to the developer's requirements and resulting in a better looking end product. I assume the GUI is intended to be basic and nothing fancy yet.

Planning to have something like what has been demonstrated here. Kivy seems to be the best option till now @SabareeshIyer.

Assigned to @bhaveshAn.

Have you looked at using an Electron-based UI? Easiest way to setup a cross-platform frontend  with ease.

This issue has taken too long and there hasn't been any visible progress on this. After carefully considering the arguments of everyone here and afk, the best solution that I could come up with was using the in-built STT of Chrome which would be controlled by a web-based interface which would be served using a Flask server. The Flask server would communicate with the web interface using web sockets. And this server would ideally act as an intermediate between Melissa-Core and the interface. Currently Electron does not support Chrome's STT for some reason. If we are able to find a solution for that, then the web interface would be packaged in Electron.
Since it does not make sense to totally remove Google STT/PocketSphinx from the core code (as it might be more convenient in headless systems), a new UI repository would be opened under Melissa-AI. The first iteration would be a dirty prototype and we would require a lot of support from you guys to make it clean like Melissa-Core. Also, there would be a need to do some important re-factoring in Melissa-Core to make these two repositories compatible.

Blocked by: https://github.com/Melissa-AI/Melisandre/issues/1.

https://github.com/Melissa-AI/Melisandre would be merged into this repository soon!

authors: SabareeshIyer neilnelson shaaza srukle tanay1337 vedmathai

repo: Melissa-AI/Melissa-Core


text:
🛑 Hacker News is down

In 8ca848c, Hacker News (https://news.ycombinator.com) was down:

HTTP code: 502
Response time: 230 ms

Resolved: Hacker News is back up in 5b5ec97 after 11 minutes.

repo: MelvinTo/uptime


text:
Attributes are not parsed correctly.

If i add attributes to the command they dont appear in the html source code.
I checked the file "LaravelVideoEmbed.php" in the Services-Directory and it seems that  the if(is_array() is set wrong:
i tried to correct this from $params to $attributes but it doesnt change anything. Maybe you can fix this?
      if(is_array($attributes))
      {
        $MediaObject->setAttribute($attributes);
      }

You're right, it need to be $attributes and it need to be work, I'll update repo, try to clear and pull it again and try


text:
fix recipes for 2D difference plots

[ ] generate spatial difference plots for every hour
[ ] allow option to loop over vertical levels
[ ] reuse existing operators this

Duplicate of #455.

authors: Sylviabohnenstengel jfrost-mo

repo: MetOffice/CSET


text:
Edit antibodies from the "my submissions" page

Clicking on an row on the "my submissions" table opens an editor rather than the viewer.

@bandrow @masonpairish Is there any workflow we should take into account here (e.g. change of state)?
May also deleting previously submitted antibodies be relevant?

@Filippo Ledda @.***> there are no antibodies that we
delete.
we do mark them rejected, but basically keep the record
The only use case that I can think of is if we get attacked by some spam
bot.
In those cases I can always just go into the back end to remove records, we
should not have a delete function.
On Tue, Oct 25, 2022 at 8:53 AM Filippo Ledda @.***>
wrote:

@bandrow https://github.com/bandrow @masonpairish
https://github.com/masonpairish Is there any workflow we should take
into account here (e.g. change of state)?
May also deleting previously submitted antibodies be relevant?
—
Reply to this email directly, view it on GitHub
https://github.com/MetaCell/scicrunch-antibody-registry/issues/116#issuecomment-1290782266,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABNSWNPNE45Z67DNT2ZAHI3WE7673ANCNFSM6AAAAAARODVNWA
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
All key biological entities deserve an #RRID!
orcid.org/0000-0002-5497-0243

authors: bandrow filippomc

repo: MetaCell/scicrunch-antibody-registry


text:
[FIX] - Allow Optimism & Optimism Testnet to be added via wallet_addEthereumChain

PR Title
Allow Optimism & Testnet to be added via wallet_addEthereumChain
Description

Because optimism was added in the default network list the wallet_addEthereumChain method fails when adding Optimism or the Optimism Testnet. These networks were initially added to identify them as custom network but through further testing the Optimism network is a custom network since it gets added using the  setupStandardProvider method.

FIXED:

This fixes the issue of adding Optimism using the wallet_addEthereumChain method.

REMOVED:

Remove Optimism and the Optimism Testnet

Checklist

[x] Tests are included if applicable
[x] Any added code is fully documented

Issue
Resolves 4492

@mcmire could you elaborate? It looks like NetworkType is an enum, so it doesn't have any properties. Every network type appears to be present in that constant as well. Maybe I'm missing something.

@Gudahtt Oops, sorry, I might have been  looking at something else. That looks right to me after all.

authors: Gudahtt mcmire sethkfman

repo: MetaMask/controllers


text:
Found conflicts with setting up the conda environment from yaml files

Hi,
while setting up the conda environment through snakemake (env : multiq) i am facing dependency conflicts issue. the strict pkg versions mentioned in the multiqc.yaml file is causing the issue. is there a workaround for this.  does installing pkg without specifying the version advisable?
linux : centos
conda : 4.12.0
some of the conflicts
Package kiwisolver conflicts for:
kiwisolver==1.3.1=py36h605e78d_1
multiqc==1.13=pyhdfd78af_0 -> matplotlib-base[version='>=2.1.1'] -> kiwisolver[version='>=1.0.1']
matplotlib-base==3.3.4=py36hd391965_0 -> kiwisolver[version='>=1.0.1']

Package rich conflicts for:
rich==12.5.1=pyhd8ed1ab_0
rich-click==1.3.0=pyhd8ed1ab_0 -> rich[version='>=10']
multiqc==1.13=pyhdfd78af_0 -> rich-click -> rich[version='>=10,<12']
multiqc==1.13=pyhdfd78af_0 -> rich[version='>=10']

Thanks
yuvaram

@tommyfuu did you face this on your recent test?

hey! while i did not face this particular conflict in my own testing, i would recommend two things
(1) in case you last pulled from the repo before I last updated it, trying pulling again and get the most updated yaml file
(2) change the version of the rick package in your multiqc.yaml to 10.x.x or 11.x.x to resolve the conflict with other packages. while i am not exactly sure why kiwisolver is giving conflict because it looks like the version it's trying to install (1.3.1) is indeed newer than 1.0.1 that the other packages requires, my guess is that multiqc/matplotlib actually inherently requires even newer version of it without writing it into dependency requirement. For that you can replace 1.3.1 with some newer version as well.
Let me know if that helps!

Thanks @b-tierney @tommyfuu . i am using the most updated yaml file. i am still getting the dependency conflicts. its nice to know that in future we will have version requirement only for necessary pkgs.
is there any plan to have a built docker image for the same?

We're looking at one potential Docker-based idea for a centralized CAMP, but it won't be available in the near future. Are you still experiencing issues with installing MultiQC?

authors: b-tierney lauren-mak tommyfuu yuvaramsingh94


text:
Building for mac Catalyst fails

Building for mac catalyst fails.
Checklist

[x] If possible, I've reproduced the issue using the master branch of this repo
[x] I've searched for existing GitHub issues

Steps to Reproduce
Build for mac Catalyst
Expected behavior
Successful build.
Actual behavior
Build error: "'MTLFeatureSet_iOS_GPUFamily3_v1' is unavailable: not available on macCatalyst"

Can’t reproduce. Please add a link to the source file and line.

All checks looking good: https://github.com/MetalPetal/MetalPetal/runs/555298148
Closing issue.

Hi YuAo, here is the file with exception:
`//
//  MTIPixelFormat.m
//  MetalPetal
//
//  Created by Yu Ao on 11/10/2017.
//
#import "MTIPixelFormat.h"
#import <AssertMacros.h>
MTLPixelFormat const MTIPixelFormatUnspecified = MTLPixelFormatInvalid;
MTLPixelFormat const MTIPixelFormatYCBCR8_420_2P = 500;
MTLPixelFormat const MTIPixelFormatYCBCR8_420_2P_sRGB = 520;
BOOL MTIDeviceSupportsYCBCRPixelFormat(id device) {
#if TARGET_OS_SIMULATOR
return NO;
#elif TARGET_OS_IPHONE
// This line: "'MTLFeatureSet_iOS_GPUFamily3_v1' is unavailable: not available on macCatalyst"
return [device supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily3_v1];
#else
return NO;
#endif
}`

This is my POD file:
pod 'MetalPetal'
pod 'MetalPetalSurfaceBlur', :git => 'https://github.com/MetalPetal/SurfaceBlur.git'
pod 'MetalPetal/Swift'

Is this not master branch ?

https://guides.cocoapods.org/syntax/podfile.html#pod
Search "master branch"

Thx. This is correct way?
pod 'MetalPetal', :git => 'https://github.com/MetalPetal/MetalPetal.git', :branch => 'master'
pod 'MetalPetal/Swift', :git => 'https://github.com/MetalPetal/MetalPetal.git', :branch => 'master'

Uau great it works now on Mac Catalyst? Great, thx!

authors: YuAo sabiland

repo: MetalPetal/MetalPetal


text:
Add net-tools to list of RHEL dependencies.

Per Spike Curtis' post on the mailing list here, we require the arp tool for Felix's correct operation, which is potentially not present on CentOS (and therefore RHEL). We should extend our list of dependencies to cover it.
@matthewdupre, I'm assigning to you because you're working in this area.

Obviously should do this for Debian/Ubuntu too.
Also - just in case - I presume "We should extend our list of dependencies to cover it." means technically, rather than that we should just document this.  In other words, this should be an addition to a Depends: line in debian/control, and to a Requires: line in rpm/calico.spec.

Correct. =)

authors: Lukasa neiljerram

repo: Metaswitch/calico


text:
Feat: Order submissions by review count

It's quite common that there are more submissions than a reviewer is able to review.
If everyone uses ordering by submission time it could lead to the last submissions on that list to receive very few reviews.
Generally there have been instances of some submissions getting relatively few reviews compared to others.
An option to sort by submissions with the least reviews could be helpful to at least make it easier to spread out reviews more equally

@PoolPirate would love your thoughts on this item: https://github.com/MetricsDAO/xyz/issues/708

authors: PoolPirate drakedanner

repo: MetricsDAO/xyz


text:
botnya tidak  bisa

SyntaxError: Unexpected identifier
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/home/kali/whatsapp-bot/msgHndlr.js:16:58)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
npm ERR! code 1
npm ERR! path /home/kali/whatsapp-bot
npm ERR! command failed
npm ERR! command sh -c node index.js
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kali/.npm/_logs/2020-10-25T17_49_53_751Z-debug.log

Usahakan taruh/clone di Folder C:
Ketik

cd C:/whatsapp-bot
npm start (Jika sudah menginstall npm)
Atau juga bisa
node index.js

repo: MhankBarBar/whatsapp-bot


text:
Run evals in parallel

Compared to the rest of the runtime, the eval via nix-env takes the longest time when uncached.
It'd be nice if two checkouts could be made with two nix-env evals in parallel to speed this up.
This would also catch merge conflicts early; you currently have to wait through a lengthy eval before it's even attempted.
It might have to be disabled by default due to memory constraints (or based on available host memory) but 2x6GiB isn't too much to ask for nowadays.

That would also require to have both nixpkgs trees checked out at the same time. I could check if https://github.com/nix-community/nix-eval-jobs could improve things here as it also deals with memory consumption.


text:
HDR Issues with the Extend Frame Into Client Area and Behind Blur Feature

Previously at https://github.com/MicaForEveryone/MicaForEveryone/issues/61 But this issue is only solvable by disabling both options.
Please look into this issue.

Not something we can really change, I'm afraid.

What seems to cause the problem?

The only way MFE manipulates the windows is via changing stuff in Windows API.
And also blur behind is an unsupported scenario. Many things break with it on.

Hmm. I'm gonna see what I can do.

Yeah you are right. It only applies a flag to HRESULT DwmSetWindowAttribute(DWORD   dwAttribute). The only way it could be fixed is if it was patched at a low level.

Well, I think that's it. I have no authority to decompile, patch and redistribute the File Uxtheme.dll under Microsoft's Terms and conditions. Unless I reverse engineer it which I have no idea how to do.
This issue is now marked as closed.

authors: Weather-OS dongle-the-gadget

repo: MicaForEveryone/MicaForEveryone


text:
TrHologram不兼容多世界

作者你好 我在使用过程中发现全息与多世界的兼容似乎存在问题。
情况复现：
将配置文件
Location: 配置项填入多世界的世界名
例如：Location: RPG~-0.63,0.5,0.51
在此之前一切都可以正常使用，/trhd reload也没有问题 全息正常显示
但重启服务器后插件将严重报错，无法继续使用，且输入/trhd 提示为未知的命令（指令没有被成功注册）
使用的多世界插件为：Multiverse
报错日志（里面提及到了位置相关的语句）：
[22:46:46 ERROR]: 启用 TrHologram v2.4-pre20 时发生错误 (它是最新的吗？)
java.lang.NullPointerException: null
at me.arasple.mc.trhologram.api.Position$Companion.fromLocation(Position.kt:58) ~[?:?]
at me.arasple.mc.trhologram.module.conf.HologramLoader.load(HologramLoader.kt:112) ~[?:?]
at me.arasple.mc.trhologram.module.conf.HologramLoader.load(HologramLoader.kt:78) ~[?:?]
at me.arasple.mc.trhologram.module.conf.HologramLoader.load(HologramLoader.kt:69) ~[?:?]
at me.arasple.mc.trhologram.TrHologram.onEnable(TrHologram.kt:36) ~[?:?]
at me.arasple.mc.trhologram.taboolib.platform.BukkitPlugin.onEnable(BukkitPlugin.java:61) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:177) ~[JavaPlugin.class:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:318) [JavaPluginLoader.class:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:399) [SimplePluginManager.class:?]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:477) [CraftServer.class:?]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:418) [CraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:383) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:315) [nz.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]

在1.18.1上问题迟迟无法解决,于是重新找了个功能完全一样的插件,完美替代
https://www.spigotmc.org/resources/decent-holograms-1-8-1-18-papi-support-no-dependencies.96927/

问题补充：这个问题在Loliserver呈现一模一样的错误，并且补充一个细节：用Plugman重载插件后恢复正常，但重启又会报错，且与Issues发布者呈现同样的NullPointerException空指针异常报错 @luoxiawuchen

authors: ZoruaFox luoxiawuchen shuiqing2046

repo: Micalhl/TrHologram


text:
Those who are trying to get this off the ground

I dont really enjoy being spoon fed but after my tutorials of using socket.io and npm trying to build and run this project on my own has been a pain in the rear. through my app dev tutorials they tell me the index.html file designates where you decide to host it, wherein this project i cannot find. To top it off im highly unsure if I am running this in the right fashion. from the command line im attempting to $node main.js while in the file and directory js/main.js. A lot of what I'm saying might sound stupid but again going by my tutorials this project goes beyond the scope.

Which version are you trying to run? (There are two: the original one, and the recently released v2 beta.)

original

In that case I suggest you try v2, which is much easier to install and offers a lot more possibilities.
https://github.com/MichMich/MagicMirror/tree/v2-beta

Do you plan to merge v2-beta into master?

Eventually yes. First want to fix most of the bugs (the calendar seems to have persistent issues).
Also want to find a beter solution to reference to the latest node version in the installer script.

authors: CFenner MichMich cputech4

repo: MichMich/MagicMirror


text:
npm trhow error, cannot run MagicMirror

Hey y'all, I've been having a couple issues after having my MagicMirror2 for a while. Main issue is I keep getting this throw error when I try to check my version of npm( npm -v ).
npm -v
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'semver'
Require stack:
- /usr/share/npm/lib/utils/unsupported.js
- /usr/share/npm/bin/npm-cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/share/npm/lib/utils/unsupported.js:2:14)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/npm/lib/utils/unsupported.js',
    '/usr/share/npm/bin/npm-cli.js'
  ]
}

This is all the code that pops up and any help would make me very thankful.
node -v

v10.24.0

nodejs -v
v10.24.0

I've attempted to update both node and nodejs along with npm but nothing seems to work and i'm not entirely sure what the problem is. Thank you for any help!

try this
cd ~/MagicMirror
rm -rf node_modules
npm install

if that works, watch out for this
https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later
but MM version 2.17 needs node 14.
do this to upgrade node
cd ~
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y npm

OR, run my MM upgrade script  (which does all this AND upgrades MM to latest  and fixed the black screen issues)
see https://github.com/sdetweil/MagicMirror_scripts

I did everything you said to do and it ended up fixing the throw error, but like you said it went to black screen. I tried running it with the default config file and it works fine so it seems to only be a problem with my config file. These are some of the errors it comes up with for some modules.
[16.11.2021 18:12.42.523] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module '/home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/@bugsounet/snowboy/lib/node/binding/Release/electron-v11.5-linux-arm/snowboy.node'
Require stack:
- /home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/@bugsounet/snowboy/lib/node/index.js
- /home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/@bugsounet/snowboy/index.js
- /home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_helper.js
- /home/pi/MagicMirror/js/app.js
- /home/pi/MagicMirror/js/electron.js
- /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
-

it also says this:
code: 'MODULE_NOT_FOUND',   requireStack: [     '/home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/@bugsounet/snowboy/lib/node/index.js',     '/home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/@bugsounet/snowboy/index.js',     '/home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_helper.js',     '/home/pi/MagicMirror/js/app.js',     '/home/pi/MagicMirror/js/electron.js',     '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',     undefined   ] } [16.11.2021 18:12.42.553] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [16.11.2021 18:12.42.553] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
any tips?

Google assistant, I think u have to run
npm run upgrade

in it's module folder

After navigating to the modules folder for each of the modules I have installed and running the npm run upgrade code this similar error message pops up for each.
npm ERR! Missing script: "upgrade"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-11-17T04_24_39_128Z-debug.log

I'm really not entirely sure what happened to my mirror because one day it just up and stopped working. I believe the only problem now is that all my modules need to be updated to the proper versions. Does that mean that I will have to reinstall all of my modules and reconfigure them all to how they were oringially? So sorry for any inconvience but thank you so much for the help!

run my upgrade script, see
https://github.com/sdetweil/MagicMirror_scripts
it does not update module source
you do that by git pull
in each module folder. but many modules have not been updated
if u already did git pull for mm, then my upgrade needs force as a parm instead of apply

I tried running your upgrade script and it seemed to upgrade MM perfectly without any problems however, it still goes right to black screen even after running everything you told me. The default config file works perfectly it genuinely just seems to be a problem with either one of multiple of my modules. Thank you for all of your help!

look at the messages from where u start mm.
either npm start
or
pm2
if pm2 , then pm2 logs --lines=50 will print out 50 lines

my latest upgrade, SHOULD have handled the black screen
can u post the~/MagicMirror/installers/upgrade.log here as an attachment

authors: HecTicMoose sdetweil


text:
Magicmirror doesnt start in fullscreen after rebooting

Magicmirror doesnt start in fullscreen after rebooting
I followed the introduction from link text to autorun magicmirror on startup, but after rebooting this is what i see:

Could you upload the image again?

I reuploaded the image

I've seen this a number of times. usually electron gets confused from a prior app usage.
so do this, stop MagicMirror
cd ~
rm -rf .config/Electron

note the dot in front of config
this will erase the saved Electron info
start MagicMirror

How do I stop magicmirror? If I press STRG+Q the magicmirror restarts :((

ctrl-m to minimize, and then on terminal window, pm2 stop all

pm2's job is to keep the app running

that looks like u are using VLC or some windowing system to access them system.
does it have a real display?

I am running a linux mint on virtual box to test magicmirror

That are my display settings

electron appears to have some trouble getting the display size.
its not our code, so I don't know what the constraints are ...
you might look thru the Electro github issues.
https://github.com/electron/electron/issues?q=is%3Aissue+is%3Aopen+fullscreen+  there are 35 open related to fullscreen
what is the size definition?   1024x768?  1920X1080?

Ill go through the issues, thank you so much for your help.
My size defenition is 1920x1080
and in the electon.js I changed the width to 1920 and the high to 1080 so that magicmirror at leasts covers the screen

@stormyark Just out of curiosity: Why are you using MagicMirror in a VM?

@stormyark you can change those settings thru config.js, without editing any of the source files.
that you were able to solve part of the problem w electron options confirms that electron is confused

@KristjanESPERANTO I Just wanted to test it a bit before the raspi arrives

@sdetweil could I possibly write a comand in the confog.js to run fullscreen?

@stormyark the default is fullscreen, in kiosk mode (no title bar, etc)
as I said  it's 'fullscreen' that is confused in the vm

Now i looks like this :(

I think this is normal behaviour in VirtualBox. MagicMirror is running fullscreen in the VM, but you have still the Windows-VirtualBox-Window around, AFAIK you cannot control this from inside the VM.
You can click on the VM-Window and play around with Ctrl(Right)+C or Ctrl(Right)+F.
This is not an electron or magicmirror problem and on a pi fullscreen will work.

authors: KristjanESPERANTO khassel rejas sdetweil stormyark


text:
refactor test configs

see discussion here.
I created a default.js test case which is now included in every other test case. So in these test cases only the properties are changed which are different to default.js.
Now you can see directly the differences to default.js and the defaults are in one place (e.g. electronOptions).

Codecov Report

Merging #2611 (2881d19) into develop (8b484ee) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #2611   +/-   ##
========================================
  Coverage    70.47%   70.47%
========================================
  Files           16       16
  Lines          823      823
========================================
  Hits           580      580
  Misses         243      243

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 8b484ee...2881d19. Read the comment docs.

Thanks for your awesome effort!
I think it might be better to go for a 'factory' approach. In this case you opt to use a lot of Object.assign(require("../../default.js"), config); statements. Using a factory approach, we could do something like:
const configFactory = require('../../default.js')

const config = configFacory({
    modules: [
        ...
    ]
})

It is a bit more verbose, but a lot cleaner, and gives a lot of opportunities for extension and validation.
What do you think?

will take a look (still thinking about how can I do this with search and replace ...)

I understand. We can always keep this PR open for someone to continue (and do some manual labor). :)

something is missing here
const configFactory = require('../../default.js')

const config = configFactory({
    modules: [
        ...
    ]
})

getting Error found: TypeError: configFactory is not a function

Ha, yeah sorry. That configFactory is an example. It's the function that we need to build. :)

I'm stopping here. You can take a look at my develop branch where I wrote the function but half of the tests are failing with this construction and I don't see why.

Cool that you came back to it. I can report the tests work on my mac and ubuntu laptops with no problem now too.

Awesome work! Thanks!

authors: MichMich codecov-commenter khassel rejas


text:
Upgrade Vue

I just moved to TS and now need to upgrade Vue, but the router also needs changes. There is a lot to think about in different styles. When the app compiles, the site gives an error. So leaving this for now.

https://next.router.vuejs.org/guide/migration/index.html#new-router-becomes-createrouter
https://next.router.vuejs.org/guide/#javascript
https://v3.vuejs.org/guide/installation.html#release-notes

repo: MichaelCurrin/badge-generator


text:
Summer Research 2020 - First Pull Request

contains new "test.py" file that runs all tests for both python implementations at once. should be modified whenever a new test is added
helper methods for creating empty arrays, creating empty matrices, reading matrix test files all declared in one file / class "matrix_reader.py"
search implementation and decision implementations now in separate directories

As far as I can tell, the pull request looks good besides the file "python/search/primary_implementation_search.py".  For the time being, I don't think this file should be in master.

Your search code still exists on the branch SummerResearch2020-Search

authors: MichaelWehar arililoia


text:
Make it work with optionals?

How do I make it work with optional attributes? The validator is checking it regardless of the attribute being optional.
export class CreateEventDto {
  @IsString()
  @Length(5, 255)
  title: string;

  @IsString()
  @Length(5, 255)
  location: string;

  @IsString()
  @IsNotEmpty()
  @Length(5, 255)
  description: string;

  @IsUrl()
  url?: string;

  @IsString({ each: true })
  images: string[];

  @IsDateString()
  startDate: Date;

  @IsDateString()
  endDate: Date;
}

export class UpdateEventDto implements Partial<CreateEventDto> {}

Error when I run try to validate UpdateEventDto body:
{
            "target": {
                "name": "AuraEd workshop on web automation with python"
            },
            "property": "title",
            "children": [],
            "constraints": {
                "length": "title must be longer than or equal to 5 characters",
                "isString": "title must be a string"
            }
        },
        {
            "target": {
                "name": "AuraEd workshop on web automation with python"
            },
            "property": "location",
            "children": [],
            "constraints": {
                "length": "location must be longer than or equal to 5 characters",
                "isString": "location must be a string"
            }
        },
        {
            "target": {
                "name": "AuraEd workshop on web automation with python"
            },
            "property": "description",
            "children": [],
            "constraints": {
                "length": "description must be longer than or equal to 5 characters",
                "isNotEmpty": "description should not be empty",
                "isString": "description must be a string"
            }
        },
        {
            "target": {
                "name": "AuraEd workshop on web automation with python"
            },
            "property": "url",
            "children": [],
            "constraints": {
                "isUrl": "url must be an URL address"
            }
        },
        {
            "target": {
                "name": "AuraEd workshop on web automation with python"
            },
            "property": "startDate",
            "children": [],
            "constraints": {
                "isDateString": "startDate must be a ISOString"
            }
        },
        {
            "target": {
                "name": "AuraEd workshop on web automation with python"
            },
            "property": "endDate",
            "children": [],
            "constraints": {
                "isDateString": "endDate must be a ISOString"
            }
        }

The API Input:
{
    "name": "AuraEd workshop on web automation with python"
}

Partial<...> is a Typescript option, so it will generate a new class with all attributes set to optional as indicated with a "?" (like title?: string).
However, class-validator does not use that Typescript "?" to determine whether an attribute is optional; you have to use the @IsOptional() decorator to indicate this, which is not generated by Partial/'?' from the core Typescript functionality.

authors: CaffeineDuck dieeisenefaust

repo: MichalLytek/class-transformer-validator


text:
Error while publishing App from VScode: A task was canceled

I found out on issue #1633 that my App can successfully been published via PowerShell, but VScode gives me errors.
On Current Build of BC I get the error message A task was canceled, although the app was successfully published.
[2018-04-28 16:29:04.78] Publishing package to tenant 'default'
[2018-04-28 16:29:04.79] Sending request to https://bcsandbox-dago.westeurope.cloudapp.azure.com:7049/NAV/dev/apps?tenant=default&SchemaUpdateMode=recreate
[2018-04-28 16:34:04.85] Error: A task was canceled.

@DominikDitoIvosevic follow up to #1633 regarding VScode Flow

You are hitting a 5 minute timeout when publishing from VSCode.
When you publish and install the extension from PowerShell, does it take more than 5 minutes to complete both operations?

We have extended the timeout as the direct mitigation for your problem. We are also looking at other performance improvements for the Fall release.

repo: Microsoft/AL


text:
Added environment variable override of cert_base_url for integration testing

This PR adds the ability to specify the environment variable "AZURE_BASE_CERT_URL" to contain the base URL, which will then override the base_cert_url in this library. This environment variable can be used for integration testing consumers of the Azure-DCAP-Client (like Open Enclave) against alternative cert/CRL/TCBInfo endpoints.
I added a new "WARNING" log level, which will be utilized if this environment variable is set.
Considerations: It feels a little awkward to have two ways of specifying the base_cert_url, one being this environment variable, and the other being the "sgx_ql_set_base_url" function. This function offers a little less utility, because it must be called by the consumers of this library, instead of being able to be specified in an environment, and that makes integration testing against custom endpoints a bit more difficult. So, should we remove sgx_ql_set_base_url? Or keep both around?
Tagging @soccerGB @msft-jonnadul, and feel free to tag others

A few questions:

Are you still keeping the sgx_ql_set_base_url() call exposed for the dcap client library?
How does it logic manage between values being passed in there vs values defined in the environment variable?
Do we give priority to one over another?

This PR adds the ability to specify the environment variable "AZURE_BASE_CERT_URL" to contain the base URL, which will then override the base_cert_url in this library. This environment variable can be used for integration testing consumers of the Azure-DCAP-Client (like Open Enclave) against alternative cert/CRL/TCBInfo endpoints.
I added a new "WARNING" log level, which will be utilized if this environment variable is set.
Considerations: It feels a little awkward to have two ways of specifying the base_cert_url, one being this environment variable, and the other being the "sgx_ql_set_base_url" function. This function offers a little less utility, because it must be called by the consumers of this library, instead of being able to be specified in an environment, and that makes integration testing against custom endpoints a bit more difficult. So, should we remove sgx_ql_set_base_url? Or keep both around?
Tagging @soccerGB @msft-jonnadul, and feel free to tag others

Hey John, Do you know if the intel DCAP library ever calls into this sgx_ql_set_base_url() function call as part of any OE SDK operations? I can't imagine customers trying to use this api call directly but would be good to confirm internally that this is infact the case. I'm in favor of either a exposed function call OR an environment variable, and not both just to keep the operations clean.
NOTE: You'll need to modify test_quote_prov.cpp as it currently uses sgx_ql_set_base_url() as part of QuoteProvTests()

@msft-jonnadul I just talked with @soccerGB and we don't believe there are other consumers of the sgx_ql_set_base_url function! So I'll refactor this PR to remove that function and change the tests to do so as well. After hearing your thoughts, I agree 100% with you that we should have only one method for changing the base URL.
Thanks so much, Srujan!

Okay, I tried to find all references to sgx_ql_set_base_url. Let me know if I missed anything :) Also, here's what the test output looks like to me:

johnkord@jk64-ubu1604-01:~/dev/Azure-DCAP-Client/src/Linux | 16:24:50$ make check
g++ -fPIC -std=c++14 -Wall -Werror -I/usr/include/curl -I. -I.. -Iext -D__LINUX__ -Wno-unknown-pragmas -pthread -c ../UnitTests/test_quote_prov.cpp -o ../UnitTests/test_quote_prov.o
g++ -fPIC -std=c++14 -Wall -Werror -I/usr/include/curl -I. -I.. -Iext -D__LINUX__ -Wno-unknown-pragmas -pthread ../UnitTests/main.o ../UnitTests/test_local_cache.o ../UnitTests/test_quote_prov.o local_cache.o -ldl `pkg-config --libs openssl` -o tests
LD_LIBRARY_PATH=`dirname libdcap_quoteprov.so ` ./tests
---------
void AddGetItem()
AddGetItem Passed
---------
void OverwriteCacheEntry()
OverwriteCacheEntry Passed
---------
void VerifyClearCache()
VerifyClearCache Passed
---------
void VerifyExpiryWorks()
VerifyExpiryWorks Passed
---------
void InvalidParams()
InvalidParams Passed
---------
void ThreadSafetyTest()
ThreadSafetyTest Passed
---------
void GetCertsTest()
[WARNING]: Using AZURE_BASE_CERT_URL envvar for base cert URL, set to 'https://global.acccache.azure.net/sgx/certificates'.
[INFO]: Fetching quote config from remote server: 'https://global.acccache.azure.net/sgx/certificates/00bd4b2879d5a2764a964ab990908b67/05050205ff8001000000000000000000/0600/0000?api-version=2018-10-01-preview'.
[INFO]: raw_header SGX-TCBm:[050502040180010000000000000000000600]

[INFO]: CPU SVN: '05050204018001000000000000000000'.
[INFO]: PCE ISV SVN: '0600'.
[INFO]: PCE SVN parsed as '0x0006'
[INFO]: libquote_provider.so: [-----BEGIN CERTIFICATE-----
MIIClzCCAj6gAwIBAgIVANDoqtp11/kuSReYPHsUZdDV8llNMAoGCCqGSM49BAMC
MGgxGjAYBgNVBAMMEUludGVsIFNHWCBSb290IENBMRowGAYDVQQKDBFJbnRlbCBD
b3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQsw
CQYDVQQGEwJVUzAeFw0xODA1MjExMDQ1MDhaFw0zMzA1MjExMDQ1MDhaMHExIzAh
BgNVBAMMGkludGVsIFNHWCBQQ0sgUHJvY2Vzc29yIENBMRowGAYDVQQKDBFJbnRl
bCBDb3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNB
MQswCQYDVQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABL9q+NMp2IOg
tdl1b
GetCertsTest Passed
---------
void GetCrlTest()
[WARNING]: Using AZURE_BASE_CERT_URL envvar for base cert URL, set to 'https://global.acccache.azure.net/sgx/certificates'.
[INFO]: Fetching revocation info from remote server: 'https://global.acccache.azure.net/sgx/certificates/pckcrl?uri=https%3A%2F%2Fapi.trustedservices.intel.com%2Fsgx%2Fcertification%2Fv1%2Fpckcrl%3Fca%3Dprocessor&api-version=2018-10-01-preview'
[INFO]: raw_header SGX-PCK-CRL-Issuer-Chain:[-----BEGIN%20CERTIFICATE-----%0AMIIClzCCAj6gAwIBAgIVANDoqtp11%2FkuSReYPHsUZdDV8llNMAoGCCqGSM49BAMC%0AMGgxGjAYBgNVBAMMEUludGVsIFNHWCBSb290IENBMRowGAYDVQQKDBFJbnRlbCBD%0Ab3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQsw%0ACQYDVQQGEwJVUzAeFw0xODA1MjExMDQ1MDhaFw0zMzA1MjExMDQ1MDhaMHExIzAh%0ABgNVBAMMGkludGVsIFNHWCBQQ0sgUHJvY2Vzc29yIENBMRowGAYDVQQKDBFJbnRl%0AbCBDb3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNB%0AMQswCQYDVQQGEwJVUzBZMBMGByqGSM49AgEGCC
[INFO]: unescape_header SGX-PCK-CRL-Issuer-Chain:[-----BEGIN CERTIFICATE-----
MIIClzCCAj6gAwIBAgIVANDoqtp11/kuSReYPHsUZdDV8llNMAoGCCqGSM49BAMC
MGgxGjAYBgNVBAMMEUludGVsIFNHWCBSb290IENBMRowGAYDVQQKDBFJbnRlbCBD
b3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQsw
CQYDVQQGEwJVUzAeFw0xODA1MjExMDQ1MDhaFw0zMzA1MjExMDQ1MDhaMHExIzAh
BgNVBAMMGkludGVsIFNHWCBQQ0sgUHJvY2Vzc29yIENBMRowGAYDVQQKDBFJbnRl
bCBDb3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNB
MQswCQYDVQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0I
[WARNING]: Using AZURE_BASE_CERT_URL envvar for base cert URL, set to 'https://global.acccache.azure.net/sgx/certificates'.
[INFO]: raw_header SGX-TCB-Info-Issuer-Chain:[-----BEGIN%20CERTIFICATE-----%0D%0AMIICjDCCAjKgAwIBAgIUfjiC1ftVKUpASY5FhAPpFJG99FUwCgYIKoZIzj0EAwIw%0D%0AaDEaMBgGA1UEAwwRSW50ZWwgU0dYIFJvb3QgQ0ExGjAYBgNVBAoMEUludGVsIENv%0D%0AcnBvcmF0aW9uMRQwEgYDVQQHDAtTYW50YSBDbGFyYTELMAkGA1UECAwCQ0ExCzAJ%0D%0ABgNVBAYTAlVTMB4XDTE4MDUyMTEwNDc1MVoXDTMzMDUyMTEwNDc1MVowbDEeMBwG%0D%0AA1UEAwwVSW50ZWwgU0dYIFRDQiBTaWduaW5nMRowGAYDVQQKDBFJbnRlbCBDb3Jw%0D%0Ab3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQswCQYD%0D%0AVQQGEwJVUzBZMBMGBy
[INFO]: unescape_header SGX-TCB-Info-Issuer-Chain:[-----BEGIN CERTIFICATE-----
MIICjDCCAjKgAwIBAgIUfjiC1ftVKUpASY5FhAPpFJG99FUwCgYIKoZIzj0EAwIw
aDEaMBgGA1UEAwwRSW50ZWwgU0dYIFJvb3QgQ0ExGjAYBgNVBAoMEUludGVsIENv
cnBvcmF0aW9uMRQwEgYDVQQHDAtTYW50YSBDbGFyYTELMAkGA1UECAwCQ0ExCzAJ
BgNVBAYTAlVTMB4XDTE4MDUyMTEwNDc1MVoXDTMzMDUyMTEwNDc1MVowbDEeMBwG
A1UEAwwVSW50ZWwgU0dYIFRDQiBTaWduaW5nMRowGAYDVQQKDBFJbnRlbCBDb3Jw
b3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQswCQYD
VQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0I
GetCrlTest Passed
---------
void GetCertsTest()
[WARNING]: Using AZURE_BASE_CERT_URL envvar for base cert URL, set to 'https://global.acccache.azure.net/sgx/certificates'.
GetCertsTest Passed
---------
void GetCrlTest()
[WARNING]: Using AZURE_BASE_CERT_URL envvar for base cert URL, set to 'https://global.acccache.azure.net/sgx/certificates'.
[INFO]: Fetching revocation info from remote server: 'https://global.acccache.azure.net/sgx/certificates/pckcrl?uri=https%3A%2F%2Fapi.trustedservices.intel.com%2Fsgx%2Fcertification%2Fv1%2Fpckcrl%3Fca%3Dprocessor&api-version=2018-10-01-preview'
[INFO]: raw_header SGX-PCK-CRL-Issuer-Chain:[-----BEGIN%20CERTIFICATE-----%0AMIIClzCCAj6gAwIBAgIVANDoqtp11%2FkuSReYPHsUZdDV8llNMAoGCCqGSM49BAMC%0AMGgxGjAYBgNVBAMMEUludGVsIFNHWCBSb290IENBMRowGAYDVQQKDBFJbnRlbCBD%0Ab3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQsw%0ACQYDVQQGEwJVUzAeFw0xODA1MjExMDQ1MDhaFw0zMzA1MjExMDQ1MDhaMHExIzAh%0ABgNVBAMMGkludGVsIFNHWCBQQ0sgUHJvY2Vzc29yIENBMRowGAYDVQQKDBFJbnRl%0AbCBDb3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNB%0AMQswCQYDVQQGEwJVUzBZMBMGByqGSM49AgEGCC
[INFO]: unescape_header SGX-PCK-CRL-Issuer-Chain:[-----BEGIN CERTIFICATE-----
MIIClzCCAj6gAwIBAgIVANDoqtp11/kuSReYPHsUZdDV8llNMAoGCCqGSM49BAMC
MGgxGjAYBgNVBAMMEUludGVsIFNHWCBSb290IENBMRowGAYDVQQKDBFJbnRlbCBD
b3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQsw
CQYDVQQGEwJVUzAeFw0xODA1MjExMDQ1MDhaFw0zMzA1MjExMDQ1MDhaMHExIzAh
BgNVBAMMGkludGVsIFNHWCBQQ0sgUHJvY2Vzc29yIENBMRowGAYDVQQKDBFJbnRl
bCBDb3Jwb3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNB
MQswCQYDVQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0I
[WARNING]: Using AZURE_BASE_CERT_URL envvar for base cert URL, set to 'https://global.acccache.azure.net/sgx/certificates'.
[INFO]: raw_header SGX-TCB-Info-Issuer-Chain:[-----BEGIN%20CERTIFICATE-----%0D%0AMIICjDCCAjKgAwIBAgIUfjiC1ftVKUpASY5FhAPpFJG99FUwCgYIKoZIzj0EAwIw%0D%0AaDEaMBgGA1UEAwwRSW50ZWwgU0dYIFJvb3QgQ0ExGjAYBgNVBAoMEUludGVsIENv%0D%0AcnBvcmF0aW9uMRQwEgYDVQQHDAtTYW50YSBDbGFyYTELMAkGA1UECAwCQ0ExCzAJ%0D%0ABgNVBAYTAlVTMB4XDTE4MDUyMTEwNDc1MVoXDTMzMDUyMTEwNDc1MVowbDEeMBwG%0D%0AA1UEAwwVSW50ZWwgU0dYIFRDQiBTaWduaW5nMRowGAYDVQQKDBFJbnRlbCBDb3Jw%0D%0Ab3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQswCQYD%0D%0AVQQGEwJVUzBZMBMGBy
[INFO]: unescape_header SGX-TCB-Info-Issuer-Chain:[-----BEGIN CERTIFICATE-----
MIICjDCCAjKgAwIBAgIUfjiC1ftVKUpASY5FhAPpFJG99FUwCgYIKoZIzj0EAwIw
aDEaMBgGA1UEAwwRSW50ZWwgU0dYIFJvb3QgQ0ExGjAYBgNVBAoMEUludGVsIENv
cnBvcmF0aW9uMRQwEgYDVQQHDAtTYW50YSBDbGFyYTELMAkGA1UECAwCQ0ExCzAJ
BgNVBAYTAlVTMB4XDTE4MDUyMTEwNDc1MVoXDTMzMDUyMTEwNDc1MVowbDEeMBwG
A1UEAwwVSW50ZWwgU0dYIFRDQiBTaWduaW5nMRowGAYDVQQKDBFJbnRlbCBDb3Jw
b3JhdGlvbjEUMBIGA1UEBwwLU2FudGEgQ2xhcmExCzAJBgNVBAgMAkNBMQswCQYD
VQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0I
GetCrlTest Passed

authors: johnkord msft-jonnadul

repo: Microsoft/Azure-DCAP-Client


text:
Better explanation of botFileSecret

Creating issue as per @JasonSowers for sample readme issue
Sample information
Any sample that uses a .bot file
Describe the bug
In several of the samples, the index.js file looks for botFilePath, botFileSecret, and transcriptsPath in the .env file.
For example, some repro steps:

Clone samples repo
Navigate to a bot. If I chose a Node bot, readmes instruct me to run npm i, and npm start

Get this error without further setup:
Error reading bot file. Please ensure you have valid botFilePath and botFileSecret set for your environment.

 - The botFileSecret is available under appsettings for your Azure Bot Service bot.

 - If you are running this bot locally, consider adding a .env file with botFilePath and botFileSecret.

Should reference proper instructions in all readmes that use .bot files one how to create a .bot file in the first place (i.e. using msbot CLI or manually and referencing an example .bot file)

Link or better explanation of botFileSecret

@nyxsys actually pointed out that the bulk of the samples' index.js are actually written to search for the botFileSecret variable in .env, but the value can actually be set to empty string ""
Expected behavior
Clear instructions on how to get a bot started (i.e. include instructions/link in readme on how to add a bot file that would give user more context as to what the error above on botFilePath and botFileSecret means)
[bug]

@Zerryth and @nyxsys  take a look at 828 and rewview to see if you think this is addressed in the new readme

authors: JasonSowers Zerryth

repo: Microsoft/BotBuilder-Samples


text:
ConsoleConnector support for processEvent

Is there a way to send an event to the console connector ?
I want to test some logic when the bot is added to a group conversation

The emulator is capable of sending a few events like conversationUpdate. Open emulator and click on 3 dots at the top. Go to conversation => System activity and you ll find the option to send a couple of events

@slidenerd Thanks! I already tried that and it works. I wanted to know if there is a way to unit test it so I thought that maybe the ConsoleConnector could have a way to send an event.

In the issues section, search for testing, one of the issues has code samples on how to write unit tests

@slidenerd I saw the test and also read a blog post from MS about unit testing. The thing is, I couldn't find any reference on how to emit a conversationUpdated event for example.
From the ConsoleConnector API reference is not possible if I understood correctly. I just wanted to ask if someone thinks it can be a good idea or if there is any workaround on how to test this events.

You can implement your own equivalent of consoleconnector. Look at the open source for consoleConnector.
Note: Please only submit Bot Builder SDK bugs here. If you have general questions or implementation issues, please submit a question on Stack Overflow at http://stackoverflow.com/questions/tagged/botframework

@tomlm Thanks for the reply. Do you think this is something that can be merged in the ConsoleConnector ? I will fork and add the processEvent support.
Thanks and understood the usage of the issues!

authors: bilby91 slidenerd tomlm

repo: Microsoft/BotBuilder


text:
How to pass message in Chain to child Dialog.and process it immediately.

I have following root dialogue:
public class WelcomeDialog
    {
        public static readonly IDialog<string> dialog = Chain.PostToChain()
               .Switch<Message, IDialog<string>>(
                   new Case<Message, IDialog<string>>(msg =>
                   {
                       var text = msg.Text;
                       var regex = new Regex("^query");
                       return regex.Match(text).Success;
                   }, (context, msg) =>
                   {
                       var message = msg;
                       return Chain.From(() => new GenerallQueryDialog());
                   }),
                  new DefaultCase<Message, IDialog<string>>((context, msg) => new HelpDialog()))
               .Unwrap()
               .PostToUser();
    }

What I want is to whenever user message any textstarting with "query", I want to start GeneralQueryDialog. (It is a LuisDialog) and let the dialog respond. Above code does Initialize the dialog, Calls the StartAsync method of dialog , but message is not processed. MessageReceived is not call.Message is being processed second time.  I want to process the message immediately. How to do that?
I tried to pass message variable in GeneralQueryDialog constructor but I got Serialization errors. Please suggest a work around, I am stuck on this.

We recently added a IDialogStack.Forward method - does that help?
Yes, Message is not marked serializable.  You might consider enabling the reflection serialization surrogate to serialize Messages if IDialogStack.Forward does not work for you.

I'm going to close this item for now - feel free to re-open to discuss further.

authors: Praggie willportnoy


text:
Localization language Bot Framework v4 C#

first of all, sorry because my englist is poor. so i hope you can understand what i say.
my code
ResourceManager rm =new ResourceManager("Resource.en-US.resx", Assembly.GetExecutingAssembly());
rm.GetString(strName);

when i debug it report:
{System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Resource.resx.resources" was correctly embedded or linked into assembly "BasicBot" at compile time, or that all the satellite assemblies required are loadable and fully signed.

What should I do to implement localized language?
Thanks in advance!
(Edited by @compulim for code formatting)

@1249682741 which SDK version are you using? It looks like a question on Bot Builder SDK.

@1249682741 Sorry missed your title it is a v4 issue. I will find the right guy to help you on this one.

Hi @1249682741 : You might want to take a look at the enterprise sample.  In the future, you might want to log these in stackoverflow.com.  If you have specific bugs for C#, please log in https://github.com/Microsoft/botbuilder-dotnet.
Thanks!

authors: 1249682741 compulim daveta

repo: Microsoft/BotFramework-WebChat


text:
Wasm.instantiateModule()

Added WScript.LoadBinaryFile that returns an ArrayBuffer with the bytes.
Added a Wasm object on the global object with instantiateModule method to create a module from an ArrayBuffer

@dotnet-bot test this please

lgtm

authors: Cellule MikeHolman

repo: Microsoft/ChakraCore


text:
Use the new location of gdb.exe (multi-arch) and parse source.properties

This PR has fixes to work with the new path to gdb in NDK  >= r11.
Also note that the RELEASE.txt file that used to be in the root of the NDK has been replaced by a source.properties file.

cc: @gregg-miskelly @chuckries @jacdavis

:+1:

authors: edumunoz gregg-miskelly

repo: Microsoft/MIEngine


text:
caffe to pytorch: torch cannot load converted model

Platform (like ubuntu 16.04/win10):
Ubuntu 16.04
Python version:
3.5
Source framework with version (like Tensorflow 1.4.1 with GPU):
caffe
Destination framework with version (like CNTK 2.3 with GPU):
pytorch 0.4.0
Pre-trained model path (webpath or webdisk path):
None
Running scripts:
mmconvert --srcFramework caffe --inputWeight ./x0316_iter_15000.caffemodel --inputNetwork test.prototxt --dstFramework pytorch --outputModel x0316.pth
Execute the above command will give me the x0316.pth  as expected.  The output:
IR network structure is saved as [d062f69da8de4ee49e02a402dd6dceb4.json].
IR network structure is saved as [d062f69da8de4ee49e02a402dd6dceb4.pb].
IR weights are saved as [d062f69da8de4ee49e02a402dd6dceb4.npy].
Parse file [d062f69da8de4ee49e02a402dd6dceb4.pb] with binary format successfully.
Target network code snippet is saved as [d062f69da8de4ee49e02a402dd6dceb4.py].
Target weights are saved as [d062f69da8de4ee49e02a402dd6dceb4.npy].
PyTorch model file is saved as [x0316.pth], generated by [d062f69da8de4ee49e02a402dd6dceb4.py] and [d062f69da8de4ee49e02a402dd6dceb4.npy].

When I try to load the model:
pth = './x0316.pth'
import torch as tc
model = tc.load(pth)

It raises error:
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-d440d4d079da> in <module>()
----> 1 torch.load(pd)

~/.local/lib/python3.5/site-packages/torch/serialization.py in load(f, map_location, pickle_module)
    301         f = open(f, 'rb')
    302     try:
--> 303         return _load(f, map_location, pickle_module)
    304     finally:
    305         if new_fd:

~/.local/lib/python3.5/site-packages/torch/serialization.py in _load(f, map_location, pickle_module)
    467     unpickler = pickle_module.Unpickler(f)
    468     unpickler.persistent_load = persistent_load
--> 469     result = unpickler.load()
    470
    471     deserialized_storage_keys = pickle_module.load(f)

ImportError: No module named 'd062f69da8de4ee49e02a402dd6dceb4'

Hi @Microos , the issue has been fixed in #154 , have a try please.
Now the script will produce  two files x0316.pth and x0316.py. Keep these two files in the CWD, tc.load('x0316.pth') will no longer raise errors.

@zhantong Thank you for your update, I will have a try soonly.

authors: Microos zhantong

repo: Microsoft/MMdnn


text:
AssertionError: xxx is not in graph（multi_label_generate network）

Platform (like ubuntu 16.04):
Python version:python2.7
Source framework with version (like Tensorflow 1.4 with CPU):
Running scripts:
mmconvert -sf tensorflow -in model.ckpt-600.meta -iw model.ckpt-600 --dstNodeName [fc20,fc21,fc22,fc23,fc24,fc25,fc26,fc27] -df caffe -om tf_mlp
I'm attempting to convert a TF model (multi_label_generate network) to caffe model.
When I run the above command,
an AssertionError occured. this is the log:
(project-P1jiVRWH) deep@server:~/project/test/test_model$ mmconvert -sf tensorflow -in model.ckpt-600.meta -iw model.ckpt-600 --dstNodeName [fc20,fc21,fc22,fc23,fc24,fc25,fc26,fc27] -df caffe -om tf_mlp Parse file [model.ckpt-600.meta] with binary format successfully. Tensorflow model file [model.ckpt-600.meta] loaded successfully. Tensorflow checkpoint file [model.ckpt-600] loaded successfully. [352] variables loaded. Traceback (most recent call last):   File "/home/deep/.local/share/virtualenvs/project-P1jiVRWH/bin/mmconvert", line 11, in <module>     sys.exit(_main())   File "/home/deep/.local/share/virtualenvs/project-P1jiVRWH/local/lib/python2.7/site-packages/mmdnn/conversion/_script/convert.py", line 102, in _main     ret = convertToIR._convert(ir_args)   File "/home/deep/.local/share/virtualenvs/project-P1jiVRWH/local/lib/python2.7/site-packages/mmdnn/conversion/_script/convertToIR.py", line 68, in _convert     parser = TensorflowParser(args.network, args.weights, args.dstNodeName)   File "/home/deep/.local/share/virtualenvs/project-P1jiVRWH/local/lib/python2.7/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py", line 221, in __init__     model = extract_sub_graph(model, dest_nodes)   File "/home/deep/.local/share/virtualenvs/project-P1jiVRWH/local/lib/python2.7/site-packages/tensorflow/python/framework/graph_util_impl.py", line 145, in extract_sub_graph     assert d in name_to_node_map, "%s is not in graph" % d AssertionError: [fc20,fc21,fc22,fc23,fc24,fc25,fc26,fc27] is not in graph
my  tf model code as follows：
`def model (images,keep_prob,is_training):
with tf.variable_scope('conv1') as scope:
    omit
# conv2
with tf.variable_scope('conv2') as scope:
   omit
with tf.variable_scope('max_pooling1') as scope:
    pool1 = tf.nn.max_pool(conv2,ksize = [1,2,2,1],strides= [1,2,2,1],padding='VALID',name='pooling1')
	omit
#%%
#conv3
with tf.variable_scope('conv3') as scope:
   omit
#conv4
with tf.variable_scope('conv4') as scope:
   omit
with tf.variable_scope('max_pooling2') as scope:
    pool2 = tf.nn.max_pool(conv4,ksize=[1,2,2,1],strides=[1,2,2,1],padding='VALID',name='pooling2')

#conv5
with tf.variable_scope('conv5') as scope:
   omit
#conv6
with tf.variable_scope('conv6') as scope:
   omit
#pool3
with tf.variable_scope('max_pool3') as scope:
     pool3 = tf.nn.max_pool(conv6,ksize=[1,2,2,1],strides=[1,2,2,1],padding='VALID',name='pool3')
#%%
#fc1_flatten
with tf.variable_scope('fc1') as scope:
    shp = pool3.get_shape()
    flattened_shape =shp[1].value*shp[2].value*shp[3].value
    reshape = tf.reshape(pool3,[-1,flattened_shape])

with tf.variable_scope('fc20') as scope:
    weights = tf.get_variable('weights',
                              shape=[flattened_shape,2],
                              dtype=tf.float32,
                              initializer=tf.truncated_normal_initializer(stddev=0.005,dtype=tf.float32))
    biases = tf.get_variable('biases',
                             shape=[2],
                             dtype=tf.float32,
                             initializer = tf.truncated_normal_initializer(0.1)
                             )
    fc20 = tf.matmul(fc1,weights)+biases

with tf.variable_scope('fc21') as scope:
    omit
with tf.variable_scope('fc22') as scope:
    omit
with tf.variable_scope('fc23') as scope:
    omit
with tf.variable_scope('fc24') as scope:
    omit
with tf.variable_scope('fc25') as scope:
   omit
with tf.variable_scope('fc26') as scope:
   omit
with tf.variable_scope('fc27') as scope:
    weights = tf.get_variable('weights',
                              shape=[flattened_shape,36],
                              dtype=tf.float32,
                              initializer=tf.truncated_normal_initializer(stddev=0.005,dtype=tf.float32))

    biases = tf.get_variable('biases',
                             shape=[36],
                             dtype=tf.float32,
                             initializer = tf.truncated_normal_initializer(0.1)
                             )
    fc27 = tf.matmul(fc1,weights)+biases

return fc20,fc21,fc22,fc23,fc24,fc25,fc26,fc27   `

Do you know the reason? Thanks a lot!

Hi @124399839 , please put '' around the dstNodeName

@rainLiuplus i tried your solution, the error still persist's .... although I have single output node and trying to convert it to pth file.
Hope you can help.

authors: 124399839 rainLiuplus santosh-shriyan


text:
Convert Model from MXNet to PyTorch

Dear @kitstar,
Thank you for your nice repository. I have a pre-trained ResNet152 model on MXNet and I want to convert it to PyTorch. Would you please kindly guide me to do that?

Hi @ahkarami ,
Pytorch emitter is on-going. Would you mind sharing your models through netdisk so I can try it first?
Thanks.

Dear @kitstar,
In fact, I want to convert the ResNet152 which is trained on ImageNet11k with 11221 classes. The model can found in below links:
Large Scale Image Classification
Image Classification MXNet Example
Model Files
I think it would be great if we have this valuable model at PyTorch.
Thanks.

I will follow up and tell you if there is any progress. Thans.

Hi @ahkarami , please check the newest code. mxnet -> pytorch resnet152 with 11K tested.

Dear @kitstar,
I have converted the ResNet152 (which is trained on ImageNet11k with 11221 classes) on MXNet to PyTorch. However, the results of MXNet version significantly differ from the Converted one on PyTorch.
I have used the PyTorch 0.2 version and MXNet 0.11.0.
In fact, I did the following steps:
1- python -m mmdnn.conversion._script.convertToIR -f mxnet -n resnet-152-symbol.json -w resnet-152-0000.params -d resnet152 --inputShape 3 224 224
then the produced results were as follows:
IR network structure is saved as [resnet152.json].
IR network structure is saved as [resnet152.pb].
IR weights are saved as [resnet152.npy].
2- python -m mmdnn.conversion._script.IRToCode -f pytorch --IRModelPath resnet152.pb --dstModelPath kit_imagenet.py --IRWeightPath resnet152.npy -dw kit_pytorch.npy
then the produced results were as follows:
Parse file [resnet152.pb] with binary format successfully.
Target network code snippet is saved as [kit_imagenet.py]
Target weights are saved as [kit_pytorch.npy]
3- python -m mmdnn.conversion.examples.pytorch.imagenet_test --dump resnet152Full.pth -n kit_imagenet.py -w kit_pytorch.npy
then the produced results were as follows:
PyTorch model file is saved as [resnet152Full.pth], generated by [kit_imagenet.py] and [kit_pytorch.npy].
I think I have converted the model correctly. After that, I have tested the results of two models (i.e., the original MXNet one and converted PyTorch one (i.e., the resnet152Full.pth)) via my implemented scripts. However, the results were different from each other. Have you ever tested the results of these two models by yourself? and Would you please help me?

I tested the conversion with
python -m mmdnn.conversion.examples.pytorch.imagenet_test -n kit_imagenet.py -w kit_pytorch.npy -i mmdnn/conversion/examples/data/seagull.jpg

which use seagull.jpg to test the inference result.
mxnet inference result of top-5:
'resnet152-11k'  : [(1278, 0.49073416), (1277, 0.21393695), (282, 0.12980066), (1282, 0.0663582), (1224, 0.022041745)]
converted pytorch inference result of top-5:
[(1278, 0.49070838), (1277, 0.21392572), (282, 0.12979434), (1282, 0.066355459), (1224, 0.022040628)]
Since the difference is not so significant, I didn't look into it. (Different implementation leads to difference result).

Could you share the implement scripts and check if you use the same preprocess method?
Not quite sure if my converted model inference result above is acceptable. You have any idea about it?

Thanks.

Dear @kitstar,
Thank you for your follow up. At first, unfortunately when I use this command:
python -m mmdnn.conversion.examples.pytorch.imagenet_test -n kit_imagenet.py -w kit_pytorch.npy -i mmdnn/conversion/examples/data/seagull.jpg
I got this error:
return f(*args, **kwds)
Traceback (most recent call last):
  File "/home/karami/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/karami/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/karami/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/examples/pytorch/imagenet_test.py", line 66, in <module>
    tester.inference(tester.args.image)
  File "/home/karami/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/examples/pytorch/imagenet_test.py", line 45, in inference
    self.preprocess(image_path)
  File "/home/karami/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/examples/pytorch/imagenet_test.py", line 26, in preprocess
    x = super(TestTorch, self).preprocess(image_path)
  File "/home/karami/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/examples/imagenet_test.py", line 166, in preprocess
    func = self.preprocess_func[self.args.s][self.args.preprocess]
KeyError: None

Nevertheless, I will share my tested scripts on both frameworks (i.e., MXNet and PyTorch) in the next comment.

Sorry for the lack argument
python -m mmdnn.conversion.examples.pytorch.imagenet_test -n kit_imagenet.py -w kit_pytorch.npy -i mmdnn/conversion/examples/data/seagull.jpg -p resnet152-11k -s mxnet

-s mxnet

Dear @kitstar,
Sorry for the inconvenience, I run your mentioned command (with new argument), and I got this result:
return f(*args, **kwds)
[(1278, 0.48384374), (1277, 0.26611671), (282, 0.1002832), (1224, 0.027631452), (1282, 0.025890373)]
Traceback (most recent call last):
  File "/home/karami/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/karami/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/karami/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/examples/pytorch/imagenet_test.py", line 66, in <module>
    tester.inference(tester.args.image)
  File "/home/karami/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/examples/pytorch/imagenet_test.py", line 51, in inference
    self.test_truth()
  File "/home/karami/anaconda3/lib/python3.6/site-packages/mmdnn/conversion/examples/imagenet_test.py", line 192, in test_truth
    assert np.isclose(this_truth[index][1], i[1], atol = 1e-6)
AssertionError

Unfortunately, I got error again! and another amazing thing that the produced results on my machine is a little different from your reported results!!
My System Results:
[(1278, 0.48384374), (1277, 0.26611671), (282, 0.1002832), (1224, 0.027631452), (1282, 0.025890373)]
Your Reported Results:
[(1278, 0.49070838), (1277, 0.21392572), (282, 0.12979434), (1282, 0.066355459), (1224, 0.022040628)]

my mxnet version is '0.12.0'
my pytorch version is ''0.4.0a0+7ddcb91'
maybe it matters?

Dear @kitstar,
As previously stated I have used above-mentioned sequence of commands for converting the ResNet152-11k from MXNet to PyTorch via your fantastic repository. I hope my conversion commands is correct. My used sequence of commands are as follows:
1- python -m mmdnn.conversion._script.convertToIR -f mxnet -n resnet-152-symbol.json -w resnet-152-0000.params -d resnet152 --inputShape 3 224 224
2- python -m mmdnn.conversion._script.IRToCode -f pytorch --IRModelPath resnet152.pb --dstModelPath kit_imagenet.py --IRWeightPath resnet152.npy -dw kit_pytorch.npy
3- python -m mmdnn.conversion.examples.pytorch.imagenet_test --dump resnet152Full.pth -n kit_imagenet.py -w kit_pytorch.npy
Now, I want to compare the results of the original MXNet Model (i.e., resnet-152-symbol.json & resnet-152-0000.params) vs the converted PyTorch one (i.e., resnet152Full.pth model) visually.
This is my used script on MXNet:
import mxnet as mx
import matplotlib.pyplot as plt
import cv2
import numpy as np
from collections import namedtuple

# Load & Download the ResNet152 trained of the Full ImageNet:

# path='http://data.mxnet.io/models/imagenet-11k/'
# [mx.test_utils.download(path+'resnet-152/resnet-152-symbol.json'),
#  mx.test_utils.download(path+'resnet-152/resnet-152-0000.params'),
#  mx.test_utils.download(path+'synset.txt')]

# Load the ResNet152 trained of the Full ImageNet:

sym, arg_params, aux_params = mx.model.load_checkpoint('resnet-152', 0)
mod = mx.mod.Module(symbol=sym, context=mx.gpu(), label_names=None)
mod.bind(for_training=False, data_shapes=[('data', (1,3,224,224))],
         label_shapes=mod._label_shapes)
mod.set_params(arg_params, aux_params, allow_missing=True)
with open('synset.txt', 'r') as f:
    labels = [l.rstrip() for l in f]

# ** Predicting:

# define a simple data batch
Batch = namedtuple('Batch', ['data'])

def get_image(imageAddress, show=True):
    # load and show the image
    img = cv2.cvtColor(cv2.imread(imageAddress), cv2.COLOR_BGR2RGB)
    if img is None:
         return None
    if show:
         plt.imshow(img)
         plt.axis('off')
         plt.show()
    # convert into format (batch, RGB, width, height)
    img = cv2.resize(img, (224, 224))
    img = np.swapaxes(img, 0, 2)
    img = np.swapaxes(img, 1, 2)
    img = img[np.newaxis, :]
    return img

def predict(imageAddress):
    img = get_image(imageAddress, show=True)
    # compute the predict probabilities
    mod.forward(Batch([mx.nd.array(img)]))
    prob = mod.get_outputs()[0].asnumpy()
    # print the top-5
    prob = np.squeeze(prob)
    a = np.argsort(prob)[::-1]
    for i in a[0:5]:
        print(i)
        print('probability=%f, class=%s' %(prob[i], labels[i]))

# *** Test Model:
sampleInputImage = 'seagull.jpg'
predict(sampleInputImage)

And this is the produced Results:
1278
probability=0.536169, class=n02041246 gull, seagull, sea gull
1277
probability=0.104755, class=n02041085 larid
282
probability=0.098345, class=n01517966 carinate, carinate bird, flying bird
1280
probability=0.081313, class=n02041875 black-backed gull, great black-backed gull, cob, Larus marinus
1281
probability=0.051755, class=n02042046 herring gull, Larus argentatus

And this my used PyTorch script:
import torch
from torch.autograd import Variable
import torchvision.transforms as transforms
from torch.nn import functional as F
from PIL import Image
import matplotlib.pyplot as plt
from scipy.misc import imread

# Parameter:
num_predictions = 5

# Load Model
bestModelAddress = 'resnet152Full.pth' # for loading models
model = torch.load(bestModelAddress).cuda()
model.eval()

# Load One Input Image
test_image_address = 'seagull.jpg'

# ***** Show the original image
img = imread(test_image_address)
plt.subplot(1, 1, 1)
plt.axis('off') # turn off axis

# ***** Image pre-processing transforms
normalize = transforms.Normalize(
    mean=[0.485, 0.456, 0.406],
    std=[0.229, 0.224, 0.225]
)
preprocess = transforms.Compose([
    transforms.Scale(256),
    transforms.CenterCrop(224),
    transforms.ToTensor(),
    normalize
])

img_pil = Image.open(test_image_address)
img_tensor = preprocess(img_pil)
img_tensor.unsqueeze_(0)
img_tensor = Variable(img_tensor).cuda()

# Load Full-Imagenet Synset:
# *** Note: You can download it from:
# http://data.mxnet.io/models/imagenet-11k/synset.txt
with open('synset.txt', 'r') as f:
    labels = [l.rstrip() for l in f]

# Make predictions
output = model(img_tensor) # size(1, 11,221)
max, argmax = output.data.squeeze().max(0)
class_id = argmax[0]
classname = labels[class_id]
# print(class_id)

# print the top-5
h_x = F.softmax(output).data.squeeze()
probs, idx = h_x.sort(0, True)

print('Result: ')
# output the prediction
for i in range(0, num_predictions):
    print('{:.3f} -> {}'.format(100 * probs[i], labels[idx[i]]))

print('The Image is a', classname)

StrLabel = 'The Image is a ' + classname

# ***** Show the result & Image:
ax = plt.subplot(1, 1, 1)
# str_confidence = str("{0:.2f}".format(class_probabilities_cpu[0][max_index]))
ax.set_title(StrLabel)
plt.imshow(img)

plt.show()

And this is the PyTorch produced Results:
0.013 -> n04960277 black, blackness, inkiness
0.012 -> n04960582 coal black, ebony, jet black, pitch black, sable, soot black
0.009 -> n13896217 crescent
0.009 -> n03728437 match, lucifer, friction match
0.009 -> n02846141 black

So It is obviously clear that the results are significantly different from each other. It is worth noting that I want to use the resnet152Full.pth model on PyTorch. And I also tested some other images, but the results are very different.
I hope that my conversion commands would be correct. If you can help me to tackle this issue I will be very appreciated.
Thank you.

From your code, mxnet uses the original graph for training.  But your pytorch code normalizes the input image with std and mean array. If you want to get the same result, you could try to remove the normalize part of preprocess.

Dear @kitstar,
I also removed the normalization part, but the results were different from two frameworks.

Possible. I am not familiar with PyTorch preprocess method. Have you also removed the scale part?
Could you can try my preprocess methd first, like:
from tensorflow.contrib.keras.api.keras.preprocessing import image
img = image.load_img(path, target_size = (224, 224))
x = image.img_to_array(img)
x = x[..., ::-1]     # In my test, I transform image from RGB --> BGR in both mxnet and pytorch
x = np.transpose(x, (2, 0, 1))
x = np.expand_dims(x, 0).copy()
x = torch.from_numpy(x)
x = torch.autograd.Variable(x, requires_grad = False)
output = model(x)

Dear @kitstar,
Thank you very much for your help. I have used your suggested preprocessing and the problem has been addressed. However, the results from these two frameworks are just a little different from each other, but I think it is normal.
I think the main problem was related to the RGB format of input image. When I have changed it to the BGR format and remove the normalization preprocess the problem has been addressed.
Thank you very much

Glad I could help.

Hi @yuzcccc,

Not sure if Caffe covers all operators of mxnet imagnet-11k model. You can try to use mmconvert cmd to do the conversion and post the conversion result.

Yes it is. But we could use PIL module instead.

I use the the mmconvert and successfully transform the mxnet model to caffe, however, I find a very strange phenomenon in the generated caffe's prototxt
layer {
  name: "pooling0"
  type: "Pooling"
  bottom: "bn0"
  top: "pooling0"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
    pad_h: 1
    pad_w: 1
  }
}
layer {
  name: "DummyData1"
  type: "DummyData"
  top: "DummyData1"
  dummy_data_param {
    shape {
      dim: 1
      dim: 64
      dim: 56
      dim: 56
    }
  }
}
layer {
  name: "pooling0_crop"
  type: "Crop"
  bottom: "pooling0"
  bottom: "DummyData1"
  top: "pooling0_crop"
}

Why there is such a crop operation? In the original caffe's implementation, not such part, and also I could not find this part in the MxNet's json file

The command I use is
mmconvert -sf mxnet -in ../model_mxnet/resnet-152-symbol.json -iw ../model_mxnet/resnet-152-0000.params -df caffe -om resnet-152-11k --inputShape 3 224 224

It is for eliminating the different padding algorithm between caffe and other frameworks.

You could have a try about it.

I think not. Just follow mxnet preprocess method.

thanks a lot!

I followed the instructions and it worked very well. Great thanks!

I think this link would be helpful:
Convert Full ImageNet Pre-trained Model from MXNet to PyTorch

authors: ahkarami back2yes kitstar yuzcccc


text:
Sample & recommendation to embed Power BI reports inside UWP App

With latest ADAL library (.net core) we can not use 'UserPasswordCredential' (please refer). So how are we supposed to get & build a new PowerBIClient()? Is there any way to get tokenCredentials except using userid and password? Seems the recommended way is to use userid & password as described here. But  ADAL is recommending something else. This is to embed report within an UWP App with non-Power BI users.

Also 'loadreport' is not working, e.g. this is not working
`

`

Hi,
I have no solution yet to this problem.
ADAL library for (.net core) doesn't have UserPasswordCredential.
I don't think I will have a solution soon. but I will pass the issue to my team.
I am closing this issue as it similar to this:
https://github.com/Microsoft/PowerBI-Developer-Samples/issues/3
please follow there.

A possible way could be using client certificate authentication - I got this answer when asking for an asp.net Core app running against .net core (see https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/issues/482#issuecomment-316973560)

authors: ali-hamud sanjaydebnath wind-rider

repo: Microsoft/PowerBI-Developer-Samples


text:
Added new transformed operation fns.

This PR adds new functions and operations for transforming operation inputs using functions. Marked as draft until I finish adding tests.

@anpaz-msft, would you happen to know what's up with the unit test failures? I'm not sure why this is causing an exception in the simulation runtime. Thanks!

This has been obviated by #39, so going on and closing this PR.

repo: Microsoft/QuantumLibraries


text:
Make window for Shiny or use VS browser for Shiny output

With various options.

https://github.com/Microsoft/RTVS/commit/ebc0cfce5a33964701da07e7c6c5e9047cfdaf35

Verified.

repo: Microsoft/RTVS


text:
Create Surprise quickstart notebook

What is affected by this bug?
A quickstart notebook can eliminate the irrelevant codes that may make run of the notebook unexpectedly long in the benchmark.

do we still want to do this? @yueguoguo an open question, should all algos have quick start and deep dive?

closing because stale issue, feel free to reopen if needed

authors: miguelgfierro yueguoguo

repo: Microsoft/Recommenders


text:
Documentation for getting around Excess Property Checks is Wrong(?old)

In interfaces chapter, at https://github.com/mani-mishra/TypeScript-Handbook/blob/master/pages/Interfaces.md#excess-property-checks
we have following,

One final way to get around these checks, which might be a bit surprising, is to assign the object to another variable: Since squareOptions won't undergo excess property checks, the compiler won't give you an error.

let squareOptions = { colour: "red", width: 100 };
let mySquare = createSquare(squareOptions);

But when I tried the same example in TS playground, I do get the squiggly red marker and tooltip  that even the above workaround is wrong(which is correct, as this is very common pattern).
So, maybe the docs need updating?
I'm happy to raise a PR if required.

We need to document weak type checking, which is a check for when an all-optional interface rejects anything that doesn't have any properties in common.

Check the code sample and added an exception to excess property check workaround 🙏

repo: Microsoft/TypeScript-Handbook


text:
No highlighting for property following method

TS and JS Grammar Extension version:  latest
Code
interface X {
    x(): void
    y: number
}

The second line is not highlighted at all.

This is by design. There is no easy way to fix this and handle scenarios like when { start on new line or eg. parameters of constructor start on new line.
Work around for this is to use semi colon at the end of the line, so modify your eg with
interface X {
    x(): void;
    y: number;
}

There is a similar issue for a class following a function.
export function foo(): void
class x { }

authors: andy-ms sheetalkamat

repo: Microsoft/TypeScript-TmLanguage


text:
Less use of 'this' keyword.

Instead of writing this code:
class Test
{
	private num: number;

	public doSomething(): void
	{
                //Unnecessary this keyword
		this.num = 1;
	}

	public doSomething2(): void
	{
		let num: number = 2;

		this.num = num;
	}
}

write this code:
class Test
{
	private num: number;

	public doSomething(): void
	{
		num = 1;
	}

	public doSomething2(): void
	{
		let num: number = 2;

		this.num = num;
	}
}

and compile to this:
var Test = (function () {
	Clock.prototype.doSomething = function () {
        	this.num = 1;
	};
	Clock.prototype.doSomething2 = function () {
		var num = 2;
        	this.num = num;
	};
    return Clock;
}());

Would that be possible?

This isn't C#. I mean js doesn't have static binding. what if you want to use a global variable or closured variable but you have a field with the same name? C# doesn't have to worry, it doesn't have globals or inline classes. but js is different. The compiler can give you a quick fix when it finds no deceleration but sees a field. But doing it automatically is way too error prone. take this example:
// shadowed by public foo;
const foo = 'foo';

class Bar {
   public foo;

   public baz() {
     // no way to access const foo
     return foo;
  }
}

or:
function (stuff: string) {

  return class Blah {
    stuff: public;

    function a() {return stuff}; // cannot ever access stuff:string
  }

}

This has already been suggested, of course. See #679

authors: RyanCavanaugh Wavum alitaheri

repo: Microsoft/TypeScript