Do we have a feature of interacting with server-side annotations(dump/load datasets to/from the server)

Dear great CVAT community, thanks for your continuous contributions to this opensource repo, excellently solved my previous use cases, I have a new issue not sure it is good to ask.
I'm currently trying to facilitate the annotating process between the annotation team and the data science team using CVAT.
I've added the server-side files sharing function according to the installation guide.
While the issue I'm facing now is loading annotations from the server and dumping annotation results/dataset to the server.
I know CVAT supports interacting annotations with the local PC, which is good, but we need to spend more extra time downloading the dataset(images+annotations), then uploading it to the server every time. If the dataset is big, time-consuming is huge.
So I'm wondering if we have this feature already, or else, would we try to add it in the future?
Additionally, it would be more convenient if we can have a task status flag on each of the task, such as Done, In process, Pending, so that data engineer or other annotators won’t re-do  it. In this case, annotators can mark the status by clicking a button.
Thanks for your help ahead.

Hi @nmanovic , how do you think about this?

@mhe-wyze ,

Additionally, it would be more convenient if we can have a task status flag on each of the task, such as Done, In process, Pending, so that data engineer or other annotators won’t re-do it. In this case, annotators can mark the status by clicking a button.

Each job has a status which can be changed.

While the issue I'm facing now is loading annotations from the server and dumping annotation results/dataset to the server.
I know CVAT supports interacting annotations with the local PC, which is good, but we need to spend more extra time downloading the dataset(images+annotations), then uploading it to the server every time. If the dataset is big, time-consuming is huge.

It is something which we are going to fix in the future. First step on the way is the patch: https://github.com/opencv/cvat/pull/2007. Even it solves another issue it will be an initial step to support remote data sources.

When datasets and annotations are exported, they are cached for some time (10 hours by default - https://github.com/opencv/cvat/blob/develop/cvat/apps/dataset_manager/views.py#L39). You can mount cache directories to a specific location on the host, the cache is placed in cvat/data/tasks/<task id>/export_cache for each task. Technically, it is possible to provide an option to specify another cache directory, would this help?

Hi @zhiltsov-max , thanks for your solution, this is very helpful. 👍

Hi @nmanovic , thanks for your timely comment, the following attach is my UI,

I don't know why mine is a little bit different from yours, I couldn't find the status changing button either.

Open Job
Press info button
Change the status

@nmanovic Thank you so much.

I will close the issue for now. Do not hesitate reopen it if you still have questions


HDDS-1544. Support default Acls for volume, bucket, keys and prefix. Contributed by Ajay Kumar.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
99
Docker mode activated.

_ Prechecks _

+1
dupname
1
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 8 new or modified test files.

_ trunk Compile Tests _

0
mvndep
14
Maven dependency ordering for branch

+1
mvninstall
561
trunk passed

+1
compile
269
trunk passed

+1
checkstyle
66
trunk passed

+1
mvnsite
0
trunk passed

+1
shadedclient
893
branch has no errors when building and testing our client artifacts.

+1
javadoc
157
trunk passed

0
spotbugs
344
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
548
trunk passed

_ Patch Compile Tests _

0
mvndep
22
Maven dependency ordering for patch

+1
mvninstall
509
the patch passed

+1
compile
309
the patch passed

+1
cc
309
the patch passed

+1
javac
309
the patch passed

-0
checkstyle
45
hadoop-ozone: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)

+1
mvnsite
0
the patch passed

-1
whitespace
0
The patch has 41 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply

+1
shadedclient
741
patch has no errors when building and testing our client artifacts.

+1
javadoc
164
the patch passed

+1
findbugs
551
the patch passed

_ Other Tests _

+1
unit
427
hadoop-hdds in the patch passed.

-1
unit
1524
hadoop-ozone in the patch failed.

+1
asflicense
48
The patch does not generate ASF License warnings.

7172

Reason
Tests

Failed junit tests
hadoop.ozone.security.acl.TestOzoneNativeAuthorizer

hadoop.ozone.web.client.TestKeysRatis

Subsystem
Report/Notes

Docker
Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1074/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/1074

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc

uname
Linux 965b6d02d6c9 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / 9b54dd7

Default Java
1.8.0_212

checkstyle
https://builds.apache.org/job/hadoop-multibranch/job/PR-1074/1/artifact/out/diff-checkstyle-hadoop-ozone.txt

whitespace
https://builds.apache.org/job/hadoop-multibranch/job/PR-1074/1/artifact/out/whitespace-eol.txt

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-1074/1/artifact/out/patch-unit-hadoop-ozone.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-1074/1/testReport/

Max. process+thread count
2861 (vs. ulimit of 5500)

modules
C: hadoop-ozone/common hadoop-ozone/client hadoop-ozone/ozone-manager hadoop-ozone/objectstore-service hadoop-ozone/dist hadoop-ozone/integration-test U: hadoop-ozone

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-1074/1/console

versions
git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

TestOzoneNativeAuthorizer failure is related. The Prefix_Lock is not reentrant. The fix is refactor the PrefixmanagerImpl#getLongestPrefixPath with a helper function that does not acquire prefix lock.
In PrefixManagerImpl#setAcl, we should call the helper function without lock.

I have committed this to trunk. Thanks for your work @ajayydv


Just use ppg signal

Is it possible to use your ML code and data set to estimate blood pressure only with ppg signal?

Yes, just remove the ecg signal part from the code!


DOC: Fix for side bar rendering on top of text issue

Reference issue
Tries to fix #17532

What does this implement/fix?
Fixes the overlapping text and sidebar issue

Additional information
Screenshot of issue

Thank you @harshvardhan2707, we will have a look shortly.
@j-bowhay that could be a good start 😃 (we could use this PR to go over things.) Just FYI @harshvardhan2707, we are on-boarding Jake as a new maintainer, nothing to be concerned on your side.


varying error responses for unique name violation

As pointed out here we have repositories that return a conflict error and some a bad parameter error upon violating a unique name constraint. We really should decide on one consistent way to deal with such an error.

BadParameterError means that the request was syntactically wrong which is definitely not the case here.
I found a blog which explains this well.


Preparations for stable release

This PR tries to accomplish a bunch of improvements and cleanup for the upcoming 1.0 release.
Currently it does:

