Create Android app for administering BX-bot

Create Android app for administering the bot.
It will consume the new BX-bot REST API - see #32
This work will be done in a new GitHub project: https://github.com/gazbert/bxbot-android

I may be able to have a look at this at some point, unless you've already got Boy on the case.

 I've only been tinkering until now.
I'm hacking at the REST API at the mo - still early days, but the endpoints for configuring the bot are starting to firm up.
I guess you could start knocking out the base 'droid app for now and wire up the REST API when I get my backside into gear ;-)

Alright cool, well I'm hopping off to Australia for a bit anyway, so perhaps when I get back :-D

Android devices will use the REST API provided by bxbot-ui-server:
https://github.com/gazbert/bxbot-ui-server

Hi I can help for Android.
Let me know if this is still open.

Hi @dudhatparesh - thanks for the offer, yes this is still open, go for it!
The REST API that the devices/Web UI will consume is not stable yet - #58 - I'm still evolving the design etc... but authentication will be done using JWT/TLS and I'd say the REST API defined in https://github.com/gazbert/bxbot-ui-server is about 80% there...
If we could get an android app working (even without JWT/TLS) to the same level of functionality as https://github.com/gazbert/bxbot-ui, that would be awesome!
There is a placeholder project already setup - https://github.com/gazbert/bxbot-android - feel free to fork this.
No rush for any of this, just code away whenever you get a chance... ;-)
My priorities are to add a Settings screen to https://github.com/gazbert/bxbot-ui to configure multiple bots, and then get it working e2e with https://github.com/gazbert/bxbot-ui-server  and https://github.com/gazbert/bxbot using JWT/TLS - the Runtime screen to stop/start/view logs will come later.
I'll assign the ticket to you.

Closing. No progress been made.
Will build React Native app instead - #102


Status of Cython compatibility

First PR opened on cython/cython#6137.
This allows the test suite to run. All of the falures are related to the refnanny.
https://github.com/cython/cython/pull/6147 enables vectorcall and fixes issues related to compiling in C99 mode.

https://github.com/cython/cython/pull/6137 was merged

Awesome, thanks @scoder and @lysnikolaou!

I noticed today there are some cython tests that assume PyObject has an ob_refcnt field. I also saw a segfault in parallel.parallel_exc_replace, which uses with gil. It doesn't particularly surprise me that with gil is broken.
We should probably have a brainstorming session about how to deal with prange code that does with gil.

We should probably have a brainstorming session about how to deal with prange code that does with gil.

I think there's a number of levels of that:

There's some user-code that assumes with gil can be used a lock around non-parallel bits of their code. That's never really been the right thing to do and probably isn't Cython's problem or your problem to fix.
There's some general Cython-generated code that isn't thread safe. That isn't specifically a prange problem since you could likely reproduce bugs with any threading mechanism. It should probably be fixed for nogil builds but it'll likely be a long process of finding the corner-cases. Avoiding borrowed references may solve a lot.
There's bit of Cython's internal code to do with prange/parallel that uses the GIL as a lock to juggle exception state between the Python interpreter and local variables. For that I suspect we'll need to guard it with a mutex in the nogil builds.
Eventually we'll probably want a nice way of doing prange that contains Python code for nogil builds (without having to wrap everything in meaningless with gil: blocks). That's a future problem since it's a new feature rather than a bugfix.

Thanks for that @da-woods!
One thing in response to what you wrote:

Avoiding borrowed references may solve a lot.

This seems worth doing. Not every case is unsafe and it's probably unwise to manually convert every borrowed reference usage in human-authored C API code, but there's no reason for cython to use unsafe C API constructions when there are safe alternatives available.
I spent some time working on cython this morning and opened https://github.com/cython/cython/issues/6154 to report what I found about the test suite in the nogil build.

Avoiding borrowed references may solve a lot.

This seems worth doing. Not every case is unsafe and it's probably unwise to manually convert every borrowed reference usage in human-authored C API code, but there's no reason for cython to use unsafe C API constructions when there are safe alternatives available.

I meant setting the CYTHON_AVOID_BORROWED_REFS flag (which isn't perfect and doesn't cover everything but does a lot)

Nightly wheels are up on https://anaconda.org/scientific-python-nightly-wheels/cython.

The PR that adds a new directive to declare free-threaded support was merged: https://github.com/cython/cython/pull/6242

The PR that adds a new directive to declare free-threaded support was merged: https://github.com/cython/cython/pull/6242

That means that NumPy and SciPy can now be updated to use the new directive. I'll work on updating the docs on our website and adding the directive to pandas next.

Closing in favor of the upstream issue.


Performance boost

