"using DiffEqPy" stalls sometimes

The main problem is that:

It looks like the test itself choke sometimes randomly.  It happens both locally and in Travis.  It's probably that using DiffEqPy hangs.  When it occurs, sudo strace -p <pid> shows something like
futex(0x7f507c45caa0, FUTEX_WAIT_PRIVATE, 2, NULL

I'm not sure it helps. Does it mean there is a deadlock somewhere in Julia-Python bridge?
--- https://github.com/JuliaDiffEq/diffeqpy/issues/3#issuecomment-384434506

Not sure if it's related (Edit: no it's not https://github.com/JuliaDiffEq/diffeqpy/issues/20#issuecomment-384551364), but:

Locally playing with setup Julia function, it looks like pollings are not triggered during using DiffEqPy. Is it probably due to some non-Julia blocking calls?
--- https://github.com/JuliaDiffEq/diffeqpy/pull/19#issuecomment-384541186

See also #18 where I tried to debug appveyor.yml.

I guess https://github.com/JuliaDiffEq/diffeqpy/pull/19#issuecomment-384541186 mentioned above is not relevant.  It seems that using is always blocking since there is no yield.  I forgot Julia was cooperative multitasking...
For example,
tsk = @schedule @eval using DifferentialEquations
@time timedwait(1.0) do
    print(".")
    istaskdone(tsk)
end

takes more than 1 second.

Example stalls:

https://travis-ci.org/JuliaDiffEq/diffeqpy/jobs/371129824#L975 (in using DiffEqPy)
https://travis-ci.org/JuliaDiffEq/diffeqpy/jobs/371284629#L980 (in py.test)

Let's hope we can find a solution in https://github.com/JuliaPy/PyCall.jl/issues/498


Fixed typos and corrected instructions in sirius-pipeline readme file

Fixed typos and corrected instructions in sirius-pipeline README file

@marian-pritsak @KrisNey-MSFT
Hi Marian, could you please do a quick review and merge.  Thanks!


Request settings periodically

Add a button.request_settings entity. This entity can be called periodically on demand.


VarStore explanations for deltas to F2DOT14 suggest clipping

When applying scaled deltas to an F2DOT14 value, the F2DOT14 value is treated like a 16-bit integer. (In this sense, the delta and the F2DOT14 value can be viewed as integer values in units of 1/16384ths.) If the context in which the F2DOT14 is used constrains the valid range for the default value, then any variations by applying deltas are clipped to that range.

In other parts of the spec the intention is more clearly stated that internal representations should be high enough to handle deltas resulting in effective values that are outside the range of the original data type. In the example of F2DOT14 (for example for angles in COLRv1), I understand from those separate parts of the spec that the deltas should allow moving those to values that are outside the F2DOT14 range.
Here, the text

If the context in which the F2DOT14 is used constrains the valid range for the default value, then any variations by applying deltas are clipped to that range.

may be read as the fact that the F2DOT14 data type is used for COLRv1 angles means constraining its value range to the range of F2DOT14 and values should be clipped to it, after applying the deltas.
I suggest to fix this ambiguity.

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

ID: 8cc38f55-a142-6d66-fc68-1bb6e6e9ed56
Version Independent ID: 0665d6f2-4150-1977-4fd6-91c50c226ed9
Content: OpenType Font Variations Common Table Formats (OpenType 1.9) - Typography
Content Source: typographydocs/opentype/spec/otvarcommonformats.md
Product: typography
GitHub Login: @PeterCon
Microsoft Alias: alib

Some thoughts related to this: For certain variable items, deltas could yield a result < 0 that wouldn't make any sense. E.g., MVAR could for some instances yield OS/2.ySubscriptXSize < 0, or post.underlineThickness < 0.

Further thoughts:
In COLR, VarColorIndex.alpha is F2DOT14 and is variable, but alpha does need to be constrained to [0, 1]. On the other hand, PaintVarSweepGradient.startAngle is also F2DOT14 and variable, but doesn't need to be constrained.
In the case of VarColorIndex.alpha, the text calls out that that value needs to be clamped, but this is not called out in some other cases involving variable alpha.

See the OT 1.9.1 alpha for draft revisions addressing this issue.

This is fixed in OT 1.9.1. See the OT 1.9.1 beta for draft revisions addressing this issue.


BIGTOP-2180: Add smoke-test scripts using gradle for Apache Tajo.

It's a new PR that is separated from BIGTOP-2179.

This seems to be fine. Will commit this to the master in a bit. Thanks!


[WIP}Use AutomationManager in product views

Use AutomationManager in product views

@blomquisg - these files had to be renamed to match the new model.

@miq_bot add_label enhancement


[Quantity Picker] Make QuantityPicker extensible

Duplicates ❌

[X] I have searched the existing issues

Libraries

[X] Vitamin Web UI Kit
[X] Vitamin Android UI Kit
[X] Vitamin iOS UI Kit
[ ] Vitamin Icons
[ ] Vitamin Assets
[ ] Vitamin Core theme (Light mode)
[ ] Vitamin Core theme (Dark mode)
[ ] Vitamin Base colors palette
[ ] Vitamin Extras kit
[ ] Not related to one Figma library

Summary 💡
Actually, QuantityPicker has a fixed size.
But depending on the content we need to make it extensible.
Need Design validation & documentation update before Tech modifications.
Dependencies 📦
No response
Examples 🌈

Motivation 🔦
No response
New 🆕

[ ] Validated in a grooming session

Backlog 📋

[ ] Has a good summary
[ ] Has example link(s)

Design in progress 🏗

[ ] Analysis (functional & technical)
[ ] Design refinement
[ ] Dev qualification (properties, breakpoints, tokens etc.)
[ ] Documentation refinement (inside the Figma branch)

Design review 👀

[ ] Figma branch merged
[ ] Documentation review _(and move the documentation into Vitamin Documentation Figma file)

Contribution done, Documentation to be updated with examples.

Android ✅
Web ✅

the design is under review, awaiting validation before going to documentation


Add myself as a reviewer and approver

Signed-off-by: Stephen Kitt<EMAIL_ADDRESS>

/approve
/lgtm


”Ibănești” is listed in the drop-down menu

Description:
"Ibănești" is listed in the drop-down menu alongside its corresponding county and commune, according to the law.
Precondition:
The website is up an running.

Step 1
Type "Ibănești" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Ibănești, VASLUI".


Unbuffered decoding

Check the last commit.
Sadly this requires the new IO improvements which is messy. I don't really know how we're going to do that.
Also I suspect it can be better but I don't have time to look into it more right now.
@TheBlueMatt

The implementors can use BufRead methods.

I think we should fold the DecodeablExt trait methods into Decodable.
I get that by separating them you can prevent users from overriding them (because the blanket impl would conflict with any specific impls they might create), which is a clever form of sealing I hadn't considered, but I think the cleverness is misplaced.
If we just combined the methods, put a big "do not override this method" warning on the unbuffered stuff you don't want overridden, then for users the difference between BufRead and Read is as simple as choosing consensus_decode over consensus_decode_unbuffered.

I think I'll just change this to remove the special method do the fake buffering and add more methods to Read to deal with maybe-buffered readers.


Graphics API additions in R 4.2

It seems there will be some more APIs.
https://github.com/extendr/libR-sys/pull/83/files#diff-5ef2ffb0c92c21a03a84b0789542aa2a69dd595c3566a897eb0bbf36664cb3ac

Cool. These need to go in on a cfg switch as they are version dependent.
Any volunteers?

Some more additions by https://github.com/extendr/libR-sys/pull/84

I'll address in #366. Sorry for the duplication.


Unable to define constructors on custom classes

Describe the problem
I'm trying to extend the FiniteMachine::Definition class and am unable to define my own constructor (#initialize). The #new method is directly overridden in definition.rb and its superclass in state_machine.rb, which prevents developers from creating their own constructors on classes extending either FiniteMachine::Definition or FiniteMachine.
Steps to reproduce the problem
class StateManager < FiniteMachine::Definition
  attr_accessor :state_attr

  def initialize(*args)
    @state_attr = args[0]
  end
end

# trying to initialize the class above by calling `StateManager.new(:some_attr)` will invoke
# FiniteMachine::Definition's implementation of `#new`, short-circuiting any `initialize` method
# created on the custom class

Actual behaviour
Custom classes are unable to define their own #initialize method (constructor) on classes extending classes from the FiniteMachine gem.
Expected behaviour
Custom classes should be able to define their own #initialize method (constructor) on classes extending classes from the FiniteMachine gem.
Describe your environment

OS version: macOS Big Sur 11.1
Ruby version: 3.0.0p0
FiniteMachine version: 0.14.0

Hi there 👋
Thanks for using finite_machine gem.
This is by design. Similar to FiniteMachine.define, the FiniteMachine::Definition is meant to describe the state machine and nothing else. There is no reason to have initialization with custom state attributes as they wouldn't be a way to use them in state machine definition anyhow. The way I like to think of FiniteMachine::Defintion is a template for creating state machines instances. Each instance can then be targetted by different objects in separate threads etc. So following from this, you would first create your definition:
class CustomMachine < FiniteMachine::Definition
  # express all states and their possible transitions
end

And then integrate it with your code however you like it, for example, this way:
class StateManager
  attr_accessor :state_attr

  def initialize(*args)
    @state_attr = args[0]
    @machine = CustomMachine.new(self)
    @machine.restore!(@state_attr)  # set machine to desired state
  end

  # other methods which trigger transitions
  def move
    @machine.move
  end
end

Hi there 👋
Thanks for using finite_machine gem.
This is by design. Similar to FiniteMachine.define, the FiniteMachine::Definition is meant to describe the state machine and nothing else. There is no reason to have initialization with custom state attributes as they wouldn't be a way to use them in state machine definition anyhow. The way I like to think of FiniteMachine::Defintion is a template for creating state machines instances. Each instance can then be targetted by different objects in separate threads etc. So following from this, you would first create your definition:
class CustomMachine < FiniteMachine::Definition
  # express all states and their possible transitions
end

And then integrate it with your code however you like it, for example, this way:
class StateManager
  attr_accessor :state_attr

  def initialize(*args)
    @state_attr = args[0]
    @machine = CustomMachine.new(self)
    @machine.restore!(@state_attr)  # set machine to desired state
  end

  # other methods which trigger transitions
  def move
    @machine.move
  end
end

Hi there, thanks for your quick response 🙂
The initialize stuff is more of a side-effect of something else I'm trying to do, one could say. It's harder to explain without dropping all of my code, but I'm essentially trying to add the following:
class StateManager < FiniteMachine::Definition
  # all states and transitions

  on_enter do |event|
    target.notify_state_change(instance_variable_get(:@state_attr), event.to)
  end
end

class SomeModelClass < ActiveRecord::Base
  def notify_state_change(state_attr, new_value)
    public_send("#{state_attr}=", new_value)
  end
end

Hi there, thanks for your quick response 🙂
The initialize stuff is more of a side-effect of something else I'm trying to do, one could say. It's harder to explain without dropping all of my code, but I'm essentially trying to add the following:
class StateManager < FiniteMachine::Definition
  # all states and transitions

  on_enter do |event|
    target.notify_state_change(instance_variable_get(:@state_attr), event.to)
  end
end

class SomeModelClass < ActiveRecord::Base
  def notify_state_change(state_attr, new_value)
    public_send("#{state_attr}=", new_value)
  end
end

While I was unable to accomplish my goal with the above behavior, I was able to figure it out 🙂
Thanks for your help!

While I was unable to accomplish my goal with the above behavior, I was able to figure it out 🙂
Thanks for your help!

Glad you get to resolve your problem. The design of this gem 'forces' a certain separation between the state machine and other objects acting on it. The communication happens via triggers and callbacks. You should be able to pass any information this way. That's why there is no built-in integration for ActiveRecord or any other ORM. You're left to decide how you want to store your state. In future, you may move to a different data storage model, another framework which shouldn't affect the state machine. If you want to ensure maintenance, then this gem should continue to work even for Rails 10.
The FiniteMachine::Definition could potentially be made into a module but that would possibly make the boundaries even more blurry and let a class grow in complexity. It's a balancing act, and there are always compromises.
Thanks for using finite_machine and hope it helps you build whatever you're working on.

Glad you get to resolve your problem. The design of this gem 'forces' a certain separation between the state machine and other objects acting on it. The communication happens via triggers and callbacks. You should be able to pass any information this way. That's why there is no built-in integration for ActiveRecord or any other ORM. You're left to decide how you want to store your state. In future, you may move to a different data storage model, another framework which shouldn't affect the state machine. If you want to ensure maintenance, then this gem should continue to work even for Rails 10.
The FiniteMachine::Definition could potentially be made into a module but that would possibly make the boundaries even more blurry and let a class grow in complexity. It's a balancing act, and there are always compromises.
Thanks for using finite_machine and hope it helps you build whatever you're working on.


Error

After cloning faitagram when u type "is" to open it is shows no command "is" found

It's not i, it's l

Sir can u please help me hacking an insta account?
On Sun, 8 Jul 2018, 8:45 pm Justin Chang<EMAIL_ADDRESS>wrote:

Closed #94 https://github.com/Juniorn1003/Faitagram/issues/94.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Juniorn1003/Faitagram/issues/94#event-1721877946, or mute
the thread
https://github.com/notifications/unsubscribe-auth/Am9eb7LM07kykYbLFZrvMISo9AoFeyI4ks5uEiIQgaJpZM4VEOTq
.

I assure u.. There is no bad intenstion
Its just about my future...
By getting his id hacked.. I will get to know what he is not ready to tell..
Please sir.. Pls...! 🙏
On Sun, 8 Jul 2018, 8:46 pm Madhurima Tiwari<EMAIL_ADDRESS>wrote:

Sir can u please help me hacking an insta account?
On Sun, 8 Jul 2018, 8:45 pm Justin Chang<EMAIL_ADDRESS>wrote:

Closed #94 https://github.com/Juniorn1003/Faitagram/issues/94.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Juniorn1003/Faitagram/issues/94#event-1721877946,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Am9eb7LM07kykYbLFZrvMISo9AoFeyI4ks5uEiIQgaJpZM4VEOTq
.


Allow callbacks to interact with failures from composed interactions

Before this change, if a composed interaction failed, neither around nor after callbacks would be yielded to.

@tjwallace thanks for the PR!
This change makes sense to me. @tfausak what do you think?

Yeah, this looks good!


[KeyVault] - Update tests that depend on non-exported constant

[x] keyvault-admin
[ ] keyvault-keys
[ ] keyvault-certificates
[ ] keyvault-secrets

Being on core v2 makes this test significantly simpler as we can just use a pipeline policy to grab the user-agent string. So I am going to wait until KV is on core v2 before updating the rest of them...

@maorleger did you intentionally closed this issue?
I suspect it might got closed with PR 21189, but that only updated KV Admin, not all of the packages listed in the description


[docs] Update README.md

Minor fixes:

fix typo, "Simple" -> "Simply"
improve consistency of how colons are used (i.e., before all code blocks)

Thanks for all your work! nvm is great!

Thanks!


Make pipeline parameterized to take S3 manifest as input parameter

Tasks

[ ] Make pipeline parameterized to accept inputs from build workflow
[ ] Add manifest input to integ, bwc and perf test jobs. These jobs are already parameterized but need manifest parameter from pipeline

Can you please link the pipeline you are referring to?

@mch2 It is a poc code, which was raised as PR on infra - https://github.com/opensearch-project/opensearch-infra/pull/83
I have moved it to feature branch (jenkins) in this repo - , commit


set_attributes_config() & set_attributes_value() should do a PUT instead of POST

Hi,
Took me a couple of hours but figured it out when wanted to set a value to a device. The {"value" : ""} json is not sent along to the Zipabox when doing a POST. Changed it to a PUT and it works offcourse. Can you change the code?
I have tested it with set_attributes_value() and I am assuming it should be changed on set_attributes_config() too, so please verify.
Thanks a lot and keep up the good work,
Kind regards and have a nice weekend, -Bas
PS: Local API does return the Attribute name but you should use ["attributeName"] instead of ["name"], maybe you want to have a look to that also.

Thank you for information, I'll update code.

fixed.


[#PLAT-338]Add HTML formatting to Transactional Emails

Purpose
Add HTML formatting to Transactional Emails

Changes

[x] change all emails template to html.mako

[x] set the 'can_change_prefernce' for proper emails

[x] set the proper logo for different logo

[x] fix failing test

[x] write change log

QA Notes
https://docs.google.com/spreadsheets/d/1oTPYoy-IdG30sFs3Sek2LAXvtb1ghCDAKkFk85VqQPg/edit#gid=0

Some examples:
Before change:

After change:

Before change:

After change:(The logo will actually be changed to white transparent one)

Side Effects
Now whenever a new preprint service is added, you not only need to update its square_color_no_transparent.png in website/static/img/preprints_assets/<preprint_name>/ but also need to add in wide_white.png for that preprint service.

Ticket
https://openscience.atlassian.net/browse/PLAT-338

@chennan47 Can you check out the test failures? Looks like a Mako error is happening when rendering emails.


compability  problem with LocalDateTime object

Hello everyone,
I have a problem when saving a LocalDateTime object in the database, it shows as a string, so I cant query it.
but when retrieving from the database, it gets retrieved as java.time.LocalDateTime.
user version and platforms:
OrientDB Version:  3.1.5
Java Version:  11
OS: Windows 10
Expected behavior
saving java.time.LocalDateTime object in database is datetime type
Actual behavior
saving java.time.LocalDateTime object in database is a string like this "rO0ABXNyAA1qYXZhLnRpbWUuU2VylV2EuhsiSLIMAAB4cHcOBQAAB+UIERAWNAfO5sB4"
Steps to reproduce
OElement testingClass = db.newInstance("TestingClass");
testingClass.setProperty("test_date", LocalDateTime.now());
testingClass.save();
//then see the result from the web UI
am sorry for my English, but i hope you got the idea

Hi @khalidmrabti .
We do not support LocalDateTime type, you should convert it into the DateTime or Date type to use it.
OrientDB is general use database and can not cover all existing data types.

@khalidmrabti I am closing the issue if you encounter problems with Date or DateTime objects please reopen it.


Support Windows Live Photo Gallery face tags

I just installed pigallery2 and it appears face tags are not working. All my face tags are created with Windows Live Photo Gallery (stored in XMP tags), but no tags are shown when opening a picture. Regular keywords are working, but I believe those are EXIF.
Is there a setting I'm missing or is XMP not supported?

Nobody appears to be using these tags anymore. I now copy the face tags to a different region and they appear in PG2. So can be closed from my end.


new syslog changes

New behavior for using syslog service within a VPC.
Related: https://github.com/convox/rack/pull/1381

lgtm 👍


CSS example: parse decimal form of nums correctly

Hello, thanks for making this. I've been using a variant of the example file css.pegjs for something I've been working on, and I think I may have ran into a small mistake in it.
The nums rule was trying whole numbers before trying decimals, so if you had a rule like nums+, it would parse 0.02 as 2 num tokens - 0 and .02. I think this is the right fix for it.

@chearon Good catch, thanks


Error "contextList is empty" after signing in VSO

While on the Checkout from Team Services window and after signing successfully I get an error message above the buttons reading "contextList is empty".
Same credentials in Visual Studio bring up the project I have access to on visualstudio.com
Any logs I can check for more details?

Hi @ias0nas,
You can turn on debugging and get a log by following the last FAQ here: https://java.visualstudio.com/Docs/tools/intelliJ#_frequently-asked-questions-faq
It looks like something must have gone wrong during signing in because that should create a context that populates the contextList but without more information I can't tell you exactly what went wrong. If you attach the log here or email it to me at<EMAIL_ADDRESS>I can help you debug what might have happened.
Thanks,
-Leah

Hi @leantk
Not sure these instructions apply for Rider?
Doesn't seem to be options for custom log configuration.
I am using Rider (on Linux if that makes any difference).
Does it have another way of enabling logging?
Thanks

Hi @ias0nas,
Sorry for the confusion with the logging. The toolbar for Rider only shows up when you have a project opened already. If you have another project that you could open, you could see the toolbar across the top that has the Help dropdown. Once the debugging is enabled, could you send me the entire log please?
Another option you can try is going to the Team Foundation Server tab and pasting your Team Services repo URL in the Server URL text box. I know it looks like it's just for servers but it also will take your repo URL that you want to clone. Let me know if this gives you a different outcome then what you saw with the Team Services tab.
Thanks,
-Leah

Hi @leantk
Unfortunately the same error is returned when trying to sign in to TFS after having opened a project.
I enabled the debugging as described and this is the output:
20:21:15.754 | INFO  | SolutionLifecycleHost          | Full warm solution load with caches took 47309 milliseconds.
20:25:12.443 | INFO  | VsoCheckoutPageModel           | Skipping loading contexts in constructor
20:25:13.660 | INFO  | ServerPollingManager           | Timer fired
20:25:13.661 | INFO  | ServerEventManager             | triggering ALL events
20:25:13.661 | INFO  | ServerEventManager             | triggering event: BUILDS_CHANGED
20:25:13.661 | INFO  | ServerEventManager             | triggering event: PULL_REQUESTS_CHANGED
20:25:13.661 | INFO  | ServerEventManager             | triggering event: WORK_ITEMS_CHANGED
20:25:20.240 | INFO  | VsoCheckoutPageModel           | loadRepositories called
20:25:20.258 | INFO  | VsoAuthenticationProvider      | authenticateAsync for server: https://app.vssps.visualstudio.com
20:25:20.439 | INFO  | VstsPatAuthenticator           | Signing out from uri: https://app.vssps.visualstudio.com
20:25:20.450 | INFO  | OAuth2Authenticator            | Ready to launch browser flow to retrieve oauth2 token.
20:25:20.452 | INFO  | SettingsHelper                 | Searching for /home/ias0nas/.microsoft/VstsAuthLib4J/settings.properties
20:25:20.454 | INFO  | OAuth2Authenticator            | Attempt to use oauth2-useragent provider: JavaFx
20:25:20.462 | INFO  | OAuth2Authenticator            | Using oauth2-useragent providers to retrieve AAD token.
20:25:54.278 | INFO  | HttpProxyServiceImpl           | useHttpProxy: false
20:25:56.143 | INFO  | VsoAuthenticationProvider      | getAuthenticationInfoAsync succeeded
20:25:56.154 | INFO  | HttpProxyServiceImpl           | useHttpProxy: false
20:25:57.525 | INFO  | ServerContextLookupListener    | loadContexts activeOperation with 0 contexts and a scope of PROJECT
20:25:57.531 | INFO  | VsoCheckoutPageModel           | signOut called
20:25:57.653 | INFO  | VstsPatAuthenticator           | Signing out from uri: https://app.vssps.visualstudio.com

@leantk
Using the Team Foundation Server as you suggested tab works fine for the same credentials so probably something going on with the first tab.
If you need any more logs or anything else, let me know.
Thanks

@ias0nas I'm glad to hear things worked with the second tab. In some scenarios, a user's username/pw can't find their associated VSTS accounts which is what the first tab (VSTS) tries. The second tab (TFS) is able to use the repo URL provided to make the association. It's something that we are aware of and are looking into but for now the TFS tab is way to unblock users.
I'm going to close this issue since we already are tracking that larger problem and since you're unblocked. If you run into another issue please feel free to reopen this.
Thanks,
-Leah


How to obtain the ./pretrain/vmamba_tiny_e292.pth

Very nice work！ And could you tell me how can I do to get the pretrain model which name is“vmamba_tiny_e292.pth”

Step1: find the results section in Readme
Step2: find the results corresponding to that checkpoint
Step3: download the checkpoint from the provided link

Sorry for my oversight in not noticing it sooner. Thank you for your response.

抱歉我疏忽了，没有早点注意到。谢谢您的回复。

Hello, can you give me a specific link? I still haven't found it

@Doinb-sorrymaker  您好你找到了吗，可以给我一个链接吗


Update icd9 code mapping

Change icd9 mappings to http://hl7.org/fhir/sid/icd-9-cm

In Release 1.0.19


MM-47467: Removed global state form 'threads.ts'

Summary
Removed global state form 'threads.ts'
Ticket Link
Fixes https://github.com/mattermost/mattermost-server/issues/21363
Jira https://mattermost.atlassian.net/browse/MM-47467
Release Note
NONE

Hello @codewithshariq,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

E2E tests not automatically triggered, because PR has no approval yet. Please ask a developer to review and then try again to attach the QA label.


enhance: Remove FixtureManager in favor of MockResolver

Motivation

#446 is the favored approach since it makes changing fixtures in a component easy
Solution

Remove FixtureManager (use MockResolver instead)

This is forked from the other branch so will rebase on merge

This is labeled "enhance", but it seems like it's a breaking change?

Breaking is marked by 'BREAKING CHANGE' in commit message. However - since the removed item was never released in a version (even beta), this actually breaks nothing.

Ah, ok great, thanks for clarifying.


[es] Update references between concepts

We want to have the concept references updated between the documents to refer to others correctly.

Hi, can I be assigned to this?

Thanks!


[Bug] move-prover gets confused about BitOr

🐛 Bug
It seems that every verification involving BitOr holds, even when it should not.
To reproduce
Code snippet to reproduce
address 0x1 {
module Question {
    const CATEGORY: u64 = 128;

    public fun should_not_hold(): u64 {
        (8 as u64) | CATEGORY
    }
    spec fun should_not_hold {
        // This should not hold:
        ensures result == 0;
        // ..but holds anyway!
    }

    public fun holds(): u64 {
        (8 as u64) | 128
    }
    spec fun holds {
        // This holds, as it should:
        ensures result == 136;
    }
}
}

Generated bytecode
By looking the generated bytecode, we get a clue:
public holds(): u64 {
B0:
	0: LdU64(136)
	1: Ret
}
public should_not_hold(): u64 {
B0:
	0: LdU64(8)
	1: LdAddr[0](U64: [128, 0, 0, 0, 0, 0, 0, 0])
	2: BitOr
	3: Ret
}
}

Expected Behavior
should_not_hold should not hold.
System information
Please complete the following information:

main branch, commit 5d8dc68ddf29a19dfaba4c12da414c9b8e4db094 as the HEAD.
rustc 1.51.0 (2fd73fabe 2021-03-23)
20.04.1-Ubuntu

Additional context
It seems that when BitOr is involved, everything seem to pass?

@villesundell, thanks for this bug report. The expected output is that Prover outputs an error with the message "bit operation not supported" because Prover does not support bit operations. We'll investigate and fix it. Thanks!


Radium is growing! This is what we're planning. Discussion thread for new name.

The Radium family is growing! The inline style library is going to be joined by a component library. To start, we will release a flexbox-based grid system, followed by a typography toolkit, and form components.
Radium components will follow a set of core principles including, but not limited to:

Accessibility is a first-class citizen.
Inline styles exclusively, wherever possible.
Getting started should be super simple. We will lower the bar to get started by drawing on principles from the data viz ecosystem Victory: sensible defaults, live code examples, and providing an aggregator module that you can npm install and import individual components from.

We want the Radium brand to be associated at the core with a new way of building user interfaces (inline styles is just the start), and as such, our plan is to use the radium github and npm name as the aggregator module. This means moving Radium as it's known today under a name like radium-style or radium-style-resolver.
The structure would look something like this:
radium
  |-radium-style
  |-radium-grid
  |-radium-typography
  |-radium-input
  |-radium-textarea
  |-...

We will do our best to ensure this transition is smooth. In practice, it will be small breaking change: import { Radium } from 'radium' might become import { RadiumStyle } from 'radium'.
Please help us by suggesting a new name for Radium Inline Styles, and let us know of any concerns you may have.

Name ideas for the aggregator module:
radium-core
radium-nucleus
radium-heart
radium-bolts

Clarification - radium is going to be the aggregator module. We are looking for a new name for what is currently called "Radium" - the inline styles module.

This is going to be very exciting :+1:
I have no experience with npm orgs, so I don't know whether it's possible to move the current radium package to its own org while retaining the same package name. Assuming it is, I'd be happy to see the core radium left alone as it is because none of the suggested options sound very compelling to me (though radium-core is nice), and it wouldn't break npm either.
Org-wise, if you feel like, the projects may be structured without the prefix:
github.com/radium/radium[*]
github.com/radium/grid
github.com/radium/typography
github.com/radium/input
github.com/radium/textarea

while the npm packages will of course bear the full names: radium, radium-grid, radium-typography, and so on.
[*] If you must change the name of the core project, it may look like: github.com/radium/core.


Error updating nodes.

Current Behavior
How to go about fixing this problem, I can't update my nodes?
I have node-red integrated into my home assistant!
Expected Behavior
No response
Steps To Reproduce
No response
Example flow
paste your flow here

Environment

Node-RED version:
Node.js version:
npm version:
Platform/OS:
Browser:

For general help, as the issue templates describe, please us the forum at https://discourse.nodered.org - where there is a large community of users who'll be able to help.

Sorry, I'm not good with the forum, I'll put the error screen that appears in the log.

Please post this to the forum as asked

Raised on forum here: https://discourse.nodered.org/t/error-updating-nodes/69408


Prepare for scpca-docs release: AnnData

Steps for a new release of scpca-docs

This docs release is associated with the availability of AnnData downloads from the ScPCA Portal
Preparing for the release

[x] Does this release require an update to the CHANGELOG because there will be changes to downloadable files? If so, please create an issue tracking the CHANGELOG update and mark it as blocking this issue.
[x] Are all other issues planned for this release resolved? If any issues are unresolved, mark this issue as blocked by those on ZenHub.
[x] Optional: If not all changes in development are ready to be released, create a feature branch off main and cherry pick commits from development to that feature branch.
[ ] File a PR from the development branch (or the new feature branch) to the main branch. This should include all of the changes that will be associated with the next release.

[ ] If a CHANGELOG entry was required, add the date to the entry's header as part of this PR.

Creating a release

[ ] On the releases page, choose Draft a new release.
[ ] In Choose a tag, use the current date as the release tag (YYYY.MM.DD), then click Create a new tag: YYYY.MM.DD on publish.
[ ] Write a description of the major changes in this release. You may want to start with the auto-generated release notes to save time.
[ ] Optional: If not all issues have been addressed, save a draft to return to later.
[ ] Publish the release!

Just noting that I have cherry-picked all AnnData docs related changes to be on allyhawkins/anndata-release.  We still need a changelog entry that should be in its own PR, but once that is in, then that branch will be ready for a PR to main.


Add reminder functionality

Closes #184
The interface is the same as that of Python Discord bot's reminder command, but much of the internals have changed. The biggest change is the introduction of a database to persist reminders. Since the Python Discord bot uses their API to persist information about reminders, and since our bot communicates directly with the database with the use of SQLAlchemy, the internals have changed quite a bit.
However, this should also set the stage for more complex functionality in this bot as database functionality has been bootstrapped.

@Robin5605 Merge this into the other bot, not the Vipyr bot.


added dark mode

Implemented dark mode color scheme
Added dark mode toggle functionality
Improves accessibility and reduces eye strain

I noticed that  one of the pre-commit hooks in the CI workflow is failing — please run the pre-commits locally and it will resolve the issue.


pull request for e2e test at 01/08/2017 11:45:13

: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.


Current #%% cell should not have blue border if text editor is not focused

For https://github.com/microsoft/vscode-jupyter/issues/6564

Codecov Report

Merging #6685 (bf8f1fd) into main (0d2170b) will decrease coverage by 0%.
The diff coverage is 63%.

@@          Coverage Diff          @@
##            main   #6685   +/-   ##
=====================================
- Coverage     69%     69%   -1%
=====================================
  Files        412     412
  Lines      28504   28535   +31
  Branches    4251    4257    +6
=====================================
- Hits       19711   19708    -3
- Misses      7125    7156   +31
- Partials    1668    1671    +3

Impacted Files
Coverage Δ

...client/datascience/editor-integration/decorator.ts
73% <63%> (-7%)
:arrow_down:

src/client/datascience/jupyter/kernels/kernel.ts
63% <0%> (-4%)
:arrow_down:

src/client/common/process/pythonDaemonFactory.ts
82% <0%> (-2%)
:arrow_down:

src/client/datascience/jupyter/jupyterServer.ts
69% <0%> (-2%)
:arrow_down:

...ent/datascience/jupyter/kernels/kernelExecution.ts
67% <0%> (-2%)
:arrow_down:

...tascience/jupyter/liveshare/hostJupyterNotebook.ts
44% <0%> (-2%)
:arrow_down:

.../datascience/editor-integration/codeLensFactory.ts
87% <0%> (-1%)
:arrow_down:

src/client/datascience/jupyter/jupyterNotebook.ts
75% <0%> (-1%)
:arrow_down:

...t/datascience/notebook/vscodeNotebookController.ts
79% <0%> (-1%)
:arrow_down:

...active-common/intellisense/intellisenseProvider.ts
74% <0%> (-1%)
:arrow_down:

... and 5 more

Based on this morning's notebook sync, we are now going to:

Remove the cell separators for other cells
Use blue cell delimiters for current cell when text editor has focus
Use grey cell delimiters for current cell when text editor does not have focus

We have merged the upstream PR to define the tokens that are referenced in this PR. This PR will now also address https://github.com/microsoft/vscode-jupyter/issues/6606
GIF of new experience when toggling between files:


GH-44734: [C++][CI] Fix arrow-c-bridge-test timeout with threading disabled

Rationale for this change
The Async C Device Stream Interface unit tests requiring threading to be enabled, but a couple of our CI runs go with ARROW_ENABLE_THREADING disabled.
What changes are included in this PR?
The Async C Device Stream interface tests are guarded with #ifdef ARROW_ENABLE_THREADING to prevent CI timeouts.

GitHub Issue: #44734

@github-actions crossbow submit -g cpp

@github-actions crossbow submit -g cpp

@github-actions crossbow submit -g cpp


2.33.0: Missing @Override false positive for record constructor

When using constructor in record error-prone now gives a warning bout missing an override:
public record Example(int a) {
  public Example() {
    this(1);
  }
}

Example.java:[4,10] [MissingOverride] <init> is an explicitly declared accessor method for a record component; expected @Override
    (see https://errorprone.info/bugpattern/MissingOverride)
  Did you mean '@Override public Example() {'?

Suspecting that https://github.com/google/error-prone/pull/4585 introduced this issue.

Fixed already in https://github.com/google/error-prone/commit/81ae61d2d103c5cef1bf6d29e92c2e4152a61e3c but not released yet

Fixed already in 81ae61d but not released yet

Cool, thank you!


Gain mini analysis

I have modified mini_analysis.py in order to let it works with 2 runs for the LED calibration. I have added also the actual gain mini analisys. I have tested and it works.
Here /dali/lgrandi/led_calibration/Script there are a the shifter's script (working) prototype for XENONnT gain.
A small explanation on how it works:

the shifter has just to modifi the date and the run ids in the configuration file and submit the job. The data will automatically saved on dali and pushed on the database. This last part is not implemented yet.

I would like to upload these scripts on github but I am not sure where, could you point my the right place?

Dear @GiovanniVolta may I recommend to check the issues found by CodeFactor before anyone starts a larger review. Just click on the details button. CodeFactor helps us to keep the code clean and readable.

Dear @GiovanniVolta may I recommend to check the issues found by CodeFactor before anyone starts a larger review. Just click on the details button. CodeFactor helps us to keep the code clean and readable.

Hi Daniel, you are compleatly right. Indeed it will remove the pull request. It is definetly not ready for the review

@GiovanniVolta you do not have to close the PR. You can continue updating it. If you have any questions regarding CodeFactor let us know.

@GiovanniVolta you do not have to close the PR. You can continue updating it. If you have any questions regarding CodeFactor let us know.

Both are options. However it sometimes makes more sense to open a new PR because otherwise you'd have to plow through a PR of >20 commits which is not always the clearest (I'm not a particular fan of this especially as it makes the commit history quite chaotic) .
@GiovanniVolta if I can make one more suggestion. Rather than altering the minianalysis to be able to take multiple runs you could also make use of a superrun (https://strax.readthedocs.io/en/latest/advanced/superrun.html). This makes things a lot easier as we don't have to worry that we have a backwards compatible version of the minianalysis.

@GiovanniVolta , can you perhaps give an update if you are still working on this?

@GiovanniVolta , can you perhaps give an update if you are still working on this?

Hi Joran, no I am not! I can actually delete it, I think it is not necessary anymore

Thanks, I'll close the PR for now, feel free to revive your branch anytime.


Telemetry stuff and Time recording

Just curious, are most of the development stuff happening on discord nowadays?

Yes... always has been


Fix config catalog issues

Fix fix https://github.com/wso2/docs-apim/issues/1821 and  https://github.com/wso2/docs-apim/issues/1893

Kindly regenerate the config-catalog.md

@ruthryi As per @shaniR we will be generating the config-catalog.md at the end of hackathon.


refactor the way crypto retransmissions are packed

Fixes #2341.

Codecov Report

Merging #2388 into master will increase coverage by 0.06%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2388      +/-   ##
==========================================
+ Coverage   85.98%   86.03%   +0.06%
==========================================
  Files         119      119
  Lines        8906     8929      +23
==========================================
+ Hits         7657     7682      +25
+ Misses        928      927       -1
+ Partials      321      320       -1

Impacted Files
Coverage Δ

internal/wire/crypto_frame.go
95.92% <100%> (+1.8%)
:arrow_up:

retransmission_queue.go
94.29% <100%> (+0.74%)
:arrow_up:

server.go
83.74% <0%> (+0.61%)
:arrow_up:

Continue to review full report at Codecov.

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


update population-graph link

both figures were linking to focused-population-graph.png, but the first fig should be population-graph.png

PR approved by a named author, auto-merging
beep boop i'm a bot


Add/Update Badges on README

Add License like so
Thank you and happy #Hacktoberfest!!

I'd like to take this on


docs: create OpenShift QS for service binding in dev console

Looks good by inspecting the content. I will provision proper cluster to verify it next week

I'm off on holiday today so I just did a "read through" review. I see @wtrocki is going to do a walkthrough so I think we'll be well covered on that front.

@b1zzu Per https://issues.redhat.com/browse/MGDSTRM-4872, this quick start is ready for a final QE verification. Thanks!

Good to merge

Bold text is not displayed correctly in the Prerequisites:

That's really interesting, @b1zzu  - I hadn't noticed anything like that before. Can you say what flavour of OpenShift you are using?
During development, I have been testing these quick starts on OpenShift Container Platform, and they have looked fine:

However, I just checked the same quick start on an OpenShift Dedicated cluster, and see the same issue you saw:

The good news is that the same prerequisites are repeated in the body of the quick start, and they render fine there:

So, it seems like it's just a rendering issue specific to the pop-up, and possibly specific to OSD. If so, I will certainly investigate more with UXD, but I don't think it should block merging of this PR.

@b1zzu Can you confirm that apart from the rendering issue, the steps in this quick start were otherwise OK?

@jbyrne-redhat No I didn't manage to verify all steps because the nodjs build/deploy is failing to push the image to the openshift registry, I'm trying to upgrade the OCP cluster because I was using a 4.7 to see if that will solve the issue

@jbyrne-redhat No I didn't manage to verify all steps because the nodjs build/deploy is failing to push the image to the openshift registry, I'm trying to upgrade the OCP cluster because I was using a 4.7 to see if that will solve the issue

ACK, @b1zzu  - thanks. To be honest, you would have needed OCP 4.8 anyway, in order to use the Topology page of the Dev Console to do service binding. This is actually noted as the first prerequisite for doing the quick start.

@jbyrne-redhat yes I found out that the cluster is having issues so I tried to switch to another cluster but I just encountered a different issue with the new cluster

I finished to verify the steps

Thanks a lot, @b1zzu.


change makefile test target for no longer be required manual steps to…

Cherry-pick #3983

Hi @joelanford,

One question though. Now that v1.1.0 is out, do we plan to make another release for v1.0.x patches?
I think we have no rush for that since we will have just this bug fix. I would vote to wait a little to see if we need to address more fixes before to do that.


Adding Octal to Binary Conversion and Viceversa option

Is your feature request related to a problem? Please describe.
Presently,there is only option of conversion of binary to decimal and viceversa why not include other bases .
Describe the solution you'd like
I would like to add feauter of conversion of octal based number to binary and viceversa

I would like to work on this issue @sairish2001 under gssoc 2021

Feel free to ask your doubts, if any
Deadline 20 March,2021 (11:59 PM IST)


ENH: special function to compute iv(v+1,x)/iv(v,x) and its inverse

Is your feature request related to a problem? Please describe.
To compute the MLE of the vonmises (gh-20102) and the vonmises_fisher distribution, one needs to compute $I_{\nu+1}(\kappa)/I_\nu(\kappa)$ (if using numerical solver) or its inverse (if using analytical formula), for $\nu=0, 0.5, 1, \cdots$ and $\kappa > 0$.
Describe the solution you'd like.
Add scipy.special.iv_ratio(v,z) to compute $I_{\nu+1}(z)/I_{\nu}(z)$ for $\nu \in \mathbb{R}$ and $z \in \mathbb{Z}$.
Add scipy.special.iv_ratio_inv(v,r) to compute $x$ such that $I_{\nu+1}(x)/I_{\nu}(x)=r$ for $\nu \ge 0$ and $0 \le r \le 1$.
Describe alternatives you've considered.
To compute the ratios, the straightforward formula ive(v+1,x)/ive(v,x) doesn’t achieve superb accuracy at least for large x. (In addition, the current implementation of ive returns nan for very large x, though that's a separate issue to be addressed by gh-18088.)
To compute the inverse, the current implementation in vonmises and vonmises_fisher uses Brent’s method. This probably works for most practical purposes, but doesn’t achieve superb accuracy from a numerical perspective; for example, for $r$ very close to $1$ the relative error can easily go above 30%.
Additional context (e.g. screenshots, GIFs)
There are some known bounds and series expansions that may improve the accuracy and possibly efficiency for real $\nu$ and real $z$, but I am yet to verify them.
It’s always possible to start by implementing them the way they're done today (i.e. straightforward division and Brent solver), if it is deemed useful enough to have these special functions in scipy.

Reference
Amos, D. E. (1974). Computation of Modified Bessel Functions and Their Ratios. Mathematics of Computation, 28(125):239-251.
Gautschi, W. and Slavik, J. (1978). On the computation of modified Bessel function ratios. Mathematics of Computation, 32(143):865-875.
Hill, G. W. (1981). Evaluation and Inversion of the Ratios of Modified Bessel Functions, I1(x) / I0(x) and I1.5(x) / I0.5(x). ACM Transactions on Mathematical Software, 7(2):199-208.

Thanks for all this literature review @fancidev .
Would it be possible to generalize the implementation to $\frac{I_{\nu + n}(x)}{I_{\nu}(x)}$? Otherwise, we have a very specialized function. From what i understand, the continued fraction approach could be generalized for that expression. The continued fraction approach also looks like most straight forward implementation given that infrastructure for such compuations are part of #20223. Inverting the function using Brent's method is stable enough in my opinion.
@steppi : any strong opinions here?

@dschmitz89 I guess continued fractions is the way to go, but I’ll need to try it out to see if it really works. It has to be more accurate and/or more efficient than direct division to be useful.
As for generalizing to $I_{\nu+n}(x)/I_\nu(x)$, I haven’t come across any article that elaborates that, but I can take another look later. $I_{\nu+1}(x)/I_\nu(x)$ might be more common since it appears when differentiating $I_\nu(x)$ with respect to $x$. The literature mainly talks about vonmises (Fisher), but the MLE of non-central chi square distribution with zero degrees of freedom involves $I_1(x)/I_0(x)$ too.

Thanks @steppi ! I opened this issue as a standalone function in scipy.special to draw more review attention :-) It's a good idea to put it private in scipy.stats first so that I don't have to worry about negative $\nu$ and complex $z$ and can focus on the immediately useful stuff.
The evaluator for continued fraction from the beginning is very helpful, as the continued fractions used above doesn't have a a straightforward and tight bound on the number of terms needed.
Let me make a PR for your review.

Thanks @steppi ! I opened this issue as a standalone function in scipy.special to draw more review attention :-) It's a good idea to put it private in scipy.stats first so that I don't have to worry about negative ν and complex z and can focus on the immediately useful stuff.
The evaluator for continued fraction from the beginning is very helpful, as the continued fractions used above doesn't have a a straightforward and tight bound on the number of terms needed.
Let me make a PR!

Awesome! We have a lot of moving parts right now in special. That evaluator isn't in yet, and some updates are being made to the ufunc infrastructure. My thought is you create a branch off of main and let me know it's name. I can PR the continued fraction evaluator to your branch, and then you can take it from there. We can deal with merge conflicts later if they pop up. Does that sound like a good plan?

@steppi Sounds good! I read your generic continued fraction evaluator. It follows closely the "prescription" in Numerical Recipes (with a smaller choice of tiny), so should be good!
On my side, I coded forward evaluation and backward evaluation (by doubling the number of terms each time until the result doesn't change) of the Perron c.f.. I compared the results and found some questions:
1/ I want to make the evaluation as accurately as possible, so I effectively set the tol (as in your code) to zero. Is that ok?
2/ Usually both forward and backward evaluation work fine (with tol=0) and achieve a relative accuracy no larger than 2.2e-16 (compared with mpmath). But for some inputs the forward method requires an excessively large number of iterations; apparently round-off error is in play here:

I'll try rewrite the c.f. in a numeric-friendly way for large $x$, but otherwise do you have some general suggestion / experience on how to deal with such numerical error?
3/ When you mention "This hasn't made it into a PR yet because it's not as accurate as the methods currently be used for the specific functions I've tried it with.", what sort of inaccuracy did you observe?
Thanks for your attention!

I don’t have time to give detailed response today but

the consensus here is not to never use numerical recipes as a reference. The licensing is onerous and It’s not BSD compatible. The evaluator is a direct port from Boost.

no. It should be set to machine epsilon or possibly something slightly larger. Additional iterations beyond may cause additional accumulated rounding error.

just use backwards evaluation for sufficiently large x.

almost identical accuracy to the forward evaluator used in cephes for expn, but marginally worse for some test cases out of thousands I checked. Worst case 8e-16 vs 5e-16. Almost identical rmse

@fancidev. I’ll give more specific answers and advice in the PR message when I PR to your branch.

Thanks @steppi . I made a branch here.

It looks like computing $I_{\nu+1}(x)/I_\nu(x)$ using Perron’s continued fraction, and inverting it using Brent’s method, will be good enough for this topic. I’ll proceed with that.
The main task is to evaluate the Perron c.f. accurately, reliably, and efficiently, while keeping the code as simple as possible to not add too much maintenance burden.

Accuracy: Target 1 eps, and preferably within 8 eps (direct division has an error about 8 eps)

Reliability: handle all double precision real input properly (domain check, nan, inf, subnormal, etc); must always converge; should not generate floating point exception

Efficiency: should not take “too many” iterations

Awesome! For large $x$, asymptotic expansions could be even more accurate:
See https://dlmf.nist.gov/10.40#E1 or https://math.stackexchange.com/questions/4051200/approximation-of-subtraction-of-modified-bessel-functions-of-first-kind

Thanks for the reference @dschmitz89. I hope the continued fraction will be able to handle the full range of float input without resorting to asymptotic formula — let’s see!

I tried three ways to evaluate the Perron continued fraction to compare their accuracy and efficiency: backward recursion (doubling the number of terms until result doesn't change), forward recursion (Lentz's algorithm), and series method (as in Gautschi and Slavik (1978), also forward but with easy convergence guarantee for this c.f.).
I use $\nu=0.5$ as an example, and use mpmath direct division as "the right answer". For benchmark, I also include scipy.special.ive direct division.
The findings are:

Backward recursion is most accurate
Series method is reasonably accurate and good at automatic
Graph comparison:

Small range:

Large range:

I include the full script below so that you can play with the parameters (Lentz's algorithm appears quite sensitive to the choice of parameters for this c.f.)

Script
import numpy as np
import scipy.special
import matplotlib.pyplot as plt

from mpmath import mp
mp.dps = 50

def perron_mp(v, x):
    return float(mp.besseli(v+1,x)/mp.besseli(v,x))

def perron_cf(v, x, method, **kwargs):
    v+=1
    def g():
        """plain cf formula"""
        yield x, 2*v+x
        k=1
        while True:
            yield -2*x*(v+k-0.5), 2*(v+x)+k
            k += 1
    def g2():
        """alternative cf formula without the first term"""
        k=1
        while True:
            yield -2*x*(v+k-0.5), 2*(v+x)+k
            k += 1
    if method == 'f':  # forward
        f, n = eval_cf_forward(0, g, **kwargs)
    elif method == 'f2':  # forward recursion with first term stripped
        f, n = eval_cf_forward(2*v+x, g2, **kwargs)
        f = x/f
    elif method == 'b':  # backward recursion
        f, n = eval_cf_backward(0, g, **kwargs)
    elif method == 's':  # series
        f, n = eval_cf_series(0, g, **kwargs)
    else:
        raise ValueError
    return f, n

def eval_cf_forward(b0, g, *, tiny=16*np.finfo(float).tiny, safetiny=False, tol=0, max_iter=1000):
    f = tiny if b0 == 0 else b0
    C = f
    D = 0
    k = 0
    for a, b in g():
        k += 1
        if k > max_iter:
            return np.nan, k
        D = b+a*D
        if D == 0:
            D = tiny
        # if np.isinf(a/C):
        #     raise RuntimeError(f'{b=} {a=} {C=}')
        C = b + a/C
        if C == 0:
            C = tiny
        if safetiny and abs(C) < tiny:
            C = np.signbit(C)*tiny
        D = 1/D
        f *= C*D
        if abs(C*D-1) <= tol:
            return f, k+1

def eval_cf_backward_once(b0, g, n):
    g = iter(g())
    terms = [next(g) for _ in range(n)]
    s = 0
    for k in range(len(terms), 0, -1):
        a, b = terms[k-1]
        s = a/(b+s)
    return s + b0

def eval_cf_backward(b0, g, tol=0, max_iter=1000):
    cf = eval_cf_backward_once(b0, g, 1)
    terms = 1
    while terms < max_iter:
        terms = min(terms*2, max_iter)
        cf2 = eval_cf_backward_once(b0, g, terms)
        if np.allclose(cf2, cf, rtol=tol, atol=tol):
            return cf2, terms
        cf = cf2
    else:
        print('Warning: not converging')
        return cf2, max_iter+1

def eval_cf_series(b0, g, tol=0, max_iter=1000):
    g = iter(g())

    w = b0

    # k = 1
    a, b = next(g)
    rho = a/b
    u = 1
    v = rho
    w_ = w
    w += v
    if abs(w-w_)<=tol: # abs
        return w,1

    # k=2,3,4...
    for k in range(2,max_iter+1):
        aa, bb = next(g)
        u = 1/(1+aa/(b*bb)*u)
        b = bb
        v *= (u-1)
        w_ = w
        w += v
        if abs(w-w_)<=tol: # abs
            return w,k
    return np.nan, max_iter+1

# print('mp: ', perron_mp(0, 1.2))
# print('b: ', perron_cf(0, 1.2, 'b'))
# print('f: ', perron_cf(0, 1.2, 'f', tol=1e-16*0))
# print('f2:', perron_cf(0, 1.2, 'f2', tol=1e-17))
# print('s: ', perron_cf(0, 1.2, 's', tol=0))

def test(v, xs):
    nbs, ebs = [], []
    nfs, efs = [], []
    nss, ess = [], []
    eds = []
    for x in xs:
        r0 = perron_mp(v, x)
        eds.append(scipy.special.ive(v+1,x)/scipy.special.ive(v,x)/r0-1)
        rb, nb = perron_cf(v, x, 'b', tol=0)
        nbs.append(nb)
        ebs.append(rb/r0-1)
        rf, nf = perron_cf(v, x, 'f', tol=2.3e-16, safetiny=True)
        nfs.append(nf)
        efs.append(rf/r0-1)
        rs, ns = perron_cf(v, x, 's', tol=0)
        nss.append(ns)
        ess.append(rs/r0-1)

    plt.subplots(2,1,figsize=(9,6),sharex=True)

    plt.subplot(2,1,1)
    plt.plot(xs, nfs, label='Forward cf')
    plt.plot(xs, nbs, label='Backward cf')
    plt.plot(xs, nss, label='Series cf')
    plt.legend(loc='upper right')
    plt.title('Number of terms')

    plt.subplot(2,1,2)
    def errstat(x):
        eps = np.finfo(float).eps
        x=np.array(x)
        max_ = np.max(np.abs(x[np.isfinite(x)]))
        rmse = np.sqrt(np.mean(x[np.isfinite(x)]**2))
        ninf = np.sum(np.isinf(x))
        nnan = np.sum(np.isnan(x))
        s = f'rmse={rmse/eps:.1f}, max={max_/eps:.1f}'
        if ninf > 0:
            s += f', {ninf} inf'
        if nnan > 0:
            s += f', {nnan} nan'
        return s

    plt.plot(xs, efs/np.finfo(float).eps, alpha=0.7, label=f'Forward cf ({errstat(efs)})')
    plt.plot(xs, ebs/np.finfo(float).eps, alpha=0.7, label=f'Backward cf ({errstat(ebs)})')
    plt.plot(xs, ess/np.finfo(float).eps, alpha=0.7, label=f'Series cf ({errstat(ess)})')
    plt.plot(xs, eds/np.finfo(float).eps, alpha=0.7, label=f'Direct division ({errstat(eds)})')
    plt.axhline(y=0, lw=0.5, c='k')
    plt.legend(loc='upper right')
    plt.title(f'Relative error (upls)')

test(0.5, np.linspace(0.01, 100, 1000))
plt.show()

test(0.5, np.geomspace(1e-16, 1e16, 1000))
plt.xscale('log')
plt.show()

</details

Nice work @fancidev. It looks like the series method is the way to go. I'm a bit curious though why your stopping criterion is abs(w - w_) < tol, involving the absolute error.  If w is a double, then the distance to an adjacent double will be between $\epsilon |x|$ and $2\epsilon |x|$, where $\epsilon$ is machine epsilon, so it makes more sense to use the relative error for the stopping criterion, abs(w - w_) < tol * abs(w). The above bounds for the difference between neighboring floats is also why we typically use machine epsilon as the tolerance. If the relative error between successive estimates in the iterative process is less than machine epsilon, then we know these are at least adjacent floats, and it is usually not productive to continue the process. Sometimes a larger tolerance is useful though if additional iterations can accumulate too much rounding error.

@steppi You’re definitely right. Here I’m being lazy and just wanted to code something quickly that works with tol=0, that’s how it becomes abs(w-w_) <= tol. A relative error check is definitely more appropriate!

@steppi You’re definitely right. Here I’m being lazy and just wanted to code something quickly that works with tol=0, that’s how it becomes abs(w-w_) <= tol. A relative error check is definitely more appropriate!

No worries. It doesn't actually make a difference in the results for the backwards and series methods because the difference between successive estimates tends to zero, at worst you just need some extra iterations. Also, the infinities for Lentz's method are because the default tiny_value I chose from Boost is too small for this problem. You'll get better results for tiny_value=1e-100, but still not as good as the other methods.

Progress update:

Using Kahan summation (or math.fsum), the accuracy of the series method for this particular continued fraction is improved close to that of backward recursion, and hopefully within a factor of two for most inputs. This works because the result is a sum of a sequence of (almost) geometrically decreasing positive numbers.

By a simple equivalence transform (by a suitable power of two), the series method can evaluate the full range of float input without floating point error and to the desired accuracy. No asymptotic expansion is required!

I have derived a proper termination condition for convergence. Practically it gives (almost) the same result as zero tolerance for float, but would be useful for arbitrary precision or interval arithmetic.

I’ll proceed to do a bit more checking, and then incorporate the code into scipy. Expect a PR in mid April!

Thank you @steppi ! Looking forward to your PR with Kahan summation!

To invert $R_\nu(x) := I_\nu(x)/I_{\nu-1}(x)$, Hornik and Grün (2014) compared Brent’s method with Newton’s method, and found the latter to require fewer iterations. Some details are given below.
They show that $R_\nu(x)$ is strictly increasing and concave. Given initial bounds of the solution, the Newton-Fourier method may be applied to iteratively shrink the brackets of the root until convergence. This method requires two function evaluations per iteration, but those evaluations above the root are not useful. We only have to iterate the guesses lower than the solution.


Change common libs for XCode/apple :

Fixes: RIPD-305
Removes unnecessary common link libs related to openssl, which we link
to explicitly using finder vars now. This allows the generated XCode
project to link without error. Tested with CMake 3.9.0 and XCode 8.3.3.

Codecov Report

Merging #2191 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #2191   +/-   ##
========================================
  Coverage    69.87%   69.87%
========================================
  Files          689      689
  Lines        50587    50587
========================================
  Hits         35347    35347
  Misses       15240    15240

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 4308b12...6d07eb3. Read the comment docs.

How do you build release+assert?

-Dassert=ON is what you want to pass to cmake for assert builds, but I'm still investigating whether that actually works properly with xcode generated projects.

ok - after some pilot error on my end (not an XCode expert), I've confirmed the assert option works as designed. If you specify -Dassert=ON at cmake time and then edit the rippled scheme in XCode to use a release configuration for the running action, that should produce a release rippled with asserts on.  The release/debug switching in XCode seems clunky to me - perhaps there is a better way, but I don't know what it is.

Nice that the changes are so small.
Seems like it would be nice to include some instructions on how you use Xcode with rippled?  I've been using Xcode for most of the time I've been at Ripple, but I bet my work flow doesn't look anything like what you've come up with.
Thoughts?

I had this work once.  But today I tried using the cmake-built Xcode project and things did not go so well.  Xcode crashed twice during builds.  When it finished a build without crashing the link failed with this message:
ld: warning: directory not found for option '-L/Users/ScottsMini/Development/Boost/boost_1_60_0/stage/lib/Debug'
ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Not at all sure what's going on, since I did see the build succeed previously.  I think you should probably still check in your changes.  But I suspect there's still work to be done.  In the mean time I'm going back to my old Xcode project file.

No, hold it.  The new symptoms I'm seeing are without your change.  Sorry for the noise.  Let's get this merged into develop.

Merged as 65094d9c90a700fe864bf6be411024d9cbcb9a79


[SwiftLexicalLookup] Composite names

This PR introduces notion of composite names to SwiftLexicalLookup. In Swift, it’s possible to have a switch case introducing one name for several enum cases:
switch X {
case .x(let a), .y(let a):
  print(a) // Refers to both introduced names above
}

ASTScope currently deals with this special case by just introducing the first name from the list. Composite names are supposed to instead merge all names with the same semantic meaning into one, unified name representation. It stores an array of related names and, to match the behavior of the compiler, a composite name is represented by the first name.
Combined with some additional minor fixes included in this PR, I was able to finally perform entire Swift compilation with fully enabled validation! There still seem to be some discrepancies when running entire test suite with lit, but I’m happy to see the library finally maturing.

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test Windows

@swift-ci Please test

@swift-ci Please test Windows

@swift-ci Please test Windows

@swift-ci Please test Windows

@swift-ci please test platform Windows

@swift-ci please test platform Windows


It should be updated and also generated

Test

Means I have to revalidate when I want to edit?

test


User Info command

Pulls users into like date joined, roles, etc

Hello, could you give me more details about this one? :)

This is the current layout of the userinfo command, just some more info about the user would be neat!
See https://discord.js.org/#/docs/discord.js/main/class/User for more info

Ok, you can assign it to me, i will try to work on it :)

Go ahead @viktorluk311!


Test Disk Allocation Unit => issue #738

A New PR
THANK YOU - We love to get PR's and really appreciate your time and help to improve this module
Accepting a PR
I ran the test as specified to the wiki : https://github.com/sqlcollaborative/dbachecks/wiki
Please confirm you have 0 failing Pester Tests
[X] There are 0 failing Pester tests
Changes this PR brings
Please add below the changes that this PR covers. It doesnt need an essay just the bullet points :-)
Fix bug with Disk Allocation Unit Test as described here: #738