Merge the remaining 0.8.x commits onto master
Drop support for HHVM (no longer compatible with a few of our dev-deps)
Drop support for old, unsupported versions of PHP (<5.6)
Upgrade the dev dependencies
Reduce the src path complexity, thanks to PSR-4 (src/Sentry/SentryBundle -> src/)
Enforce a stricter code style
drop the deprecated options fields that where duplicated (now everything is under sentry.options if it's a \Raven_Client option
Fix a possible bug when catching console exceptions (thanks to PHPStan)
Re-sort the constructor's arguments of ExceptionListener; also the Client is no longer an optional argument
Clean up the SentryExtensionTest
Improve the Travis build:

Use stages to do test, CS and test coverage separately
Include Scrutinizer's coverage uploader in the dev deps
Speed up the builds using hirak/prestissimo
Fix PHP 7.2 build
Add static analysis with PHPStan

This is till a WIP, I will update this list as I will go on.

This is no longer WIP, requesting reviews!
Prior to tag the 1.0 release, I would like to tackle what remains in the milestone.


please update this page and include a working github repo

Please include the URL to a working GitHub repo on this page.  These code snippets are not working with the current SDK.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d24f0e5c-4677-457a-5f14-98c44e7157f3
Version Independent ID: 35ec5bb0-5969-c3e1-3611-b06a8e2566ea
Content: Azure Data Lake Storage Gen2 .NET SDK for files & ACLs (preview)
Content Source: articles/storage/blobs/data-lake-storage-directory-file-acl-dotnet.md
Service: storage
Sub-service: data-lake-storage-gen2
GitHub Login: @normesta
Microsoft Alias: normesta

@cjoakim Thank you for your feedback! We will review and provide an update as appropriate.

@cjoakim The Github repo URL is available in the documentation. You may checkout the code snippet available on the Github and do let us know if that works.

thank you
On Mon, Mar 9, 2020 at 2:08 AM CHEEKATLAPRADEEP-MSFT <
<EMAIL_ADDRESS>wrote:

@cjoakim https://github.com/cjoakim The Github repo URL is available in
the documentation. You may checkout the code snippet available on the
Github and do let us know if that works.
[image: image]
https://user-images.githubusercontent.com/44426401/76187100-6dcb9c00-61fa-11ea-82e9-5302e8c6a360.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/49701?email_source=notifications&email_token=AAAFCSEDWRK7CAOSW6DKVILRGSBWLA5CNFSM4LDIASGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOFYTTY#issuecomment-596347343,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAFCSGOE2GFPVGIBQZET43RGSBWLANCNFSM4LDIASGA
.

@cjoakim  We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion.


pull request for e2e test at 12/17/2016 22:15:19

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Error on Galio files when run tests with jest

Describe the bug
Got an error when galio is imported by tested file. I'm not sure if it's a problem with Galio or Jest.
Jest was configured like expo docs suggests.
/home/felipe/Dev/GoAppDesign/node_modules/galio-framework/src/index.js:4
    import Accordion from './Accordion';
           ^^^^^^^^^

    SyntaxError: Unexpected identifier

      2 | import { StyleSheet } from 'react-native';
      3 | import PropTypes from 'prop-types';
    > 4 | import { Button } from 'galio-framework';
        | ^
      5 |
      6 | import { argonTheme } from '../constants';
      7 |

      at Runtime.createScriptFromCode (node_modules/@jest/core/node_modules/jest-runtime/build/index.js:1059:14)
      at Object.<anonymous> (src/argon/Button.js:4:1)

To Reproduce
Steps to reproduce the behavior:

A published a minimal project that reproduces the error
Clone https://github.com/felipebergamin/reproduce-galio-test-error
Install deps with yarn
Run test with yarn jest

Expected behavior
Success test
Screenshots

Hi @felipebergamin ! Thanks for opening up this issue. I'll have to take a look at this, right now I'm not sure where exactly is the problem and why is this error showing up.

Hi, I have:
  "jest": {
    "preset": "react-native",
    "transformIgnorePatterns": [
      "node_modules/(?!(react-native|galio-framework|react-native-vector-icons)/)"
    ]
  }

This fixes OP error. But now I'm getting this one:
yarn run v1.22.4
$ jest
 FAIL  __tests__/App-test.js
  ● Test suite failed to run

    /home/neuromante/code/mobile/node_modules/galio-framework/src/fonts/galio.ttf:1

    SyntaxError: Invalid or unexpected token

      at Runtime._execModule (node_modules/jest-runtime/build/index.js:1166:56)
      at Object.<anonymous> (node_modules/galio-framework/src/index.js:23:19)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.241 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@davidsierradz Did you manage to solve this issue on testing?

@davidsierradz Did you manage to solve this issue on testing?

@iswanj No, sorry.

@iswanj No, sorry.

I have the equal @davidsierradz  problem too

Having the same problem. @davidsierradz did you find a solution?

I modified my jest configuration to add this:
`    "moduleNameMapper": {

"galio": "identity-obj-proxy"

}`

And installed the identity-obj-proxy package npm i identity-obj-proxy and it solved the font problem.
It seems that the problem  was that the font was not recognized, because it doesn't know the extension.
Here's where I find the solution link

@felipebergamin the problem is that Jest needs some modules compiled before it runs the tests and is unable to do this without you telling it which ones to "pre-compile". This posting has details. In short, I had to keep doing an npm run test and every time look to a line that looks like this:
    Details:

    /Users/noelmiller/workspace/ginfinity/node_modules/@unimodules/core/build/index.js:1
    export * from './AdapterProxy';
    ^^^^^^

to see which module was a problem and add it to the jest.config.js transformIgnorePatterns list. I was confused and thought the transformIgnorePatterns list is in package.json, but it won't work if you try to put it there. This is what my list looks like
  transformIgnorePatterns: [
    'node_modules/(?!(react-native'
    + '|galio-framework'
    + '|@expo/vector-icons'
    + '|expo-font'
    + '|@unimodules'
    + '|expo-asset'
    + '|expo-constants'
    + '|expo-linear-gradient'
    + '|react-native-modal-dropdown'
    + '|deprecated-react-native-listview'
    + ')/)',
  ],

Anyone found a solution?


Update to 1.20

Update to 1.20

It's coming eventually.

when

Eventually. Earliest end of July.

july ): my entire pack is unfortunately being bottle necked by this as there is no other with the functionality this one has.

Levelz is similar, but this one is much better. I hope that an update can be done eventually.
Regarding progress, https://github.com/noah1510/playerex/tree/1.20 seems to have some progress with 1.20, but not sure how stable it is.


hello，Can you provide relevant papers? Thank you

Hi there you go https://scipost.org/10.21468/SciPostPhys.16.4.104


Conversation comments duplicating when edited.

Version 8.2.1
Feature Conversations
Steps

add the conversations block
as admin, make a comment.
as admin, edit the comment.

expected Comment updates in the DB and in the dom
actual      Comment updates in the DB fine, but the comment element is duplicated in the dom.

I can confirm this using the develop branch.
After editing and saving, the edited message is displayed twice. A page refresh removes the duplicate.


private

Payment
Originally posted by @t0p0lino in https://github.com/System/System.github.io/issues/3

Payment
Originally posted by @t0p0lino in https://github.com/System/System.github.io/issues/3

Payment

Asshole

Payment
Originally posted by @t0p0lino in https://github.com/System/System.github.io/issues/3

good


Add way to access emojis by using txt file

Current implementation involves reading emojis from a text file once a specific button is clicked on
looking for a better way to re-implement this

hi，I have a question that how you save emoji in .txt  ?It's really shock me .bro

hi，I have a question that how you save emoji in .txt ?It's really shock me .bro

Hello,
It was quite simple actually, a few things you'd need to know is that, emojis are essentially unicode characters -> Unicode
Almost all programming languages have some sort of encoding, with python for instance it is string.encode(encoding=encoding, errors=errors)
Knowing this, the challenge was then to get all those unicodes in a particular order, the one way i could figure it out was to scrape all of them and put them in a .txt file
Procedure