Just update nginx would maybe give some improvements
Maybe even use the smaller alpine nginx version they have
Ref(https://hub.docker.com/_/nginx/)

I'm rebuilding the image right now.
On Alpine, the current image is pretty small already 55mb but feel free to fork this repo and create a Alpine version.

Great 👍

@sp90 Have you tried alpine? Did not see it on your repos :-p

I made an Alpine version with nginx v1.14 if anyone is interested - using on production with no issues:
https://github.com/LibrettoTeam/docker-nginx-alpine


How to kill all of the nginx process?

 I tried to use nginx -s stop and nginx -s quit command to do that, but that's all NO effect.

it's work using -s stop
which version of windows are you testing in?

nginx.exe -s stop
or
Taskkill /IM nginx.exe /F

in windows should run as administrator


ksonnet: init at v0.11.0

Motivation for this change
We already have kubecfg from @bentley, this adds ksonnet as well.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Fits CONTRIBUTING.md.

Will be closed in favor of #43644

Closed in favor of #43644.
Thanks.


[WIP] Ledger Balance Fixes

Abstract
Users in 1.0 are not getting their ledger balances, the receiving addresses are correct but the xpub is not being properly generated
What does this PR address?
This should remedy the issue with a ledger user not seeing their balance and the "view on explorer" being the correct xpub
This is still labeled as a WIP because I think there is an issue in the async as well because I am now noticing it being intermittent after these changes. Needs more testing

Closing for #162


Can I use Carla 0.9.15 with leaderboard2.0?

As far as I know, Carla 0.9.15 is newer comparing to leaderboard-2.0:

For Carla it self, there is 0.9.15 build and leaderboard-2.0 specific build;
For leaderboard repo, there is only a leaderboard2.0 branch that is up to date;
For scenario_runner repo, there are both master branch and leaderboard-2.0 branch that are up to date and they have diverted for quite a lot of commits.
I would like to take full advantage of latest Carla0.9.15 features along with leaderboard2.0 routes and metrics, so can I use Carla0.9.15 build with leaderboard-2.0 branch for leaderboard repo and master branch for scenario_runner repo?

In principle the expected CARLA package to be used in the Leaderboard is the one in the documentation, which is 0.9.14 with some bug fixes, but you should not have problems with using 0.9.15.

Did this issue get fixed?
Does Leaderboard-2.0 work on Carla 0.9.15 ?

While the Leaderboard 2.0 was designed to work with 0.9.14 as stated in the documentation, it should not present problems with 0.9.15.


Algonquin Regional High School

@figman57 For<EMAIL_ADDRESS>email address pattern the filename in the request has to be lib/domains/net/nsboroschools.txt. Please rename. Please ensure you are familiar with this repository rules located at the bottom of this page and rename accordingly.

@figman57 You might miss my previous comment. Please reply.


Prisma Client > Relation always must be bi-directional?

Describe the bug
When I use a relation in a "unique" direction, it looks that the CLI cannot generate the Prisma Client.
➜  xxx-server git:(master) ✗ prisma generate
Generating schema !
 ▸    Opposite side of relation directive "StoriesByUserSpace" found at "UserSpace.stories" is missing on type "Story"

Get in touch if you need help: https://www.prisma.io/forum/
To get more detailed output, run $ export DEBUG="*"

To Reproduce
Schema:
type Story {
  id
}
type UserSpace {
  id
  stories: [Story!]! @relation(name: "StoriesByUserSpace" onDelete: SET_NULL)
}

Expected behavior
Generate the Prisma Client.
I have no issue with the v1.16 about deploying the datamodel, or run post-deploy hooks like graphql get-schema -p prisma and graphql codegen.
Versions (please complete the following information):

OS: OS X High Sierra
prisma CLI: prisma/1.17.0-beta.22 (darwin-x64) node-v8.9.1
Prisma Server: 1.17-beta-1

Looks good since the merge from the PR of @divyenduz
I close the issue 😉

@johannpinson I'm getting the same error on version 1.17.1:
type Wish {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  title: String!
  description: String
  isExpereince: Boolean @default(value: "false")
  owner: User! @relation(name: "UserWishlist")
  experience: Experience @relation(name: "WishExperience")
  img: File @relation(name: "WishlistImage")
}

type Experience {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  translation: ExperienceTranslation! @relation(name: "ExperienceTranslations")
  price: ExperienceCurrency! @relation(name: "ExperienceCurrencies")
  receipts: [Receipt!]! @relation(name: "ExperienceReceipts")
}

Generating schema... !
 ▸    Opposite side of relation directive "WishExperience" found at
 ▸    "Wish.experience" is missing on type "Experience"

Get in touch if you need help: https://www.prisma.io/forum/
To get more detailed output, run $ export DEBUG="*"


RFC: Enum trait

 Issue by ghost
Sunday Mar 17, 2013 at 02:56 GMT
For earlier discussion, see https://github.com/rust-lang/rust/issues/5417
This issue was labelled with: A-libs, A-traits, B-RFC in the Rust repository

Since I've been doing some work with the deriving code in libsyntax, I thought I'd solicit opinions on adding a new trait to libcore:
trait Enum {
    static fn enumerate(blk: &fn(Self) -> bool);
}

Obviously, this would be most useful for enums with only nullary variants, but other enumerable types could take advantage of it as well (bool::all_values currently serves the same purpose).
This would make it possible to write
// enum Dir { North, East, South, West }
for Enum::enumerate |dir: Dir| { ... }

instead of
for [North, East, South, West].each |dir| { ... }

A standard implementation for enums with only nullary variants would be made available through #[deriving(Enum)], and a default method (or utility trait/impl until those are working) would be provided for obtaining all the values in a vector. It might be beneficial to have a static fn cardinality() -> Option<uint> method on the trait as well.
If the trait name is too easily confused with the keyword, another option is Enumerable.

Hello, apologies for reviving an old entry (I hope I'm not breaking any rules): what is the latest state of affairs on this subject? Are there (any plans for) traits implementable for Enums that allow you to access the tag number (preferably without consuming the enum in the process)?
My use case is a piece of code that can take any type (which it assumes/hopes to be an enum), and internally allocates an array whose length is the number of variants of the enum type - that is to say for:
enum Something { A, B, C }
An array of 3 would be allocated. To do this I have put together a trait "EnumTag" which provides the methods "tag_number(&self) -> usize" and "max_tag_number() -> usize". I thought this would be relatively trivial to implement, but then it turns out that (using the previous enum as an example):
impl EnumTag for Something {
fn tag_number(&self) -> usize { *self as usize }
fn max_tag_number() -> usize { Something::C as usize }
}
That implementation of tag_number is now illegal, as "as usize" now consumes self, whereas from old code examples online (and prior experience) I'm lead to believe that it used to be possible to write the above?
But anyway, I digress: are there any plans/thoughts on automatically derivable traits for enums that provide features such as the EnumTag example above? (or similar?)
Please let me know if this is the wrong place to ask.

You could self.clone() but I don't think that'd work as you want it to, either way :/

@omaskery You just need to #[derive(Copy, Clone] for that code to compile. Rust doesn't know that your enum is plain old data and that it can pass it by value, rather than consuming it.

@withoutboats Fantastic! I'll try that now, thank you.
And @Enamex, thank you both for taking the time to answer!
On a similar note, I stumbled upon https://github.com/rust-lang/rfcs/blob/master/text/0639-discriminant-intrinsic.md moments after posting my initial comment (how silly I felt!) so that's interesting, too :)

I find myself wanting to iterate over the variants of enums often, I'd love to see this get into Rust.

Same here; in addition, I often need functionalities like Haskell's pred and succ, but need to resort to workarounds instead.

You can do this with  rust-enum-derive. See #[DeriveIterVariants(..)]
custom_derive! {
    #[derive(Debug, PartialEq, Eq, IterVariants(CandyVariants),)]
    pub enum Candy { Musk, FruitRock, BoPeeps, LemonSherbert }
}

Links:

https://danielkeep.github.io/rust-custom-derive/doc/enum_derive/index.html
https://crates.io/crates/rust-enum-derive

Just my 2 cents: For a personal project, I needed a similar thing, which I encapsulated into an own crate, plain_enum (see here).
While it is probably not suited for everyone's needs, it may serve as a starting point or inspiration for others.
It can be used to declare a C-like enum as follows:
#[macro_use]
extern crate plain_enum;
plain_enum_mod!(module_for_enum, EnumName {
  Val1,
  Val2,
  Val3,
});

And will then allow you to do things like the following:
for value in EnumName::values() {
  // do things with value
}

let enummap = EnumName::map_from_fn(|value|
  convert_enum_value_to_mapped_value(value)
)

In the domain I work in, data modeling, we need to represent each of the elements that exists in our system's universe. I'd like to make these elements an enum so that I can have verification that all possibilities are covered. But in order to do this, I need to be able to iterate through the possibilities and to count them, so that I can store my measurements, for example, in a packed array of doubles. This use case is treating the enum to make a static, perfect hash that also is typechecked.

For now, you can write a macro which implements that iterator as well as the enum, I've written something similar before. Here's an example: https://is.gd/1hw4Tn

Am I correct in understanding that this issue has not had an RFC written for it in the currently expected manner, and that if one was written then iterable enums have a better chance of making it intro Rust as a built-in feature?
The alternatives suggested above work for enums where the variants have no payload:
enum Foo {
    NoPayloadA,
    NoPayloadB,
}

as opposed to
enum ByteFoo {
    BytePayloadA(u8),
    BytePayloadB(u8),
}

but given that we can iterate over the values of a given enum, then we should be able to iterate over enum with payloads that can be iterated over.
For example:
enum Foo {
    FooA,
    FooB,
}

enum Bar {
    BarA,
    BarB,
}

enum Baz {
   BazFoo(Foo),
   BazBar(Bar)
}

if given the preceding code we could iterate over Foo and Bar with something like Foo::iter() and Bar::iter(), then we should also be able to iterate over  all  four values of Baz with something like Baz::iter().
In fact, it seems like if this was implemented in such a way that built-in types could be iterated over as well, then all 512 possible values of my ByteFoo example above should then be able to be iterated over just as easily.

Since iteration is only possible on enums where every variant has the same type, if this were to be a built-in feature in standard Rust it would make changing a variant's type a potentially breaking API change even on variants that no one is supposed to use. For that reason, I believe this feature should be opt-in via some kind of #[derive(...)] annotation, the same way Copy, Clone, Default, etc require a #[derive(...)] annotation because they represent important commitments in your API that can't be removed without breaking code.
The status quo is that custom derive macros have been written to achieve this for no-payload enums. Is there any reason a similar custom derive macro could not be written for all same-payload enums? I don't know of any fundamental reason why they shouldn't be able to do that.

Some additional possible functionality for this trait:
trait Enum {
    fn len(&self) -> usize; // Total enum itemscount
    fn ordinal(item: Enum::Item) -> usize; // std::mem::discriminant() with additional typecheck.
}

I'm a new Rust user, hopefully it's appropriate to add my 2¢ here!
It seems like Rust enums are really algebraic sum types, which is great, but C-style or particularly Java-style enums (symbolic names for a set of hard-coded constants) are not very well served. Java's Enum classes are excellent. Rust could really use something similar.
For the basic functionality, there's "custom discriminants for field-less enumerations" -- tucked away in the reference and not even mentioned in the Rust Book. It took me a while to find this!
The big missing features are conversion to and from strings, and iteration through all the constants. Iteration is the most important because it can be used to implement string conversions (i.e. iterate through the enum values to build a lookup table).
There are various crates available for doing various bits of this, but it seems like such a key feature that it would be good to pull this into the standard library. If there were a standard #[derive EnumIterator] or some such that would be great. Maybe that would just mean blessing one of the existing third-party solutions.

An auto trait is problematic because I may not guarantee how many variants are there, their order, or anything like that. Adding a field would change VARIANT_COUNT which changes the API.
An auto trait is also problematic because new auto traits have other implications on generic code (AFAIU).

If not limited, how will we generate the actual value during the iterations?

Hey, I am quite new to Rust but couldn't we use Default::default() for this?

To add, there are some popular crates that implement some of the desired features.
The crate enum-iterator adds the Sequence trait which can be derived with #[derive(Sequence)]. This allows the consumer to get the length of the enumeration, and provides functions to get the first, last, previous and next elements.
The crate enum-map adds the Enum trait which can be derived with #[derive(Enum)]. This allows the consumer to get the length of the enumeration, and provides functions to convert from and into a usize, which is then used to implement a structure such as the EnumMap.
I also found the crate enum_traits, however this is unmaintained and not popular. It provides a collection of traits which can be derived.
There is also the Discriminant structure in the Rust standard library, but this is an opaque type and doesn't allow you to extract any useful information about the enumeration.
I think it would be great if Rust could create a trait for the standard library that mirrored the API seen in Sequence from enum-iterator and Enum from enum-map. I think a similar discussion is being discussed in regards to the num-traits crate.


BlackboxExporterSSLCertExpiringSoon is only warning at 30 days

Bug Description
This alert should either be critical or have another alert of the same/similar name that is critical at the 15 days mark
To Reproduce
N/A
Environment
N/A
Relevant log output
N/A

Additional context
No response

Hi @nishant-dash !
What do you think about replacing that alert rule with these ones?
groups:
- name: blackbox-exporter-ssl-expiring-soon-30-dyas
  rules:
  - alert: BlackboxExporterSSLCertExpiringSoon30Dyas
    expr: probe_ssl_earliest_cert_expiry{} - time() < 86400 * 30
    for: 5m
    labels:
      severity: warning
    annotations:
      summary: "SSL certificate will expire soon on (instance {{ $labels.probe_target }})"
      description: "SSL certificate expires in 30 days\n  VALUE = {{ $value }}\n  LABELS: {{ $labels }}"
- name: blackbox-exporter-ssl-expiring-soon-15-days
  rules:
  - alert: BlackboxExporterSSLCertExpiringSoon15Days
    expr: probe_ssl_earliest_cert_expiry{} - time() < 86400 * 15
    for: 5m
    labels:
      severity: critical
    annotations:
      summary: "SSL certificate will expire soon on (instance {{ $labels.probe_target }})"
      description: "SSL certificate expires in 30 days\n  VALUE = {{ $value }}\n  LABELS: {{ $labels }}"

@Abuelodelanada theres a slight typo there with 30-dyas. Also For the description in the 15-days, theres another typo "expires in 30 days". Other than this, it LGTM, thanks!


Add nayget init

ElegantBeef:

you can do what impbox does for nico and have a nayget init which setups a project

Porting raylib template might be a better option.


Automate submitting to Mitre

Only available to security team, or gated by a 'reviewed by security team' flag

The code is all there, I just disabled it all during the initial roll-out.  Plan is to bring it back after thinking about that reviewed-by option and how that would reset etc

how that would reset etc

I think I'd be OK with not resetting it - the chance that a project would change a CVE for the worse is fairly small, and if they do we can publish an updated CVE to Mitre easily now as part of the 'normal' handling of incoming work, without being in the critical path. The announcements would still have the bad update, but that's still better than the status quo

I've put in place the portal code and the push to cve.org button, but how this works in Vulnogram is it uses local (cached) credentials and does the push from the browser, but we're going to want projects to do it, so we'll need to convert this to a server side function instead so the users browser never sees any credentials.

this is done and live, it's restricted to security team


Ability to keep playing sound when app is inactive (e.g. when the screen is turned off, or the user switches to another app)

Very good plugin! Thanks!
Is it possible to keep playing sound when app is inactive (e.g. when the screen is turned off, or the user switches to another app)? Now when I turn screen off (or lock screen) the audio playing is stopped.
I tried to use Media plugin for looping mp3-audio file which length is about 60 seconds. But the Media plugin interrupts sound on ~50 second in Sony Z3 (Android 5.x) when screen is turned off (or locked), so the full mp3 audio file cannot be played. Media plugin works fine on Nexus 7 (Android 4.x) even app is inactive or screen is turned off.
Native Audio Plugin play sound ONLY when app is active.
Any ideas how to don't stop play sound when screen if turned off?

I have found the same issue (#33):
https://github.com/floatinghotpot/cordova-plugin-nativeaudio/issues/33

I have changed the original code of plugin - not call super.onPause():
public void onPause(boolean multitasking) {
}
It is helped to play sound even screen is locked or turned off.
But it is not fix the problem with playing audio on Sony X3 (Android 5.x)! :(
I have the same problem as using Media plugin - the audio is stopped on ~54 second.

I have changed the original code of plugin - not call super.onPause():
public void onPause(boolean multitasking) {
}
It is helped to play sound even screen is locked or turned off.
But it is not fix the problem with playing audio on Sony X3 (Android 5.x)! :(
I have the same problem as using Media plugin - the audio is stopped on ~54 second.

Maybe you can use https://github.com/katzer/cordova-plugin-background-mode on Android.


How to use redis-cluster for caching?

Werkzeug used redis-py to connect to redis, but it seems not support redis-cluster while the redis-py-cluster supported.
Can you tell me how I can use redis-py-cluster or pyredis for caching with redis-cluster?
Thank you very much!

I don't think Werkzeug has anything to do with redis, are you looking for another repo?

RedisCache is  a subclass of BaseCache, you can create your own caching class by subclassing BaseCache too


Is it possible to have either a containsText or for toHaveText to ignore whitespace at the end of string

Is your feature request related to a problem? Please describe.
deTox tests always fails when there are whitespaces at the end
Describe the solution you'd like
Either another matcher that ignores these prepending or appending whitespaces example containsText or an argument to toHaveText that makes it ignore whitespaces at the front or back.
Describe alternatives you've considered
none that I can think of now
Additional context
none

It's not possible to do. We provide the matcher string and it's matched against the view's labels.
Why not trim whitespace in your application?


make error

I try git clone and make. But an error has occurred. How to fix it?

clean
fmt
vet
build
CGO_ENABLED=1 go build -tags " cgo" .
test
=== RUN   TestApi
time="2020-04-12T20:48:22+03:00" level=error msg="Unable to create goutube object https://www.youtube.com/watch?v=lWEbEtr_Vng: fork/exec youtube-dl: no such file or directory"
TestApi: download_test.go:27: videoId(0): expected "lWEbEtr_Vng", actual "fork/exec youtube-dl: no such file or directory"
time="2020-04-12T20:48:22+03:00" level=error msg="Unable to create goutube object https://www.youtube.com/watch?v=ALWmcO8S-dc: fork/exec youtube-dl: no such file or directory"
TestApi: download_test.go:27: videoId(1): expected "ALWmcO8S-dc", actual "fork/exec youtube-dl: no such file or directory"
time="2020-04-12T20:48:22+03:00" level=error msg="Unable to create goutube object : fork/exec youtube-dl: no such file or directory"
TestApi: download_test.go:27: videoId(2): expected "", actual "fork/exec youtube-dl: no such file or directory"
time="2020-04-12T20:48:22+03:00" level=error msg="Unable to create goutube object https://www.facebook.com/mark/videos?v=RDHpNluHOAJFA: fork/exec youtube-dl: no such file or directory"
TestApi: download_test.go:27: videoId(3): expected "", actual "fork/exec youtube-dl: no such file or directory"
time="2020-04-12T20:48:22+03:00" level=error msg="Unable to create goutube object https://www.youtube.com/watch?v=ALWmcO8S-dc: fork/exec youtube-dl: no such file or directory"
TestApi: download_test.go:27: videoId(4): expected "ALWmcO8S-dc", actual "fork/exec youtube-dl: no such file or directory"
time="2020-04-12T20:48:22+03:00" level=error msg="Unable to create goutube object https://www.wsj.com/articles/trump-administration-wont-withdraw-from-paris-climate-deal-1505593922: fork/exec youtube-dl: no such file or directory"
TestApi: download_test.go:27: videoId(5): expected "", actual "fork/exec youtube-dl: no such file or directory"
time="2020-04-12T20:48:22+03:00" level=error msg="Unable to create goutube object https://vimeo.com/101522071: fork/exec youtube-dl: no such file or directory"
TestApi: download_test.go:27: videoId(6): expected "", actual "fork/exec youtube-dl: no such file or directory"
--- FAIL: TestApi (0.00s)
FAIL
FAIL	github.com/ch3ck/youtube-dl	0.007s
FAIL
Makefile:26: recipe for target 'test' failed
make: *** [test] Error 1

I also got an error on make:
make
+ clean
+ fmt
download.go
download.go
+ vet
+ build
CGO_ENABLED=1 go build -tags " cgo" .
+ test
=== RUN   TestApi
time="2020-04-27T16:10:23-07:00" level=error msg="Unable to create goutube object https://www.youtube.com/watch?v=lWEbEtr_Vng: exit status 2"
    TestApi: download_test.go:27: videoId(0): expected "lWEbEtr_Vng", actual "exit status 2"
time="2020-04-27T16:10:23-07:00" level=error msg="Unable to create goutube object https://www.youtube.com/watch?v=ALWmcO8S-dc: exit status 2"
    TestApi: download_test.go:27: videoId(1): expected "ALWmcO8S-dc", actual "exit status 2"
time="2020-04-27T16:10:23-07:00" level=error msg="Unable to create goutube object : exit status 2"
    TestApi: download_test.go:27: videoId(2): expected "", actual "exit status 2"
time="2020-04-27T16:10:23-07:00" level=error msg="Unable to create goutube object https://www.facebook.com/mark/videos?v=RDHpNluHOAJFA: exit status 2"
    TestApi: download_test.go:27: videoId(3): expected "", actual "exit status 2"
time="2020-04-27T16:10:23-07:00" level=error msg="Unable to create goutube object https://www.youtube.com/watch?v=ALWmcO8S-dc: exit status 2"
    TestApi: download_test.go:27: videoId(4): expected "ALWmcO8S-dc", actual "exit status 2"
time="2020-04-27T16:10:23-07:00" level=error msg="Unable to create goutube object https://www.wsj.com/articles/trump-administration-wont-withdraw-from-paris-climate-deal-1505593922: exit status 2"
    TestApi: download_test.go:27: videoId(5): expected "", actual "exit status 2"
time="2020-04-27T16:10:23-07:00" level=error msg="Unable to create goutube object https://vimeo.com/101522071: exit status 2"
    TestApi: download_test.go:27: videoId(6): expected "", actual "exit status 2"
--- FAIL: TestApi (0.10s)
FAIL
FAIL    github.com/ch3ck/youtube-dl     0.109s
FAIL
make: *** [test] Error 1

Same if I just try to run the binary:
youtube-dl -id xfLVxx_lBLU
ERRO[0000] Unable to create goutube object xfLVxx_lBLU: exit status 2
ERRO[0000] Unable to beginDownload: exit status 2

@netrebel @MK5555 you need to install the youtube-dl package as a dependency before running this.

@MK5555 fixed!


getElementsAtEventForMode does not return elements with null data

Expected behavior
I expect the method to return elements at the event position regardless of the values in the data. (Even with includeInvisible = true)
I need the elements to sync a crosshair in other graphs based on the cursor location in this graph so whatever the element data values are is not relevant for my use case.
I understand that this might be expected or desired behavior in all cases but it should at least be optional.
The problem stems from these 2 code snippets in the following files.
core/core.interaction.js
 if (!element.skip) {
        handler(element, index, j);
      }

src/controllers/controller.line.js

      const parsed = this.getParsed(i);
      const nullData = isNullOrUndef(parsed[vAxis]);
      const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);
      const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);

      properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;

Current behavior
The method filteres out elements that are null from the results.
Reproducible sample
https://codepen.io/leelenaleee/pen/WNyJXEe
Optional extra steps/info to reproduce
Check console for elements at mouse position, drag the mouse over the area with null points, console should be filled with ELEMENTS []
Possible solution
No response
Context
No response
chart.js version
v4.2.1
Browser name and version
No response
Link to your project
No response

You linked the template reproducible sample, can you update it to your correct reproducible sample?

You linked the template reproducible sample, can you update it to your correct reproducible sample?

Sorry, apparently I didn't save my example, fixing ASAP

@LeeLenaleee Updated now!

Any update on this issue? @LeeLenaleee


deserialize random behavior

input_mint = 'So11111111111111111111111111111111111111112'
output_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
amount =<PHONE_NUMBER>
slippage_bps = 50
api_url = f'https://quote-api.jup.ag/v6/quote?inputMint={input_mint}&outputMint={output_mint}&amount={amount}&slippageBps={slippage_bps}'
quote_response = requests.get(api_url).json()
swap_transaction_response = requests.post('https://quote-api.jup.ag/v6/swap', json=
{
'quoteResponse': quote_response,
'userPublicKey': str(public_key),
'wrapAndUnwrapSol': True,
})
swap_transaction = swap_transaction_response.json()['swapTransaction']
tx = Transaction.deserialize(base64.b64decode(swap_transaction))
print(tx)
Randomly gives errors:

line 320, in deserialize
return cls.from_solders(SoldersTx.from_bytes(raw_transaction))
ValueError: invalid value: continue signal on byte-three, expected a terminal signal on or before byte-three

line 320, in deserialize
return cls.from_solders(SoldersTx.from_bytes(raw_transaction))
ValueError: invalid value: alias encoding, expected strict form encoding

line 320, in deserialize
return cls.from_solders(SoldersTx.from_bytes(raw_transaction))
ValueError: io error: unexpected end of file

OR
Can randomly pass:
<solana.transaction.Transaction object at 0x0000017316C11130>
(As it should)

can you check if the randomness is in solders or the API response?

can you check if the randomness is in solders or the API response?

The exact same error occurs to me as well, I believe the randomness of the errors are occuring in solders.

same here

Doesn't the Jup API give a VersionedTransaction instead of a legacy Transaction?

Anyone found a way to fix this?Im facing the same issue

@Genza999 have you tried using VersionedTransaction instead of Transaction?

Worked with that, thanks
On Sat, 3 Feb 2024, 18:15 Kevin Heavey, @.***> wrote:

@Genza999 https://github.com/Genza999 have you tried using
VersionedTransaction instead of Transaction?
—
Reply to this email directly, view it on GitHub
https://github.com/michaelhly/solana-py/issues/374#issuecomment-1925355851,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGLFO4MTSDDEJAZS24CRND3YRZIA7AVCNFSM6AAAAAA7DGT6W6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGM2TKOBVGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

@Genza999 have you tried using VersionedTransaction instead of Transaction?

Even if u are using VersionedTransaction, it can randomly throw "ValueError: invalid value: alias encoding, expected strict form encoding". You can try for yourself. Make several requests. Some of them will throw error

I've been using the following line to to fix the issue myself and @uy5cu71  had. Since I made this adjustment this issue hasn't presented itself again.
rawTransaction = VersionedTransaction.from_bytes(base64.b64decode(swap_transaction))


Proposal: represent  of CompilerItems and CompilerProperties as dedicated types

While debugging #244, I noticed that debugging which compiler properties where active was not really clear. So similar to #243, I introduced two dedicated (read-only) types that contain the properties and the items. Potentiality, it can replace the dictionaries in the AnalyzerResult. That is, obviously a breaking change.
Under the hood, CompilerProperties and CompilerItemsCollection are dictionaries (with case-insensitive keys), but as I think (that can be challenged) having the values without the related key have less value in this case, the TryGet() method returns a KeyValuePair like struct that combines the two.
Let me know what you think.

As with #243, I love where your thinking with these changes but just don't have the bandwidth to bring them in. https://github.com/daveaglick/Buildalyzer/issues/247 is a request for a new maintainer(s) and I think it makes sense to let whoever takes over the project decide the direction of open PRs. Thanks for the work, and hopefully we can find a maintainer soon and get this merged.

@phmonte I think this one is also ready for review. This one should be easy (I think(.


Add custom metric for html[lang] attribute

Extract the value of the html[lang] attribute to allow for easier comparison of sites with different languages.
Since country ≠ language, it's important to be able to detect the language information separately, and the lang attribute is the most useful indicator.

We already get this in almanac.js where we get the full html node and all it's attributes.
You can see how to query it here: https://github.com/HTTPArchive/almanac.httparchive.org/blob/main/sql/2022/markup/lang.sql
Or see results here: https://almanac.httparchive.org/en/2022/markup#fig-4
or for more details here: https://docs.google.com/spreadsheets/d/1grkd2_1xSV3jvNK6ucRQ0OL1HmGTsScHuwA8GZuRLHU/edit#gid=1194853402

Ah, I missed this. Thanks! Will look into it.


Updated .travis.yml to include code coverage

Codecov Report

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

@@            Coverage Diff            @@
##             master      #12   +/-   ##
=========================================
  Coverage          ?   54.92%
=========================================
  Files             ?       12
  Lines             ?      619
  Branches          ?        0
=========================================
  Hits              ?      340
  Misses            ?      279
  Partials          ?        0

Continue to review full report at Codecov.

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


Error Downloading Data from a Site in Version 0.2, works in Version 0.1

Hello,
Attached are two screenshots, version .1 is successful in pulling the data, version .2 throws an error.
Can you give any guidance on what is happening?
Thanks!

There were several beta and testing versions of WQReview 2.0 that were widely distributed but still have bugs. Could this be one of them?
Try uninstalling (go to the directory where it's installed and run unins000.exe, then delete the folder) and re-downloading and installing the latest install executable on the FTP site. If this doesn't fix the problem I'll need your DBA to grant me temporary access to nwisaz to investigate the bug further.


Article resolvers return both Article and Draft type objects

Tasks

[x] Article resolvers return both Article and Draft ,  at the same time most Article fields' resolvers assume that their parents are Draft

References

Slack
https://github.com/thematters/matters-server/issues/2952

root-resovler
editArticle
toggleASubscribeArticle
appreciateArticle
readArticle
toggleArticleRecommend
updateArticleState
Topic.latestAricle
Topic.articles
CircleContentAnalytics.Public
CircleContentAnalytics.Paywall
ArticleNotice.target
ArticleActicleNotice.target
ArticleActicleNotice.article
ArticleTagNotice.article
Appreciation
Chapter.articles
ReadHistory
UserAddArticleTagActivity
UserPublishArticleActivity
ArticleRecommendationActivity.nodes
ResponseEdge
Transaction.target
Recommendation.readTagsArticle
Recommendation.newest
Recommendation.hottest
Recommendation.icymi
User.articles
User.commentedArticles
User.subscription
OSS.articles
Draft.article
Draft.collection
Circle.works
Tag.articles
Article.collectedBy
Article.collection
Article.relatedArticles
Article.relatedDonationAricles

All resolvers return draft correctly,  except  Draft.article


Ad's on RTD?

@sjezewski

Is this about ads as in advertisements? Or something different?

pachyderm.readthedocs.io has an ad display in the bottom left. It must be something from readthedocs and we just noticed it when we pushed. Sean was there so I didn't ad more info. We want to figure out how to get rid of it, obviously.

We started paying for RTD and got rid of ads. Also got a few new nice features we can consider using such as a Canonical URL such as docs.pachyderm.io instead of pachyderm.readthedocs.io.


Overload arithmetic operations for LinearCombinationOfGateOperations

The aim is to enable users to write expressions such as
cirq.X(q) / 2 - cirq.Y(p) / 2

instead of
cirq.LinearCombinationOfGateOperations({
    cirq.X(q): 0.5,
    cirq.Y(p): -0.5,
})

Similar overloads exist already for LinearCombinationOfGates.
Context: Filed in review of #1612.

This seems to have been completed.  At least for the stated example :)
cirq.X(a) / 2 + cirq.Y(b) / 2

gives
cirq.PauliSum(cirq.LinearDict({frozenset({(cirq.LineQubit(0), cirq.X)}): (0.5+0j), frozenset({(cirq.LineQubit(1), cirq.Y)}): (0.5+0j)}))


App icon in launch (aka splash) screen should not move (up) abruptly

During a cold launch, this happens:

the launch screen (which includes the app icon) appears
SplashView(Controller) appears (probably due to ProtectionCoordinator) which includes the app icon too.
SplashViewController is hidden

The app icon in (1) and (2)'s y position is slightly different so it looks like the logo moved up abruptly. The icon should not move at all.
Need to verify the fix works on 5s, iPhone X and a bigger than 5s phone with no notch.

Keeping this for Sunil

Hello @AW-STJ
Can u verify if this is as per required?
This is for notch device.

This is for Older/Notch less device.

@hadwanihardik launch the app again after creating a wallet to be sure.

@hboon I checked  it in notch display after creating wallet it has issue

@hboon I checked  it in notch display after creating wallet it has issue.

@hboon
Is this shows issue resolved.
please check video in attached link.
https://drive.google.com/file/d/1v_6lY1jqrdf9Q4_1iopPxMN1B2VwbYVm/view?usp=sharing

@hadwanihardik can you push the code? And I can't watch the video.

Always push the code in a PR.

Ok sure
Sent from iPhone
Regards,
Hardik Hadwani
(iOS Developer)

On 23-Jun-2020, at 9:43 AM, Hwee-Boon Yar<EMAIL_ADDRESS>wrote:

Always push the code in a PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@hadwanihardik launch the app again after creating a wallet to be sure.

Hey boon this is public link you must be able to see video
https://drive.google.com/file/d/1v_6lY1jqrdf9Q4_1iopPxMN1B2VwbYVm/view?usp=sharing

@hboon I created PR for the same


Code-GPT Not Producing Output

Firstly, I am not able to close out of the Chat 1 box in Code-GPT, the button to the right of the Send button is red as if it is running, but I am unable to click it, here is a screenshot of the issue.

Secondly, even when a new tab is opened, Code-GPT does not produce any results. The cursor just keeps blinking and no output is given, here's the screenshot for that.

What should I do to resolve this?

Hey, can someone help me resolve this issue? What seems to be the problem here?

Closing this issue due to inactivity.


add list of publications or projects which use StartUpDG.jl

Stable and Conservative High-Order Methods on Triangular Elements Using Tensor-Product Summation-by-Parts Operators by Montoya, Zingg 2022
Adaptive numerical simulations with Trixi.jl: A case study of Julia for scientific computing

https://www.researchgate.net/profile/Anita-Gjesteland/publication/374234334_Injected_Dirichlet_boundary_conditions_for_general_diagonal-norm_SBP_operators/links/6515500dcce2460b6c3d6eda/Injected-Dirichlet-boundary-conditions-for-general-diagonal-norm-SBP-operators.pdf

https://arxiv.org/pdf/2312.07874.pdf


⚠ Bofrost.de has degraded performance

In 2797d7c, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 2715 ms

Resolved: Bofrost.de performance has improved in 7880dd7.


refact(Transaction Management): add links to Tracking Actions

feat(Transaction Management): add print format for transaction


GetSize() and GetSpace()

Is the GetSize() based on space of (1, 1, 1) if the image is of 3 dimensions, or based on space as GetSpace()?

The reason why I asked the question is because the GetImageFromArray() and GetArrayFromImage() are not symmetric. GetArrayFromImage() makes the size of array the same as image size. But GetImageFromArray is not.

And SetSpacing() for the GetArrayFromImage() does not work.

GetSize() returns dimension in voxels.
GetSpacing() returns the size of a single voxel.
If you import an image to a python? array, fiddle with it, then convert it back then it is usually necessary to use the CopyInformation method to copy all the original metadata, such as spacing, to the new image. There is no SetSpacing for arrays, as they are not image objects.
Have a look at:
http://simpleitk.github.io/SimpleITK-Notebooks/01_Image_Basics.html

Thank you! I will take a look at it！


[MM-37497] Rename view image modal to file preview modal and change imports

Summary
As part of new file preview modal ui changes MM-12104, Changing the preview modal name from view image modal to file preview modal. We show variety of files (pdf) using that component, so name is little misleading.
Ticket Link
https://mattermost.atlassian.net/browse/MM-37497
Related Pull Requests

None

Screenshots

Release Note
NONE

Hello @AshishDhama,
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.

I don't think this needs to be in the release notes since it won't have any effect on users yet

I don't think this needs to be in the release notes since it won't have any effect on users yet

@hmhealey Should I remove the release note then.

Yeah, please do. I think those end up in the changelog, so they only need to be things that end users will actually care about. The actual technical details we need are in the commit messages themselves.

Thanks @AshishDhama
Tested, looks good to merge.

Verified/tested file and image preview - as before.
Found few issues that also reproduce on master, filed separately
MM-37565
MM-37566
MM-37567

@jgilliam17 Thanks will check if we can fix these as part of parent ticket.

@AshishDhama - This PR may have API documentation impact. Are you open to review and update the API docs as needed?

@AshishDhama - This PR may have API documentation impact. Are you open to review and update the API docs as needed?

@cwarnermm sure I will check the documents if there will something that needs to be updated will do that.

@cwarnermm This pr doesn’t contains any api changes, Actually in this pr we have just renamed the Image view modal to file preview modal. So only renaming No changes in UI as well

Yeah, I don't think this has any effects on documented APIs unless plugins are doing something wonky to access it directly.


Don't validate hidden inputs

The error indicators work properly while editing the form, but after clicking the (disabled) submit button, they disappear:
http://jsbin.com/moyojafuvu/1/edit?html,css,output
Can someone tell me what I'm doing wrong?
Thanks!

I think the hidden fields in the .form-group are causing the validator to thing there's no error, so it's clearing them.
I should probably exclude validation on those.

Thanks, Cina!
I was hoping to use your validator for a project that's due shortly. I'd
fix it myself, but I'm not a JavaScript developer. I'd be happy to pay to
have it fixed if you or someone you know would be willing to do it.
I'd also be happy to donate to keep this project going, because I love its
declarative design. So let me know how I can help.
Thanks again,
Steve Kramer
On Mon, Mar 9, 2015 at 4:21 PM, Cina Saffary<EMAIL_ADDRESS>wrote:

I think the hidden fields in the .form-group are causing the validator to
thing there's no error, so it's clearing them.
I should probably exclude validation on those.
—
Reply to this email directly or view it on GitHub
https://github.com/1000hz/bootstrap-validator/issues/84#issuecomment-77965649
.

Just pushed v0.7.3 of the plugin. It was a simple fix. Let me know if works out for you.

Hi Cina,
I tested it on jsbin, but it doesn't seem to work. Maybe I'm doing
something wrong. Does it work for you?
Thanks,
Steve
On Tue, Mar 10, 2015 at 11:14 AM, Cina Saffary<EMAIL_ADDRESS>wrote:

Just pushed v0.7.3 of the plugin. It was a simple fix. Let me know if
works out for you.
—
Reply to this email directly or view it on GitHub
https://github.com/1000hz/bootstrap-validator/issues/84#issuecomment-78113922
.

I hadn't pushed the new version up to the docs page, where the JSBin is pulling the script from. I just updated it and the JSBin is working for me.

Cina, it works!
Thanks for your quick response,
Steve
On Tue, Mar 10, 2015 at 11:40 AM, Cina Saffary<EMAIL_ADDRESS>wrote:

I hadn't pushed the new version up to the docs page, where the JSBin is
pulling the script from. I just updated it and the JSBin is working for me.
—
Reply to this email directly or view it on GitHub
https://github.com/1000hz/bootstrap-validator/issues/84#issuecomment-78119300
.


gradle-completion: init at 1.3.1

Motivation for this change
This package adds completion scripts for gradle on the bash and
zsh shells.
The completions can be enabled like this:
{ pkgs, ... }:
{
  environment.systemPackages = [ pkgs.gradle pkgs.gradle-completion ];
  programs.zsh.enable = true;
}

The package stores the scripts into the expected directories in
$out/share to ensure that the shells can easily find their scripts.
Closes #42799
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

Success on x86_64-linux (full log)
Attempted: gradle-completion
Partial log (click to expand)
patching sources
configuring
no configure script, doing nothing
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/fmy99395mfr23myxxambvwgprvygdh06-gradle-completion-1.3.1
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/fmy99395mfr23myxxambvwgprvygdh06-gradle-completion-1.3.1
checking for references to /build in /nix/store/fmy99395mfr23myxxambvwgprvygdh06-gradle-completion-1.3.1...
/nix/store/fmy99395mfr23myxxambvwgprvygdh06-gradle-completion-1.3.1

Success on aarch64-linux (full log)
Attempted: gradle-completion
Partial log (click to expand)
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/yc2zg2fcbiac8d7fhzh2zp6i4rq0qhgi-gradle-completion-1.3.1
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/yc2zg2fcbiac8d7fhzh2zp6i4rq0qhgi-gradle-completion-1.3.1
checking for references to /build in /nix/store/yc2zg2fcbiac8d7fhzh2zp6i4rq0qhgi-gradle-completion-1.3.1...
/nix/store/yc2zg2fcbiac8d7fhzh2zp6i4rq0qhgi-gradle-completion-1.3.1


These classes are not used on the same nodes so use normal packages

We seem to have hit an issue with stdlib so we're reverting this change
out. 4.12.0 didn't work with it on Puppet 3 but it does on puppet 4.3

:+1: mergey mergey


Ender Fluid Conduits have massive Waila tooltips

The tooltips on large ender fluid conduit networks fill the entire screen: http://i.imgur.com/LEtiEGe.png

see #3113


The resulting ToF pcap file is different from the given test file.

The given test pcap file in /ToF/traces/test is shown below:

But what I got is something like this:

They looks quite different and the frame interval is not 4ms. Since I can extract ToF, all the files I got are like this. Is it right? And if it's wrong, what's the problem?

I think it is ok. Which was the ToF value? If the ToF value is ok, it means that the pcap is fine.
Try by cables first.
Best,
Alejandro

I think it is ok. Which was the ToF value? If the ToF value is ok, it means that the pcap is fine.
Try by cables first.
Best, Alejandro

Thanks, I will try it.


Refactor: organize code structure

Refactor logging module
Specify provider dependencies on pages
Remove dependency with summary and detail page
Rewrite context.maybeRead method
Fix habit's revert operation

 Code Refactoring


NXP/MIMXRT1062.svd: make unique "name" from duplicated enumeratedValue identifiers

This PR implements the changes proposed in issue #115

@ardnew This has been stale for a bit; generally, we do not accept patches to SVD files here at present in favor of using files directly from vendors.  We have discussed some and may revisit a patch approach for fixing vendor bugs via postprocessing but at this time we don't have a strong story for that.


Fix ToS message

I dunno if this is how python works, I'm just guessing

Oh ye added fix for DM commands throwing error I think idfk I just guessed again, no testing


Add quickcheck tests for FromJSON / ToJSON instances

We are hand coding the JSON instances.
Provide quickcheck tests that confirm that we can successfully roundtrip all JSON instances.
i.e. decode . encode == id

Could we have people make a comment when they're taking a shot at a ticket and let others know when they're setting it aside if they didn't reach a PR-able state?

Or just assign the issue to themselves. The "Asignee" button on the right.

@alanz ah right, at'll do 'er.

Note that you can only assign issues to you if you are part of the project, so especially for newcomers this is not an option.

ok. does anyone need to be added at the moment?

@alanz perhaps make it known that a comment is an acceptable fallback if somebody that isn't on the project yet wants to claim a ticket and doesn't want to wait to get added?


Disable Node IPAM in Hetzner CCM

What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR disables Node IPAM in Hetzner CCM. Node IPAM is also running in kube-controller-manager (unless it would run with --allocate-node-cidrs=false), which can cause serious issues when two controllers are competing with the allocation. This manifest in network connectivity being broken between control plane and worker nodes, causing some components (such as CSI) to fail. It's also not possible to get logs of pods running on the worker nodes.
We had the same issue on Azure (see #2104 and #2106), which we fixed in the same way, i.e. by disabling Node IPAM in CCM.
Does this PR introduce a user-facing change?:
Disable Node IPAM in Hetzner CCM. This fixes network connectivity issues on the worker nodes.

/test pull-kubeone-e2e-hetzner-default-install-containerd-external-v1.21.14

/test pull-kubeone-e2e-hetzner-default-install-containerd-external-v1.21.14

/test pull-kubeone-e2e-hetzner-default-install-containerd-external-v1.21.14

/test pull-kubeone-e2e-hetzner-default-install-containerd-external-v1.21.14

/lgtm

/test pull-kubeone-e2e-hetzner-default-install-containerd-external-v1.21.14


Don't add duplicate years when renaming shows

What TMM version are you using?
2.9.14 - Homebrew - (Jave 11 - after I fixed the script)
What is the actual behaviour?
Renaming a show with a year in the shows name, the year is duplicated.
What is the expected behaviour?
If year it the same, or differ minimally, one is omitted somehow.  Thoughts?
Steps to reproduce:

Find Tokyo Ghoul:re (2018) (AniDB)
Rename folder
Get Tokyo GhoulRe (2018) (2018) as the filename

Additional
Your Operating system? (win/mac/linux? version?) - macOS

if the year is part of the title, it will be hard to detect that and do not add the year via tmm..
are that much tv shows affected?

Don't believe there is a bunch.  Guess that it's more of an issue with AniDB that splits the seasons into separate shows.


MINOR: Change type of StreamsConfig.BOOTSTRAP_SERVERS_CONFIG to List

To be consistent with other configs. cc @ijuma

LGTM

Actually, I think we should have a test for this.

I had a look and it's easy to add a test in StreamsConfigTest that throws a ClassCastException before this change by using getList on the bootstrap.servers property.

An updated version of this PR, including a unit test, is available at https://github.com/apache/kafka/pull/1377.

@guozhangwang: You can close this PR.

Thanks @miguno


dovecot_pigeonhole: 0.5.2 -> 0.5.3

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/dovecot-pigeonhole/versions.
meta.description for dovecot_pigeonhole is: '"A sieve plugin for the Dovecot IMAP server"'.

Checks done (click to expand)

built on NixOS
Warning: no invocation of /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/bin/sievec had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/bin/sieve-dump had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/bin/sieve-test had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/bin/sieve-filter had a zero exit code or showed the expected version
0 of 4 passed binary check by having a zero exit code.
0 of 4 passed binary check by having the new version present in output.
found 0.5.3 with grep in /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3
directory tree listing: https://gist.github.com/73626a1d155fd6a190a7a8bf50aea231
du listing: https://gist.github.com/d94ffa8efdfceea6212437f118db89f1

Instructions to test this update (click to expand)

One-time optional setup to skip building using Cachix:

Install cachix from https://cachix.org/
Use r-ryantm's cache:cachix use r-ryantm

Test this update by entering a nix shell, seeing what is inside the
result, and if applicable, running some binaries:
nix-shell --pure -I nixpkgs=https://github.com/r-ryantm/nixpkgs/archive/8cdecfc127db08225ee652110cf3f3e4b2a07167.tar.gz -p dovecot_pigeonhole
ls -la /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3

cc @rickynils for testing.

Success on x86_64-linux (full log)
Attempted: dovecot_pigeonhole
Partial log (click to expand)
shrinking /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/lib/dovecot/settings/libmanagesieve_login_settings.so
shrinking /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/lib/dovecot/settings/libmanagesieve_settings.so
shrinking /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/lib/dovecot/settings/libpigeonhole_settings.so
shrinking /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/lib/dovecot/lib90_sieve_plugin.so
shrinking /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/lib/dovecot-2.3-pigeonhole/libdovecot-sieve.so.0.0.0
gzipping man pages under /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/share/man/
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/lib  /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/libexec  /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3/bin
patching script interpreter paths in /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3
checking for references to /build in /nix/store/381f23m9h9g5yd2vx8amah13ncr18wj7-dovecot-pigeonhole-0.5.3...

Success on aarch64-linux (full log)
Attempted: dovecot_pigeonhole
Partial log (click to expand)
shrinking /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/lib/dovecot/sieve/lib90_sieve_imapsieve_plugin.so
shrinking /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/lib/dovecot/sieve/lib90_sieve_extprograms_plugin.so
shrinking /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/lib/dovecot/lib90_sieve_plugin.so
shrinking /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so
shrinking /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/lib/dovecot-2.3-pigeonhole/libdovecot-sieve.so.0.0.0
gzipping man pages under /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/share/man/
strip is /nix/store/428gs2z4b8f9byvghzlpbjwjb3a7jwxx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/lib  /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/libexec  /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3/bin
patching script interpreter paths in /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3
checking for references to /build in /nix/store/dw14qf4s19bp3af56n0g5sm5gnbm9vw4-dovecot-pigeonhole-0.5.3...

Success on x86_64-darwin (full log)
Attempted: dovecot_pigeonhole
Partial log (click to expand)
make[3]: Entering directory '/private/tmp/nix-build-dovecot-pigeonhole-0.5.3.drv-0/dovecot-2.3-pigeonhole-0.5.3/doc'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Leaving directory '/private/tmp/nix-build-dovecot-pigeonhole-0.5.3.drv-0/dovecot-2.3-pigeonhole-0.5.3/doc'
make[2]: Leaving directory '/private/tmp/nix-build-dovecot-pigeonhole-0.5.3.drv-0/dovecot-2.3-pigeonhole-0.5.3/doc'
make[1]: Leaving directory '/private/tmp/nix-build-dovecot-pigeonhole-0.5.3.drv-0/dovecot-2.3-pigeonhole-0.5.3/doc'
post-installation fixup
gzipping man pages under /nix/store/jiiabbp4lhdf4wxl5fi6is29v1bp6yg7-dovecot-pigeonhole-0.5.3/share/man/
strip is /nix/store/9xjkb4xz0b5lmizij9ppxy7lkxdxhx6b-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/jiiabbp4lhdf4wxl5fi6is29v1bp6yg7-dovecot-pigeonhole-0.5.3/lib  /nix/store/jiiabbp4lhdf4wxl5fi6is29v1bp6yg7-dovecot-pigeonhole-0.5.3/libexec  /nix/store/jiiabbp4lhdf4wxl5fi6is29v1bp6yg7-dovecot-pigeonhole-0.5.3/bin
patching script interpreter paths in /nix/store/jiiabbp4lhdf4wxl5fi6is29v1bp6yg7-dovecot-pigeonhole-0.5.3


How to use spatialite extension?

I am newbie of NativeScript, Can you recommend how to use spatialite extension?
(from this link: spatialite  )

@pattrawuth2530 - To my knowledge nobody has created a plugin that supports Spatialite for NativeScript yet.   You can double check by going to https://plugins.nativescript.rocks and checking.     If you need someone to develop it for you; I can make you a quote to build it for you, just contact me via email.


Fixed the issue ENTMQBR-2424 panic: runtime error: invalid memory address or nil pointer reference'

Fixed the issue ENTMQBR-2424 panic: runtime error: invalid memory address or nil pointer reference'
Signed-off-by: Abdul Hameed<EMAIL_ADDRESS>

@redhatHameed Good find on the defer! Thanks!


fix: revert default search mapping change

Summary of Changes
So the change got more pushed back internally.  Let's revert it for now.
Tests
What tests did you add or modify and why? If no tests were added or modified, explain why. Remove this line
Documentation
What documentation did you add or modify and why? Add any relevant links then remove this line
CheckList
Make sure you have checked all steps below to ensure a timely review.

[ ] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"

In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

[ ] PR includes a summary of changes.
[ ] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
[ ] In case of new functionality, my PR adds documentation that describes how to use it.

All the public functions and the classes in the PR contain docstrings that explain what it does

[ ] PR passes make test

+1

Codecov Report

Merging #276 into master will decrease coverage by 0.28%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #276      +/-   ##
==========================================
- Coverage   74.39%   74.11%   -0.29%
==========================================
  Files         100      100
  Lines        4199     4199
  Branches      390      371      -19
==========================================
- Hits         3124     3112      -12
- Misses        975      979       +4
- Partials      100      108       +8

Impacted Files
Coverage Δ

databuilder/publisher/elasticsearch_constants.py
100.00% <ø> (ø)

databuilder/loader/file_system_neo4j_csv_loader.py
83.33% <0.00%> (-5.96%)
:arrow_down:

...ilder/transformer/regex_str_replace_transformer.py
92.85% <0.00%> (-3.58%)
:arrow_down:

...abuilder/extractor/snowflake_metadata_extractor.py
93.44% <0.00%> (-1.64%)
:arrow_down:

...tabuilder/extractor/postgres_metadata_extractor.py
93.54% <0.00%> (-1.62%)
:arrow_down:

databuilder/extractor/mssql_metadata_extractor.py
94.02% <0.00%> (-1.50%)
:arrow_down:

databuilder/publisher/neo4j_csv_publisher.py
84.23% <0.00%> (-0.99%)
:arrow_down:

databuilder/task/neo4j_staleness_removal_task.py
83.62% <0.00%> (-0.87%)
:arrow_down:

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 a8440b1...cce3533. Read the comment docs.

cc @jdavidheiser
unfortunately we have to revert as lots of internal push back on the new change :)

i can add one example showing why search quality is not good


Docker network create doesn't inherit the MTU set in the Docker deamon

Docker network create doesn't inherit the MTU set in the Docker deamon
The Docker deamon dockerd on some of our hosts has the mtu set to 1450 using the flag "--mtu=1450".
When a network is created using "docker network create " the mtu for the bridge is set at 1500.
It would make sense for the network to use the mtu setting specified as
Steps to reproduce the issue:

run docker with a custom mtu "dockerd --mtu=1450"

/usr/bin/dockerd --mtu=1400 --debug=true -H unix:///var/run/docker.sock

docker create a network  called test

docker network create test
8fbf416d37582ee1f0352625cb0cdff786e3516d10b8540e5bac458bebf53d95

list the networks

docker network ls
NETWORK ID          NAME                     DRIVER              SCOPE
e9c21cb405c9        bridge                   bridge              local
bd0f75218012        host                     host                local
3d81c322c790        none                     null                local
8fbf416d3758        test                     bridge              local

ip link show | grep 8fbf416d3758

543: br-8fbf416d3758: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN

Describe the results you received:
I expected the network created to honour the MTU set at the daemon level
Describe the results you expected:
Any networks created the MTU is set to 1500
Additional information you deem important (e.g. issue happens only occasionally):
I am aware that I can set the MTU manually. This means I need to have knowledge about the docker I'm running on. I just want to be unaware of the underlying hardware and network configuration
Output of docker version:
docker version
Client:
 Version:      1.12.2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   19fddc2
 Built:
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   19fddc2
 Built:
 OS/Arch:      linux/amd64

Output of docker info:
docker info
Containers: 15
 Running: 7
 Paused: 0
 Stopped: 8
Images: 37
Server Version: 1.12.2
Storage Driver: btrfs
 Build Version: Btrfs v4.2.2
 Library Version: 101
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.1.12-61.1.17.el6uek.x86_64
Operating System: Oracle Linux Server 6.7
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.858 GiB
Name: **********.novalocal
ID: P5PR:YBOT:SLNB:IPES:KTV6:GO26:6UU3:FUWC:UKU5:TFY6:P2VI:Z3MP
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 59
 Goroutines: 87
 System Time: 2016-11-11T12:03:02.740206819-05:00
 EventsListeners: 0
Registry: https://index.docker.io/v1/

Additional environment details (AWS, VirtualBox, physical, etc.):
Openstack, physical mix

Yes it does not inherit, because the daemon network options, like --mtu, --fixed-cidr, ... are only for the default automatically created bridge network bridge. They are not default options for all networks.

@aboch What's the reason they're not the default option for networks created on a daemon which has the --mtu network option?

Because those options existed long before user could create networks, and their semantic was associated to the then only existing docker0 bridge.
Once the docker network create feature was added, the semantic of those options was not modified, they still only affect the default bridge network.
Yours is a feature request, but in my opinion it would be very confusing that (some of) those options represent both the user chosen values for the bridge network as well the default values for newly user created networks.
Also that this will be true only for --mtu and --dns... options, while it is not (it does not make sense) for --b, --bip, --fixed-cidr, --fixed-cidr-v6, --default-gateway, --default-gateway-v6 which are either strictly bridge specific or cannot be used by more than one network.
Also, if --ipv6 becomes a default value and say user sets it to true, how would user create a pure ipv4 network after that ?
It would also not be possible to set a default for any network but still control the value for the default bridge network.
While this may make sense for your use case around the host mtu, I am not sure a common solution can be achieved by simply changing the semantic of --mtu flag. It seems to me yet a new flag would be needed to control the defaults.

Closing as responded.


Addresses by tokenid

slp/balancesForToken/:tokenId

Pull Request Test Coverage Report for Build 1838

0 of 0   changed or added relevant lines in 0 files are covered.
97 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.01%) to 71.775%

Files with Coverage Reduction
New Missed Lines
%

dist/routes/v2/slp.js
97
50.76%

Totals

Change from base Build 1834:
0.01%

Covered Lines:
1971

Relevant Lines:
2552

💛  - Coveralls


I'm not understanding the response

Hi again, sorry I'm trying to work out the kinks as quickly as possible. I have the service running and using Postman I make a GET watch request. I get a response but it isn't just a URL that I can use to view the video.
The details from my test are listed below. Am I making an obvious mistake?
Thanks.
https://rr2---sn-q4flrnld.googlevideo.com/videoplayback?expire=1676507712&ei=3yXtY4eyPL2Cir4P74u90Ac&ip=<IP_ADDRESS>&id=o-AC8jY4qMObrcVJHWmtXYbDtVSEQE4ppvKh38EjAbDwpk&itag=22&source=youtube&requiressl=yes&mh=1R&mm=31%2C26&mn=sn-q4flrnld%2Csn-5ualdnz7&ms=au%2Conr&mv=u&mvi=2&pl=22&spc=H3gIhiNqsmwX2SrZPyYbGhoy4pHgCV8&vprv=1&svpuc=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=148.166&lmt=1667621245853676&mt=1676485211&fvip=2&fexp=24007246&c=ANDROID&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAJLhA6OePgITw1t54jHXv594VsMAOqPqsUXdgnAhsCXxAiEA40QP5pdGvni2Gk7ZFWEHOmgvzDRjAiHrUwuF2ffdEJY%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AG3C_xAwRQIhAO3vCaiEp_Haxa0b2sOFGamShhcb4ybkSG2BsITO_McEAiBnfkfYbjfEY_uu3Nj06O1rJYRjZPv5SghPNjoTLABAsw%3D%3D

As mentioned in https://github.com/iBicha/youtube-dl-server#api

GET /watch  Redirects to the raw video url.

It means if you open the url in the browser (or a video player) it will redirect to the raw video url, the video will play.
If you don't want that, use GET /v1/video which will return a json payload you can parse


missing module ?

from lib.check_packages import is_package_installed

throws an error :
Traceback (most recent call last):   File "/home/ibnattya/Downloads/builds/grub-themes-manager/install.py", line 6, in <module>     from lib.check_packages import is_package_installed ModuleNotFoundError: No module named 'lib.check_packages'

Thank you for submitting this issue.
it seems that i forgot to remove line 6 in the file install.py after deleting the check_packages library.
The bug is fixed in this commit 970e074


Realtime transport auth fixed (RTC1)

RTC1 is passing.

Next on new PR:

ARTError need to be a NSError.
Channels are not working.

Merge when it's possible. Thank you,

Can you check that comment above about the token? You should treat the token string as opaque.

But the received token is encoded and then the it's not possible to establish connection to the realtime server.

@ricardopereira realtime provides it as a base64-encoded string, and expects back the same base64-encoded string. If it's not working unless you have a decode in there, I'd hazard a guess that there's code elsewhere that's mistakenly encoding it before sending it.
(The client lib can't do anything with it decoded anyway -- it won't be valid ascii when decoded, it's a binary)

@SimonWoolf Ok, I will investigate. Thanks.

@paddybyers @SimonWoolf Fixed. Encoder was misplaced on ARTAuth.

Thanks


adding a sample CircleCI build config

This adds a short demo to give an idea for how to use CircleCI to automatically preview and build a person's book when they make PRs etc.
It's inspired from @psychemedia 's idea to templatize repositories and make it easy for people to do this.
Would love folks to take a look at these instructions and let me know if they seem correct (or if there's anything I can do to improve them!)
Check out the built page here: https://1457-137292803-gh.circle-artifacts.com/0/html/advanced/circleci.html

hard to read.. left margin nav not resizable on my mob device and i can't figure out how to paste / append screenshot from my phone to this comment.... I f****g hate computers....

hmmm, the left margin should be closeable by clicking the hamburger menu...does that not work?

I love this ! I also commented in https://github.com/jupyter/jupyter-book/issues/289#issuecomment-529621683 that we could optionally also describe building on Netlify, since it's a much more accessible build process.
The downside (of course there's a downside) is that users only get 100GB of free bandwidth each month across all of their sites. But I think if we do include Netlify (or any other build strategy), this page would be the right place to host that information !

hmmm, the left margin should be closeable by clicking the hamburger menu...does that not work?

It works for me on Firefox 68.0.2 and Chrome 76.0.3809.132... Always fun to figure out browser differences :upside_down_face:

@emdupre I am all for a netlify tutorial :-)

OK, I'm gonna merge this one since it seems like there's no specific stuff to improve, I'm happy to spot-check improvements on individual items moving forward!


snapshot tests print to file in numeric order

this should address #448

Looks like I broke something in #446. I just pushed the fix e9918ee352cd094088f83291f3fa86bea096e50c. Could you rebase and regenerate the snapshots? It should resolve some of the weirdness you're seeing in the diff.

the diffs make more sense now 👍

Perfect! Thank you!


Add xarm7 MJCF.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

7 of 7 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 98.573%

Totals

Change from base Build<PHONE_NUMBER>:
0.01%

Covered Lines:
967

Relevant Lines:
981

💛  - Coveralls


Compute block_counts iteratively with explicit stack

I get recursion errors when converting some large profiles with flameprof. This change avoids these RecursionErrors by using iteration with an explicit stack to compute block counts. Could get a similar effect using sys.setrecursionlimit with the existing recursive implementation, but there's no way to choose a sufficiently large limit, so a non-recursive implementation seems safer.

Hi @baverman, I wanted to ask whether there's any chance to get this merged? I'd love to be able to continue using flameprof without having to patch it locally to increase the stack size.


Bugs / Clarifications

Heya,
So I thought this would be an interesting project to leverage the new built-in AI capabilities in Chrome, so I forked the repo and started tinkering with it.
I had a few observations/questions about the RAG part.
First, it is sending an extra curly brace here:
https://github.com/nico-martin/ask-my-pdf/blob/cf3e36d8ccad765509e88acac801d6b35dd308e3/src/store/ragContext/RagContextProvider.tsx#L99
Second, here it is potentially adding the same lines multiple times:
https://github.com/nico-martin/ask-my-pdf/blob/cf3e36d8ccad765509e88acac801d6b35dd308e3/src/store/ragContext/RagContextProvider.tsx#L71-L94
So this ends up being bad input for the LLM as it's just the same content repeated over and over again.
With some console.log() here and there this was easy to spot.
Here's what I did to fix duplication:
    const foundEntries: Array<string> = [];
    results.map((result) => {
      let entry = '';
      [...Array(7).keys()].forEach((i) => {
        const line = entries.find(
          (entry) =>
            entry.metadata.allLinesNumber ===
            result[0].metadata.allLinesNumber + (i - 3)
        );
        if (line) {
          if ( ! activeLines.includes(line.metadata.allLinesNumber) && ! fuzzyLines.includes(line.metadata.allLinesNumber)) {
            entry += `${line.str} `;
          }
          if (i - 3 === 0) {
            activeLines.push(line.metadata.allLinesNumber);
          } else {
            fuzzyLines.push(line.metadata.allLinesNumber);
          }
        }
      });
      if ( entry ) {
        foundEntries.push(entry);
      }
    });
    setActiveLines({ exact: activeLines, fuzzy: fuzzyLines });

    let prompt = `These are parts of the ${pdfTitle}:\n\n`;

    // TODO: Test with allEntries or foundEntries
    foundEntries.forEach((result) => {
      prompt += `"${result}"`;
      prompt += '\n\n';
    });

Third, I am struggling to see the need for the whole vector DB here. In my testing, it leads to poor results due to information loss.
Example:

I upload a PDF of a restaurant's menu. It's a number of dishes with some descriptions and a price.
I ask "What is the most expensive item on the menu?"
This searches the vector DB for this query and somehow returns maybe 1/3rd of the PDF text for feeding into the LLM prompt
The LLM now gets 1/3rd of the PDF content as context for the prompt.
You won't get a correct result due to the information loss

Hi @swissspidy,
I really appreciate you taking the time to take a closer look at my project!

Yep, thats a bug. Will fix that
Hmm.. You're right. I will try that
Ok, that will be a longer answer :)

The thing is that for small PDFs I would agree that the whole vectorization is not necessary. It would be possible to just send the whole content. But you would lose the link to the sources. With RAG I determine which sources are relevant for answering the questions. If I simply send the entire content, it is not clear which passages the answer is based on.
Also as soon as we work with bigger files (I am working on that) we will quickly exceed the 8k context window of the Gemma 2B. So we need to boil it down to the relevant parts.
One limitation I found is that the way it is set up it works best with long paragraphs of continuous text. Thats what the all-MiniLM-L6-v2, which I use for similarity search, was trained for. Especially with tables, it quickly loses the right context.
In your case with the menu (not much text to process, not suitable for sentence transformer similarity search) I would agree that just sending the whole menu might provide better results.
I was thinking more of long documents such as terms and conditions or contracts, which have long flowing texts and clear chapters. Like the "twitter terms of service" I use in my example here: https://www.linkedin.com/feed/update/urn:li:activity:7203439376545054720/

Yeah I definitely get the reason behind it and there is a need to stay within the limits of the system.
I think my issue is that, while it works for some prompts, it is not suitable for others, a) because of the loss of information and b) because my question for Gamma does not necessarily make for a good query for the vector db.
Even for a text-heavy document such as the one from https://mozilla.github.io/pdf.js/web/viewer.html, I can't ask questions such as "What is the title of this document?" or "How many words are in this document?". (Just some examples)
On the other hand, a query like "What is SpiderMonkey?" works better because the db search gives some better results already due to a similar sentence existing in the document.

I am actually surprised how good it works with your example document. At least for questions that are dealt with in the content of the document. It has a few problems with meta questions about the document.
In my opinion "Ask my PDF" has two main problems:

The parsing of the PDF is not yet good enough. Parsing line by line means that we lose the document structure (coherent paragraphs, headings, etc.) and since sentences are separated if they go over two lines, the search does not work optimally either.
The generated prompt could provide more meta informations about the document to also be able to anwer questions about the document.

Unfortunately, I don't yet have a good idea for the first issue in particular. To be honest, I've seen this problem coming since I started the project :/

After some second and third thoughts I might need to change to a different approach. Right now, every question is handled as if RAG would be the best solution.
But as in your example, quite often its not. So maybe I should try a "function calling" approach first where I analyse the question and try to figure out how to proceed from there on.

Is it a content related question? RAG
Do they want to know how many words/characters/sentences the document has? Build a function to retrieve the info
Do they need a summary? Summarize the whole document
etc.

I guess that could be a better approach. But I still think I need to solve the structured content problem first😕

Cool, it sounds like we're on the same page :)


Rewrite TypeEngine for performance, robustness, and simplicity

Description
This PR implements a major rewrite of the TypeEngine. The rewrite:

significantly improves overall compilation performance. The compilation time of the real-world Spark Orderbook workspace got reduced from 8.99 to 5.94 seconds, and the memory consumption from 3.32 to 1.78 GB.
provides robust API for inserting types, related to the usage of the source_id (see: #5991). The new API forbids not providing source_ids or providing semantically questionable or non-optimal ones.
introduces simpler, much less verbose, API for inserting types.

The PR also removes the obsolete and unused TypeInfo::Storage.
The PR does not address the following:

The TypeEngine's "garbage-collection-(un)friendlines" (see: #6603).
The handling of the TypeInfo::Custom and TypeInfo::TraitType types within the TypeEngine (see: #6601).
The number of interactions with the TypeEngine. E.g., removing unnecessary insertions after resolve()ing or monomorphyze()ing types will be done as a part of DeclEngine optimization.

Closes #5991.
Shareable types
The PR formalizes the notion of a shareable type within the TypeEngine (strictly speaking, a shareable TypeInfo). A shareable type is a type that is both:

unchangeable: it, or any of its parts, cannot be replaced during the unification or monomorphization.
and undistinguishable by annotations: it doesn't carry any additional information (annotations) that could differ it from another instance of TypeInfo that would, purely from the type perspective, be a same type.

E.g., u64 or MyStruct<u64, bool> are unchangeable while Numeric, Unknown or MyStruct<T1, T1> are changeable.
E.g., in this example, a and b have the same type, [u64; 2] but those two types differ in spans assigned to the "u64"s and the "2"s, and are treated as different within the TypeEngine, and thus as non-shareable.
let a: [u64; 2] = [1, 1];
let b: [u64; 2] = [2, 2];

Shareability of a type is crucial for reusing the TypeSourceInfo instances within the type engine. Shareable types can be given different TypeIds without the need to newly allocate a TypeSourceInfo.
Performance improvements
The cummulative effect of the performance improvements on the compilataion of the real-world Spark Orderbook workspace is given below. The compilation means the frontend compilation, up to the IR generation (forc check).
Compilation time
Before:
  Time (mean ± σ):      8.995 s ±  0.297 s    [User: 7.126 s, System: 1.289 s]
  Range (min … max):    8.675 s …  9.262 s    3 runs

After:
  Time (mean ± σ):      5.945 s ±  0.517 s    [User: 4.749 s, System: 0.768 s]
  Range (min … max):    5.349 s …  6.280 s    3 runs

Memory consumption
---------------------------------------------------------
                total(B)   useful-heap(B)   extra-heap(B)
---------------------------------------------------------
Before:    3,316,786,808    3,237,317,383      79,469,425
After:     1,784,467,376    1,743,772,406      40,694,970

Applied optimizations:

Replacement of expensive insert calls with compile time constants for built-in types. Built-in types like !, bool, (), u8, etc. are inserted into the engine at its creation at predefined slots within the slab. The id_of_<built-in-type> methods just return those predefined TypeIds, effectively being compiled down to constants. The calls like type_engine.insert(engines, TypeInfo::Boolean, None) are replaced with maximally optimized and non-verbose type_engine.id_of_bool().

Elimination of extensive creation of TypeSourceInfos for TypeInfo::Unknown/Numerics. Unknown and Numeric are inserted into the engine ~50.000 times. Each insert used to create a new instance of TypeSourceInfo with the source_id set to None. The optimization replaces those ~50.000 instances with two predefined singleton instances, one for Unknown + None and one for Numeric + None. (Note that when implementing #6603, we will want to bind also Unknowns and Numerics to source_ids different then None, but we will still want to reuse the TypeInfo instances.)

Elimination of extensive temporary heap-allocations during hash calculation. The custom hasher obtained by make_hasher required a TypeSourceInfo to calculate the hash and it was called every time the insert was called, ~530.000 times. Getting the TypeSourceInfo originally required cloning the TypeInfo, which depending on the concrete TypeInfo instance could cause heap allocations, and also heap-allocating that copy within an Arc. Hash was calculated regardless of the possibility for the type to be stored in the hash map of reusable types. The optimization removed the hashing step if the type is not shareable, removed the cloning of the TypeInfo and introduced a custom compute_hash_without_heap_allocation method that produced the same hash as the make_hasher but without unnecessary temporary heap-allocations of TypeSourceInfos.

Replacement of TypeSourceInfos within the hash map with Arc<TypeSourceInfo>s. The hash map unnecessarily required making copies of reused TypeSourceInfos.

Introducing the concept of a shareable type and rolling it out for all types. Previously, the engine checked only for changeability of types by using the TypeInfo::is_changeable method. The implementation of that method was extremely simplified, e.g. treating all structs and enums with generic arguments as changeable even if they were fully monomorphized. This resulted in over-bloating the engine with type instances that were actually unchangeable, but considered to be changeable. Also, strictly seen, the unchangeability (during unification and monomorphization) is not the only necessary criteria for reuse (or sharing) a type within the engine. Another important aspect is, as explained above, the differentiability by annotations. The PR introduces the notion of a shareable type which is both unchangeable and not differentiable by annotations. The optimization takes advantage of such types by storing them only once per source_id.

Elimination of extensive unnecessary inserts of new types during replace() calls. When replace()ing types during unifications, a new TypeSourceInfo instance was created for every replacement, ~46.000 times. This meant a heap-allocation of the TypeSourceInfo (16 bytes) and the Arc-contained TypeInfo (232 bytes), even if the replaced type was shareable and already available in the type engine. The optimization now reuses an already existing shareable type if available.

Robustness related to source_ids
The issues we had with properly providing the source_id in the insert method are explained in #5991. This PR removes the source_id from the new public API and calculates it internally within the engine, based on the type being inserted. This makes inserting of types both more robust and less verbose and eliminates the possibility of providing a semantically wrong source_id.
Note that the calculation of an optimal source_id done within the engine fully corresponds to the "calculations" we currently have at call sites.
E.g., when inserting enums, previously we always had to write type_engine.insert(engines, TypeInfo::Enum(decl_id), enum_decl.span.source_id()). Fetching the source_id from the enum declaration is now done within the insert_enum method: type_engine.insert_enum(engines, decl_id).
Note that for certain types we will want to change the current behavior and either provide a source_id or pick a more suitable one. E.g, even when inserting Unknowns, we will want to have source_ids, if possible. This will be done in #6603, but again, together with providing a robust API that will be difficult to misuse.
Simplicity
As already mentioned in some of the examples above, the new id_of_<type>() and insert_<type> methods provide much simpler and less verbose API to use. Introducing those methods remove a lot of boilerplate code from the callers. Also, the individual insert_<type> methods are additionally optimized for inserting the particular type.
The common insert method is intended to be used only in cases where the inserted TypeInfo is not known at the call site.
Here are some examples of the new API versus the existing one:

Before
After

type_engine.insert(engines, TypeInfo::Tuple(vec![]), None)
type_engine.id_of_unit()

type_engine.insert(engines, TypeInfo::Unknown, None)
type_engine.new_unknown()

type_engine.insert(engines, TypeInfo::UnsignedInteger(IntegerBits::SixtyFour), None)
type_engine.id_of_u64()

For more complex types, like, e.g., TypeInfo::Tuple, the difference in inserting is even more prominent, as can be seen from the diffs of numerous code lines deleted in this PR.
Checklist

[x] I have linked to any relevant issues.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book).

[ ] If my change requires substantial documentation changes, I have requested support from the DevRel team

[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
[x] I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
[x] I have requested a review from the relevant team or maintainers.

While working on the improvements I've noticed an E2E test suddenly failing with this error message:
 7 │+  --> sway-lib-core/src/slice.sw:7:24
 8 │+   |
 9 │+ 5 |   impl<T> &__slice[T] {
10 │+ 6 |       pub fn ptr(self) -> raw_ptr {
11 │+ 7 |           let (ptr, _) = asm(s: self) {
12 │+   |  ________________________^
13 │+ 8 | |             s: (raw_ptr, u64)
14 │+ 9 | |         };
15 │+   | |_________^ Mismatched types.
16 │+expected: ()
17 │+found:    (pointer, u64).
18 │+help: Variable declaration's type annotation does not match up with the assigned expression's type.
19 │+10 |           ptr
20 │+11 |       }

Note that the wrongly reported compile error is in core library, means it should affect almost all the tests but it didn't. Indeed, re-running that test didn't reproduce the error.
I've kept re-running the E2E suit on another machine for two days straight (!!) before the error got provoked again, this time in another file:
   --> sway-lib-std/src/math.sw:316:28
    |
314 |           }
315 |
316 |           let (a, b, c, d) = asm(r1: self) {
    |  ____________________________^
317 | |             r1: (u64, u64, u64, u64)
318 | |         };
    | |_________^ Mismatched types.
expected: ()
found:    (u64, u64, u64, u64).
help: Variable declaration's type annotation does not match up with the assigned expression's type.
319 |           if a != 0 {
320 |               return a.log2().as_u256() + 0xc0u256;

Up to now, I couldn't find a logical error in code, and chasing a non-reproducible issue is difficult indeed. But the issue is for sure still there. After opening this draft PR, the forc-unit-tests failed because of the same reason. It is green now, but the cargo-run-e2e-test-release failed on one test I am sure for the same reason.
It is interesting (and for sure good!), that the tests are failing on the build machine, but when run locally it takes literally tens of thousand of compilations to get the error.

The changes in this PR make LSP garbage collection panic. A big thanks to @JoshuaBatty for detailed testing and finding this issue.
Joshua's tests showed that we already have GC issues on the master branch. Out of the 267 test projects in the e2e_vm_tests/test_programs/should_pass/language folder, we are getting 26 examples failing GC currently on the master branch. This PR makes additional six tests fail.
I'll keep the PR in draft until these issues are solved.

All the GC issues reported in #6665, are now fixed on this branch. Similarly to the transient bug explained above, the root causes for GC related issues were already existing and the rewrite of the TypeEngine made them occur more frequently.
This PR now fixes, or at least mitigate to an extent, those GC issues which were possible to fix by changing only the TypeEngine internals.
However, GC still has issues whose solving requires restructurings outside of the TypeEngine. E.g. fixing #6687 requires changes in the DeclEngine as well.
The question is now how to proceed with this PR?
My thinking is to merge it as it is now, although knowing that not all of the GC issues are solved. The reasoning behind that is the following:

this version already has more stable GC then the one on the master.
When running GC tests on our whole E2E test suite (both should_pass and should_fail test) only one test fails in this PR (should_pass/stdlib/option_eq/src/main.sw), while numerous tests fail on master.

the option_eq test fails on master as well, proving that this is not a new error caused by the changes in this branch.

I've manually tried LSP from this PR on several representative projects end never experienced a crash. (Of course, should_pass/stdlib/option_eq project will cause LSP crash.)

this PR is already vast in scope and brings significant changes. Extending it to rewrite the DeclEngine and address other GC related topics would be a huge scope-explosion. We originally planned to tackle the DeclEngine and "GC-friendliness" in separate PRs.

keeping this PR on the top of other changes already proved to be a high effort. The PR touches the most prominent files on the frontend and is in constant collision with other changes done on the frontend.

@sdankel @JoshuaBatty @tritao @IGI-111 What do you think about this proposal? Can you also please try the local version of the LSP on your projects to see if you can experience any crashes?


Integration Test - Release - 2019/05/30 15:37:28

Auto create for integration test. AnotherAuthorUpdatedArticleFlow

@PRMergerTest3 : Thanks for your contribution! The author(s) have been notified to review your proposed change.