does it work this way?
$exclude = ($Psitem.Name -in $excludedisks)

He @karb0f0s :)
From my understanding skip is a switch parameter function in it function. Therefore $exclude must be $True or $False.
Regards

tested here https://github.com/SQLDBAWithABeard/JupyterNotebooks/tree/master/notebooks/dotNETNotebooks/dbachecks-PR/BeardNUC-PR/Archive/739

Thank you @mikedavem  and @karb0f0s  and @shaneis


Add support for parser context in MVEL conditions/actions

MVEL provides the ability to programmatically import individual classes, entire packages, and even static methods,But I didn't find this capability in easy-rule, and I couldn't extend MVELAction to execute it.
Mvel:
ParserContext ctx = new ParserContext（）;
ctx.addPackageImport（“java.util”）; //import java.util.*
Serializable s = MVEL.compileExpression（expression，ctx）;

This is the only way in easy-rule:
compiledExpression = MVEL.compileExpression(expression);

Hi @wuhaidu
Thank you for reporting this issue! I added a constructor to MVELAction that accepts a parser context. You can see an example here. This will be part of the upcoming v3.3. Stay tuned.
Kr,
Mahmoud

First of all, thank you for answering my questions. Now I can import external classes to execute the rules, but some of them are difficult to implement.
Actions in the rule set generated using MVELRuleFactory's createRulesFrom () method can't use the constructor you added to MVELAction, which is troublesome, and the class modifier of MVELRuleDefinitionReader and MVELRuleDefinition is the default level, which means that I can't extend or use MVELRuleDefinitionReader and MVELRuleDefinition from other packages, and it's not clear for the time being what you are for.  I think it's best to expand.
Rules rules = MVELRuleFactory.createRulesFrom(new FileReader(file.toFile()));
I would like to add a method that can be used to your constructor, as follows:
ParserContext context = new ParserContext();
            context.addPackageImport("java.util");
            //
            File file = new File("testRule.yml");
            Rules rules = MVELRuleFactory.createRulesFrom(new FileReader(file), context);