I built a scraper using selenium library (you can find it here -> EMOJI SCRAPPER)
Then I scraped the emojiPedia website, specifically the google emoji set, (I preferred that order) -> EmojiPedia
On emojipedia there's a copy button for every emoji, so I built the scraper to click that button and then paste it in a txt file
I let it run overnight and then I got my emojis in the textfile
I also scrapped the emoji images using an extension for chrome Extension
Then I just wrote a batch script (CMD script) to rename all the images in the order as the emojis text. Then I just imported them into python and then displayed them using a for loop while matching the image to the content of the txt file in the form {  [image1 : emojitext1]  ,  [image2 : emojitext2]} and so on

Hope that helps ☺, I'm sure there are various packages that would help you do this exact thing easily tho


[AMA]

Ask me anything...
@pmarsceill,
Hi, my name is Michael, I am writing because I really don't know who else to turn to anymore, I don't know what to do really. I have been a person who has always done things out of love and wanted nothing but the best out of love. At least I thought I did I want to help people but I don't know what to do anymore. I don't even know what to ask but I am homeless now, living on the street and I was doing my best to try to do something great by working with computers.  I just don't know what to do anymore

Hello, How are you?


⚠ Bofrost.hr has degraded performance

In c18e900, Bofrost.hr (https://www.bofrost.hr) experienced degraded performance:

HTTP code: 200
Response time: 4267 ms

Resolved: Bofrost.hr performance has improved in fd26c15.


npm start issue in Windows Machine

This is the error log I get when I do npm start
C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool>npm start

<EMAIL_ADDRESS>start C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool
node node_modules/gulp/bin/gulp.js

C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\require-dir\index.js:97
if (!require.extensions.hasOwnProperty(ext)) {
^
TypeError: require.extensions.hasOwnProperty is not a function
at requireDir (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\require-dir\index.js:97:37)
at Object. (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\gulpfile.js:1:85)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Liftoff.handleArguments (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\gulp\bin\gulp.js:116:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>start: node node_modules/gulp/bin/gulp.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\Users\skyip\AppData\Roaming\npm-cache_logs\2017-11-15T23_44_58_976Z-debug.log
Any help will be appreciated.
Also this is what I get after I do npm install
npm notice created a lockfile as package-lock.json.
Step 1 : Create a file in your home directory (usually your name) named .aws
In order to do this on windows, simply crate a new folder with the name .aws.
Step 2 : Create a file in that folder with the name credentials.file using notepad
Inside include this code
[default]
aws_access_key_id = [KEY FROM AWS]
aws_secret_access_key = [SECRET KEY FROM AWS]

	Replacing those codes with the ones found in AWS console This you get by logging into
IAM (http://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html)

step 3:  Install node from https://nodejs.org/en/
step 4:Install NPM from https://www.npmjs.com/
step 5 : Install git https://git-scm.com/downloads

Step 6: Run git clone https://github.com/alexa/interactive-adventure-game-tool.git in command prompt
Step 7: CD to that drive it will be in C:\Users\NAME\interactive-adventure-game-tool replacing name with your home directory name

so CD C:\Users\name\interactive-adventure-game-tool in command prompt.

Step 8 : Type npm install and wait, it will take a while
Step 9 : Npm Start and then allow, it should open.

Hope this helps! i saw this guide and couldn't believe they only made it for macs and nobody posted windows instructions!

Hi - I needed to edit the package.json in the "interactive-adventure-game-tool" folder to bump the version of require-dir from 0.2.0 to 0.3.2.  You cannot just edit the file with an editor else the install will fail.
I used www.jsoneditoronline.org and re-saved the edited version.  Look for line 38 ("require-dir": "^0.3.2",)
That got me past your error but then I still had a Python error (installed Python 2.7.X) after that and an MS Framework 4.0 (my computer) vs 2.0 (after that (which I haven't yet resolved).
I hope this helps!

I have had a problem with python and just installed python 2.7 frome here and it finally worked...but the fonts doesnt seem to fit, so it looks a little bit different from running on the mac


About entire graph classification and adjacency matrix

Hi, I'm new to pytorch-geometric.
I'm sorry if you have already answered the same question.
I searched for this github issues, but I was not able to find .
【Thing I want to do】
I want to classify 500,000 entire graphs (flag 0 or 1 for all graphs) using my dataset.
I'm trying to write code with reference to mutag_gin.py (https://github.com/rusty1s/pytorch_geometric/blob/master/examples/mutag_gin.py)
I think mutag_gin.py is sample code that classifies the entire graph.
Please point out if i am wrong
[Tried]
My datasets have unique id(2million),graph_id(500,000),features(2milliion*512)in pandas format.
I created 2 million * 2 million adjacency matrices in scipy format (because the nodes in all graphs add up to 2 million).
Created 2 million nodes features. Each node has 512 features.
The graph has 1 to 10 nodes, which vary from graph to graph.
I thought  the number of flgs are 500,000, but I made flgs 2 million ( if graph’s flag 1 then node’s flag 1 too)
I'm having trouble understanding how to transform an adjacency matrix and input to GCN.
I think I need a readout function for each graph, but I don't know how.
Do I have to create a text-based dataset like MUTAG?
I would appreciate any advice.
If you have any good reference materials, please let me know.
Thank you.

In general, each graph in your dataset should be separately saved into a data object. In your case, that should result in 500,000 data objects, which you can hold in a simple python list or a specific PyG dataset. Therefore, it is not necessary to create a 2 mil * 2 mil adjacency matrix. If you want to classify graphs, each graph/data object should hold exactly one label (resulting in 500,000 labels). You can convert a scipy matrix to the (edge_index, edge_weight) format via torch_geometric.utils.from_scipy_sparse_matrix.


WIP: Unifi poe control

Description:
Control POE supply to devices using POE. Each entity identifies as a switch that control the supply of POE.
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:

[x] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

Could not find a related PR in the documentation repository. Adding docs-missing label.


Create a generator for fake json data

Thinking need to take a generic type and a delegate to allow users to define what values will be assigned where. Maybe only take a single type with primitive types only and let users figure out how to form a complete json file from it.
Use System.Text.Json to generate a json object from a single type?
Long term will be to add a file writing mechanism. Try to program around that thought.

Add with commit: 092fd037e42b85bc1a6a84bbac9eed1d7bdd5b16


Import all characters - script doesn't do anything for me

Describe the bug
I read through the FAQ and found this script:
const actors = game.actors;
for (let [key, value] of actors.entries()) {
  const ddbImported = 'ddbimporter' in value.flags;
  if (ddbImported && value.type === "character") {
    console.log('Importing: ' + value.name);
    await game.modules.get("ddb-importer").api.importCharacter(value);
  }
}

I've saved it as a script macro and executed it, but it doesn't do anything. Nothing in the logs and / or console
Environment:

Browser [Thorium]
Foundry Version [e.g. 11.315]
5e System Version [e.g 3.1.2]
Module Version [e.g 5.1.24]
Does this behaviour occur with other modules disabled: Yes

Additional context
Manually importing single characters work fine.

This script will just update existing characters in the world

Yeah i realized that aswell.
Sorry and thanks^^


Remove Id popup from create source & target

When creating a source or target, a pop-up appears asking for id.  The ID is irrelevant at this point, show maybe group, and generate a unique id based on the group.

Also, make group immutable

Change of approach, going to look into removing the group concept, so for now, use the the "name" (actually description) in the pop-up


Cannot build submodel with layer of nested model as output

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
TensorFlow installed from (source or binary): pip
TensorFlow version (use command below): v2.0.0-rc2-26-g64c3d38 2.0.0
Python version: 3.6.8
CUDA/cuDNN version: 10
GPU model and memory: Nvidia GTX 1060 6GB

Describe the current behavior
(see also the StackOverflow on this: https://stackoverflow.com/questions/59191855/how-to-build-a-submodel-in-keras-functional-api-ending-at-a-layer-of-a-nested-m)
Usually when using the functional API to define a model one can build a submodel starting and ending at any of the original models layers. However, when models become many and large, it can become very convenient to encapsulate some parts of the models into different python functions. These then build another model (potentially multi input/output, hence not Sequentials), which can be used in the functional API just like a layer. The graph will differ due to the additional Input layer, but the computations should be the same. However, when trying to build a submodel from such a nested model that has an output which originally was a layer of the nested model, a  "Graph disconnected" error is thrown.
Describe the expected behavior
The Graph very clearly is connected, given that the nested model in its entirety is an executable, connected graph. It should therefore be possible to build submodels, no matter how deeply nested the model is, as it should always be possible to select subgraphs.
Code to reproduce the issue
import os
import tensorflow as tf
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

# NOT NESTED
inp = tf.keras.Input((4,))
y = tf.keras.layers.Dense(4, name="od_1")(inp)
y = tf.keras.layers.Dense(2, name="od_2")(y)
y = tf.keras.layers.Dense(4, name="id_1")(y)
y = tf.keras.layers.Dense(10, name="od_3")(y)
y = tf.keras.layers.Dense(10, name="od_4")(y)
final_model = tf.keras.Model(inputs=[inp], outputs=[y])
final_model.summary()

sub_model = tf.keras.Model(inputs=[final_model.input], outputs=[final_model.get_layer("id_1").output])
sub_model.summary()

# NESTED
inp_1 = tf.keras.Input(shape=(2,))
x = tf.keras.layers.Dense(4, name="id_1")(inp_1)
inner_model = tf.keras.Model(inputs=[inp_1], outputs=[x], name="inner_model")

inp_outer = tf.keras.Input((4,))
y = tf.keras.layers.Dense(4, name="od_1")(inp_outer)
y = tf.keras.layers.Dense(2, name="od_2")(y)
y = inner_model(y)
y = tf.keras.layers.Dense(10, name="od_3")(y)
y = tf.keras.layers.Dense(10, name="od_4")(y)
final_model = tf.keras.Model(inputs=[inp_outer], outputs=[y])
final_model.summary()

sub_model = tf.keras.Model(inputs=[final_model.input], outputs=[final_model.get_layer("inner_model").get_layer("id_1").output])
sub_model.summary()

Other info / logs
    Traceback (most recent call last):
      File "/home/***/test_submodel_acces.py", line 35, in <module>
        sub_model = tf.keras.Model(inputs=[final_model.input], outputs=[final_model.get_layer("inner_model").get_layer("id_1").output])
      File "/home/***/venv/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 146, in __init__
        super(Model, self).__init__(*args, **kwargs)
      File "/home/***/venv/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 167, in __init__
        self._init_graph_network(*args, **kwargs)
      File "/home/***/venv/lib/python3.6/site-packages/tensorflow_core/python/training/tracking/base.py", line 457, in _method_wrapper
        result = method(self, *args, **kwargs)
      File "/home/***/venv/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 320, in _init_graph_network
        self.inputs, self.outputs)
      File "/home/***/venv/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 1625, in _map_graph_network
        str(layers_with_complete_input))
    ValueError: Graph disconnected: cannot obtain value for tensor Tensor("input_2:0", shape=(None, 2), dtype=float32) at layer "input_2". The following previous layers were accessed without issue: []

I have tried on colab with TF version 2.0,2.1.0-rc0 and was able to reproduce the issue.Please, find the gist here. Thanks!

Is there an ETA for a fix? This is quite essential to a project I am currently working on and I would like to know if I can expect this to be solved soon (and maybe be part of 2.1 stable) or if I need to find a workaround.

I'm facing same issue too.

Thanks for reporting the issue.
The issue is caused by the usage of "inner_model.get_layer("id_1").output". In the code example above, the dense layer within the inner model is used twice, first time by the inp_1, and second time with inp_outer. In that sense, there are two pairs of input/output for that layer, and layer.output returns the output for the first pair (there is an ambiguity of the API here). When you build the model with the outer input with the output from previous input, it raised error since it was expecting the input from inp_1.
To avoid the ambiguity here, keras has the API to explicitly fetch the output tensor, by layer.get_output_at(). If you change your code to follow, then it will run fine.
sub_model = tf.keras.Model(
    inputs=[final_model.input],
    outputs=[final_model.get_layer("inner_model").get_layer("id_1").get_output_at(1)])
sub_model.summary()

Note that you are expect to use the second output which is at index 1. Index 0 will give u the output for the input of inp_1.

I have a very similar issue. I've tried changing the code to be get_output_at(1) instead of output, but it results in the following error message.
ValueError: Asked to get output at node 1, but the layer has only 1 inbound nodes.
Here is my code:
`
base_model = sm.Unet('vgg16', encoder_weights='imagenet', classes=1, activation='sigmoid')
inp = Input(shape=(448, 224, 1))
l1 = Conv2D(3, (1,1))(inp)
out = base_model(l1)
model = Model(inp, out, name = base_model.name)
model.summary()
intermediate_layer_model = Model(inputs=[model.input], outputs = [model.get_layer('model_1').get_layer('center_block2_relu').get_output_at(1)])
`
Any help would be appreciated. Thanks!

I have a very similar issue. I've tried changing the code to be get_output_at(1) instead of output, but it results in the following error message.
ValueError: Asked to get output at node 1, but the layer has only 1 inbound nodes.

Here is my code:
base_model = sm.Unet('vgg16', encoder_weights='imagenet', classes=1, activation='sigmoid')

inp = Input(shape=(448, 224, 1))
l1 = Conv2D(3, (1,1))(inp)
out = base_model(l1)
model = Model(inp, out, name = base_model.name)
model.summary()

intermediate_layer_model = Model(inputs=[model.input], outputs = [model.get_layer('model_1').get_layer('center_block2_relu').get_output_at(1)])

Any help would be appreciated. Thanks!
because only one tensor output :
intermediate_layer_model = Model(inputs=[model.input], outputs = [model.get_layer('model_1').get_layer('center_block2_relu').get_output_at(0)])

@qlzh727 Thanks for the above response. My doubt is what if I have several layers in a submodel and want to make models for several layers in the submodel. I have raised a question here
https://stackoverflow.com/questions/64118557/how-to-create-a-keras-model-using-the-intermediate-layers-of-its-submodel
Thanks you.

Thanks for reporting the issue.
The issue is caused by the usage of "inner_model.get_layer("id_1").output". In the code example above, the dense layer within the inner model is used twice, first time by the inp_1, and second time with inp_outer. In that sense, there are two pairs of input/output for that layer, and layer.output returns the output for the first pair (there is an ambiguity of the API here). When you build the model with the outer input with the output from previous input, it raised error since it was expecting the input from inp_1.
To avoid the ambiguity here, keras has the API to explicitly fetch the output tensor, by layer.get_output_at(). If you change your code to follow, then it will run fine.
sub_model = tf.keras.Model(
    inputs=[final_model.input],
    outputs=[final_model.get_layer("inner_model").get_layer("id_1").get_output_at(1)])
sub_model.summary()

Note that you are expect to use the second output which is at index 1. Index 0 will give u the output for the input of inp_1.

If I'm not mistaken, this fix does not work (anymore). At least not in TF 2.4.1.
I have also created a separate code snippet in which basically the same issue is present, and was not able to solve it by using .get_output_at, as the layer has only a single output/inbound node.
Shouldn't the code snippet below be able to work?
import tensorflow as tf

# Define an inner model of an input and a single dense layer
inner_input = tf.keras.layers.Input(10)
x = inner_input
x = tf.keras.layers.Dense(10, name="inner_layer")(x)
inner_output = x

inner_model = tf.keras.Model(inner_input, inner_output, name='inner_model')
inner_model.summary()

# Define an outer model in which we prepend a single Dense layer before the inner model.
# The inner model is thus a layer or sub-model within the outer model
outer_input = tf.keras.layers.Input(10)
x = outer_input
x = tf.keras.layers.Dense(10, name="outer_layer")(x)
outer_output = inner_model(x)

outer_model = tf.keras.Model(outer_input, outer_output, name='outer_model')
outer_model.summary()

# Append an extra Dense layer after `inner_layer`, and create a new model with inputs
# the `inner_input` and outputs the output of the newly appended Dense layer.
# This works.
x = inner_model.get_layer('inner_layer').output
x = tf.keras.layers.Dense(10)(x)
extended_inner_model_output = x
extended_inner_model = tf.keras.Model(inner_input, extended_inner_model_output)
extended_inner_model.summary()

# Append an extra Dense layer after `inner_layer`, and create a new model with inputs
# the `outer_input`(!) and outputs the output of the newly appended Dense layer.
# This does not work.
x = outer_model.get_layer('inner_model').get_layer('inner_layer').output
x = tf.keras.layers.Dense(10)(x)
extended_inner_model_output = x
extended_inner_model = tf.keras.Model(outer_input, extended_inner_model_output)
extended_inner_model.summary()


KITTI traning code

Hi,
I was wondering if you plan to release KITTI training code at any time?
Apart from this, are the released model checkpoints all pretrained on ImageNet? Thanks!

Hi,

We do plan to release the training flows for the other datasets, but since we used some internal libraries from ByteDance, this will involve re-writing the dataloaders. Therefore, I don't have a precise estimation on when exactly we will be releasing them. But you are welcome to open an issue or drop us an email if you want to ask for any details or even request some code snippets. My apologies and thanks for your understanding.

Yes, all the released models were trained with the encoder pretrained on ImageNet.

Hope this helps!
Zijian


refactor(Button): change css to use styled

DO NOT MERGE BEFORE https://github.com/zakodium-oss/react-science/pull/814


Move the "out of place" sentence in the background

see p. 2, right column, section 2.1

Closed in PR #37


[Dart] analysis_option.yaml bug - analyser-exclude option doesn't seems to work with folders with a '(' in there name

Environment
Flutter 3.3.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e3c29ec00c (il y a 2 semaines) • 2022-09-14 08:46:55 -0500
Engine • revision a4ff2c53d8
Tools • Dart 2.18.1 • DevTools 2.15.0
System:    Kernel: 5.15.0-48-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 5.2.7
           wm: muffin dm: LightDM Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal

Bug found:
Just look at this screen capture.
Those two folders do have the exact same content.
The one on the right has "(" int it's name. There the exclude seems not to be taken into account.

Hi @nicolasmol, this issue should be reported on the dart-lang repo.
Here's the link https://github.com/dart-lang/sdk/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc.
Closing from here as this is not a flutter issue.
Thank you

Ok cool.
Done


Asynchronous OpenCL calls have potential for undefined behaviour

Description
There are some innocent-looking code patterns that can actually result in reading memory from destroyed objects.
1) Using any temporary matrix_cl variable in a function that calls a kernel. Synce kernel call is asynchrounous that temporary could be destroyed before the kernel is executed. This is only problem with arguments of type matrix_cl - setKernelArguments() makes a copy of scalars, but not of cl::Buffers.

Constructing a matrix_cl from any temporary object. Since we are using asynchronous copying that that temporary could be destroyed before copying happens.

Example
1)
N=100;
matrix_cl<double> a(N,N), b(N,N), c(N,N);
matrix_cl<double> d = a + b + c;

MatrixXd a = ...
MatrixXd b = ...

matrix_cl<double> c(a + b);

Expected Output
Well-defined behaviour.
Current Version:
v2.20.0

I just found out that documentation for clReleaseMemoryObject says that a memory object is not deleted until all comands using it have completed, even if its reference count is 0. So 1 is not actually an issue.

Ty! For (2) could we just make a copy of the object when it's a temp?

I guess we could allocate the object on the heap and construct it by moving from the temporary. Than bind a callback to the event that will delete the object. That requires two versions of every existing matrix_cl constructor, but I think it is a good option.

I think we could also use more generic templates and then for temporaries have an if(is_rvalue_reference<T>::value) // do copy of temp

You are right. Two versions of constructors are not needed. However the copies still need to be dynamically allocated.

Which devices and platforms did the tests fail on? Looking at your clinfo it looks like your drivers support out of order while the Intel(R) HD Graphics 4000 device does not. If I had to guess I bet we are only looking at if the driver supports it and not the device. I ran the test you posted on my laptop (which does not support async) and can confirm I'm getting it here as well. I'll work on a fix tmrw

I tested on NVidia GPUs on both computers.

Fixed via #1356


workload Ingress UI not deleting rules as expected

Rancher versions:
rancher/server or rancher/rancher: 2.0 RC3
rancher/agent or rancher/rancher-agent: 2.0 RC3
Infrastructure Stack versions:
kubernetes (if applicable): 1.10
Docker version: (docker version,docker info preferred)
docker 17.03
Operating system and kernel: (cat /etc/os-release, uname -r preferred)
CentOS 7
Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
bare-metal vm
Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
k8
Steps to Reproduce:
When editing the rules of an ingress I noticed that rules weren't being deleted even after removing them and saving as seen in the screen shots below.
After removing the default rule:

Going back to the list of load balencers, two defaults are shown that match:

When I go back into the ingress i see this again:

It seems to always force you to have a default rule, so possibly the UI should not allow you to remove a default rule on the edit ingress view.

Version - v2.0.0
Could be related to https://github.com/rancher/rancher/issues/13238?

Version - 2.0 master 5/8
Verified fixed


Add receive modal story.

@keybase/react-hackers, this is ready for review.

@keybase/react-hackers, this is ready for another review.

@keybase/react-hackers, bump.


[question] new release

@yelouafi is there any estimate when you are gonna ship new release from the master branch?

Planned for this weekend (hopefully)

done!
https://github.com/yelouafi/redux-saga/releases/tag/v0.12.0

great news, gonna update soon in my project 👍


📃: Word Scramble Game

🔴 Title :Word Scramble Game
🔴 Tech stack : HTML, CSS <Javacript
🔴 Objective : to add Word Scramble Game
🔴 Summary :  Its a game in which through hints one could guess the correct word from its scramble form

✅ Details to Include When Taking the Issue:
Name : Word Scramble Game
Participant Role (Specify the Open Source Program name, e.g., GSSOC, Hacktoberfest, etc.):

Happy Contributing! 🚀
Wishing you all the best on your open source journey. Enjoy! 😎

@iamrahulmahato please add this game too


Enhancement Request - Please add support for Trusted Advisor.

Is there is any chance of adding support for Trusted Advisor in near future?
Reporting Bugs
Please be aware of the following things when filing bug reports:

Avoid raising duplicate issues. Please use the GitHub issue search feature
to check whether your bug report or feature request has been mentioned in
the past.

When filing bug reports about exceptions or tracebacks, please include the
complete traceback. Partial tracebacks, or just the exception text, are
not helpful.

Make sure you provide a suitable amount of information to work with. This
means you should provide:

Guidance on how to reproduce the issue. Ideally, this should be a
small code sample that can be run immediately by the maintainers.
Failing that, let us know what you're doing, how often it happens, what
environment you're using, etc. Be thorough: it prevents us needing to ask
further questions.
Tell us what you expected to happen. When we run your example code,
what are we expecting to happen? What does "success" look like for your
code?
Tell us what actually happens. It's not helpful for you to say "it
doesn't work" or "it fails". Tell us how it fails: do you get an
exception? A hang? How was the actual result different from your expected
result?
Tell us what version of Moto you're using, and
how you installed it. Tell us whether you're using standalone server
mode or the Python mocks. If you are using the Python mocks, include the
version of boto/boto3/botocore.

If you do not provide all of these things, it will take us much longer to
fix your problem.

As a general rule, new endpoints get added when people that need them have some extra time to add them to Moto.
Right now I don't have a particular use for this so I can't promise anything for timing.
If someone does have time, pull requests are much appreciated (even small one just to get a service started). If you have some example code you want to work, preferably with some example data, that can also speed up the process.
I'm going to mark this as a feature request.

The support service is now available as of moto >= 2.x!
Will close this, but let us know if you're still missing a specific feature/method in the service.


Added color support for 0.16

#21

->

This looks neat, @Fresheyeball
@mybuddymichael have you been too busy recently to review these PRs? I'd love to see some of these changes merged in without forking the repo and doing it on my own version.
Thanks!

Oh man, @splodingsocks, thanks for bringing this to my attention. I thought I was watching all my repos, but, for some reason, I wasn't watching this one. I had no idea all these issues and PRs had been created. :flushed:
I'm now watching this and, yes, I'll definitely sort through all these and get them merged as I can.

Great! I'm so excited to start using this plugin again, @mybuddymichael ! Thanks for your work!

@splodingsocks I haven't been able to get around to reviewing these, so you and @thSoft now have collaborator privileges, if either of you have the time to review and merge as needed.

@mybuddymichael awesome, thanks!

@mybuddymichael you're the only one who can make a new release, right?

@splodingsocks I have no idea. I assume you tried and it won't let you?

Hurray!

@mybuddymichael just checked, looks like I'm able to publish a package version too!


ARROW-1946: [JAVA] Add APIs to decimal vector for writing big endian data

We recently moved Dremio to LE Decimal format (similar to Arrow). As part of that we introduced some APIs in decimal vector which take a big endian data and swap the bytes while writing into the ArrowBuf of decimal vector.
The advantage of these APIs is that caller would not have to allocate an additional memory and write( and read) source big endian twice for swapping into new memory and using that to write into the vector.
We can directly swap bytes while writing into the vector – just read once and swap while writing.
cc @jacques-n , @BryanCutler , @icexelloss

Ping.
Looks like the Travis CI failure is not related to the code changes.

Ping.

Ping

This seems ok to me, but I don't really know how many users have BE decimals.  Could you clarify a little if this is still useful for Dremio since you've moved to LE, or is it just something that might help other users if they have this type of data?

@BryanCutler, the in-memory arrow buffer format is LE and Dremio has moved to LE format as well. However, as part of making the changes in Dremio, we obviously had to swap bytes in places where we are writing BE data (say from our Parquet reader code) into buffer of decimal vector through DecimalWriter or set interfaces.
So in order to optimize this swapping, we created new interface(s) that allow us to swap bytes while writing itself -- as opposed to allocating a temp buffer, reading source BE data, writing target LE data into temp buffer and using the latter to write data into decimal vector.
The new APIs you see in this patch are introduced for this particular purpose. It's an optimization and not really a necessity. I agree that the API in general may not be useful but sort of helps our case.

Thanks  for reviewing, @wesm and @BryanCutler . I have added unit tests.


Input fields for the WAS URL and Wi-Fi credentials not appearing

I am following the new on-boarding instructions using WAS and Willow Web Flash but when I am using the flash, after connecting to willow, the Input fields for the WAS URL and Wi-Fi credentials do not appear. I did manage to do it once but then changed my WAS address (after installing WAS on a different computer) and trying to flash again, I am getting this issue. Here is a screenshot:

Any ideas?

Does anything appear in your browser console?
Do you have any browser add-ons like ad blockers or similar?
Try running in incognito window?

Thanks. I do get an error in the console but I am not sure if they are relevant:
Uncaught (in promise) TypeError: jsonResponse is not iterable
    at getReleases (index.js:71:25)
    at async connectButton.onclick (index.js:153:14)
getReleases @ index.js:71

No add-ons installed. Issue persists in incognito mode.

I followed the error. When I try to open https://api.github.com/repos/toverainc/willow/releases in the browser I get an error (IP address redacted):
{"message":"API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

Good catch! We're using a Cloudflare Worker in WAS to avoid hitting the Github rate-limit, but we forgot to update Willow Web Flasher to use this.


Create an experimental test bursty_traffic_test.go

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 57.081%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1181

Relevant Lines:
2069

💛  - Coveralls


test: added an example test case for video autofocus

#946  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @shakyShane and the rest of your teammates on  Graphite


Error on build after freeglut3 install

I did a fresh set up while not having freeglut3-dev installed. Setup.sh was able to finish, but, understandably, I got an error when I ran build.sh after. I then installed freeglut3-dev, but I'm now getting a different error which is shown in build_fail.txt.
In a moment I'm going to wipe my install and then do a setup/build from scratch and see if the error persists. I'll post the results shortly.

Doing a reinstall from scratch resolved the issue.
Seems pretty reasonable that if someone runs into this problem in the future they'll realize on their own that they probably have to rebuild from scratch, but I'll add a note in the INSTALL file anyways.


EventEmitter support

I'm trying to stub an interface that extends eventEmitter:
interface Session extends EventEmitter {
  send: (...) => Promise<string>;
}

The function I'm testing looks something like this (dumbed down):
getSession(opts): Promise<Session> {
  return new Promise(resolve => {
    // `someModule.connect` returns a session instance, which might happen before the connection is complete
    const session = someModule.connect(opts);
    console.log('This is the session:', session);

    // For the example, assume connect succeeds every time
    session.on('connect', () => resolve(session));
  });
}

then I stub the interface:
const session = stubInterface<Session>();
const someModuleConnectStub = sinon.stub(someModule, 'connect');
someModuleConnectStub.returns(session);

setTimeout(() => {
  session.emit('connect');
}, 150);

return getSession(opts)
  .then(result => {
    result.should.be.equal(session);
  });

This is the output:
this is the session: {
  constructor: [Function: Object],
  should: overwritingMethodWrapper {
    __flags: [Object: null prototype] {
      ssfi: [Function: shouldGetter],
      lockSsfi: undefined,
      object: {},
      message: null
    }
  }
}

Error: Cannot read property 'on' of undefined

Am I doing anything wrong here? Is there a reason the stub doesn't have a .on function?
I'm guessing the internals of ts-sinon doesn't bind these, and then even if it did, it probably wouldn't have custom code to invoke the function passed into the .on function when the emit is invoked? I haven't dug into the code, so this is just a guess.
Any help would be appreciated

Turns out the error Cannot read property 'on' of undefined is because I had code doing this:
session.on('connect', onConnect)
  .on('secureConnect', onConnect)
  .on('close', onClose);

but .on() doesn't return the session, so it works for the first invocation (which returns undefined), then can't invoke the second .on
I had to change it to:
session.on('connect', onConnect);
session.on('secureConnect', onConnect);
session.on('close', onClose);

This still didn't work though as the function given to the .on function never gets invoked ...
To get around this, I change my test to:
const session = stubInterface<Session>();
(session as any).fns = {};
(session as any).on = (name: string, fn: any) => {
  (session as any).fns[name] = fn;
};
(session as any).emit = (name: string, data?: any) => {
  (session as any).fns[name](data);
};

const someModuleConnectStub = sinon.stub(someModule, 'connect');
someModuleConnectStub.returns(session);

setTimeout(() => {
  session.emit('connect');
}, 150);

return getSession(opts)
  .then(result => {
    result.should.be.equal(session);
  });

I'm hoping this can be added to ts-sinon instead?

Thank you for using my library.
I think the functionality you're looking for is a partial stub for which you have to use stubObject function instead.
Consider following code:
class Session extends EventEmitter {
    send() { return "example" }
}

const getSession = (opts): Promise<Session> => {
    return new Promise(resolve => {
        // `someModule.connect` returns a session instance, which might happen before the connection is complete
        const session = someModule.connect(opts);
        console.log('This is the session:', session);

        // For the example, assume connect succeeds every time
        session.on('connect', () => {
            resolve(session);
        });
    });
}

// someModule example
const someModule = { connect: (opts: any[]) => new Session()};

// you need to create an instance of object first
const originSession = new Session();
// now you can create partial (as a second arg provide an array of method names you are going to set custom behaviour for)
const session = stubObject<Session>(originSession, ["send"]);
// do whatever on methods you want to set custom behaviour for
session.send.returns("something");

const someModuleConnectStub = sinon.stub(someModule, 'connect');
someModuleConnectStub.returns(session);

setTimeout(() => {
    session.emit('connect');
}, 150);

getSession(opts)
    .then(result => {
        // cannot use .should on result since it's a partial mock
        expect(result).to.equal(session);
    });

Partial mocks allow you to keep some internal behaviour of mocked object while replacing the behaviour of chosen methods.
Alternatively you can refactor your code to use composition over inheritance for Session class -> take EventEmitter object in Session constructor and keep it as a dependency (private member of Session class) then you will be able to test Session behaviour separately (stub EventEmitter and do assertions on what methods have been called with what arguments for 'emit' and 'on').
I hope that'll help with your problem.

No, thank you for putting this library out there for us to use; it has made testing with TS so much easier!
I started writing a whole essay here, just to realize that instead, I could do this:
session.on.callThrough();
session.off.callThrough();
session.emit.callThrough();

Just to then test it and find an error: Unable to find wrapped method.
Since I'm stubbing an interface that extends EventEmitter, should I not just be able to specify that those functions should just call through, which would give me the default handling I'm looking for?
I'll rewrite my whole long essay after you have a chance to reply to this, if my long essay is still relevant.
Thanks in advance

No, thank you for putting this library out there for us to use; its made testing with TS a breeze!
I see how using the stubObject in this scenario would be better than stubInterface and will implement that. Thanks for the help.
For anyone reading this, it comes down to the difference between actually having an instance of an EventEmitter (or something that extends it) which has all the properties implemented and ready to be used, versus having an defintion of an EventEmitter (ie, a template, a schema, a skeleton, an interface) where the properties are just placeholders for code that could be defined and executed.
As for the alternative, thanks, but for this scenario I have that wouldn't work as I'm mocking a resource from another node module and can't actually control the internals; I can't convert it to use composition rather than inheritance. But another good suggestion, thanks


Automated Package Upgrade

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[regression]Auto detection of gulp command no more working for user having space in name

VSCode Version: 1.31.0
OS Version: Windows 10

Steps to Reproduce:

have a system with user home containing a space
have some gulp task configured
you will have:

Auto detecting gulp for folder vscode-atlasmap failed with error: Error: Command failed: C:\Users\Aurelien Pupier\AppData\Roaming\npm\gulp.cmd --tasks-simple --no-color
'C:\Users\Aurelien' is not recognized as an internal or external command,
operable program or batch file.

Does this issue occur when all extensions are disabled?: Yes/No
I think it was introduced by this commit: https://github.com/Microsoft/vscode/commit/272c6827f1e15dea7097c2b73bf9d0752135b7ee#diff-7c470ab4f4141bf44222125e9685fa35
it is now using a global gulp which is installed in user home instead of local one.
The command has never escaped space in path though

Thank you for catching this! The fix will be available in the next Insiders build.

Why are you looking in appdata/npm - Copy now?

Ah that was already fixed


PyOhio 2016

https://github.com/pytube/data/issues/142

@mattboehm Has a branch for with work here: https://github.com/mattboehm/data/tree/pyohio-2016/

Created a PR at https://github.com/pyvideo/data/pull/95

The PR was closed so we should be able to close this.
@logston I noticed that the pyohio 2016 videos disable embeds, which make the pyvideo page less useful. Do you know if there's anyone to talk to about changing this? Past years' videos appear to allow embeds.

Talk to @CarlFK

@CarlFK any chance you can help with making the PyOhio 2016 movies embeddable?

I think the links just need to be converted. They are currently:
http://youtu.be/<video_id>
They should be of the form http://www.youtube.com/watch?v=<video_id>
They youtube tool should help with this:
https://github.com/pyvideo/data/blob/master/tools/youtube.py
python tools/youtube.py -p pyohio-2016

I believe this one can be closed:

http://pyvideo.org/events/pyohio-2016.html
#95 + #114

Nice.


Carboxylic-based Metal-organic cage

Hi!
Thanks for the great tutorial for using stk and building structures.
I tried to use it to build stk to build carboxylic-based metal-organic cages but without success so far. In particular, I struggle to define the M-M paddlewheel building blocks. In your examples, you use Pd or Fe and define it as stk.SingleAtom. Is there any equivalent for a dimetal like Cu2 paddlewheel?
I try as well to create first an M2(OAc)4 metal complex by replacing the C with a Br dummy before adding a spacer building block to form the cage. However, I also could not figure out how to create such a paddlewheel complex. Is there a way to do it only using CarboxylicAcidFactory and not the smartfunctionalgroupfactory?
Best regards

Hello!
Welcome and thank you!
If I understand correctly, you want to build an stk.metal_complex.Paddlewheel structure - below is an example code to do that. Let me know if that helps?
The SmartsFunctionalGroupFactory is used to afford the specificity seen below - you want two functional groups (one per oxygen atom) in the caborxylic acid -- not one FG from the entire caborxylic acid.
In the example below, I finally turn the constructed complex into a BB with bromo functional groups for further reaction, as I think you requested, for cage formation.
import stk

cu_atom = stk.BuildingBlock(
  smiles='[Cu+2]',
  functional_groups=(
      stk.SingleAtom(stk.Cu(0, charge=2))
      for i in range(4)
  ),
  position_matrix=([0, 0, 0], ),
)

bi_1 = stk.BuildingBlock(
    smiles='O=C(O)c1ccc(Br)cc1',
    functional_groups=[
        stk.SmartsFunctionalGroupFactory(
            smarts='[#6]~[#8]~[#1]',
            bonders=(1, ),
            deleters=(2, ),
        ),
        stk.SmartsFunctionalGroupFactory(
            smarts='[#6]~[#8X1]',
            bonders=(1, ),
            deleters=(),
        ),
    ]
)

mcomplex = stk.ConstructedMolecule(
    stk.metal_complex.Paddlewheel(
        metals=cu_atom,
        ligands=bi_1,
        reaction_factory=stk.DativeReactionFactory(
            stk.GenericReactionFactory(
                bond_orders={
                    frozenset({
                        stk.GenericFunctionalGroup,
                        stk.SingleAtom,
                    }): 9,
                },
            ),
        ),
    )
)

mcomplex.write('test.mol')

# Turn into BB for next reaction.
complex_bb = stk.BuildingBlock.init_from_molecule(mcomplex, (stk.BromoFactory(), ))

Yes, it helps a lot, I could built my cuboctahedral cage by sligthly modifying the complex to match with the spacer. I also run MC Hammer optimization, which give a pretty decent result. I found the cage structure to be closer to the crystalographic structure when replacing C(=O)(O)Br by C(O)(O)Br (even if i got of course an extra hydrogen on the C).
I am a beginner with Python but I could understand the general concept of how it works thanks to your tutorials.
`cu_atom = stk.BuildingBlock(
smiles='[Cu+2]',
functional_groups=(
stk.SingleAtom(stk.Cu(0, charge=2))
for i in range(4)
),
position_matrix=([0, 0, 0], ),
)
bi_1 = stk.BuildingBlock(
smiles='C(=O)(O)Br',
functional_groups=[
stk.SmartsFunctionalGroupFactory(
smarts='[#6]~[#8]~[#1]',
bonders=(1, ),
deleters=(2, ),
),
stk.SmartsFunctionalGroupFactory(
smarts='[#6]~[#8X1]',
bonders=(1, ),
deleters=(),
),
]
)
mcomplex = stk.ConstructedMolecule(
stk.metal_complex.Paddlewheel(
metals=rh_atom,
ligands=bi_1,
reaction_factory=stk.DativeReactionFactory(
stk.GenericReactionFactory(
bond_orders={
frozenset({
stk.GenericFunctionalGroup,
stk.SingleAtom,
}): 9,
},
),
),
optimizer=stk.MCHammer(),
)
)
show_stk_mol(mcomplex)
Turn into BB for next reaction.
complex_bb = stk.BuildingBlock.init_from_molecule(mcomplex, (stk.BromoFactory(), ))
Define spacer building block.
bb3 = stk.BuildingBlock(
smiles=(
'C1=CC(=CC(=C1)Br)Br'
),
functional_groups=[stk.BromoFactory()],
)
Build an M12L24  with a spacer.
cage1 = stk.ConstructedMolecule(
stk.cage.M12L24(
building_blocks=(
complex_bb,
bb3,
),
optimizer=stk.MCHammer(),
)
)
show_stk_mol(bb3)
show_stk_mol(cage1)`

Hey Alex,
Thank you! Glad it helped. MCHammer is meant to be a very crude optimisation, but I am glad it gets to the right point. Note that you should encompass the code in ``` to properly show your code blocks in comments.
Are you happy for us to close this issue? @lukasturcani
Additionally, on the main page is a link to a discord, where you can chat to us further as you use stk in your research - we can help you get it going for sure!

I forgot to mention, if the structure with the appropriate chemistry (C=O(O) instead of CO(O)) is less close to the crystal structure, I would suggest looking into further optimisation with gfn xtb (https://xtb-docs.readthedocs.io/en/latest/contents.html) which is quite good for these structures and is accessible with our package stko (https://github.com/JelfsMaterialsGroup/stko) once you have downloaded the xtb binary.

Is not GULP more adapted as the cage contain a metal?

GULP and xTB can handle metals. I suggest xTB first because it is a better method for a similar cost. However, it may fail when atoms are initially in high energy states because it does not have the bonding information. Therefore, it may be best to use gulp first, then use xtb. It really depends on what the structure is to be used for, but the following sequence has worked for me in the past:

MCHammer/Collapser
UFF/Gulp with conjugate_gradient=True
UFF/Gulp with conjugate_gradient=False
UFF/Gulp Molecular dynamics at high T
optimisation with xTB

All of the above can be done in stko but is quite costly. You might want to just do steps 1, 2 and 5.

Also moving this into discussions.


Fixing warnings related to creation of dictionaries

I picked this up again to write tests for the long pending vcr inclusion and unsurprisingly realized I was many-a-commit behind. Fixing warnings here for a start.
[Addendum]: Fixed the test case as well by switching the order of the keys. The response appears to be sorted in an alphabetically descending order by default for some strange reason.

All the vcr related stuff was removed a while back in this PR
https://github.com/bulkan/robotframework-requests/pull/47

Apologies for the delay with that pull request. There were a lot of things that changed for me on a personal level. I started off with a re-base again, and these tests appeared to be failing. I'll start making vcr related changes again, add some test cases and submit another pull request for that.

Just to be clear, this pull request is to fix the one test case that is failing (and also fix warnings around the creation of dictionaries). This has nothing to do with VCRPy.