motors API: speed_pct vs speed_dps vs speed_rps

While working on #353 #360 one thing we did not address was the API for specifying the motor speed in something other than speed_pct.  The other two we want are degrees per second and rotations per second.
Some ideas that were floated:
Option 1
How about we make the default units % just like EV3-G, plus introduce scaling factor constants for those who want scientific units.
# run the motor at 50% of max speed
m.run(50)
# run the motor at 400 degrees/second
m.run(400 * m.DPS)
# run the motor at 60 RPM
m.run(60 * m.RPM)

Option 2
why not m.run(speed_pct=50), m.run(dps=400), and m.run(rpm=60)? If we define run as
def run(self, speed_pct=None, dps=None, rpm=None)

We have other parameters that need to be passed in though (speed) so basically everything becomes a positional arg. So the user would do one of
m.on_for_degrees(speed_pct=40, degrees=720)
m.on_for_degrees(speed_dps=90, degrees=720)
m.on_for_degrees(speed_rps=0.25, degrees=720)

Option 3
(copied from https://github.com/rhempel/ev3dev-lang-python/pull/360#issuecomment-331421475)
Introduce proxy properties for various units. For example, we could have
@property
def degrees_sp(self):
    return self.position_sp * self.POS2DEG_FACTOR
@degrees_sp.setter
def degrees_sp(self, value):
    self.position_sp = value * self.DEG2POS_FACTOR

and then same thing for rotations_sp, power_sp (percentage of max_speed_sp), etc.

@ddemidov can you give an example m.on_for_degrees(...) call with option 3?

I would just call our existing m.run_to_rel_position(degrees_sp=360).

How would it be used for m.on_for_degrees(...) though?

I think m.run_to_rel_position(degrees_sp=360) is exactly m.on_for_degrees(360), no?

Say I'm a user and I want to rotate a motor for 720 degrees at 360 degrees per second, I'm asking how does that happen with option 3 via a call to m.on_for_degrees().  Today if you call m.on_for_degrees(360) it is going to assert because 360 is speed_pct and it is greater than 100.

m.run_to_rel_position(degrees_sp=720, dps_sp=360) should do it, where dps_sp is another proxy property, but for speed_sp.  We can rename (or create an alias) the method to on_for_degrees (I would prefer even simpler and generic on_for though: it would take kwargs dict and it would be useable with degrees_sp or seconds_sp or what not).

Ignore run_to_rel_position, that is what is happening behind the scenes :)  So you would have m.on_for_degrees(dps_sp=360, degrees=720)?  If so that looks the same as option 2

Yes, it looks very much like option 2, but the implementation should is easier. Instead of
def on_for_degrees(self, degrees=None, dps=None, speed=None, power=None):
  if dps is not None:
    self.speed_sp = dps * dps2speed
  elif power is not None:
    self.speed_sp = dps * power2speed
  self.position_sp = degrees * deg2pos
  self.run_to_rel_position()

we can do
def on_for_degrees(self, degrees=None, **kwargs):
  for key,val in kwargs:
    setattr(self, key, val)
  self.position_sp = degrees * deg2pos
  self.run_to_rel_position()

or even
def on_for(self, **kwargs):
  for key,val in kwargs:
    setattr(self, key, val)
  if degrees_sp in kwargs: # this is tricky, need to check for other positional units...
    self.run_to_rel_position()
  elif time_sp in kwargs:
    self.run_timed()
  ...

We can come up with a name more generic than on_for_degrees that would mean 'turn for some rotations units'. rotate_for? Then we can do rotate_for(degrees_sp=720, dps_sp=360), or rotate_for(turns_sp=2, rpm_sp=1), and it would mean the same thing.

To me using kwargs makes the API much less readable/obvious if you are a new user looking at this for the first time...and that is really who we are trying to target here.  Today you can look at the EV3-G motor block and look at def on_for_degrees(self, speed_pct, degrees, brake=True, block=True): and connect the dots pretty quickly on how they are equivalent.  If we use kwargs we lose that.

We can put positional arguments into the documentation, but implement it with keyword args.

That doesn't solve the problem of having readable/obvious code though :)

Well, for me the code with kwargs is more readable because it is more concise, and the resulting API is better because it gives you more freedom: you can use whatever meaningful combination of attributes you need, and you are not constrained by the set of positional arguments a developer thought would be enough.

it gives you more freedom: you can use whatever meaningful combination of attributes you need, and you are not constrained by the set of positional arguments a developer thought would be enough
Agreed but we already have that with the current run_XYZ API, that isn't the problem we are trying to solve.  To me we don't want crazy amounts of freedom, we want a nice clean/obvious 1:1 mapping with the EV3-G motor blocks.
Just my 2c though...lets see what the others think since you and I are just going back and forth on this.

we already have that with the current run_XYZ API

That is a good point. We can add proxy attributes and keep the current interface. And I think that would also let us implement the new 'simpler' API easier.

I've been working on translating an EV3-G program for the last couple days and I am finding that having the API exactly the same as EV3-G is really the most useful thing to do and perhaps more importantly, it is just really fun.
What I mean by exactly is having positional arguments in the same order as the EV3-G software that take the exact same value. I thought I would like to have fancy extra features or tweaking things (like changing names) to make it "better", but I am finding that in practice, they are getting in the way (with the exception of correcting things that are just plain wrong in EV3-G, like using the name speed instead of power). So, I would say put this issue on the back burner and move on to something else. Once we have the basics, we can start using the library and find what we are really missing and add more if needed. By then, we should have a better idea of what feels right instead of just trying to guess like we are now.
Also...
import this