MVELRuleFactory should have such a method:
...
public static Rules createRulesFrom(Reader rulesDescriptor, ParserContext context) {
        Rules rules = new Rules();
        List<MVELRuleDefinition> ruleDefinition = reader.readAll(rulesDescriptor);
        for (MVELRuleDefinition mvelRuleDefinition : ruleDefinition) {
            rules.register(mvelRuleDefinition.createSimpleRule(context));
        }
        return rules;
    }
...

Finally, this is the more reasonable test method I imagine.
...
@Test
    public void testParseContext(){
        try {
            ParserContext context = new ParserContext();
            context.addPackageImport("java.util");
            //
            File file = new File("testRule.yml");
            Rules rules = MVELRuleFactory.createRulesFrom(new FileReader(file), context);
            RulesEngine rulesEngine = new DefaultRulesEngine();

            //
            Facts facts = new Facts();
            rulesEngine.fire(rules, facts);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
...

@wuhaidu Thank you for your great feedback! It looks like I closed this issue too early.. I have added two things:

The ability to use a parser context in conditions (in addition to actions). See c83ff59da8e35c96a0bdcab45db21471b9ed32d4
The ability to create a rule from a file with a parser context as you suggested. See 3f6e87b2028055339929326333b588d3b21709eb

Now it is possbile to do something like:
ParserContext context = new ParserContext();
context.addPackageImport("java.util");
File file = new File("testRule.yml"); // both conditions and actions can use "java.util" classes thanks to the parser context
Rules rules = MVELRuleFactory.createRulesFrom(new FileReader(file), context);

I pushed these additions in the latest snapshot version. Could you give it a try and let me know if this is ok for you? Please check this page if you don't know how to import the snapshot version.
Thank you upfront!

Thank you very much for your reply. I tried these new features in the snapshot version. It's good. Easy-rule is more flexible. If there are any other questions, I will come to ask you. Thank you. I look forward to v3.3.

Thank you very much for your reply. I tried these new features in the snapshot version. It's good. Easy-rule is more flexible. If there are any other questions, I will come to ask you. Thank you. I look forward to v3.3.
my test:
try {
            ParserContext context = new ParserContext();
            context.addPackageImport("java.util");
            context.addPackageImport("utry.robot.base.runtime");
            context.addImport(RobotPlatformConnectionState.class);

            //
            File file = new File("config/weather-rule.yml");
            Rules rules = MVELRuleFactory.createRulesFrom(new FileReader(file), context);
            RulesEngine rulesEngine = new DefaultRulesEngine();

            //
            Facts facts = new Facts();
            rulesEngine.fire(rules, facts);
        } catch (Exception e) {
            e.printStackTrace();
        }

Gradle 配置:
...
maven {
		name 'ossrh'
		url 'https://oss.sonatype.org/content/repositories/snapshots'
	}
...
compile('org.jeasy:easy-rules-mvel:3.3.0-SNAPSHOT'){
		exclude group: "org.slf4j"
	}
...

Thank you very much for your reply. I tried these new features in the snapshot version. It's good. Easy-rule is more flexible. If there are any other questions, I will come to ask you. Thank you. I look forward to v3.3.
my test:
try {
            ParserContext context = new ParserContext();
            context.addPackageImport("java.util");
            context.addPackageImport("utry.robot.base.runtime");
            context.addImport(RobotPlatformConnectionState.class);

            //
            File file = new File("config/weather-rule.yml");
            Rules rules = MVELRuleFactory.createRulesFrom(new FileReader(file), context);
            RulesEngine rulesEngine = new DefaultRulesEngine();

            //
            Facts facts = new Facts();
            rulesEngine.fire(rules, facts);
        } catch (Exception e) {
            e.printStackTrace();
        }

I tried these new features in the snapshot version. It's good

Great! Thank you for taking time to test the fix!


parameterize table names

Closes #21

Parameterize table names in SQL files

Create config file for table names

After this is merged, I plan to update the table names, rerun and cut another release.
@pwoods25443 a couple of questions:

I did not parameterize the table names in the known_fishing queries as those tables looked like
they might be stable and there is already one query per year.  Is that reasonable?

Currently some of the data in the other queries is being pulled from pipeline_normalize and some
from pipeline_classify_logistic_661b. Do you recall if there is a reason for this, or can I try to
consolidate these down to a single table?

@bitsofbits

I agree that the known fishing queries do not need to use different tables, so the changes in this PR look good
the pipeline_classify tables are a superset of the pipeline_normalize tables, so we probably could use the same table for everything, but we might change things in the future so that is no longer true.  I think we should probably continue to use the normalize table when we are only interested in the raw data and the classify table when we want the processed data


Support router.push without page navigation but update the route (shallow routing)

What problem is this solving
Currently, when using router.push, it reloads all components on the page. This behavior resets the component state, which may not always be desirable.
I can use window.history.pushState({}, '', '/shipment/123') which will update the URL without navigating BUT it will not update the router object - vue-router will still think that I am on previous page.
For example, if I have a "Create Shipment" page with a form to fill out. When I press "Save", I want the URL to change from /shipment to /shipment/:uuid, but I don't want to navigate anywhere, otherwise the form will be reset, I don't really need a navigation, only update the URL and route.
/shipment and /shipment/:uuid
Both routes point to the same page and component. When url is /shipment you get a new form and with /shipment/:uuid you get filled out form. If I use router.push('/shipment/:uuid'), the form will be reset because all components are reloaded. But I just want the URL to change because if the user refreshes the page, it should open the saved shipment not a new shipment. I have needed this feature several times already.
Here is a reproduction where you can see the problem:
https://github.com/martinszeltins/vue-router-update-url-only
When I press "Save Shipment" - it performs a navigation to /123. But I don't want a navigation. I only want the URL to update to /123
Proposed solution
It seems like I am looking for something like Next.js shallow routing but Next.js supports only updating query not params so it is not as good - https://nextjs.org/docs/pages/building-your-application/routing/linking-and-navigating#shallow-routing
This feature request proposes adding an optional parameter to the router.push function to allow developers to choose whether or not to reload the components on the page or to keep the page alive. This will handle the scenarios where only the URL update is required without impacting the component lifecycle.
Introduce an option to the router.push function, such as:
router.push('/shipment/123', { keepAlive: true })

// or silent
router.push('/shipment/123', { silent: true })

// or shallow
router.push('/shipment/123', { shallow: true })

This would do 2 things:

It will update the URL to /shipment/123
It will update the route object so route.params.id will be 123

But it will NOT trigger a real navigation - that is important.
Describe alternatives you've considered
No response

Currently, when using router.push, it reloads all components on the page. This behavior resets the component state, which may not always be desirable.

This is because you have a key attribute, otherwise, Vue will reuse the component. You can achieve the behavior you want by removing or adapting the key.

But I just want the URL to change because if the user refreshes the page, it should open the saved shipment not a new shipment. I have needed this feature several times already.

There is already a feature in Vue Router to achieve this: the route prop. It's poorly documented, so it's normal if you haven't seen it. It's what allows to have modals with a different URL and you can find an example here. You should be able to use that example to build your own feature. I can also help out understanding it or building it.

But it will NOT trigger a real navigation - that is important.

It would be interesting to know why you think that's important. From Vue Router perspective, it's crucial to always trigger navigations. Otherwise, navigation guards are not run and one cannot hook into the navigation, a major deal breaker for extensibility. In other words, shallow routing is just a workaround that ends up creating problems and should be avoided at all cost in routing.

It would be interesting to know why you think that's important. From Vue Router perspective, it's crucial to always trigger navigations. Otherwise, navigation guards are not run and one cannot hook into the navigation, a major deal breaker for extensibility. In other words, shallow routing is just a workaround that ends up creating problems and should be avoided at all cost in routing.

Because sometimes, I am super sure that I don't want or care about navigation guards or lifecycles. The only goal is to update the URL so that if the user reloads the page, they will land on this specific URL.

This is because you have a key attribute, otherwise, Vue will reuse the component. You can achieve the behavior you want by removing or adapting the key.

What key? Where do I have a key?

Because sometimes, I am super sure that I don't want or care about navigation guards or lifecycles. The only goal is to update the URL so that if the user reloads the page, they will land on this specific URL.

FYI Component lifecycles are disconnected from the navigation. Navigation guards can be added by plugins, you we are never sure that the goal is to update just the URL. Navigation guards can always skip if they want to. I'm confident the modal demo will prove helpful for your use case 🙂
I updated my comment!


new event OnAfterUpdateSalesOrderLineInvoicedQuantity in "Correct Posted Sales Invoice" codeunit

Hello,
Please add new event OnAfterUpdateSalesOrderLineInvoicedQuantity in "Correct Posted Sales Invoice" codeunit, UpdateSalesOrderLineInvoicedQuantity procedure.
Event Declaration:
    [IntegrationEvent(false, false)]
    local procedure OnAfterUpdateSalesOrderLineInvoicedQuantity(var SalesLine: Record "Sales Line"; CancelledQuantity: Decimal; CancelledQtyBase: Decimal)
    begin
    end;

Event Call:
    local procedure UpdateSalesOrderLineInvoicedQuantity(var SalesLine: Record "Sales Line"; CancelledQuantity: Decimal; CancelledQtyBase: Decimal)
    var
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeUpdateSalesOrderLineInvoicedQuantity(SalesLine, CancelledQuantity, CancelledQtyBase, IsHandled);
        if IsHandled then
            exit;

        SalesLine."Quantity Invoiced" -= CancelledQuantity;
        SalesLine."Qty. Invoiced (Base)" -= CancelledQtyBase;
        SalesLine."Quantity Shipped" -= CancelledQuantity;
        SalesLine."Qty. Shipped (Base)" -= CancelledQtyBase;
        SalesLine.InitOutstanding();
        SalesLine.InitQtyToShip();
        SalesLine.InitQtyToInvoice();
        SalesLine.Modify();
        //New Event >>
        OnAfterUpdateSalesOrderLineInvoicedQuantity(SalesLine, CancelledQuantity, CancelledQtyBase);
        //New Event <<
    end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Integrate with NestedSampling-hs

Can we have deanie create the required functions for use with NestedSampling-hs? That would be great.

I didn't realize this issue was still open. 😅  But I think this is impossible to do cleanly -- reifying a posterior from a model description seems to be pretty tricky, and might require dependent types.

To be honest I don't really understand why, because it's basically what BUGS and Stan already do. Happy to trust your judgment, though.

You can do it for simple finite models (i.e. the kind that BUGS or Stan support) but it winds up being pretty hacky.  Basically you have to add extra annotations for every variable in the model, along the lines of:
foo = do
  a <- bar (Tag "a")
  b <- baz a (Tag "b")
  c <- qux b (Tag "c")
  zop c (Tag "x")

The core problem is that since deanie is a language embedded in Haskell, you can't actually observe bound variable names (the a, b, c, etc. in a <- ...) in an interpreter, and so need to rely on something else to keep track of them when doing inference, reporting results, etc.  BUGS and Stan are standalone thingies (i.e. they aren't embedded in some other host language), so they don't have the same issue.
There are probably other ways to do this, via Template Haskell (hacky; probably not a total solution anyway) or something like the bound library maybe, but I've never tried them.
If one is willing to live with the additional fugly tagging syntax, It is indeed pretty easy to write something that reifies a posterior for basic (i.e. non-recursive, non-dynamic in size) models.  Maybe it would be worth implementing that in a separate library?  posterior-reifier? 😄

Gotcha. I have actually come across this myself in the past: https://plausibilitytheory.wordpress.com/2016/08/11/a-jags-like-interface-to-dnest4/


modules: introduce mkcert (development certification authority)

mkcert module allows to temporarily install a development certificate authority per project
to dynamically create a (local) certificate authority on first entry — a little more secure
[mkcert]
enable = true

or (predefined, if that is of circumstantial relevance to the project)
[mkcert]
enable = true
root-ca.key = """
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
"""
root-ca.cert = """
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
"""

What we get:
$ nix develop
[mkcert] Install development CA into the system stores...
[mkcert] The local CA is already installed in the system trust store! 👍
[mkcert] root CA directory: /nix/store/skw9isvhcacmwzpl7fxdlc81vq0gcdcm-rootCA
🔨 Welcome to devshell

[certs]

  mkcert        - A simple tool for making locally-trusted development certificates

[formatters]

  nixpkgs-fmt   - Nix code formatter for nixpkgs

[general commands]

  hello         - prints hello
  menu          - prints this menu

[linters]

  golangci-lint - golang linter

[utilites]

  hub           - github utility

$ [devshell]$ mkcert -CAROOT
/nix/store/skw9isvhcacmwzpl7fxdlc81vq0gcdcm-rootCA

$ [devshell]$ mkcert example.org

Created a new certificate valid for the following names 📜
 - "example.org"

The certificate is at "./example.org.pem" and the key at "./example.org-key.pem" ✅

It will expire on 27 April 2023 🗓

$ [devshell]$ git status
On branch da/mkcert-mod
Your branch is up to date with 'origin/da/mkcert-mod'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	example.org-key.pem
	example.org.pem

nothing added to commit but untracked files present (use "git add" to track)

Something I feel quite strongly about is that devshell modules should be self-contained and not touch files outside of the project root. I am historically bad at testing and don't want to be responsible for rm -rf /$variable where $variable is empty :)
It doesn't mean I don't understand the need for such a module. In its current design, it could be added to a ./contrib folder with enough caveats added to it. And also making sure to prompt the user before doing any changes to the system.
Or, we could come up with a self-contained design.
OpenSSL can be pointed to SSL_CERT_FILE to find what CAs are available. I'm thinking, the project could generate a private/public key-pair in Nix. Then generate a new CA bundle that includes the defaults + the public key. And finally, expose both through environment variables. Have you thought about that approach yet?

Something I feel quite strongly about is that devshell modules should be self-contained and not touch files outside of the project root. I am historically bad at testing and don't want to be responsible for rm -rf /$variable where $variable is empty :)
It doesn't mean I don't understand the need for such a module. In its current design, it could be added to a ./contrib folder with enough caveats added to it. And also making sure to prompt the user before doing any changes to the system.
Or, we could come up with a self-contained design.
OpenSSL can be pointed to SSL_CERT_FILE to find what CAs are available. I'm thinking, the project could generate a private/public key-pair in Nix. Then generate a new CA bundle that includes the defaults + the public key. And finally, expose both through environment variables. Have you thought about that approach yet?

PS: Browsers are moving in the direction of marking localhost connections as secure by default so the whole localhost SSL might become moot.

PS: Browsers are moving in the direction of marking localhost connections as secure by default so the whole localhost SSL might become moot.

Or, we could come up with a self-contained design.

On the horizon, that could be feasible, indeed.
As far as hostnames are concerned, there is even an dead simple, yet exploratory, implementation of the underlying C library looking for a environment host file.
As for udev, I think also udev rules can have a runtime configuration at /run/..

OpenSSL can be pointed to SSL_CERT_FILE to find what CAs are available. I'm thinking, the project could generate a private/public key-pair in Nix. Then generate a new CA bundle that includes the defaults + the public key. And finally, expose both through environment variables. Have you thought about that approach yet?

I was prompted about it in the past, once. If we check a couple of libraries (openssl/wolfssl/mbedssl/etc) and see what environment variables they do observe, then it might actually become a lot cleaner, indeed.
We need to make sure those do not override the system ones, but complement them.

Or, we could come up with a self-contained design.

On the horizon, that could be feasible, indeed.
As far as hostnames are concerned, there is even an dead simple, yet exploratory, implementation of the underlying C library looking for a environment host file.
As for udev, I think also udev rules can have a runtime configuration at /run/..

OpenSSL can be pointed to SSL_CERT_FILE to find what CAs are available. I'm thinking, the project could generate a private/public key-pair in Nix. Then generate a new CA bundle that includes the defaults + the public key. And finally, expose both through environment variables. Have you thought about that approach yet?

I was prompted about it in the past, once. If we check a couple of libraries (openssl/wolfssl/mbedssl/etc) and see what environment variables they do observe, then it might actually become a lot cleaner, indeed.
We need to make sure those do not override the system ones, but complement them.

In the context of a webapp, another thing you might do is start a reverse-proxy in front of the app that acts as the "load-balancer".
In the README, add a table that maps HTTP prefixes to ports for each backend. The browser then can hit a single end-point which makes things easier to manage.
Things get a bit trickier with IPC if the backends start talking to each-other.

In the context of a webapp, another thing you might do is start a reverse-proxy in front of the app that acts as the "load-balancer".
In the README, add a table that maps HTTP prefixes to ports for each backend. The browser then can hit a single end-point which makes things easier to manage.
Things get a bit trickier with IPC if the backends start talking to each-other.

Things get a bit trickier with IPC if the backends start talking to each-other.

Effectively, although not the most common scenario, some projects require to have properly set dns (for mTLS, I guess), even for local testing. One example is: github.com/openintegrationhub.

Things get a bit trickier with IPC if the backends start talking to each-other.

Effectively, although not the most common scenario, some projects require to have properly set dns (for mTLS, I guess), even for local testing. One example is: github.com/openintegrationhub.

Do you think this PR is worth pursuing? I would need some tests.


export all interfaces instead of just the 'top' interface

Hey,
could you change all the .d.ts files to export all interfaces? There are two reasons why I think this would be a good change:

you could go from this: foo(match.info : any) to foo(match.info : Info) This has two advantages: first type safety and second enabling auto complete for the properties of Info in the method. I know you could also just always pass the entire match to any function. however i think thats kind of unnecessary.
you could create a variable in a type safe way without having to define them right away. So instead of let matchInfo: any; you could write matchInfo : Info; This comes with the same adantages as the first reason.

Hello!
I believe that the DTOs for request responses should already be available for use (Potentially redefining type Info = Galeforce.dto.MatchDTO['info']; could help?)
Code example:
import Galeforce from 'galeforce';

const galeforce = new Galeforce({
  'riot-api': {
    key: 'RGAPI-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
  },
});

type Info = Galeforce.dto.MatchDTO['info'];

(async () => {
  const matchInfo: Info = (await galeforce.lol.match.match()
    .region(galeforce.region.riot.AMERICAS)
    .matchId('NA1_1234567890')
    .exec()).info;
  console.log(matchInfo);
})();

Please let me know if this works for you!

Hello bcho04,
thank you very much for your answer. that does indeed work for me. However it still seems like kind of a hack, so just out of curiosity: why dont you just export the other interfaces as well?

@hemmoleg
There are a couple reasons why I'm currently not exporting all of the lower-level interfaces for the DTOs; there's some name collision with the actual interface names, they're accessible as properties of the top-level interfaces corresponding to the API return values, and the sheer number of them (and their internal nature) makes it somewhat messy to export all of them directly.

oh ok. well thank you for the explanation :)


Adding a couple unit tests and code cleanup

@tellarin,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Can not reproduce DilatedNet result using provided solver, data_layer and training network

I tried to reproduce the result with provided data layer, training network and solver parameters but fail to produce even close result as provided DilatedNet model [http://sceneparsing.csail.mit.edu/model/DilatedNet_iter_120000.caffemodel].
A test run on validation images with model of 120000 iteration gives me following stats:

iteration 120000 overall accuracy 0.71458910259
iteration 120000 mean accuracy 0.321233999994
iteration 120000 mean IU 0.243954227299
iteration 120000 fwavacc 0.567641521075

However, the reported baseline performance is (73.6, 44.6, 32.3, 60.1)
I wonder what is going wrong and what I should do to have a matching result?
[The training images are resized to 384x384 and mirrored to match the setting of author's]

@Hexiang-Hu Hi Hexiang, there are several tricks we used to improve the performance, like data augmentation, using pretrained model on imageNet, large mini-batch training on multiple GPUs, early stopping, etc.

@hangzhaomit Thanks for the reply. I used imageNet pretrained model as well, but only have mirror as a data augmentation method. It would be so great if you provide some details about those tricks, like how large the mini-batch is, what early stopping strategy you used and which data augmentations are adapted in this model?
Sorry to bother you so much but I really want to reproduce the performance and do fair comparison to some other methods.

@Hexiang-Hu We used mini-batch size of 16; images randomly shifted to have 100k images in training. In your case, I expect you can get much better performance if you simply train for more iterations.

@hangzhaomit Thanks for the information. I will try more iterations.

I trained the network for 250k iterations and now the performance looks much nicer. Now pixel acc is around 73.2 and mean iu is 30.3.
@hangzhaomit Do you think more training iterations will continue to improve mean IU?

@Hexiang-Hu Good to know. Yes, should have space for improvement.

Thank you so much

@Hexiang-Hu  Did you try to train the net from scratch without using the pretrained weights?I tried training the net from scratch and  I couldn't even get 70 percent accuracy. I get blank images after training using the code. Were there any tricks that you used while training your net ? I tried to initialise the net with pretrained vgg-16 weights but that did not help either. Feel like there is some trick that I am missing. Any leads appreciated. Thanks!


Invoices rows

The invoices messages are pretty different depending on their state: PENDING OR PAID - SENT OR RECEIVED. So we have 6 different layouts to build:
1- RECEIVED PENDING INVOICE

2- RECEIVED PAID INVOICE AND SENT PAYMENT FOR THAT INVOICE:

they are 2 rows showing together but they need to be built separately
Even when they represent a received invoice, it will show on the right side of the chat (as any sent message) because it's linked to sent payment for that invoice)

3- SENT PENDING INVOICE

4- SENT PAID INVOICE AND INVOICE PAYMENT

they are 2 rows showing together but they need to be built separately
Even when they represent a sent invoice, it will show on the left side of the chat (as any received message) because it's linked to received payment for that invoice)

Another test comment

test comment

test

test

test

test

test

test

test


HelmetJS challenge helmet.hidePoweredBy() test failing always

In the second module of the HelmetJS section, the application will not pass the test despite having code fully correct. I even went to copy the code directly from the HelmetJS docs and it still will not pass. I have installed and required HelmetJS correctly in order to pass the test from the previous challenge and now the test for the second challenge fails and just says "expected 'Express' to not equal 'Express.'"

If I just call app.use(helmet()) then I get a different error that seems to be more accurate as to what should return an error. I have not found any solution that satisfies the test case.
EDIT:
Upon inspecting the header in the Chrome Dev Tools, it appears that the code is working correctly and the x-powered-by has been set to 'PHP 4.2.0' like it should have been. This makes me assume that the test is just always failing and returning that error message regardless of the actual header.

This challenge is the one that will not pass the test case.

Browser Name: Google Chrome
Browser Version: 69.0.3497.100 (Official Build) (64-bit)
Operating System: MacOS 10.13.6 High Sierra

I'm having issues with passing these tests too, same browser and OS combo.
it took many tries spaced over several hours to get the first and second tests to pass (code was not changed between attempts, it just didn't pass the first 3 or 4 times i tried to submit). the third challenge i've tried to submit multiple times over two days, and have also tried in firefox and safari.the one line of code i added to the file for this challenge is helmet.frameguard({action: 'deny'});
the error message in the test results is
helmet.frameguard() middleware is not mounted correctly
expected { 'x-powered-by': 'PHP 4.2.0' } to have property 'x-frame-options'

Same exact situation here.

Google Chrome Version 69.0.3497.100 (Official Build) (64-bit)
Windows 10

Facing the same issue, I was like going crazy, thanks @jacobvarner for the thread.

May I know, Is this reproduced in other browsers?.

The issue stems from the boilerplate - the api always returns 'Express' the first time it's called.  The work around is to submit your challenge twice as discussed above.  Waiting should not be necessary. Not beyond waiting for the first submission to fail.
As for a solution - it's necessary to change server.js to use express.Router().  I have a PR ready to go, but first I need to check this doesn't break something elsewhere!

I had the same issue, you can resolve it by using a previous version.  I was having the same issue to and what you did helped me out, what helped was changing the version from 4.0.0 to another previous version like 3.21.1 to fix the helmet.hidePoweredBy() middleware should be mounted correctly. error i kept getting. my code was right but the FCC site was just not letting me submit my glitch project link url.
My browser details
Browser Name: FireFox
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

This should be fixed now via https://github.com/freeCodeCamp/freeCodeCamp/pull/39194 - so I am going to close this. If anyone is still having problems, feel free to make a comment and we can reopen it. Thanks and happy coding 🎉