My two cents: in addition to what others have said, I think that we should fully commit to this new API surface if we're going to support it (and I'm pretty darn sure we are). My vote would be to remove the old methods given that the new ones are 1:1 replacements for all the normal use cases (or, if they aren't, add optional arguments to make them so).

My vote would be to remove the old methods

Please lets not do this until we have the new API fully implemented. My feeling is the purpose of the new API is to make translation from EV3-G to our library simple, but not necessary 1:1. When a nicer API is possible, why not use a nicer API?
I am not saying that what I am proposing is nicer, just lets not do this only to have 1:1 mapping with EV3-G. After all, people move to ev3dev because they are not satisfied with EV3-G.

Strongly suggest you implement an EV3G compatible API as a loadable helper module - leave the basic API as is because it's compatible across many scripting languages

I don't think it hurts for us to keep the old API around...it is a little bit more code to maintain but it gives us backward compatibility

Will close this one for now but we may re-open it in a few months when we've had time to finish and work with the EV3-G 1:1 API.

I don't think it hurts for us to keep the old API around...

I do. A user has no way of knowing the difference between run_forever and on, or run_timed and on_for_seconds. With both APIs available, code will be fractured between the two and only be confusing. The two types of methods have entirely different calling patterns and behaviors which isn't clear to any user.
If we are making choices, I'd prefer they are intentional and deliberate so we make sure we don't add to the confusion.

To think of it, how does the user know to look for on_for_seconds as opposed to run_timed? Aren't both of those just arbitrary names we came up for 'green motor block'? If on_for_seconds is somehow canonical, @dlech, are you willing to rename the corresponding action in kernel drivers?
Creating a EV3G compatibility layer in a  separate module sounds like a nice idea. Users can import * from ev3dev.ev3g and have just the ev3-g API available.

Thanks Denis - that's what I was trying to say. We have users that will be a bit annoyed if we change the API again

@dlech, are you willing to rename the corresponding action in kernel drivers?

No. At this point, the only kernel changes I am planning on making are things that make it into the mainline kernel. I would really like to avoid these small breaking changes if at all possible because it breaks all existing ev3dev software.

Creating a EV3G compatibility layer in a separate module sounds like a nice idea. Users can import * from ev3dev.ev3g and have just the ev3-g API available.

This is exactly what I meant in #348. The current ev3dev-lang-python is the "low level" api because it looks and feels like the hardware drivers. You don't want to change it because people are using it. The new "high level" api should look and feel like the EV3-G software. And most importantly, there should be a clear separation between these two.
In fact, this suggestion of an ev3dev.ev3g module fits well with what I have been thinking in regards to micropython. I'll post those thoughts in ev3dev/ev3dev#937 since it is off topic here.


[ADD] Monte-Carlo approximation of the Fisher

Requires time-consuming tests due to verifying the Monte-Carlo approximation. Introduces test and test-light, the former of which is run when PRing into or pushing to master and development. test executes all tests, test-light skips the expensive Monte-Carlo tests (realized with the pytest-optional-tests package).

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

16 of 55 (29.09%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-7.6%) to 83.073%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

curvlinops/fisher.py
13
52
25.0%

Totals

Change from base Build<PHONE_NUMBER>:
-7.6%

Covered Lines:
373

Relevant Lines:
449

💛  - Coveralls


OpenXR interface not initialized

Godot version
4.0.beta4.mono.official [e6751549c]
System information
Fedora Linux 37, Kernel <IP_ADDRESS>.fc35, AMD Radeon RX 5700 XT, SteamVR Valve Index, Vulkan backend, Wayland/X11
Issue description
Headset is connected properly and SteamVR runs other OpenXR applications fine.

OpenXR is enabled

Test code
extends Node3D

var interface : XRInterface

func _ready():
	print(XRServer.get_interfaces())
	interface = XRServer.get_interface(1)
	if interface:
		print("Interface present")
		if interface.is_initialized():
			print("Interface initialized")
		else:
			print("OpenXR not initialised, please check if your headset is connected")
	else:
		print("Invalid interface")

Result
--- Debugging process started ---
Godot Engine v4.0.beta4.mono.official.e6751549c - https://godotengine.org
Vulkan API 1.2.0 - Using Vulkan Device #0: AMD - AMD RADV NAVI10

[{ "id": 0, "name": &"Native mobile" }, { "id": 1, "name": &"OpenXR" }]
Interface present
OpenXR not initialised, please check if your headset is connected
--- Debugging process stopped ---

Debugger error

Bug present on both X11 and Wayland.
Steps to reproduce
Run debug_playground.tscn
Minimal reproduction project
HTDKH.zip

Further investigation has led me to find this is an issue with the flatpak version of steam preventing external openxr applications from using steamvr. I've brought the issue up here with the maintainer of the flatpak and have since switched to the repository version with no issue.


Add deployment errors to services based on k8s events

Changes proposed in this PR

When a service has no running pods and k8s events show an inability to create pods, add a deployment error to the service map.

Why are we making these changes?
Certain k8s events, like FailedCreate, indicate that a pod cannot be created. When no pods are running, this should be reflected as an error that is visible to the user.

Closed in favor of https://github.com/twosigma/waiter/pull/1577


Create CloudAgentInfo in Connecton constructor

Move CloudAgentInfo from connect() to Connection constructor in order to be able to download messages immediately after the struct creation instead after calling connect().
Signed-off-by: Miroslav Kovar<EMAIL_ADDRESS>

Codecov Report

Merging #300 (d920b7c) into master (ec23a53) will decrease coverage by 4.21%.
The diff coverage is 20.00%.

@@            Coverage Diff             @@
##           master     #300      +/-   ##
==========================================
- Coverage   49.73%   45.51%   -4.22%
==========================================
  Files         154      152       -2
  Lines       19502    18647     -855
  Branches     6142     5830     -312
==========================================
- Hits         9699     8488    -1211
- Misses       5044     6085    +1041
+ Partials     4759     4074     -685

Flag
Coverage Δ

integration
?

unittests
45.51% <20.00%> (-0.04%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

libvcx/src/aries/handlers/connection/connection.rs
39.61% <20.00%> (-3.91%)
:arrow_down:

libvcx/src/libindy/utils/pool.rs
14.58% <0.00%> (-52.42%)
:arrow_down:

libvcx/src/libindy/utils/anoncreds.rs
18.04% <0.00%> (-46.61%)
:arrow_down:

libvcx/src/utils/plugins.rs
0.00% <0.00%> (-33.34%)
:arrow_down:

libvcx/src/libindy/utils/ledger.rs
12.00% <0.00%> (-27.24%)
:arrow_down:

libvcx/src/utils/random.rs
75.00% <0.00%> (-25.00%)
:arrow_down:

libvcx/src/utils/devsetup.rs
41.63% <0.00%> (-21.04%)
:arrow_down:

libvcx/src/init.rs
25.80% <0.00%> (-20.97%)
:arrow_down:

libvcx/src/utils/devsetup_agent.rs
0.00% <0.00%> (-20.33%)
:arrow_down:

libvcx/src/libindy/utils/payments.rs
38.88% <0.00%> (-13.20%)
:arrow_down:

... and 28 more

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 ec23a53...d920b7c. Read the comment docs.


Unable to open modpacks?

Hi, I searched all over the web, and I can't seem to find some type of within-2015/2016 answer to my issue. Just a few weeks ago, my launcher and all packs were working perfectly. Now, I can download packs, but when I click play/launch, the bar at the bottom of the launcher loads up, then the launcher closes out and reopens immediately. So in short, no packs will launch.
Sidenote: I have tried reinstalling/updating Java
Also tried deleting TechnicLauncher, restarting computer, then reinstalling launcher
Nothing seems to work.
Thank you so much

This is the Solder Repository and is not an issue tracker for the launcher.
http://www.technicpack.net/help
https://github.com/TechnicPack/TechnicLauncher


adding Gatsby image support

Meant to put a PR on my own fork for this- I'm not sure if it is wanted in this repo. This is intended to allow CMS-uploaded images to use Gatsby's nifty image processing capabilities.

I'll be updating this PR with some cleanup


Crash on latest version (5.90)

5.88 works fine. My guess is that you just dint update the library yet, since it cant find a certain method. Will try again with newest version soon.
crash-2017-03-21_18.33.30-client.txt

This crash is with 5.89. Please use 5.90. The bug is fixed there

I am getting this error on 5.90 - http://pastebin.com/raw/WjdH1WAb. Haven't verified if it happens on the client, but it is crashing my dedicated server.


tests(api) replace tavern tests with bash

the use of networks: in the -compose.yaml is also a good thing, but i guess could make "manual" tests slightly more difficult. OTOH, the simpler script chain will make it easier to use it properly, if well documented.

It's a little easier to manually test now, as the admin and proxy ports are exposed. Previously, with the networking mode "host", it wasn't possible on Mac, due to how the Docker engine runs in a Linux VM (so "host" means the VM, not the VM's host :)

the use of networks: in the -compose.yaml is also a good thing, but i guess could make "manual" tests slightly more difficult. OTOH, the simpler script chain will make it easier to use it properly, if well documented.

It's a little easier to manually test now, as the admin and proxy ports are exposed. Previously, with the networking mode "host", it wasn't possible on Mac, due to how the Docker engine runs in a Linux VM (so "host" means the VM, not the VM's host :)


engine: Add a test for multi-line BuildLogAction

Hello @landism,
Please review the following commits I made in branch nicks/prefix:
2e0743bb7c2c103634662788593b6b979e1646ea (2019-07-18 20:50:42 -0400)
engine: Add a test for multi-line BuildLogAction

this test is expected to fail, but should pass after https://github.com/windmilleng/tilt/pull/1878 is merged


 IF YOU DO NOT FOLLOW THE FORMAT OR MAKE A GENERIC TOKEN REQUEST YOUR ISSUE WILL BE DELETED WITHOUT COMMENT
YOUR JUSTLIST MUST FOLLOW THE JSON SPECIFICATION
https://github.com/justswaporg/justlists/blob/main/example.justlists.ts
Checklist

[x] I understand that this is not the place to request a token listing.
[x] I have tested that my JustList is compatible by pasting the URL into the add a list UI at justswap.org.
[x] I understand that filing an issue or adding liquidity does not guarantee addition to the justlists website.

Please provide the following information for your token.
JustList URL must be HTTPS.
JustList URL:
JustList Name:
Link to the official homepage of the JustList manager:

I was forget my wallet passowrd

Hello @Mohamedrazmi
It sounds like your query would be best dealt with by the support team.
I'll have to refer you to the official support live chat with the ticket ID WAL07638
Please see the link below to our dedicated support line:
Wallet Network DApps Support Ticket Requests.
Click on the live chat icon at the bottom corner of the page to initiate chat with a live support agent.


Add missing changelog entry

This commit was added in 0.4.17 and is missing in master

bors r+

bors r+


Update dirty before callbacks

ActiveRecord updates its changes/previous_changes before
after_create/after_update callbacks
However, MongoMapper does that after the callbacks, therefore the
changes/previous_changes values don't match with equivalent code in
ActiveRecord.

Comparisons
ActiveRecord:
require 'bundler/inline'
gemfile do
  source 'https://rubygems.org'
  gem 'activerecord'
  gem 'sqlite3'
end
require 'active_record'

ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Base.logger = Logger.new(File::NULL)

ActiveRecord::Schema.define do
  create_table :docs, force: true do |t|
    t.text :x
  end
end

class Doc < ActiveRecord::Base
  after_save do
    p changes #=>          {}
    p previous_changes #=> {"id"=>[nil, 1], "x"=>[nil, "hello"]} at create
                       #=> {"x"=>["hello", "world"]} at save!
  end

  after_create do
    p changes #=>          {}
    p previous_changes #=> {"id"=>[nil, 1], "x"=>[nil, "hello"]}
  end

  after_update do
    p changes #=>          {}
    p previous_changes #=> {"x"=>["hello", "world"]}
  end
end

d = Doc.create(x: 'hello')
d.x = 'world'
d.save!

MongoMapper:
document = Doc {
  key :x, String

  after_save do
    p changes #=>          {}
    p previous_changes #=> {"id"=>[nil, 1], "x"=>[nil, "hello"]} at create
                       #=> {"x"=>["hello", "world"]} at save!
  end
  after_create {
    p changes #=>          {"x"=>[nil, "hello"]}
    p previous_changes #=> {}
  }
  after_update {
    p changes #=>          {"x"=>["hello", "world"]}
    p previous_changes #=> {"x"=>[nil, "hello"]}
  }
}

d = document.create(x: 'hello')
d.x = 'world'
d.save!

MongoMapper with this changeset:
document = Doc {
  key :x, String

  after_save {
    p changes #=>          {}
    p previous_changes #=> {"x"=>[nil, "hello"]} at create
                       #=> {"x"=>["hello", "world"]} at save
  }
  after_create {
    p changes #=>          {}
    p previous_changes #=> {"x"=>[nil, "hello"]}
  }
  after_update {
    p changes #=>          {}
    p previous_changes #=> {"x"=>["hello", "world"]}
  }
}

d = document.new(x: 'hello')
d.save
d.x = 'world'
d.save!

The only difference between the new behaviour and ActiveRecord is to show id in previous_changes or not. Since the behaviour for IDs are already different between MongoMapper and ActiveRecord, I kept it as is, but if it makes more sense I'm also happy to work on adding _id into the previous_changes.

Need to review / think more about the implementation but like the idea overall.  This is great!
I think this will have to be a major version release since it's a major change in how the software works.  So just heads up it might be a little bit before this is released.
FYI, this is how AR used to work so MM was just copying ActiveRecord from back then.  But agreed it should work the same way to abide by the principle of least surprise.

For my own reference (as I'm in the middle of upgrading a rails app) - I ran into this:
https://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Dirty.html#method-i-saved_change_to_attribute
and the error that rails 5.1 generates:
DEPRECATION WARNING: The behavior of attribute_changed?inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method aftersave returned (e.g. the opposite of what it returns now).

Hmm, I believe this is not a breaking change but rather a bugfix, since the behaviour with after_save has already been same to ActiveRecord, and that's causing an inconsistent changes between after_save and after_update.
Doc.create(x: 'hello').changes:

ActiveRecord
MongoMapper
MongoMapper with this changeset

after_save
{}
{}
{}

after_create
{}
{"x"=>[nil, "hello"]}
{}

d.x = 'world'; d.changes:

ActiveRecord
MongoMapper
MongoMapper with this changeset

after_save
{}
{}
{}

after_update
{}
{"x"=>["hello", "world"]}
{}

^ See these examples; I would consider changes at these after callbacks to be always empty when they succeeded.
Sorry, the original issue description I posted has been kinda misleading. I updated the comparison codes in the description now too.

I added ad9e8196d125d243ffe1351ed135b869417ba3df to cover the after_save in the test too.
While adding after_save test, since after_save callback is called twice in the test, I tweaked the test code structure to assert using a strategy to use "history" var like existing callback test :)

Please let me know if I need further descriptions or changes for this; I'm more than happy to work on them.

Thanks @ujihisa.  Yeah, I need to look at the pending patches!  Will do soon.

JFYI, this PR will fix https://github.com/mongomapper/mongomapper/pull/673.
Thanks!

@ujihisa So FYI I do want to get this in, but first would like to release a point version with pending changes.
Then I'm also reworking a lot of the proxy code.  It's sort of a cleanup project but I'd like to get that in before taking this on.  This would probably be a minor release version alone.
But just a heads up in still on my radar - just waiting a bit to merge it.  Thanks for your patience.

@ujihisa So FYI I do want to get this in, but first would like to release a point version with pending changes.
Then I'm also reworking a lot of the proxy code.  It's sort of a cleanup project but I'd like to get that in before taking this on.  This would probably be a minor release version alone.
But just a heads up in still on my radar - just waiting a bit to merge it.  Thanks for your patience.

Thanks for the update! Yes, it makes sense to release a minor version first with the changes already in the master branch before this.
However, I still believe this fix should be included not too late, even before the rework, as I mentioned at https://github.com/mongomapper/mongomapper/pull/667#issuecomment-734053058. It's attracting to include proxy code reworks first to clean things up without changing behaviour, but it will also need to take time finding out new bugs before release.

Thanks for the update! Yes, it makes sense to release a minor version first with the changes already in the master branch before this.
However, I still believe this fix should be included not too late, even before the rework, as I mentioned at https://github.com/mongomapper/mongomapper/pull/667#issuecomment-734053058. It's attracting to include proxy code reworks first to clean things up without changing behaviour, but it will also need to take time finding out new bugs before release.

@smtlaissezfaire cc @ujihisa
I think this change should be shipped as bugfix because the behavior for changes already changed since 0.15.
MongoMapper::Version 0.14.0
after_save
{"x"=>[nil, "hello"]}
{}
after_save
{"x"=>["hello", "world"]}
{"x"=>[nil, "hello"]}

MongoMapper::Version 0.15.1
after_save
{}
{"x"=>[nil, "hello"]}
after_save
{}
{"x"=>["hello", "world"]}

 code
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'

  gem 'pry-byebug'
  gem 'activemodel', '<IP_ADDRESS>'

  case ENV['MM_VERSION']
  when '0.15', 'pr-667'
    gem 'mongo_mapper', '0.15.1'
  when '0.14'
    gem 'mongo_mapper', '0.14.0'
    gem 'bson', '1.9.2'
  else
    raise 'MM_VERSION must be 0.14, 0.15 or pr-667'
  end
  gem 'bson_ext'
  gem 'activemodel-serializers-xml'
end

MongoMapper.setup({'development' => {'uri' => 'mongodb://mongo/test'}}, 'development')

if ENV['MM_VERSION'] == 'pr-667'
  module MongoMapper
    module Plugins
      module Dirty
        def create_or_update(*)
          super
        end

        def save_to_collection(*)
          super.tap do
            changes_applied
          end
        end
      end
    end
  end
end

class Doc
  include MongoMapper::Document

  key :x, String

  after_save do
    puts "after_save"
    p changes
    p previous_changes
  end
end

if ENV['MM_VERSION'] == 'pr-667'
  puts "MongoMapper::Version #{MongoMapper::Version} (with pr-667 patch)"
else
  puts "MongoMapper::Version #{MongoMapper::Version}"
end

d = Doc.create(x: 'hello')
d.x = 'world'
d.save!

@smtlaissezfaire cc @ujihisa
I think this change should be shipped as bugfix because the behavior for changes already changed since 0.15.
MongoMapper::Version 0.14.0
after_save
{"x"=>[nil, "hello"]}
{}
after_save
{"x"=>["hello", "world"]}
{"x"=>[nil, "hello"]}

MongoMapper::Version 0.15.1
after_save
{}
{"x"=>[nil, "hello"]}
after_save
{}
{"x"=>["hello", "world"]}

 code
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'

  gem 'pry-byebug'
  gem 'activemodel', '<IP_ADDRESS>'

  case ENV['MM_VERSION']
  when '0.15', 'pr-667'
    gem 'mongo_mapper', '0.15.1'
  when '0.14'
    gem 'mongo_mapper', '0.14.0'
    gem 'bson', '1.9.2'
  else
    raise 'MM_VERSION must be 0.14, 0.15 or pr-667'
  end
  gem 'bson_ext'
  gem 'activemodel-serializers-xml'
end

MongoMapper.setup({'development' => {'uri' => 'mongodb://mongo/test'}}, 'development')

if ENV['MM_VERSION'] == 'pr-667'
  module MongoMapper
    module Plugins
      module Dirty
        def create_or_update(*)
          super
        end

        def save_to_collection(*)
          super.tap do
            changes_applied
          end
        end
      end
    end
  end
end

class Doc
  include MongoMapper::Document

  key :x, String

  after_save do
    puts "after_save"
    p changes
    p previous_changes
  end
end

if ENV['MM_VERSION'] == 'pr-667'
  puts "MongoMapper::Version #{MongoMapper::Version} (with pr-667 patch)"
else
  puts "MongoMapper::Version #{MongoMapper::Version}"
end

d = Doc.create(x: 'hello')
d.x = 'world'
d.save!

Ah!  Didn't understand all the context.
Merging now + will release a new point version.

Ah!  Didn't understand all the context.
Merging now + will release a new point version.

Thank you! :+1::tada::+1:

Thank you! :+1::tada::+1:


feat(hooks): add async hook

Codecov Report

:exclamation: No coverage uploaded for pull request base (dev@721dfff). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             dev      #10   +/-   ##
======================================
  Coverage       ?   99.35%
======================================
  Files          ?       16
  Lines          ?      155
  Branches       ?       25
======================================
  Hits           ?      154
  Misses         ?        1
  Partials       ?        0

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 721dfff...5ddf1dd. Read the comment docs.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

@all-contributors please add @Pochodaydayup for bug
@all-contributors please add @lianghx-319 for code, doc

@all-contributors please add @lianghx-319 for code and doc


Add statsd-client definitions and tests.

The only functionality missing from the typing for now is the Express helper.

@peterkooijmans Thanks mate!


Got error while running the training script for SED

Hello, I got the following error while trying to train the model by running 'train_sed.py'.
Epoch 0:   0%|                                                                                | 0/229 [00:00<?, ?it/s]/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torch/functional.py:515: UserWarning: stft will require the return_complex parameter be explicitly  specified in a future PyTorch release. Use return_complex=False  to preserve the current behavior or return_complex=True to return  a complex output. (Triggered internally at  /opt/conda/conda-bld/pytorch_1603729009598/work/aten/src/ATen/native/SpectralOps.cpp:653.)
return _VF.stft(input, n_fft, hop_length, win_length, window,  # type: ignore
/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torch/functional.py:515: UserWarning: The function torch.rfft is deprecated and will be removed in a future PyTorch release. Use the new torch.fft module functions, instead, by importing torch.fft and calling torch.fft.fft or torch.fft.rfft. (Triggered internally at  /opt/conda/conda-bld/pytorch_1603729009598/work/aten/src/ATen/native/SpectralOps.cpp:590.)
return _VF.stft(input, n_fft, hop_length, win_length, window,  # type: ignore
Epoch 0:  97%|▉| 222/229 [01:24<00:02,  2.62it/s, loss=1.21, v_num=3, train/step=117.0, train/student/tot_self_loss=3.47e-5, train/student/tot_supervised=0Traceback (most recent call last):██████████████████████████████████████████████████████████████████████████████████▍      | 104/111 [00:18<00:01,  5.92it/s]
File "train_sed.py", line 295, in
single_run(
File "train_sed.py", line 244, in single_run
trainer.fit(desed_training)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 458, in fit
self._run(model)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 756, in _run
self.dispatch()
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 797, in dispatch
self.accelerator.start_training(self)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 96, in start_training
self.training_type_plugin.start_training(trainer)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 144, in start_training
self._results = trainer.run_stage()
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 807, in run_stage
return self.run_train()
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 869, in run_train
self.train_loop.run_training_epoch()
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/training_loop.py", line 576, in run_training_epoch
self.trainer.run_evaluation(on_epoch=True)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 962, in run_evaluation
output = self.evaluation_loop.evaluation_step(batch, batch_idx, dataloader_idx)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/trainer/evaluation_loop.py", line 174, in evaluation_step
output = self.trainer.accelerator.validation_step(args)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 226, in validation_step
return self.training_type_plugin.validation_step(*args)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 161, in validation_step
return self.lightning_module.validation_step(*args, **kwargs)
File "/home/SharedData/Suhasinee/DESED_task-master/recipes/dcase2021_task4_baseline/local/sed_trainer.py", line 371, in validation_step
self.get_weak_student_f1_seg_macro(
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torchmetrics/metric.py", line 168, in forward
self.update(*args, **kwargs)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torchmetrics/metric.py", line 216, in wrapped_func
return update(*args, **kwargs)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torchmetrics/classification/stat_scores.py", line 207, in update
tp, fp, tn, fn = _stat_scores_update(
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torchmetrics/functional/classification/stat_scores.py", line 90, in _stat_scores_update
preds, target, _ = _input_format_classification(
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torchmetrics/utilities/checks.py", line 418, in _input_format_classification
case = _check_classification_inputs(
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torchmetrics/utilities/checks.py", line 268, in _check_classification_inputs
_basic_input_validation(preds, target, threshold, multiclass)
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/torchmetrics/utilities/checks.py", line 36, in _basic_input_validation
raise ValueError("The target has to be an integer tensor.")
ValueError: The target has to be an integer tensor.
Exception ignored in: <function tqdm.del at 0x7f85288df160>
Traceback (most recent call last):
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/tqdm/std.py", line 1145, in del
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/tqdm/std.py", line 1299, in close
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/tqdm/std.py", line 1492, in display
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/tqdm/std.py", line 1148, in str
File "/nfs4/suhasinee/miniconda3/envs/dcase2021/lib/python3.8/site-packages/tqdm/std.py", line 1450, in format_dict
TypeError: cannot unpack non-iterable NoneType object
Please suggest on how to fix this issue.

In the python script 'sed_trainer.py' in the local folder, in line 247 'labels_weak' have been converted to float datatype which throws an error in line 375
self.get_weak_student_f1_seg_macro( weak_preds_student[mask_weak], labels_weak)
ValueError: The target has to be an integer tensor.
So I simply changed the datatype of 'labels_weak' back to int in line 375 and 378 by doing labels_weak.int() and that got me rid of the error.


chore: bdd-spring-1580868527 to 0.0.1

chore: Promote bdd-spring-1580868527 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


dexie seems to be published as an ES6 module on NPM

<EMAIL_ADDRESS>export * from<EMAIL_ADDRESS>export {default} from<EMAIL_ADDRESS>
Was this your intent? I'm relatively new to NPM but most (all?) seem to be ES5.

This is the result of my trying to bundle it for a browser. I'm no expert, but should it be detected as a "global module?"

Yeah, there it is in your package.json:
"jspm": {
    "main": "dist/dexie.es6.js",
    "format": "esm"
  },

I would not expect an ES6 module here. This really should be ES5, no?

I'm also new to jspm, but I've tested successfully to jspm install dexie latest version (1.3.3).
jspm should handle ES6 modules. That's why I point out the es6 module and format "esm" which is JSPM's alias of ES6.
There was a jspm bug in 1.3.2. Check your package.json's jspm-dependencis so that it is not tied to an old version.
//package.json:
  ...
  "jspm": {
    "dependencies": {
      "dexie"<EMAIL_ADDRESS>    },

Yes, JSPM can handle es6 modules if you configure a transpiler, but I don't use one. This isn't really a question about JSPM though. It's more about conventions for packages placed on npmjs.org. Out of the hundreds and hundreds of packages I'm using directly (top level) and indirectly (dependencies), yours is the only one written in ES6. Do I really have to turn activate the transpiler just for yours? :)
I guess the real question is this: Isn't the convention to publish ES5 on npmjs? Your development cycle can include ES6/ES5 transpilation, but why enforce your choice on everyone else?

Aha, thanks much for the explanation! Then I suppose I should delete the jspm element in package config, and jspm should pick the main element - the es5 module and not try to confuse jspm.
Thanks a lot for liking my work :)
Cheers!

Just to reassure myself, I did some research and the general consensus is that people still publish as ES5... it'll be a while yet. Here's a good article how to help set up your workflow to write in ES6 and publish in ES5
https://booker.codes/how-to-build-and-publish-es6-npm-modules-today-with-babel/

I'm about to dive head-first into Dexie.Syncable ... wish me luck! First step is to port your node server to c# -- I'll submit a pull request to you when I get it working if you'd like to integrate it into your samples.

Please do, it would be much apprecieated. If it would target a real database that would be even greater. I myself am depending on Dexie.Syncable for my app and I have a backend with lots of legacy code and dependencies to my app - that's why I couldnt publish it. However, it actually does its job. I still use ajax sync instead of websocket. My plan is to go over to socket.io or SignalR. If you're on C#, I would recommend SignalR on the server. We used it with success on another project I was on last year. Very easy API.
I'm not so proud of the code structure in Dexie.Observable and Dexie.Syncable so I hope to get time to rewrite them. Dexie.Observable is currently dependent on "onstorage" event for communicating changes between browser windows. The issue with that is that localStorage is not present in Web Workers, so as long as I don't find a fallback for that, the addons cannot be used from a Web Worker.
The principle of Dexie.Observable and Syncable are quite easy. Most of the work is done in Dexie.Observable:

A "changes" table that works as an oplog for the DB.
A "nodes" table where each node represents either a locally connected Dexie instance, or a remote sync server. Each node has a revision number. The revision number is the same as the primary key on the changes table in the point of time that the node was updated. All changes since then is what that node will get on next sync.
An "uncommittedChanges" table that is a temp storage while downloading changes from the server.

However, the code would need to be restructured and hopefully possible to simplify a lot.

Hah! I originally was going to use SignalR for the change broadcasting but I was expecting to have to write the framework myself. It was then that I found Dexie and it didn't really enter my head to use SignalR as a transport but if you're saying it is viable, then I may go forward with that. Even writing it out now is helping solidify the thought. It's nice to have SignalR abstract out the transport and then we can just focus on data.
Whatever I learn, I'll do my best to share back this direction and perhaps we may have a chance in the future to work on it together.

I'm having an issue with jspm (and that was why I started adding jspm element to package.json). If I do jspm install<EMAIL_ADDRESS>which was a version before I started adding jspm to package.json, I get:
MultipleErrors: C:/Users/David/AppData/Local/.jspm/packages/npm/dexie@1.3.1/dist/dexie.es6.js:3704:1: Unexpected reserved word export
C:/Users/David/AppData/Local/.jspm/packages/npm/dexie@1.3.1/dist/dexie.es6.js:3704:8: Semi-colon expected
C:/Users/David/AppData/Local/.jspm/packages/npm/dexie@1.3.1/dist/dexie.es6.js:3704:8: Unexpected reserved word default
C:/Users/David/AppData/Local/.jspm/packages/npm/dexie@1.3.1/dist/dexie.es6.js:3704:16: Semi-colon expected

It seems it tries to interpret dexie.es6.js as an ES5 module. These errors are gone in 1.3.3. Tried to laborate with this by using the -o argument:
jspm install npm:dexie -o "{main:'dist/dexie.js', format: 'cjs' }"

...but same result.
Ok, now I got it to install without errors:
jspm install npm:dexie -o "{main:'dist/dexie.js', format: 'cjs', ignore: ['dist/dexie.es6.js'] }"

So I will actually need the jspm element but with just an ignore in it, I suppose.

hmm... but really, should there be es6 code in the package at all? It's my understanding that the es6 stays in github and your npm publish process only publishs es5...

Yes, your help is appreciated. And you may be right. The reason for including es6 is to support a better experience for other people writing es6 code and including dexie. That was one of the main reasons for migrating to ES6 in the first place (#140). They can use rollup to bundle their code and it will understand jsnext:main attribute. But it may be overkill. For jspm at least.

In #140 @wgebczyk suggests "write Dexie in es6 and transpile to es5" hehe ;)

Well it's what rollup suggests, using the jsnext:main property. And rollup is increasing in popularity.

From the rollup README:
"Can I distribute my package as an ES6 module?
If your package.json has a jsnext:main field, ES6-aware tools like Rollup can import the ES6 version of the package instead of the legacy CommonJS or UMD version. You'll be writing your code in a more future-proof way, and helping to bring an end to the dark days of JavaScript package management"
https://www.npmjs.com/package/rollup#can-i-distribute-my-package-as-an-es6-module
https://github.com/rollup/rollup/wiki/jsnext:main

Cool -- that's good to know. So did you publish a fixed version on NPM yet? :)
btw, I have been looking into making Dexie Syncable work over SignalR and https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy  -- what do you think of the idea?

Just published 1.3.4. Actually removed the es6 output from dist and included src instead. Sounds interesting with the EventAggregatorProxy - looking at it briefly seems like something smart when having multiple types of signalr events going on.
Would you be able to verify whether the new package works for you now? I tested to jspm install npm:dexie and it succeeds, but there's still an error file under the package .jspm.errors where it complains about all src and test files because they're in ES6 format.
If the jspm install works for you and you can require dexie, I could close this issue. Otherwise I'll have to update the jspm.ignore attribute. Have "src" there now, but it didn't bite. By labbing with jspm install with the -o flag, it turns out that the only way to get rid of this error file would be to explicitely list all individual files to IGNORE. I would not want to have to maintain that list just to make jspm error file go away, so if it works for you to use dexie the way you want, I will close this issue despite the error file that jspm generates.

Filed an issue for this at jspm https://github.com/jspm/jspm-cli/issues/1624

Ok, ive tried to install dexie via jspm with transpilation off using a simple hello world approach. I could install and run dexie from my app. Closing this issue.

Thank you for your attention and the prompt turnaround! Much appreciated!


[bug] Connection declined when using the wagmi Safe connector

Link to minimal reproducible example
https://github.com/paintoshi/web3modal-next-test
Summary
The safe connector from wagmi/connectors always saying "Connection declined, Connection can be declined if a previous request is still active". Tested on mobile too, served from a validated wallet connect domain and with the Safe mobile app installed, but it says the same thing. I would expect it to use the Safe wallet just as it uses Metamask.

I made a minimal next.js app where you can click connect, then Safe to see the issue. Just have to yarn install and yarn dev to run it.
I also modified your stackblitz demo, using the exact same web3modal/wagmi config and library versions, but getting a different modal, see below. https://stackblitz.com/edit/web3modal-next-template-qwflf1?file=config%2Findex.tsx

I can't see any differences in the code, so I'm not sure why it works differently in stackblitz. But downloading the stackblitz project and running it locally (or on a server) will result in the same problem anyway.
Appreciate any help to track this down.
List of related npm package versions
Node v20.12.2
"next": "14.2.2",
"react": "18.2.0",
"@web3modal/wagmi": "^4.1.11"
"viem": "^2.9.25"
"wagmi": "^2.5.20"

I could not reproduce this issue. please re-open if it remains a problem

@paintoshi , is it resolved? I am facing same issue

Having same error. React, ethers v6, MetaMask.

@Sam-Newman  can we please re-open this?


Registering inline styles in views

Isn't there a Style.Head() function for registering styles in views?
This code works but its a hack.
@using(Script.Head())
{
    <style>
        body {
            background: #379;
        }
    </style>
}

Also this code replicates when the view is called more than once.

Nope, that is the only way, and not a hack. You can also target the Layout.Head zone like this:
Layout.Head.Add(New.YourShape());

Or even:
@using(Capture(Layout.Head)){
<style>
        body {
            background: #379;
        }
    </style>
}

Which is nicer as you don;t have to create a separate shape.


Undefined is not a valid argument for 'in'

Crashlytics log:
Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: undefined is not a valid argument for 'in' (evaluating ''icon'in e')

This error is located at:
    in t
    in RCTView
    in RCTScrollView
    in ScrollView
    in t
    in t
    in RCTView
    in t
    in RCTView
    in t
    in Connect(t)
    in RCTView
    in RCTView
    in RCTView
    in Navigator
    in t
    in Connect(t)
    in t
    in RCTView
    in Unknown
    in AndroidViewPager
    in n
    in n
    in RCTView
    in ScrollableTabView
    in RCTView
    in t
    in Connect(t)
    in RCTView
    in t
    in Connect(t)
    in RCTView
    in RCTView
    in RCTView
    in RCTView
    in Navigator
    in r
    in Connect(r)
    in n
    in r
    in RCTView
    in RCTView
    in t, stack:
c@566:1870
getPlatformIcon@566:1073
value@606:3229
_renderItem@217:4654
value@225:34657
P@41:57552
<unknown>@41:58916
beginWork@41:58927
q@41:88635
ee@41:89236
ne@41:90310
batchedUpdates@41:93177
A@41:3891
batchedUpdates@41:3978
_receiveRootNodeIDEvent@41:68492
receiveEvent@41:68596
value@18:3177
<unknown>@18:911
value@18:2606
value@18:883

Logging submitted with crash reports has lead me to believe this is due to the app returning from the background after being saved to instance state and the view properties not persisting correctly.
Looking into a solution like https://github.com/rt2zz/redux-persist should help.


Request: Dark Mode support of Perfview

I set Windows 10 2004 (19041) to dark mode for Shell+Apps, but Perfview is still white.
Can we get Dark mode support in Perfview?

@MagicAndre1981 this is one of those things that is likely going to be left to those in the community.  If it's something that you're interested in contributing, please let me know.  I'd be interested to understand how much work is involved before the work is done just in case it is too invasive.
For now, I will put this on the backlog so that it is available should someone wish to work on this.

@brianrob I have no idea, as I don't use WPF that much and Perfview is doing things about UI a bit differently compared to normal WPF applications, so I have no idea how large the amount of work would be to support themes.

I have been working on this as part of our Hackathon week, and I am interested in getting it "production ready" and merging it later. Can you assign this to me?

Small sneak peek from WIP

Absolutely, @rzikm.  Thanks for working on this!


Value first pipe

Hi! I'm confused about pipe accepting a value first. Unless I'm missing something, you can't create a point-free (tacit) function.
With a pipe that takes the value last (as in most, if not all implementations), you can do this:
const someFn = pipe(fnA, fnB, fnC)
// later:
someFn(value)

I think this is very clean. With a pipe that takes the value as it's first argument, you always have to "wrap" the composition in a function:
const someFn = (value) => pipe(value, fnA, fnB, fnC)
// later:
someFn(value)

Making a point-free style impossible. Am I missing something?

Unless I'm missing something

no, you’re actually not missing anything :)

I think this is very clean.

I take your point and fully agree this is a very clean solution, but on the other hand most of the time it requires defining types manually, which is not developer-friendly and was much problematic in Ramda (if you use Ramda in TS), and basically I wanted to avoid this, for instance:
type SomeType1 = {
  readonly prop: string
}

const someFn: (arg: SomeType1) => string = createPipe(D.getUnsafe('prop'), S.toUpperCase)

someFn(value)

with the current implementation, you only need to define a type to the provided argument and a result type is correctly inferred:
type SomeType1 = {
  readonly prop: string
}

const someFn = (value: SomeType1) => pipe(value, D.getUnsafe('prop'), S.toUpperCase)

someFn(value)

I consider adding pipe that returns a new function and accepts a single argument but still, due to TS limitations, most of the time developers will have to use it like the following to get types correctly inferred:
const value =  pipe(
  ['hello', 'world'],
  A.map(createPipe(S.remove('o'), S.toUpperCase)),
) // → ['HELL', 'WRLD']

Thanks for explaining. I didn't take into account that TS is the limiting factor here. Also, I see that fp-ts' pipe has the same signature, probably for the same reason. However, fp-ts also has the flow util. I haven't used it yet, but maybe they figured out a way to make it infer types without too much hassle.

thanks for sharing the link! ❤ good news, the initial implementation of flow in ts-belt looks really promising, and I think it will be included in the next version

@flauwekeul added and published in v3.6.0 🚀


Make a 0.4.0 PyPI/npm release

There's a fair amount of unreleased content on main. It would be good to get this out there so it can be used with JupyterLab 3.x.

@bollwyvl I sent you an invite to be a maintainer of the PyPI package (I realize I was the only maintainer, not good)

The pypi release is up:

https://pypi.org/project/jupyterlab-robotmode/0.4.0/
And a WIP conda-forge PR:
https://github.com/conda-forge/jupyterlab_robotmode-feedstock/pull/3

I see we haven't been publishing to npm for a while... not a big deal for this release, but perhaps looking forward we will want to resume the practice.


fix(btngroup): remove border-hover and background-active-hover classes

Based on changes made in https://github.com/warp-ds/tokens/pull/56 we can remove respective classes that would apply the removed tokens.

 Warpify ButtonGroup component


[OutlinedSelect] Popover position is different if I add a ListSubheader component with a different size

[X] The issue is present in the latest release.
[X] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
The OutlinedSelect positions the Popover component differently depending on its children. In the example here I have three selects, each of them with a different ListSubheader or not ListSubheader
The first has no ListSubheader and positions the Popover right below the border of the OutlinedInput

The second has a ListSubheader with no styles applied and it positions the Popover right above the OutlintedInput

The third has has a LIstSubheader with lineHeight: 1.5 and positions the Popover below the border

Expected Behavior 🤔
I believe that in every case it positions the Popover the same way independent of its children)
Steps to Reproduce 🕹

Steps:

https://codesandbox.io/s/fast-wind-mzrxk?file=/src/Selects.js
See the examples and the code

Context 🔦

Your Environment 🌎

Tech
Version

Material-UI
v4.11.0

React
16.13.1

Browser
Google Chrome  85.0.4183.83

TypeScript
-

etc.
-

See https://github.com/mui-org/material-ui/issues/18493#issuecomment-557793616 for more details.


Error while signing data with privateKey: error:06000066:public key routines:OPENSSL_internal:DECODE_ERROR

Version: 1.0.71
Platform: win32 10.0.17134
Plugins: none
After updating to 1.0.71 from 1.0.69 I got this error for the connections that I've used few minutes ago on older version.

Same issue here as well.
Worked great in 1.0.69 upgraded to 1.0.71 version, and now gets the error.
Windows 7, 64bit

Just experienced the same issue on 1.0.71, Windows 10 64bit

I also experience this issue.

@Eugeny any idea?

Load the key to puttygen then export it as an OpenSSH key

Load the key to puttygen then export it as an OpenSSH key

it works!!

I have reinstalled Windows recently and I don't have this error anymore.
For others this is how you can use Windows built in ssh agent.

When following next steps from the link make sure that you name your key id_rsa instead of id_dsa.
https://stackoverflow.com/questions/2224066/how-to-convert-ssh-keypairs-generated-using-puttygen-windows-into-key-pairs-us/2224204#2224204

Go to services (Windows key and search for "Services")

find OpenSSH thing (just type to search)
and make that service to start automatically, click Apply and click Start

work as a fuc***** tnk u

Worked as a charm, exporting it as an openssh key id_rsa
Thank you so much!


Trying to load model weights saved by ModelCheckpoint throws: Unable to open file (unable to lock file, errno = 35, error message = 'Resource temporarily unavailable')

Hi all,
I'm new to keras and was playing around with some example I found on kaggle: https://www.kaggle.com/fizzbuzz/beginner-s-guide-to-audio-data
I got to the point, where I get to run the model training, but for some reason it throws this error:
OSError: Unable to open file (unable to lock file, errno = 35, error message = 'Resource temporarily unavailable') when trying to call model.load_weights().
Here's the code:
PREDICTION_FOLDER = "predictions_1d_conv"
if not os.path.exists(PREDICTION_FOLDER):
    os.mkdir(PREDICTION_FOLDER)
if os.path.exists('logs/' + PREDICTION_FOLDER):
    shutil.rmtree('logs/' + PREDICTION_FOLDER)

skf = StratifiedKFold(n_splits=config.n_folds)

for i, (train_split, val_split) in enumerate(skf.split(np.zeros(train.label_idx.shape[0]), train.label_idx)):
    train_set = train.iloc[train_split]
    val_set = train.iloc[val_split]
    ##################################
    #This seems to create a file without a problem
    checkpoint = ModelCheckpoint('best_%d.h5'%i, monitor='val_loss', verbose=1, save_best_only=True)
    ##################################
    early = EarlyStopping(monitor="val_loss", mode="min", patience=5)
    tb = TensorBoard(log_dir='./logs/' + PREDICTION_FOLDER + '/fold_%d'%i, write_graph=True)

    callbacks_list = [checkpoint, early, tb]
    print("Fold: ", i)
    print("#"*50)
    if COMPLETE_RUN:
        model = get_1d_conv_model(config)
    else:
        model = get_1d_dummy_model(config)

    train_generator = DataGenerator(config, './free-sound-challange/audio_train/', train_set.index,
                                    train_set.label_idx, batch_size=64,
                                    preprocessing_fn=audio_norm)
    val_generator = DataGenerator(config, './free-sound-challange/audio_train/', val_set.index,
                                  val_set.label_idx, batch_size=64,
                                  preprocessing_fn=audio_norm)

    history = model.fit_generator(train_generator, callbacks=callbacks_list, validation_data=val_generator,
                                  epochs=config.max_epochs, use_multiprocessing=True, workers=6, max_queue_size=20)
    ##################################
    #But then this can't read the same file that was just written
    model.load_weights('best_%d.h5'%i)
    ##################################

    # Save train predictions
    train_generator = DataGenerator(config, './free-sound-challange/audio_train/', train.index, batch_size=128,
                                    preprocessing_fn=audio_norm)
    predictions = model.predict_generator(train_generator, use_multiprocessing=True,
                                          workers=6, max_queue_size=20, verbose=1)
    np.save(PREDICTION_FOLDER + "/train_predictions_%d.npy"%i, predictions)

    # Save test predictions
    test_generator = DataGenerator(config, './free-sound-challange/audio_test/', test.index, batch_size=128,
                                    preprocessing_fn=audio_norm)
    predictions = model.predict_generator(test_generator, use_multiprocessing=True,
                                          workers=6, max_queue_size=20, verbose=1)
    np.save(PREDICTION_FOLDER + "/test_predictions_%d.npy"%i, predictions)

    # Make a submission file
    top_3 = np.array(LABELS)[np.argsort(-predictions, axis=1)[:, :3]]
    predicted_labels = [' '.join(list(x)) for x in top_3]
    test['label'] = predicted_labels
    test[['label']].to_csv(PREDICTION_FOLDER + "/predictions_%d.csv"%i)

Here's console output:
Fold:  0
##################################################
Epoch 1/1
15/16 [===========================>..] - ETA: 2s - loss: 3.7218 - acc: 0.0347Epoch 1/1
16/16 [==============================] - 35s 2s/step - loss: 3.7217 - acc: 0.0324 - val_loss: 3.7204 - val_acc: 0.0317

Epoch 00001: val_loss improved from inf to 3.72044, saving model to best_0.h5
Epoch 1/1
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-22-07b1fbdc3cc4> in <module>()
     31                                   epochs=config.max_epochs, use_multiprocessing=True, workers=6, max_queue_size=20)
     32
---> 33     model.load_weights('best_%d.h5'%i)
     34
     35     # Save train predictions

/anaconda3/lib/python3.6/site-packages/keras/engine/network.py in load_weights(self, filepath, by_name, skip_mismatch, reshape)
   1155         if h5py is None:
   1156             raise ImportError('`load_weights` requires h5py.')
-> 1157         with h5py.File(filepath, mode='r') as f:
   1158             if 'layer_names' not in f.attrs and 'model_weights' in f:
   1159                 f = f['model_weights']

/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py in __init__(self, name, mode, driver, libver, userblock_size, swmr, **kwds)
    310             with phil:
    311                 fapl = make_fapl(driver, libver, **kwds)
--> 312                 fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
    313
    314                 if swmr_support:

/anaconda3/lib/python3.6/site-packages/h5py/_hl/files.py in make_fid(name, mode, userblock_size, fapl, fcpl, swmr)
    140         if swmr and swmr_support:
    141             flags |= h5f.ACC_SWMR_READ
--> 142         fid = h5f.open(name, flags, fapl=fapl)
    143     elif mode == 'r+':
    144         fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/h5f.pyx in h5py.h5f.open()

OSError: Unable to open file (unable to lock file, errno = 35, error message = 'Resource temporarily unavailable')

Briefly, this code is writing model weights into a file via ModelCheckpoint and then reads it within the same iteration, which... should be fine. But, from what I speculate, once ModelCheckpoint opens a file to write in it, that file never gets released (or closed), so  model.load_weights() fails.
I looked up the code for both ModelCheckpoint and file saving and didn't find anything indicating this is expected behaviour.
Any help with resolving this is appreciated!
P.S. I'm new to all the machine learning stuff, so if you need some more logs or any extra info, please let me know how I could get it for you.

Have you tried using the keyword 'save_weights_only=True' in ModelCheckpoint, else it just saves the hdf5 file, which contains the full trained model, not the weights.

@rohithex  The issue persists even with setting 'save_weights_only=True' in ModelCheckpoint.
@MaximusWhite  It works when 'use_multiprocessing' is set to 'False'.
There is already an issue for this (https://github.com/keras-team/keras/issues/11101). Some workarounds are mentioned on that thread.


feat(rule): add blaze-consistent-eventmap-parameters

Add rule that enforces consistent event handler parameters.
closes #12

Closed through be73ffa031a9d7542d2e33dc658483dd50e49e54.


Added send message on Enter press functionality #16

Great work! Feature works as intended, good job.


Implement synchronized subscription

https://pycyphal.readthedocs.io/en/stable/api/pycyphal.presentation.subscription_synchronizer.monotonic_clustering.html

Do we support an arbitrary amount of synchronized subjects? @pavel-kirienko


[Help]

I am running python 3.6 in ubuntu and I am new to python so please be nice.
basically I want to buy when the 5 day moving average crosses the 10 day moving average AND the 10 day is above the 20 day.
    dataframe.loc[
        (
            (dataframe['sma5'] qtpylib.crossed_above (dataframe['sma10'])) &
            (dataframe['sma10'] > dataframe['sma20'])

        )
        'buy'] = 1

    return dataframe

#I know that my code is written wrong and my syntax is wrong so that is why I need help.
#Similarly, for the close I would like to close once price breaks below the 5 day moving average:
dataframe.loc[
(
                (dataframe['close'] crossed_below (dataframe['sma5']))
        ),
        'sell'] = 1
    return dataframe

im all alone... :'(

only die hard fanatics are trying to code trading algos on Christmas!  If I got anything to work it was the MA example...are you not able to get that to work?

I got this figured out but through no help of this forum :(

Ya, there's not much activity on here


Make encoding of params optional

Ziggy version
1.4.2
Laravel version
8.75.0
Description
Hi guys,
In this merge you enabled the encoding of all params and queries by default: https://github.com/tighten/ziggy/issues/118
This poses a problem when using a route parameter where a forward slash is expected. Laravel can handle this as shown here: https://laravel.com/docs/8.x/routing#parameters-encoded-forward-slashes - but ziggy encodes the url before hand.
Actual result:

example.com/mens%2Fblazers

Expected Result:

example.com/mens/blazers

Would be great to be able to toggle this behaviour in Ziggy config, maybe discern between route params and query params and be able to toggle either for flexibility
Ziggy call and context
// How I expected to use Ziggy
const goToCategory = (url) => {
  // url = 'mens/blazers'
  Inertia.visit(route('catalog', { slug: url });
}

// How I am working around the issue currently
const goToCategory = (url) => {
  // url = 'mens/blazers'
  const route = decodeURIComponent(route('catalog', { slug: url })
  Inertia.visit(route);
}

Ziggy configuration
{
  "url": "https://local.test",
  "port": null,
  "defaults": {
      "store": "uk"
  },
  routes: {
    "catalog": {
        "uri": "{store}/{slug}",
        "methods": [
            "GET",
            "HEAD"
        ]
    }
  }
}

Route definition
Route::get('/{slug}', [ContentController::class, 'view'])->where('slug', '.*')->name('catalog');

//n.b. the store parameter is added within the RouteServiceProvider as a prefix.

Thanks for the heads up! I think you're right that this should either be configurable or we should automatically do what Laravel does and not encode it if it's the very last route parameter. I'll look into this.

@just-tom I'm coming back to this while digging into #661 and realizing that example.com/mens%2Fblazers and example.com/mens/blazers are actually functionally identical, and both will work exactly the same way with Laravel. Was your issue here that example.com/mens%2Fblazers didn't work correctly? Or just that you wanted / displayed in the URL instead of %2F?

@bakerkretzmar wohh blast from the past! hey!
Id I remember correctly it was because i wanted to be able to display the / correctly as mens/blazers without seeing the encoding. e.g. if I stored a customer built "mega menu" in a DB somewhere and that was stored with a path like "mens/blazers" the when building a uri for the path it should accommodate it not encode it using a {{slug}} route
Thats from memory what the issue was to begin with but its been a long while haha!


An option to simplify the output a little would be good ...

I think an option that simplified the diagram along the lines of the manually created version would be good.

I think it's a good idea to use colours to avoid repeating edge labels, will keep it in mind for future developments.
In your example diagram this may be difficult, since we can only emit an edge label if the input and output match
(currently we only check for equality after removing any _in or _out suffix.)
It would be quite simple to also remove any initial_ or final_ prefix, which would simplify your diagram by a bit.
I would be happy to accept any PRs for changes related to this.
However, I would recommend to drop the initial_ and final_ from your port specifiers in the yMMSL, since then you would not need to change your conduits when replacing a model.


Feature 13/revproxy

Adds a few Docker service changes

Adds an Nginx rev proxy to serve the web app

includes conf and healthcheck

Adds a "build pipeline" for building the react app
Adds a setup script to MariaDb to configure the db users

Adds some databases and users like so,


Release 0.13.1

High priority fix #1842 is in.

blessing 40bd5c88956fbe7f0d949564bd655710ea9fff72

release underway

Homebrew PR opened: https://github.com/Homebrew/homebrew-core/pull/12765

@stefantalpalaru release underway.

@kamilchm release underway.

Windows, RPM and Debian packages are in bintray.

I'm working on crafting release notes for ponylang.org

release notes are out: https://www.ponylang.org/blog/2017/04/0.13.1-released/
waiting on homebrew and will then announce.

Gentoo ebuild updated.

thanks @stefantalpalaru

homebrew released.


Node-uuid is still a dependency for published package

npm install disturbed produces: npm WARN deprecated<EMAIL_ADDRESS>use uuid module instead
Despite #1 being merged in.
Could it be that updated package wasn't released to npm?

Could be, i will make a new release and be sure it uses the latest uuid.


Headless Chrome -- best way to install?

What's the best/easiest/quickest way to install headless chrome for use with Wallaby? Both on a Mac for development as well as Linux for CI.

For OS X, you can run:
$ brew install chromedriver

This currently installs version 2.32 (2.31+ is required). Then you can either run chromedriver when  needed or have it always start with brew services start chromedriver. As long as you have Chrome 60+ installed, it should "just work".
As for running on Linux, here are the lines we added to our build script to get headless chrome running on Travis: https://github.com/keathley/wallaby/blob/master/.travis.yml#L40-L50.
For the time being, you will still need to have phantomjs installed on your machine as well. This is because wallaby has historically only supported phantomjs and still tries to start a pool of phantomjs processes on boot. I'm working on a fix for that and hope to remove that requirement soon.
Let me know if you have any issues!

@aaronrenner You're a collab on this project?? Nice! Thanks for the help, man, and great to see you last week at ElixirConf.

@jamonholmgren Happy I could help. Feel free to reopen this issue of you have any other questions.

@aaronrenner : nowadays, it seems to be brew cask install chromedriver

@mick352 Thanks posting this! ❤


feat: add snap points relative to content

Please provide enough information so that others can review your pull request:
Motivation
Explain the motivation for making this change. What existing problem does the pull request solve?

Task linked: DEV-49 Support snap point based on content height


Create A_custom_primary_key.md

My motivation for this document: it is important to be able to create a primary key other than id:integer in a variety of situations, especially if Phoenix is being adopted in existing projects or organizations.  I wanted to have all the steps in one place and easily accessible to Phoenix users -- especially new Phoenix users like myself.   Big thanks to Jose Valim and Slack users  @sg, @angeloashmore, @gjaldon for their help and feedback!

 :)


Support license suffixes

[x] I'm sure this issue is not a duplicate.

A lot of Rust projects are dual licensed under MIT and Apache-2.0. One of the most popular ones is probably serde. Projects like these often have two license files named license-mit and license-apache. Would it be possible to add support for these kind of files as well? Maybe matching license-,LICENSE- as well alongside the already existing variations.
Thanks!

Hi @SirWindfield, the problem for us is that we cannot support that kind of matchings due to a limitation in vscode api. We can add, though, some of the most common license file names as alias. That should do the trick. Happy to receive a PR with that change 😜 .


Grammar mistake with "Pick up" and "Pickup"

There is a spelling mistake with pickup:
"Pickup and drop-off dates and times." should read "Pick-up and drop-off dates and times."
"Pick up and drop-off locations." should read "Pick-up and drop-off locations."
kindest regards
Jacques
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 068f5779-7ef3-5967-06ba-cec5972c1a81
Version Independent ID: 598ded85-6c42-b320-98b1-c2b532d923a2
Content: Tutorial: Use serverless SQL pool to analyze Azure Open Datasets in Azure Synapse Studio - Azure Synapse Analytics
Content Source: articles/synapse-analytics/sql/tutorial-data-analyst.md
Service: synapse-analytics
Sub-service: sql
GitHub Login: @azaricstefan
Microsoft Alias: stefanazaric

@JacquesNZGithub Thanks for your contribution, I've addressed this issue in PR: https://github.com/MicrosoftDocs/azure-docs-pr/pull/140537
The changes should be live EOD or tomorrow. In future, if you see any minor bug fixes in the doc, feel free to click on the edit button and submit a PR to update. we love to take community contributions.


Transaction details with multiple assets

Show all the CA amounts in tx details (note different colors for sent and received assets)
The rate to USD/BTC/ETH should be only shown if it's available at the time of transaction
Hint "(calculated with the exchange rate at the time of the transaction)" or "(exchange rate was not available at the time of the transaction)" should be shown below "AnountS" field header only for CA transactions details
add "open in blockchain explorer" icon next to Confidential Asset ID (on the right side of the dialog)
for Kernel ID leave only green icon (external link), remove text "Open in blockchain Explorer"

Design https://zpl.io/VK9NdGR
https://zpl.io/a3PzEXN

wallet.zip
Needed wallet.db for multiple assets transaction.

Please switch places : first come the assets that we receive (with a + sign), then the assets that we send (with a -sign) as in design
Please add  for Kernel ID  green icon (external link)

Please add for Kernel ID green icon (external link)
link visible only for successfully completed transactions

wallet.tar.gz
pass: 1

Please switch places : first come the assets that we receive (with a + sign), then the assets that we send (with a -sign) as in design
Please add  for Kernel ID  green icon (external link)

@AndreyDyakonov, green icon for KernelID is only visible for transactions that have just completed successfully. In your screenshot, you can see that the transaction was not successful.


(ccs) test using kafka for sal on comcam-mcm.tu

Checked in noop mode on all relevant hosts:
auxtel-mcm.tu, comcam-mcm.tu
auxtel-mcm.ls, lsstcam-mcm.ls
auxtel-mcm.cp, auxtel-dc01.cp, comcam-mcm.cp, lsstcam-mcm.cp


Fix parameter tests timeout

Codecov Report

Merging #283 (b4c30db) into galactic (2442f75) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           galactic     #283   +/-   ##
=========================================
  Coverage     62.24%   62.24%
=========================================
  Files            13       13
  Lines          1523     1523
  Branches        446      446
=========================================
  Hits            948      948
  Misses          367      367
  Partials        208      208

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 2442f75...b4c30db. Read the comment docs.

@mergify backport foxy


PD: Labware name in Dispense dropdown should truncate with a "..."

Labware in Dispense dropdown should truncate with a "..." so as to not overlap with the drop down arrow.
Currently, labware name overlaps with the dropdown arrow, and it looks janky.

Moved to AUTH-665


Bifrost - alpha version

Demo app
https://bifrost.stellar.org/

First you need some ETH on Ethereum testnet.
Create an account at https://www.myetherwallet.com/, then switch Network (top-right dropdown) to "Ropsten (MyEtherWallet)". Write down/copy your Ethereum address somewhere.
Use http://faucet.ropsten.be:3001/ to send 3 ETH to your testnet account.
Now open Bifrost demo: https://bifrost.stellar.org/ It will display address where to send your test ETH.
Go back to MyEtherWallet and send ETH to the address displayed by Bifrost. Sometimes Ropsten network is overloaded so monitor the Etherscan if you tx was included in a block. If not, increated gas price (this can be done in "Send Offline" tab).
Switch back to Bifrost demo and check the progress.

Work in progress: do not use in production, do not merge.
This is MVP version of Bifrost [design doc]. Bifrost accepts coins from other blockchains and issues them on Stellar blockchain.
TODO (random order):

[x] Finish README.
[x] Tests.
[x] Find and fix all TODOs.
[ ] ~Recovery mechanism in stellar.AccountConfigurator, continue configuring accounts after crash, power down, etc.~ https://github.com/stellar/go/issues/123
[ ] ~CloudWatch/Loggly driver for logging.~ https://github.com/stellar/go/issues/121
[ ] ~Frontend: Send back unused lumens (10 XLM for ETH trust line)?~ https://github.com/stellar/go/issues/120
[ ] ~Recaptcha in /generate-ethereum-address?~ https://github.com/stellar/go/issues/119
[ ] ~Rate-limit /generate* endpoints.~ https://github.com/stellar/go/issues/119
[ ] ~Embedded service log.~
[x] ~Allow setting Access-Control-Allow-Origin white list.~ https://github.com/stellar/go/issues/124
[x] ~In address association table, mark successful payments to make finding non-empty addresses easier.~ https://github.com/stellar/go/issues/122
[x] ~CLI command to check if master public key derives correct addresses (and if user can derive private keys).~ https://github.com/stellar/go/issues/117
[x] ~Frontend SDK~ https://github.com/stellar/go/issues/120
[x] ~Recovery transactions.~ https://github.com/stellar/go/issues/116
[x] ~Check if horizon connected to correct network.~ https://github.com/stellar/go/issues/118
[x] Use channels in stellar.AccountConfigurator.
[x] README: Another account to update offers (or other account as a signer on that account or channels). Sequence numbers.
[x] Ensure github.com/r3labs/sse package can be used (license).
[x] Create ethereum.Transaction instead of using github.com/ethereum/go-ethereum/core/types.Transaction.
[x] Use signer of issuing account instead of issuing account directly.
[x] Fix glide.yaml.
[x] AmountToBtc, AmountToEth -> AmountToStellar.
[x] Stress tests.
[x] README: "Production checklist" section.
[x] Check if geth version >= 1.7.1 (Byzantium) in ethereum.Listener, add requirement to README.
[x] Bitcoin support.
[x] ~Create trust lines with limit so no more than limit is sent?~
[x] ~Sign responses sent to frontend app?~ Everyone should use SSL so not required.
[x] Check crediting multiple transactions.
[x] Error during bip-32 key derivation - continue to the next index.
[x] Check if ethereum.Listener connected to correct network. (Possible?)
[x] Graceful shutdown.
[x] Webserver logging.
[x] Close SSE stream when no longer needed.
[x] Error/Warning if ethereum.Listener doesn't see new blocks in 3 (?) minutes.
[x] Restart SSE streams after crash, power down, etc.
[x] --debug.

Quick question is setting blocknumber to 0 in BTC/ETH equivalent to setting cursor to "now" in stellar?

Exactly.

I think the code is good for Alpha version for developers and community to test. @nikhilsaraf can you approve?