text:
Custom attribute accessor yields "column does not exist" error

Laravel Version: 8.78.1
PHP Version: 8.0
Database Driver & Version: Irrelevant

Description:
With reference to the method mutateAttributeMarkedAttribute found in the HasAttributes trait introduced with the new attribute casting feature in v8.77:
    protected function mutateAttributeMarkedAttribute($key, $value)
    {
        if (isset($this->attributeCastCache[$key])) {
            return $this->attributeCastCache[$key];
        }

        $value = call_user_func($this->{Str::camel($key)}()->get ?: function ($value) {
            return $value;
        }, $value, $this->attributes);

        if (! is_object($value)) {
            unset($this->attributeCastCache[$key]);
        } else {
            $this->attributeCastCache[$key] = $value;
        }

        return $value;
    }

It seems to me that the calculated $value is only cached if it's an object, which essentially means any callable Attribute that returns scalar values (string, boolean etc.) will not be cached. I'm not sure of the reason behind this, but even with this aside, it seems the logic here introduces a bug. Considering the method mergeAttributesFromAttributeCasts() in the same trait, which is called upon saving/updating a model:
    protected function mergeAttributesFromAttributeCasts()
    {
        foreach ($this->attributeCastCache as $key => $value) {
            $callback = $this->{Str::camel($key)}()->set ?: function ($value) use ($key) {
                $this->attributes[$key] = $value;
            };

            $this->attributes = array_merge(
                $this->attributes,
                $this->normalizeCastClassResponse(
                    $key, call_user_func($callback, $value, $this->attributes)
                )
            );
        }
    }

If I read it correctly, this method will merge $attributeCastCache back to the model before performing the query. Now if in the model I have an attribute accessor like this:
// User.php
protected function foo(): Attribute
{
   return Attribute::get(fn () => new Foo());
}

Once $user->foo is accessed, a 'foo' key will be stored into $attributeCastCache and merged into $attributes. If my table doesn't have a foo column, however, saving the model will yield an error saying the column foo doesn't exist.
This problem won't happen if the closure provided in Attribute::get() returns a non-object value, because 'foo' won't be registered into $attributeCastCache and as such won't exist in the $attributes array after merging.
Steps to Reproduce:

Checkout https://github.com/phanan/laravel-attr-bug
Run composer install
Run php artisan test. The test should break.

~/P/laravel (master) $ php artisan test

   FAIL  Tests\Unit\UserTest
  ⨯ custom attribute

  ---

  • Tests\Unit\UserTest > custom attribute
   Illuminate\Database\QueryException

  SQLSTATE[HY000]: General error: 1 no such column: foo (SQL: update "users" set "foo" = ?, "updated_at" = 2022-01-12 13:47:18 where "id" = 1)

More Information:
The bug (?) didn't exist with the old syntax i.e. getFooAttribute(). Of course, as a workaround, I can change foo() from an attribute into a method like this:
public function foo(): Foo
{
    return new Foo();
}

But this a) makes it a bit less elegant (IMHO) and b) makes it harder to add custom attributes into appends.
Of course, if this is just me not understanding Laravel, my apologies.

Having the same issue, accessors with the new syntax that are intended to be getter-only are sometimes trying to be saved to the database even though there's no underlying column for them.

Can you try with the latest Laravel version? This has changed a bit.

Is there any new version since yesterday? Because I reproduced this bug in
a fresh install yesterday, as shown in the linked repository.
On Thu 13. Jan 2022 at 15:24 Dries Vints @.***> wrote:

Can you try with the latest Laravel version? This has changed a bit.
—
Reply to this email directly, view it on GitHub
https://github.com/laravel/framework/issues/40364#issuecomment-1012182712,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB5O3UQSSPNSE7FXMSUOEIDUV3OAZANCNFSM5LZAXX5Q
.
You are receiving this because you authored the thread.Message ID:
@.***>

Yes. Please try with Laravel v8.79.0 and verify that this version resolves it or not.

Ah, indeed it seems to have been fixed in https://github.com/laravel/framework/commit/29a6692fb0f0d14e5109ae5f02ed70065f10e966. I'll go ahead and close the issue then. Thanks!

authors: bakerkretzmar driesvints phanan


text:
Indexes need to add the db prefix for multiple projects in one db

I'm using bican/roles and realized that laravel is not adding the db prefix to db indexes and foreign keys. This leads to the problem that you can't have two indexes with the same name in one mysql database, as it is not allowed to have two in a single database. Even if you use different db prefixes like I do.
So could we prefix the $table->foreign() keys with the db prefix?

Agreed.

:+1: totally agree, having the same issue.
on my own migrations I can handle this manually but when I want to install package migrations I'm stuck...
and we have a usecase where we have to work on one database :-/

Is anyone able to do anything about this?

I think we cannot easily change the index name creation routine, as that would break when removing old indices that were created with the old routine. Any ideas how to do this in a backward-compatible way?
@taylorotwell Would this be okay in the next major release?

Would this be okay in the next major release?

All minor releases in laravel are the equivalent on a major version bump. An actual major version bump isn't planned for a while, and such a version bump will probably mark the end of php 5 support.

If we are going to change the logic for generating index names, we should also fix the problem of long identifier names at the same time.
MySQL identifiers can be a maximum of 64 characters.  The current algorithm can easily generate names longer than this.
prefix_table_name_first_column_name_second_column_name_third_column_name_unique
One way is to use a hash of this generated value.  Doctrine does this.  See their implementation here:
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/AbstractAsset.php#L219

Any ideas how to do this in a backward-compatible way?

function dropIndex {
  try {
    drop new_index_name
  } catch {
    drop old_index_name
  }
}

@GrahamCampbell Was this taken care of?

No. I was closed due to 0 interest from the community. I can re-open it again if you like.

:+1: I also think this should be fixed

same here, especially as many people are starting to use multi tenancy packages and different connections for cloud based storage.
i came across this myself again when using the same db with different prefixes.

If the index names are going to be hashed, should there be a default dependency on doctrine/dbal again? Or copy over the hashing function (MIT)? Use a custom algorithm?

Sorry, we don't process requests/proposals here. Please see https://github.com/laravel/internals/issues.

@taylorotwell @GrahamCampbell @laravel-internals This is not a proposal but rather a bug with the table prefix. Either remove the prefix option all together (which has my preference), or fix the naming of the index. Right now, prefix functionality is broken.

Sorry about that.

any updates on this?

I encountered same issue.
Currently manually assigning the index names but doing so over 50+ migrations is cumbersome.

I run into the same Issue. I could handle the problem with the prefix. But a permanent solution would be greate.

What about a config option to enable this functionality? That would be a backward-compatible solution.

source: gharchive/issue

authors: EliasZ GrahamCampbell KuGelFaaaNg di5abled fisharebest franzliedke jerguslejko laravel-internals leemason lucidlemon spacemudd staudenmeir

repo: laravel/framework

license: MIT

license_type: permissive

license_source: github-api


text:
[5.1] HasOneThrough

Credit to https://github.com/pandaac/apolune/blob/09785a40e1b9070176b75aaf2a982ab20297697d/src/Apolune/Core/Database/Eloquent/Relations/HasOneThrough.php

Sorry for the many minor fix commits.

What table structure is this attempting to solve?

users
id
shops
id
user_id
chain_id
shop_identifier
chains
id
shop_name
This allows the user to do $user->chain as the user can only moderate one shop-chain, but multiple shops.

But shop is not a pivot table per say, because there are shop managers and chain managers.
The shop manager will not have access to the chain, therfore it cannot be used sloely as a pivot table

Credit to

You should author the first commit as that user, then apply your changes on top.

Sorry, I am a bit new to the whole pull request etc.
And didn't know you could that with styleci.
I think I may have caused more problems they it's worth, therefore I could probably just turn it into a package and use it myself.

source: gharchive/pull-request

authors: GrahamCampbell Sirlazer2 taylorotwell


text:
[5.3] Consider IP option as well for throttle key

Just wondering in situations where someone had a list of emails and passwords they would iterate over that list against a site. The throttle would never kick in since each attempt is with a different email.
For example Yahoo list of emails and passwords (if decrypted), now someone is using those to see if these users used the same password on other sites.
By adding this to config/auth.php
    /*
    |--------------------------------------------------------------------------
    | Throttle Key
    |--------------------------------------------------------------------------
    |
    | You may choose to block ip address from failed attempts
    | of a combination of IP and Username
    |
    | Supported: "ip", "username|ip"
    |
    */
    'throttle_key' => 'ip'

And the above code the site admin could easily switch this out.
The odd part is if an office of staff are using the application and x number of people in the office try to log in and have issues then the 6th user might get hit by this throttle.

Turning off and on the router will give you a new ip address.
That's how easy to bypass the throttle feature when using the ip as key.

I think IP is just a little too easy to spoof and so on as to make this not very helpful overall. Will hold off for now pending more community demand. Thanks

sounds good. I was easy to override as needed in the class @taylorotwell

authors: alnutile shadoWalker89 taylorotwell


text:
[5.3] fix bindings on update statements with advanced joins for all grammars

solution for issue #16367, #16363

Needs full description of how fix addresses problem. Need for passing into this overriden prepareBindingsForUpdate method, etc.

For different grammars, we need a different order for the bindings and values.
Example Mysql:
update users inner join orders on users.id = orders.user_id and users.id = ? set email = ?
We need first set user id and then values
Example Postgres:
update "users" set "email" = ?, "name" = ? from "orders" where "users"."id" = "orders"."user_id" and "users"."id" = ?
We need first set values and then user id
That's why we need merge bindings and values in different way for each grammar

@litvinchuk thank you, looks like the syntax for Postgres and SQL Server varies from MySQL, closing my other PR so that we can work on this one.

authors: litvinchuk taylorotwell themsaid


text:
[5.4] Stub the login method on the TokenGuard so that it may be used during user registration

I think it would be really useful and not at all harmful to add a no-op login method to the TokenGuard.
Doing so allows a developer to use the TokenGuard during user registration. This avoids creating any session and associated data which is handy if you're developing an API but would still  like to use the RegistrationController provided by the framework.
Once this is merged all a developer would have to do is add the following to their RegistrationController and they would be good to go.
protected function guard()
{
    return Auth::guard('api');
}

protected function registered(Request $request, $user)
{
    return response()->json(['data' => $user], Response::HTTP_CREATED);
}

Note that Response in this instance is Symfony\Component\HttpFoundation\Response
Fixes #17456

Holding off on this for now. Doesn't really make sense as login isn't on the contract and has a "stateful" connotation.

This PR was too short sighted.
The TokenGuard isn't setup in any way to useful for user registration and logins.

authors: colindecarlo taylorotwell


text:
[5.8] The result is the same, but the way of calling method is mixed

The result is the same, but the way of calling is mixed.
For example,
response()->json() and new JsonResponse(),
View::replaceNamespace() and view()->exists(),
response() and new Response() etc...
Changed how to call some methods so as not to depend on the Facade / Helper.

What's the issue that this resolves?

Every change from response()->method(...) into new MethodResponse(...) is a breaking change since you are no longer calling the ResponseFactory. Any site that has its own ResponseFactory will no longer have that code called.

Please see the comment by @sisve

authors: devcircus driesvints sisve ytake


text:
[9.x] Added callback support on implode Collection method.

Allow to use a callback as $value on implode Collection method to simplify ->map()->implode() calls:
Before:
{{ $user->cities->map(fn ($city) => $city->name.' ('.$city->state->name.')')->implode(', ') }}

After:
{{ $user->cities->implode(fn ($city) => $city->name.' ('.$city->state->name.')', ', ') }}

@eusonlito this broke something: https://github.com/laravel/framework/issues/41466

Ok is_callable must be replaced with $this->useAsCallable.

Fixed with PR https://github.com/laravel/framework/pull/41468

authors: driesvints eusonlito


text:
safe flag added into migrate  command to show the list of pending migration

I added a new "safe" flag in the migrate command, which allows users to list pending migrations and decide whether they want to run them or not. This feature is extremely useful as it helps users prevent running unwanted migrations without careful consideration.

Hi,
I Hope you are well. Sorry but --pretend flags only show the sql queries
which run during migrations. But with safe command user can see the list of
remaining migrations before run migration and can continue with this or
stop running the migration process.


text:
[11.x] Add PDO subclass support for PHP 8.4

Description
In PHP 8.4 there will be PDO driver specific subclasses. PHP will introduce classes for each database driver it supports. It allows for driver specific methods. I don't think this will be a huge improvement for most, but it does allow SQLite users to load extensions for example. This is not available in PDO at the moment.
If you're not using Laravel this would look like this:
$pdo = PDO::connect('sqlite:database.sqlite');
$pdo->loadExtension('sqlean.dylib');

$query = "select regexp_replace(company_name, '[^a-zA-Z0-9]', '') from customers";
$query = $pdo->query($query)->fetchAll();

I'm not sure what your policy is for features that are only in 8.4, so please let me know what I could do to improve on this. I've targeted this at 11.x as it's backwards compatible with older PHP versions.
Backwards compatibility
PDO::connect returns a subclass of PDO. It will pick the correct subclass for you based on the DSN. As the subclass extends PDO, the return type does not need to change and is backwards compatible.
As PDO::connect is not compatible with versions prior to 8.4. This PR is backwards compatible by using new PDO for other PHP versions instead.
Tests
I haven't included any new tests. PDO::connect is a PHP function so it should not require testing in userland. The method itself is already covered by the test suite and its functionality remains the same.
Edit: static analysis failed because it runs on 8.2 where PDO::connect does not exist yet.
References

https://github.com/php/php-src/blob/php-8.4.0alpha1/UPGRADING#L299
https://wiki.php.net/rfc/pdo_driver_specific_subclasses

@taylorotwell I don't know enough about phpstan's internals to say anything meaningful about it. But I don't think you can unless you run static analysis on 8.4. And that's probably not a good idea in 11.x or 12.x.
The only 'workaround' I can think of is ignore the error for now, and add a PHP 8.4 test here. We can test if the PDO instance is Pdo\Sqlite, which is the subclass for SQLite in 8.4.
I'm not a fan of ignoring the error but this is the best I can think of.
@ondrejmirtes perhaps you know of a better solution?

@ju5t just add a ignore line to it for now 👍


text:
Add $bind parameter to allow binding custom Blade directive handler to the BladeCompiler instance.

I was attempting to extend the functionality of the @extends directive but encountered issues accessing properties of the BladeCompiler.
With the introduction of the $bind parameter in the directive method, setting it to true allows full access to the BladeCompiler instance. This effectively makes the Blade compiler more flexible, as it now supports directive handlers that can access its protected properties, making it function similarly to a macroable object.
Example:
Blade::directive(name: 'custom_directive', handler: function ($expression) {
    dd(
        class_basename($this)
    ); // prints: BladeCompiler
}, bind: true);

Real Example:
Blade::directive('template_extends', function ($expression) {
    $expression = $this->stripParentheses($expression);

    // ...

    $echo = "<?php echo \$__env->make({$expression}, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>";

    $this->footer[] = $echo;

    return '';
}, true);

Personally I would rather just make stripParentheses a static method so you can access it without needing this parameter.

authors: hossein-zare taylorotwell


text:
Using php's 8.1 first class callable method leaves an xdebug in limbo

When a closure is passed via a first class callable method xdebug doesn't know where it is.
<?php
namespace Foo;
include_once '/path/to/laravel/vendor/autoload.php';

use Laravel\SerializableClosure\SerializableClosure;

class Bar {
    public function __construct(public int $x = 0) {

    }

    public function foo(int $a) {
        $y = $a + $this->x;
        xdebug_break();
    }
}

$bar = new Bar();
$closure = new SerializableClosure($bar->foo(...));
$x = serialize($closure);
echo $x;
$z = unserialize($x);
$z->getClosure()(2);

When a closure is passed via a first class callable method, maybe serialize the given class, then call the method on the deserialized class?
Currently we need to use string references instead of these first class callable features we have now available.

Please recreate this issue with a filled out issue template. Thanks

authors: driesvints tschallacka

repo: laravel/serializable-closure


text:
better unit testing

implement:

dummy persistency
dummy objects
dummy git server

so that it will be easier to do automatic integration testing using abap unit

closing, always ongoing

repo: larshp/abapGit

license: mit

license_source: bigquery


text:
Assertion failed blob data is initial #1857

currently only removed the assertiation - maybe we should add some additional checks e.g. only certain object types,...?

#1857

authors: bigld larshp


text:
Update sbt to 1.7.3

Updates org.scala-sbt:sbt from 1.4.9 to 1.7.3.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Applied Scalafix Migrations

org.scala-sbt:sbt:1.5.0 (created no change)

https://gist.githubusercontent.com/eed3si9n/57e83f5330592d968ce49f0d5030d4d5/raw/7f576f16a90e432baa49911c9a66204c354947bb/Sbt0_13BuildSyntax.scala
Documentation: https://eed3si9n.com/syntactic-scalafix-rule-for-unified-slash-syntax

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-sbt", artifactId = "sbt" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "org.scala-sbt", artifactId = "sbt" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, scalafix-migrations, commit-count:1

Superseded by #211.

repo: laserdisc-io/eisner


text:
Make Region mandatory and rename Ether-returning apply methods to build

Hello!
Just two things I found confusing when I first tried to use fs2-aws:

Either-returning constructors. In my (maybe very personal) opinion, A.apply should always return object of type A and smart constructions should be distinguishable
Right now if AWS region is not specified and stream is located in a different one - consumer will start throwing exceptions that we could easily prevent.

Another commit is to address #203 - let me know if you're okay to accept just one of these commits.
I don't think our implementations are identical, but at the same time I don't think checkpoint() was asynchronous.

Thank you for you contribution.
please run scalafmt formatting to make build green.

Can you please extract checkpointing into separate PR ?

[x] Clean-up this PR
[x] Create https://github.com/laserdisc-io/fs2-aws/pull/267
[x] Apply scalafmt for both

Codecov Report

Merging #266 into master will not change coverage by %.
The diff coverage is 33.33%.

@@           Coverage Diff           @@
##           master     #266   +/-   ##
=======================================
  Coverage   47.68%   47.68%
=======================================
  Files          24       24
  Lines         281      281
  Branches        1        1
=======================================
  Hits          134      134
  Misses        147      147

Impacted Files
Coverage Δ

...c/main/scala/fs2/aws/kinesis/KinesisSettings.scala
66.66% <ø> (ø)

...-aws/src/main/scala/fs2/aws/kinesis/consumer.scala
37.70% <0.00%> (ø)

...scala/fs2/aws/dynamodb/KinesisStreamSettings.scala
70.00% <100.00%> (ø)

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 a2342d6...1dd26a0. Read the comment docs.

Hey @semenodm! Sure thing - I fully agree making the SDK initalization user-controlled is the best design decision here.

authors: chuwy codecov-io semenodm


text:
Add type annotations

Add type annotations.

I think we'll want to add a pinned version of mypy to the dev dependencies so developers will have a consistent version to use for checking.
I just installed the latest mypy on 3.11 (I don't know which versions we're targeting) to test and ran into some issues.
First, latis-python-client isn't a valid Python module name, so the directory containing __init__.py probably needs to be renamed. mypy chokes on this, but you also won't be able to import the client to use it. I think with a tree like the following, you'd be able to write import latis.client or from latis import client:
src
└── latis
    ├── __init__.py
    └── client.py

After tweaking the directory name to be a valid module name, I got the following errors from mypy:
src/latis_python_client/latis.py:9: error: Library stubs not installed for "pandas"  [import]
src/latis_python_client/latis.py:9: note: Hint: "python3 -m pip install pandas-stubs"
src/latis_python_client/latis.py:9: note: (or run "mypy --install-types" to install all missing stub packages)
src/latis_python_client/latis.py:9: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
src/latis_python_client/latis.py:10: error: Library stubs not installed for "requests"  [import]
src/latis_python_client/latis.py:10: note: Hint: "python3 -m pip install types-requests"
src/latis_python_client/latis.py:263: error: Argument 1 to "list" has incompatible type "Optional[List[str]]"; expected "Iterable[str]"  [arg-type]
src/latis_python_client/latis.py:264: error: Argument 1 to "list" has incompatible type "Optional[List[str]]"; expected "Iterable[str]"  [arg-type]
src/latis_python_client/latis.py:265: error: Argument 1 to "list" has incompatible type "Optional[List[str]]"; expected "Iterable[str]"  [arg-type]
src/latis_python_client/latis.py:340: error: Incompatible types in assignment (expression has type "str", variable has type "None")  [assignment]
src/latis_python_client/latis.py:342: error: Unsupported left operand type for + ("None")  [operator]
src/latis_python_client/latis.py:345: error: Unsupported left operand type for + ("None")  [operator]
src/latis_python_client/latis.py:348: error: Unsupported left operand type for + ("None")  [operator]
src/latis_python_client/latis.py:350: error: Incompatible return value type (got "None", expected "str")  [return-value]
src/latis_python_client/latis.py:363: error: Name "numpy.DataFrame" is not defined  [name-defined]
src/latis_python_client/latis.py:391: error: "None" has no attribute "replace"  [attr-defined]

I think the missing stubs would also belong in the dev dependencies.

authors: lindholc pie-tras

repo: lasp/latis-python-client


text:
Install on 4.11.20210226

Hi,
Just wondering if there's plans to port this extension over to the latest Slicer. I'm not currently able to find it through the extension manager and I'm wondering how to best install it or whether I should jump back to a previous version of Slicer to continue using it.
Thanks for all your incredible work.

SegmentEditorExtraEffects is available for latest Slicer. See this page for more information: https://slicer.readthedocs.io/en/latest/user_guide/extensions_manager.html#extension-is-not-found-for-current-slicer-version

authors: lassoan liamtimms

repo: lassoan/SlicerSegmentEditorExtraEffects


text:
ERC1155 module support

Add ERC1155 Puppet as a module as well as ERC20 and ERC721
ERC20: https://github.com/latticexyz/mud/tree/main/packages/world-modules/src/modules/erc20-puppet
ERC721: https://github.com/latticexyz/mud/tree/main/packages/world-modules/src/modules/erc721-puppet

you're in luck: https://github.com/latticexyz/mud/pull/2198

authors: holic hourglasshoro

repo: latticexyz/mud


text:
add: Type suggestion for ts

Hi,
I liked the idea of using express like syntax on bun and really loved what you are doing here. I was using bunrest for a project and the type suggestions were not showing. So, I wanted to contribute to the project by adding the type hints.
Would really love to see the project grow.

@cinder-star I added types hint by refactoring some code, checkout v1.1.1


text:
Add module.exports to dist/index.js

This module is exactly what we needed, thanks! 👏
As a small addition, this PR uses babel-plugin-add-module-exports so that those of us stuck in ES5 land don't have to write require('preact-classless-component').default. The tests pass and no other changes are made.
Please let me know if there's anything you'd like me to do to help get this merged and published, otherwise thanks for your consideration.

Thanks for your PR, I'm merging and I'll republish

authors: laurencedorman rreusser


text:
Add Lavacord to v4 lib list

Tested working

Please resolve the conflicts

Resolved

repo: lavalink-devs/Lavalink


text:
Parts of entities are recognised separately

Hello, can you please help me with advice how can I solve this issue: trained SpERT on my custom dataset and am getting most of the entities right, but there is this strange repetition with parts of the entities.
Maybe there is some way to solve it. (Didn't have such an issue with huggingface transformers for token classification)
{"type": "3.2_mixtures/components/concentration/value", "start": 82, "end": 86},
{"type": "3.2_mixtures/components/concentration/value", "start": 82, "end": 87},
{"type": "3.2_mixtures/components/concentration/value", "start": 82, "end": 88},
{"type": "3.2_mixtures/components/concentration/value", "start": 83, "end": 87},
{"type": "3.2_mixtures/components/concentration/value", "start": 83, "end": 88},
{"type": "3.2_mixtures/components/concentration/value", "start": 84, "end": 87},
{"type": "3.2_mixtures/components/concentration/value", "start": 84, "end": 88},
{"type": "3.2_mixtures/components/concentration/value", "start": 85, "end": 87},
{"type": "3.2_mixtures/components/concentration/value", "start": 85, "end": 88},
{"type": "3.2_mixtures/components/concentration/value", "start": 86, "end": 88},

Hi, are there any control characters in your input sentence (e.g. \n)? Could you please send me the corresponding sentence?

We had a conversation by email. Please leave a comment if the issue is still relevant.

authors: maiiabocharova markus-eberts

repo: lavis-nlp/spert


text:
Feature request: Add an option to choose the image format

Currently, generated responsive images are .png files. Now that more efficient formats like .webp files are well supported by all browsers, it would be great to be able to choose the output format.
I think about something like the following:
# _config.yml

responsive:
  widths: [...]
  format: webp # the file extension for the ImageMagick `convert` command

What do you think about this feature @lawmurray?

Actually, I want to precise something: jekyll-responsive-magick does follow the original file format. But it forces us to convert our images to the desired format before using srcset filter. So it's okay to keep the behavior by default but it would be great to allow us to force the output format.

I like this idea @d9beuD. Want to have a go at implementing? Basically the default would be to preserve the current behavior where image format is preserved from input to output, but add a format option to the config to override, forcing all output images into a desired format.

Sure, I'll do it 🚀

Assigned. Thanks @d9beuD, looking forward to seeing what you can do with this!

I wait for #5 to be accepted before I work on this feature so I can better benefit from the refactoring I did. I hope you'll like my work!

#5 now accepted, thanks @d9beuD!

Thanks @lawmurray. I'm going to start working on this now 😃

repo: lawmurray/jekyll-responsive-magick


text:
why is datetime not unpacked?

there is a comment saying "intentionally not unpacked". why?

decodeDatetime, defined in the same module, is certain to box its result since it calls parseByteArray, which in turn calls runRW#.

Ok, makes sense. Should be added to the comment for clarity.

authors: andrewthad chessai


text:
workflow updated

Signed-off-by: kumarabd abishekkumar92@gmail.com

This is helpful in bringing in the Edge channel.
@kushthedude we can bring this into ci.yml in the meantime while kinks golintci are being worked out.

Please see how the other edge channels are drafted and working, Meshery can be taken as canonical implementation.

authors: kumarabd kushthedude


text:
Create new Meshery project site at https://meshery.io

Enhancement Description
Currently, https://layer5.io/meshery serves at the main project page. As a project Meshery has grown significantly - to the point that it needs its own project. The domain "meshery.io" has been reserved for this purpose.
Good Example Sites:

https://dapr.io
any of the CNCF Projects

https://www.cncf.io/projects/ (graduated / incubating)
https://www.cncf.io/sandbox-projects/ (sandbox)

closing this because we have a site now

authors: girishranganathan leecalcote


text:
feat: cloak telescope previews

Closes #8

For me the autocmd triggers (I added a print statement at line 85) but then nothing happens to the telescope preview. However, when I copy this new cmd and place it in my autocmds file like so it works like a charm (I'm using lazyvim btw):
-- Handle cloaking the Telescope preview.
local cloak = require("cloak")
vim.api.nvim_create_autocmd("User", {
  pattern = "TelescopePreviewerLoaded",
  callback = function(args)
    if not cloak.opts.enabled then
      return
    end

    local buffer = require("telescope.state").get_existing_prompt_bufnrs()[1]
    local picker = require("telescope.actions.state").get_current_picker(buffer)
    local base_name = vim.fn.fnamemodify(args.data.bufname, ":t")

    -- If our state variable is set, meaning we have just refreshed after cloaking a buffer,
    -- set the selection to that row again.
    if picker.__cloak_selection then
      picker:set_selection(picker.__cloak_selection)
      picker.__cloak_selection = nil
      vim.schedule(function()
        picker:refresh_previewer()
      end)
      return
    end

    local is_cloaked, _ = pcall(vim.api.nvim_buf_get_var, args.buf, "cloaked")

    -- Check the buffer agains all configured patterns,
    -- if matched, set a variable on the picker to know where we left off,
    -- set a buffer variable to know we already cloaked it later, and refresh.
    -- a refresh will result in the cloak being visible, and will make this
    -- aucmd be called again right away with the first result, which we will then
    -- set to what we have stored in the code above.
    for _, pattern in ipairs(cloak.opts.patterns) do
      -- Could be a string or a table of patterns.
      local file_patterns = pattern.file_pattern
      if type(file_patterns) == "string" then
        file_patterns = { file_patterns }
      end

      for _, file_pattern in ipairs(file_patterns) do
        if base_name ~= nil and base_name:match(file_pattern) ~= nil then
          cloak.cloak(pattern)
          vim.api.nvim_buf_set_var(args.buf, "cloaked", true)
          if is_cloaked then
            return
          end

          local row = picker:get_selection_row()
          picker.__cloak_selection = row
          picker:refresh()
          return
        end
      end
    end
  end,
  group = cloak.group,
})

Perhaps it has something to do with the order the plugins are loaded? I tried declaring Telescope as a dependency to cloak to ensure it gets loaded first but that didn't seem to do anything. I'll investigate more and comment again.

Thanks for the comments, I will look into this further too, was expecting things like this because it is not exactly a clean solution

So the issue went away when I rebased this branch from main. The issue was not your solution but that this branch was outdated. There's another issue though. For the normal cloak the defined pattern is matched using the autocmd pattern field which uses a completely different way to match the pattern from string:match(). This makes it so that some patterns apply to the previewer but not when you open the buffer and vice versa.
e.g. "^.env*" works on the previewer but not when opening the buffer given that the file name = ".env" . removing the caret  makes the previewer match with files such as "example.env".
This can be fixed by using
if base_name ~= nil and vim.fn.match(base_name, vim.fn.glob2regpat(file_pattern)) ~= -1 then

instead of
if base_name ~= nil and base_name:match(file_pattern)

I made this a pull request #14 with the above changes and a cloak_telescope setup option if you want to compare.

authors: eslam-allam laytan


text:
树组件增加搜索功能

议题条件

[X] 我确认已查看官方使用文档：https://layui.dev ，但没有找到相关解决方案。
[X] 我确认已在 Issues 中搜索过类似的问题，但没有找到相关解决方案。
[X] 我已仔细阅读： 🍀 Layui Issue 贡献指南

议题类型
功能请求
使用版本
v2.9.3
问题描述
树组件，缺少搜索功能，并且被搜索到的内容的颜色最好可以支持自定义
业务代码
新功能特征

截图补充
No response
浏览器
常用浏览器
演示地址
No response
友好承诺

[X] 我承诺将本着相互尊重、理解和友善的态度进行交流，共同维护 Layui 良好的社区氛围。

tree 组件的功能增加不在当前 2.x 版本计划之内，复杂的树形菜单需求，建议采用更成熟的同类组件替代。

好的，谢谢了
---原始邮件---
发件人: @.>
发送时间: 2024年1月15日(周一) 晚上11:40
收件人: @.>;
抄送: "jason @.@.>;
主题: Re: [layui/layui] 树组件增加搜索功能 (Issue #1566)
tree 组件的功能增加不在当前 2.x 版本计划之内，复杂的树形菜单需求，建议采用更成熟的同类组件替代。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

authors: JasonZhuAtamation sentsim

repo: layui/layui


text:
train_2020.py problem

FileNotFoundError: [Errno 2] No such file or directory: './data/pytorch2020/train+virtual'
Hello, run the train_2020.py file as you said, but the above error occurs. What does the train+virtual folder do?

The virtual data is the synthetic data provide by aicity2020 dataset.

authors: RoseLucy layumi


text:
Crash on reload in iOS simulator

Thanks for the wonderful library. I have a small issue when using it.
I generated a new app using react-native CLI and added your library using instruction in the readme. After this, if I won't start turbolinks app in js and just will reload app in the simulator it will crash.
Here's my App.js file (just default RN code):
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View
} from 'react-native';

const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' +
    'Cmd+D or shake for dev menu',
  android: 'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});

type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to React Native!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit App.js
        </Text>
        <Text style={styles.instructions}>
          {instructions}
        </Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

This is how error looks like in Xcode:

Log from Xcode:
2018-05-07 15:59:15.524 [info][tid:main][RCTCxxBridge.mm:210] Initializing <RCTCxxBridge: 0x6080001c4830> (parent: <RCTBridge: 0x6040000d3a90>, executor: (null))
2018-05-07 15:59:15.526068+0300 testapp[26340:1719060] Initializing <RCTCxxBridge: 0x6080001c4830> (parent: <RCTBridge: 0x6040000d3a90>, executor: (null))
2018-05-07 15:59:15.567 [warn][tid:main][RCTBridge.m:119] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2018-05-07 15:59:15.566754+0300 testapp[26340:1719060] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2018-05-07 15:59:15.578 [warn][tid:main][RCTModuleData.mm:67] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-05-07 15:59:15.578128+0300 testapp[26340:1719060] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-05-07 15:59:15.589 [info][tid:main][RCTRootView.m:293] Running application testapp ({
    initialProps =     {
    };
    rootTag = 1;
})
2018-05-07 15:59:15.667748+0300 testapp[26340:1719060] Running application testapp ({
    initialProps =     {
    };
    rootTag = 1;
})
2018-05-07 15:59:15.779335+0300 testapp[26340:1719864] [] nw_connection_get_connected_socket 4 Connection has no connected handler
2018-05-07 15:59:16.940 [info][tid:com.facebook.react.JavaScript] Running application "testapp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2018-05-07 15:59:16.940292+0300 testapp[26340:1719854] Running application "testapp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2018-05-07 15:59:16.953601+0300 testapp[26340:1719829] [] nw_connection_get_connected_socket 5 Connection has no connected handler
2018-05-07 15:59:17.787708+0300 testapp[26340:1719830] [] nw_connection_get_connected_socket 6 Connection has no connected handler
2018-05-07 15:59:18.541 [info][tid:main][RCTCxxBridge.mm:917] Invalidating <RCTCxxBridge: 0x6080001c4830> (parent: <RCTBridge: 0x6040000d3a90>, executor: (null))
2018-05-07 15:59:18.541290+0300 testapp[26340:1719060] Invalidating <RCTCxxBridge: 0x6080001c4830> (parent: <RCTBridge: 0x6040000d3a90>, executor: (null))
2018-05-07 15:59:18.541 [info][tid:main][RCTCxxBridge.mm:210] Initializing <RCTCxxBridge: 0x6080001c5460> (parent: <RCTBridge: 0x6040000d3a90>, executor: (null))
2018-05-07 15:59:18.541502+0300 testapp[26340:1719060] Initializing <RCTCxxBridge: 0x6080001c5460> (parent: <RCTBridge: 0x6040000d3a90>, executor: (null))
2018-05-07 15:59:18.542 [warn][tid:main][RCTModuleData.mm:67] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-05-07 15:59:18.542007+0300 testapp[26340:1719060] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
(lldb)

The same problems appears when I reloading from any plain RN component. If turbolinks is initialized then it reloads everything fine.
Do you know what causing this problem? How I can fix it?
P.S. I use CMD + R for reloading in simulator.

I had the same problem, I've sent a pull request with a fix for this issue.

@adanmayer Thank for you work... Could you provide a pull request with only fix for this problem?
Could you give me more explanation about startAppInView?

I've created a specific pull request for the bugfix.
Sorry – I was working on a POC and added additional stuff, which is not related to the issue.
I'm working on integrating the viewController into a different subView (other then the view of the root viewController). The basics are working, so it's iOS only for now.
I will create a separate pull request once that is done. So you can decide, if you want to integrate that functionality ...

Fixed with https://github.com/lazaronixon/react-native-turbolinks/releases/tag/v1.6.7

It seens not working anymore, and I could not find why  😢

#22 Fixed. It seems some compatibility problem with react-native-webview

authors: adanmayer kirillplatonov lazaronixon

repo: lazaronixon/react-native-turbolinks


text:
Why is deisotoping optional?

Dear Michael,
I was going through the example config file and saw that deisotoping is set to false. I thought deisotoping is essential to accurately quantify the peptides. Is there a reason to switch it off?
Thanks
Maithy

Why shouldn't it be optional? My philosophy is that we should enable the broadest configuration surface area, when reasonable, to enable workflows that other people may have, even if it's of no immediate use.
In the case of MS2 deisotoping, there are several cases where you might want to turn it off: low-res MS2 (e.g. typical TMT-MS3 workflows), TMT-MS2. I can assure you that there is no issue with identifying peptides when deisotoping is turned off.
You mentioned quantifying peptides, so perhaps you are not thinking of what I have described above -  I should clarify that Sage performs deisotoping only on MS2 spectra. MS1 spectra are left in their deisotoped state, and isotopic envelopes are extracted if LFQ is turned on.

repo: lazear/sage


text:
assets_vfsdata.go를 제거

원래 이 파일은 자동생성되기 때문에 제거되어야 하고
.gitignore에도 명시되어 있으나 그 전에 추가되었기 때문에
삭제되지 않고 있었다. 이를 명시적으로 제거함.
Close: #224

코드에서 assets_vfsdata.go를 제거해서 버전관리를 하지않도록 만들고, 빌드 직전에 생성되도록 하는 거 맞나요?
디펜던시 설치는 뭔가요? 왜 그 전에 해야하는거에요?😲

디펜던시는 go.mod와 go.sum에 등록되어있는 이 프로그램을 만들기 위해 불러다 쓴 패키지들이에요.
ci는 기본 os에 칼레나 빌드 또는 테스트를 위한 코드를 만들기 때문에 당연히 필요한 모든 패키지를 설치하는데 이걸 디펜던시 설치라고 해요.
vfsdata를 먼저 생성하는 이유는 그러지 않았을때 디펜던시 설치를 위한 go명령어가 칼레나 프로그램이 애초에 깨져있다고 판단해 설치를 하지않고 에러를 내며 종료하기 때문이고요.

아하! 고마워요!

repo: lazypic/kalena


text:
How to use slice for string varible

How to use slice for string varible like
-- input
a: "12312"
b: !? $_.a[:2]
-- output
a: "12312"
b: "12"

Yglu uses YAQL as expression language. So you can achive the wanted result with substring and len
https://yaql.readthedocs.io/en/latest/standard_library.html#substring

Actually you can also use negative index with substring
# input
a: "12345"
b: !? $_.a.substring(-2,2)
# output
a: '12345'
b: '45'

authors: Alexzsh lbovet

repo: lbovet/yglu


text:
lbry-sdk not making progress during initial address sync when connecting to herald.go

This data was gathered with some local changes plus my published branch herald.go/blockchain_tx_rpc1:
failure.txt
It's not completing, even though some messages are emitted like these:
2022-11-18 17:12:30,189 - lbry.wallet.ledger - INFO - subscribed to 15/15 addresses on 127.0.0.1:50002
2022-11-18 17:12:30,189 - lbry.wallet.ledger - INFO - finished subscribing to 15 addresses on 127.0.0.1:50002

It just keeps spinning in some loop alternating between address.get_history and transaction.get_batch. It's also only mentioning a couple of specific transactions -- one at height=0 and one at height=1
I will continue investigating this, but maybe @eukreign, @jackrobison, or @shyba could point me in the right direction.
Herald.go is not generating address notifications and header notifications at this time AFAICT. That's one difference in behavior between herald.go and python herald that may be relevant.

Lbry-sdk <-> Herald RPCs sent & responses:
Baseline: a.txt
Herald.go: b.txt
It's starting to diverge at the point of blockchain.address.subcribe (Python hub returns None a lot of the time) and later at blockchain.address.get_history (Herald.go returns 2 different transactions at height 0 and height 1, Python returns same transaction at height -1 and later height 201).


text:
Author Fields Blank - Suggest delete from UI, or re-add to Publish

The Issue
Author field needs to be removed as a metadata field, since it's no longer in publish process. Or, re-add it to publish process so copyright can properly auto-fill again.
Steps to reproduce

Attempt to publish
Look at new content publishes which have empty Author fields.

Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Anything Else

Screenshots

Will be fixed in 0.12.3.

authors: kauffj reillysmith

repo: lbryio/lbry-app


text:
LBRY app locks up on "Downloaded" tab

The Issue
Steps to reproduce

Create a channel with less than 4 characters
Download and publish content
Try and run LBRY and view downloaded content

Expected behaviour
LBRY app should allow you to view your published content.
Actual behaviour
After some time the LBRY app may become unresponsive when you click on the Folder icon for "Downloaded & Published"
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Anything Else

Screenshots

Thx for filing, great find! Took care of reward via slack.
Workaround is to abandon the channel

#690 should fix this.

Will be live in next app release (presumably 0.18).


text:
RSS is BORRING

I just tried to subscribe to myself through the RSS, and it works. The problem is. The article is not loading. And example:

I don't think anything like loading articles are yet implemented. But would be nice. I mean, at least for the articles.

Dup #6369

authors: JYamihud infinite-persistence

repo: lbryio/lbry-desktop


text:
Show last watched position of an upload, and go to that last watched position when navigated to

A very important feature to have is to save where a user last was on a video and then show that progress when they are overviewing a channel page. When the user sees the progress bar they can know where they were in that video (a completed video should be a full red progress bar) and when they click that video they should be taken to where they last were while watching that video.
Example from NodeTube, YouTube has the same implementation:

It should be simple enough to make a call to the database on a recurring basis that will mark the current progress of the upload view. On the frontend most of this functionality exists because we are saving user's current state on the client side, so provided the backend can provide the last watched time along with the rest of the information about the claim all that is needed is a progress bar which is easy enough to implement.

Thanks for filing, will close my old issue for this (https://github.com/lbryio/lbry-desktop/issues/3614). This should also include some indicator that something was viewed fully (red bar all the way to the end, maybe different tile shading, etc).
We still need account API support for this to make it cross device / persistent: https://github.com/lbryio/internal-apis/issues/1790

Re: indicating fully watched videos, YouTube does a solid red bar, which feels natural and I support as the spec.

authors: mayeaux tzarebczan


text:
update statbot.js

add IDR from cryptocompare and Australian Dollar , i Hope its can be merged.. i just helping out to make this bots more better

Please add Eur if this PR merged. I saw this has been deleted

your using an older version of pricebot.js you could remove that and keep stats.js

Chris - please close this and delete your branch. Start your new changes on new branch.

Okey. Sorry for late. Im busy right now

authors: MSFTserver tzarebczan ykris45

repo: lbryio/lbry-wunderbot


text:
add php download links

probably should link to https://www.docker.com/get-docker for install docker section

Let me know how you make out with the install, you may need to do this : https://github.com/lbryio/lbry.io/issues/527#issuecomment-393647193
It will vary by distro or if you are on Windows. Haven't had a chance to update the docs.

@tzarebczan its from Php official site . http://php.net/manual/en/install.php . im install php on windows machine using the method from that site and success

https://www.sitepoint.com/how-to-install-php-on-windows/


text:
Add a better help message

$ sudo python3 osbs-box.py --help
usage: osbs-box.py [-h] {up,down,cleanup} ...

Setup a new OSBS instance using docker-compose.
It includes Openshift cluster, Koji and docker registry

optional arguments:
  -h, --help         show this help message and exit

subcommands:
  {up,down,cleanup}  action to execute
    up               start a new osbs-box
    down             destroy existing osbs-box
    cleanup          remove configuration volumes

$ sudo python3 osbs-box.py up --help
usage: osbs-box.py up [-h] [--no-cleanup] [--force-rebuild]

optional arguments:
  -h, --help       show this help message and exit
  --no-cleanup     Don't remove existing volumes when starting a new box
  --force-rebuild  Force image rebuild

Not sure how do I make up help show by default, as its most used command
Fixes #17

Not sure how do I make up help show by default, as its most used command

I think it's fine not to do that.

authors: lcarva vrutkovs

repo: lcarva/osbs-box


text:
lcdblib conda install does not get all dependencies

Is there a way to specify channels in the meta.yaml.  I am getting some errors about not having pysam, pybedtools, jsonschema, etc...
Even though these are clearly in the requirements. Not sure what is going.

No longer having this issue.

repo: lcdb/lcdblib


text:
🛑 Netdata is down

In 9802e40, Netdata (https://netdata.thonk.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Netdata is back up in fdeb4f6.

repo: le-server/thonk-upptime


text:
rc/1.0.0

Set version to 1.0.0 (gitleaks7 version number for gitleaks v7.6.1)

Merging to main and tagging v1.0.0


text:
feat(Algebra/Homology): the category of short complexes is linear

Thanks!
bors merge


text:
chore(Init/Data/Int): drop deprecated lemmas

Cherry-picked from #9607
Co-authored-by: @semorrison

bors merge

authors: semorrison urkud


text:
feat(AlgebraicGeometry/ProjectiveSpectrum/Scheme): add the underlying map of forward  sheaf component

for each open sets V ⊆ Spec A⁰_f, We aim to define (Spec A⁰_f)(V) ⟶ (Proj| pbo f)(φ⁻¹ V). Let s be a section on V (i.e. a (dependent) function Π (𝓅 ∈ V) (A⁰_f)_𝓅) and y : φ⁻¹ V, we consider the fraction s φ(y) ∈ (A⁰_f)_φ(y), we can write it as a/b where a, b are fractions in A⁰_f; by writing a as n_a/m_a and b as n_b/m_b, we obtain a homogeneous fraction in A⁰_y
              n_a * m_b
    α(s)(y) = ---------.
              n_b * m_a

Note that this is just a function, still need to prove that it preserves zero, one, addition, multiplication, and locally a fraction

!bench

I haven't looked at the whole file so I might be totally wrong, but couldn't (Spec A⁰_f)(V) -> (φ _* Proj | D(f))(V) be obtained easily via the Gamma-spec adjunction and a the ring map Proj(D(f)) -> A⁰_f used to construct the topological maps?

Ah I completely forgot about gamma spec adjunction. But I don't think I have a map Proj(D(f)) -> A⁰_f.
Do you think gamma spec adjunction would work for the backward direction as well? Because this very explicit approach (forward and backward direction) has the advantage of making checking they are inverse to each other just about calculating fractions.

It's a typo. It should be A⁰_f -> Proj(D(f)) instead, which maps x to the constant function with value x. Then just check that the sheaf map is bijective on stalks, which should be easy on paper (but maybe not in lean).

It's a typo. It should be A⁰_f -> Proj(D(f)) instead, which maps x to the constant function with value x. Then just check that the sheaf map is bijective on stalks, which should be easy on paper (but maybe not in lean).

Do we have the fact sheaf morphism is an isomorphism if and only if the induced stalk ring homs are isomorphisms in Lean?

We have TopCat.Presheaf.app_bijective_of_stalkFunctor_map_bijective or TopCat.Presheaf.isIso_iff_stalkFunctor_map_iso.

Thanks. I will try tomorrow the gamma spec adjunction approach.

I think this  is how gamma-spec adjunction going to work:
We define the following sheaf morphism
example : (Proj| (pbo f)) ⟶ (Spec (A⁰_ f)) :=
  ΓSpec.locallyRingedSpaceAdjunction.homEquiv (Proj| (pbo f)) (op <| .of <| A⁰_ f) <| op <|
    {
      toFun := fun x ↦
        ⟨fun y ↦ Quotient.mk'' ⟨x.deg, ⟨x.num, x.num_mem_deg⟩, ⟨x.den, x.den_mem_deg⟩,
          by
            simp only [Functor.op_obj, unop_op, LocallyRingedSpace.forgetToSheafedSpace_obj,
              SheafedSpace.forgetToPresheafedSpace_obj, LocallyRingedSpace.restrict_carrier,
              IsOpenMap.functor_obj_coe, Opens.coe_inclusion, Opens.coe_top]
            obtain ⟨n, (hn : f^n = x.den)⟩ := x.den_mem
            intro r
            rw [← hn] at r
            have y_mem := y.2
            simp only [Functor.op_obj, unop_op, LocallyRingedSpace.forgetToSheafedSpace_obj,
              SheafedSpace.forgetToPresheafedSpace_obj, LocallyRingedSpace.restrict_carrier,
              Opens.openEmbedding_obj_top] at y_mem
            exact y_mem (y.1.2.mem_of_pow_mem _ r)⟩, by
          rintro ⟨z, hz⟩
          simp only [Functor.op_obj, unop_op, LocallyRingedSpace.forgetToSheafedSpace_obj,
            SheafedSpace.forgetToPresheafedSpace_obj, LocallyRingedSpace.restrict_carrier,
            Opens.openEmbedding_obj_top] at hz
          refine ⟨_, hz, eqToHom (by ext; simp), x.deg, ⟨x.num, x.num_mem_deg⟩,
            ⟨x.den, x.den_mem_deg⟩, fun a ↦ ⟨?_, rfl⟩⟩
          obtain ⟨n, (hn : f^n = x.den)⟩ := x.den_mem
          rintro (r : x.den ∈ _)
          rw [← hn] at r
          exact a.2 <| a.1.2.mem_of_pow_mem _ r⟩
      map_one' := by
        simp only [Functor.rightOp_obj, LocallyRingedSpace.Γ_obj, unop_op,
          LocallyRingedSpace.restrict_carrier, LocallyRingedSpace.restrict_presheaf_obj,
          Functor.op_obj, LocallyRingedSpace.forgetToSheafedSpace_obj,
          SheafedSpace.forgetToPresheafedSpace_obj, IsOpenMap.functor_obj_coe, Opens.coe_inclusion,
          Opens.coe_top, CommRingCat.coe_of]
        refine Subtype.ext <| funext fun x ↦ ?_
        simp only [Functor.op_obj, unop_op, LocallyRingedSpace.forgetToSheafedSpace_obj,
          SheafedSpace.forgetToPresheafedSpace_obj, LocallyRingedSpace.restrict_carrier,
          IsOpenMap.functor_obj_coe, Opens.coe_inclusion, Opens.coe_top, CommRingCat.coe_of]
        change _ = 1

        rw [HomogeneousLocalization.ext_iff_val, HomogeneousLocalization.one_val,
          HomogeneousLocalization.val_mk'',
          show (1 : Localization.AtPrime x.1.asHomogeneousIdeal.toIdeal) = Localization.mk 1 1 by
            convert Localization.mk_self _ |>.symm
            rfl]

        erw [Localization.mk_eq_mk_iff, Localization.r_iff_exists]
        have eq_final := (1 : A⁰_f).eq_num_div_den
        rw [HomogeneousLocalization.one_val,
          show (1 : Localization.Away f) = Localization.mk 1 1 by
            convert Localization.mk_self _ |>.symm
            rfl, Localization.mk_eq_mk_iff, Localization.r_iff_exists] at eq_final
        obtain ⟨⟨_, ⟨n, rfl⟩⟩, eq_final⟩ := eq_final
        simp only [mul_one, OneMemClass.coe_one, one_mul] at eq_final
        refine ⟨⟨f^n, ?_⟩, by simpa using eq_final.symm⟩
        have mem_final := x.2
        simp only [Functor.op_obj, unop_op, LocallyRingedSpace.forgetToSheafedSpace_obj,
          SheafedSpace.forgetToPresheafedSpace_obj, LocallyRingedSpace.restrict_carrier,
          Opens.openEmbedding_obj_top] at mem_final
        exact fun r ↦ mem_final <| x.1.2.mem_of_pow_mem _ r
      map_mul' := sorry
      map_zero' := sorry
      map_add' := sorry
    }

and we prove that the induced stalk map is isomorphism. But I am not fully convinced that I want to make the switch. Because sending $x$ to the constant function $x$ is still kinda messy: $x$ is in $A^0_f$ and the "constant function x" is in $A^0_{\mathfrak p}$ for some homogeneous ideal $\mathfrak{p} \in D(f)$, so coercion is needed as well. So works still needs to be done to prove preservation of zero/one/addition/multiplication, being locally fraction. Maybe its less work compared to this approach though.
Checking the induced stalk map is isomorphism probably won't be very easy to formalize as well.

I haven't looked at the whole file so I might be totally wrong, but couldn't (Spec A⁰_f)(V) -> (φ _* Proj | D(f))(V) be obtained easily via the Gamma-spec adjunction and a the ring map Proj(D(f)) -> A⁰_f used to construct the topological maps?

Using Gamma-Spec adjunction would indeed be extremely elegant and even make the homeomorphism unnecessary I think.
Is this the argument using Gamma-Spec adjunction:
Let $\alpha: A^0_f \to \mathrm{Proj}|{D(f)}$ be function defined by sending $$x$$ to the constant function $x$. Then the morphism from $\mathrm{Proj}|{D(f)} \to \mathrm{Spec}(A^0_f)$ is defined by
\mathrm{Proj}|_{D(f)} \to \mathrm{Spec}(\mathrm{Proj}_{D(f)}) \stackrel{\mathrm{Spec(\alpha)}}{\to} \mathrm{Spec}(A^0_f)

Then we need to check the induced stalk morphism at $\mathfrak q \in \mathrm{Proj}|_(D(f))$ is bijective, i.e.
{(A^0_f)}_{\mathfrak p} \to A^0_{\mathfrak q}

is bijective where $\mathfrak p$ is calculated as the preimage of the maximal ideal of $A^0_{\mathfrak q}$ under
A^0_f \to \Gamma(\mathcal{O}_{\mathrm{Proj}}, D(f)) \to \mathcal{O}_{\mathrm{Proj}, \mathfrak q} \cong A^0_{\mathfrak q}.

Ideally $\mathfrak p$ should just be $A^0_f \cap \mathrm{span} {\frac{g}{1} | g \in \mathfrak q}$ (this should be okay since $f \not\in \mathfrak q$.)  and
${(A^0_f)}{\mathfrak p} \to A^0{\mathfrak q}$ should ideally have inverse $A^0_{\mathfrak q}\ni \frac{a}{b} \mapsto \frac{a/1}{b/1} \in {(A^0_f)}_{\mathfrak p}$. (I am not quite sure what the forward ring map is, but I am convinced that this is its inverse)
But since $\mathcal{O}{\mathrm{Proj}, \mathfrak q} \cong A^0{\mathfrak q}$ and $\mathcal{O}{\mathrm{Spec(A^0_f)}, \mathfrak p} \cong {(A^0_f)}{\mathfrak p}$ are both complicated in Lean, I am not sure how easy it is to check that the stalk map is isomorphism.

Sorry forgot to reply.
I don't think this isomorphism is a one off thing. We will need to identify $D_+(f)$ with $\mathrm{Spec}(A^0_f)$ at times and I think it might be easier to show that this isomorphism commutes with other stuff if this map comes from some general machinery and so that the API of the machinery can be used. Maybe this don't matter though as the adjunction guarantees that the map is uniquely determined.
If you have some more thoughts, maybe we should move this conversation to Zulip?

Sorry forgot to reply. I don't think this isomorphism is a one off thing. We will need to identify D+(f) with Spec(Af0) at times and I think it might be easier to show that this isomorphism commutes with other stuff if this map comes from some general machinery and so that the API of the machinery can be used. Maybe this don't matter though as the adjunction guarantees that the map is uniquely determined.
If you have some more thoughts, maybe we should move this conversation to Zulip?

The thread is here

Superceded

authors: erdOne jjaassoonn


text:
feat(Nat/Defs): Add div_dvd_iff_dvd_mul

maintainer merge

maintainer merge

authors: Jun2M YaelDillies erdOne


text:
feat (LinearAlgebra/RootSystem/Defs): define Weyl group

This PR defines the Weyl group of a root pairing, and its permutation representation on the indexing set of roots.
Co-authored-by: Deepro Choudhury

bors r+


text:
feat(AlgebraicGeometry/EllipticCurve/Weierstrass): add j_(eq|ne)_zero[_iff][']

which state the equivalency of j equals zero and c4 equals zero.

Thanks! Suggestions applied.
I found that I need some more lemma for specified characteristic case. For example, in char 3 case, j=0 if and only if a2=0 (if I remembered correctly). Is it a good idea to include such char specified lemma in this file?
Message ID: @.***>

@Multramate is this good to go?
Also, please merge master and resolve the linter failures.

I suppose there's also no need to add docstrings for the lemmas since they're kinda obvious what they do?

OK. Except for the results with a prime, which will be complained if without a docstring.

bors merge

authors: acmepjz mattrobball


text:
fix: silence sleep_heartbeats in unusedTactic

Found thanks to the large-import label on #12339.

I added the sleep_heatbeats exception to the unusedTactic linter.  Let me know if you this is preferable to simply do nothing, as I can see arguments both ways.

On the one hand, I expect sleep_heartbeats to (almost) never make it into final code, so having to silence it by setting the linter option is certainly a reasonable expectation.
On the other hand, sleep_heatbeats is mostly a debugging/testing tool, so it also makes sense that you would not have to want to add clutter by having to further silence the linter, or see its warnings.

I am happy either way!

Thanks!
bors r+

authors: adomani kmill


text:
feat(Algebra/Category): the category of abelian groups satisfies AB4*

Thanks!
bors d+

Thanks for the review
bors merge

authors: dagurtomas joelriou


text:
feat: port CategoryTheory.Monad.Coequalizer

bors merge

authors: Parcly-Taxel semorrison


text:
Abel tactic

I've got an Abel tactic working, but just for groups and not monoids right now. The comments are all horrible because I cut and pasted the ring tactic and adapted it to Abelian Groups.

I don't know. I think maybe the result would probably look pretty similar anyway, so it might not be worth it even if that is better. My plan was basically to wait until we actually have the interface for groups and monoids before finishing this off.

Is this obsoleted by #555?

I think so


text:
feat: port Order.Basic

TODO: decide on min/max alignment with mathlib3
In lean3, min and max vary by changing the conditional. In lean4, min and max vary by changing the order of the branches.
-- mathlib3
def min_default := if a ≤ b then a else b
def max_default := if b ≤ a then a else b

-- mathlib
def min := if a ≤ b then a else b
def max := if a ≤ b then b else a

This means that lemmas like min_def and max_def have different statements, and some proofs that rely on defeq will break.
According to @digama0, the lean4 version is inlined to C code.
We can backport the min and max definitions, or just make mathlib4 min_def and max_def match the lean3 expression and have non-rfl proofs.

Can you explain the TODO in the PR description? What are the choices?

Updated the description

Okay, I propose we backport the Lean 4 behaviour to Lean 3. Here's the PR:

lean: https://github.com/leanprover-community/lean/pull/779
mathlib: https://github.com/leanprover-community/mathlib/pull/17470

Optionally wait until people have opinions on those PRs, but you can copy my changes in the mathlib PR here if you like.

bors merge

bors merge

bors merge

authors: pechersky semorrison


text:
lake command that reports whether lake build will do any work

I would like to be able to add a CI step for downstream projects, e.g. Mathlib, that verify that the cache has really worked, i.e. that after lake exe cache pack && lake exe cache get, lake build does no work.
But as far as I'm aware, there is not currently a mechanism to find out if there is any work to do.

@semorrison While this feature may be a nice to have, I am not sure about the example case. In Mathlib,  a lake build is expected to do work after a lake exe cache get to build things that are not cached (e.g., the executables for runLinter and checkYaml). In the future, it may also need to build native libraries for features like precompileModules used in dependencies.

In fact this is no longer true: we removed defaultTarget from both runLinter and checkYaml.
But even if that were still the case, I think the point remains that we don't have an effective way to verify programmatically that the cache is complete, and will be fully used.

Note that this is the reason why lean-cache duplicates so much of the logic of lake, it gives some hints regarding whether lake build needs to be run after or not and tries to reliably predict whether anything will happen.

Looking through Lake issues, I realized that this appears to have been addressed by the addition of the --no-build option (in #2651). As such,, I am closing this issue.

authors: digama0 semorrison tydeu


text:
Functional induction does not preserve match cases syntactically

Prerequisites
Please put an X between the brackets as you perform the following steps:

[x] Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues
[x] Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries.
[x] Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)

Description
If I define a function on natural numbers using the equation compiler and have a case for n + 1, then the corresponding case in the functional induction principle is spelled n.succ.
Context
In #3629 we changed cases and induction such that they generate goals with n + 1 instead of n.succ. This is one case where functional induction is less nice to use than induction or the equation compiler.
Steps to Reproduce
def f : Nat → Nat
  | 0 => 0
  | n + 1 => f n

#check f.induct

Expected behavior: f.induct (motive : Nat → Prop) (case1 : motive 0) (case2 : ∀ (n : Nat), motive n → motive (n + 1)) :   ∀ (a : Nat), motive a
Actual behavior: f.induct (motive : Nat → Prop) (case1 : motive 0) (case2 : ∀ (n : Nat), motive n → motive n.succ) :   ∀ (a : Nat), motive a
Versions
4.12.0-nightly-2024-09-07 on live.lean-lang.org
Impact
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.

Thanks for the report!
Since FunInd merely massages the function definition into the induction principle, it seems the proper fix should happen earlier, in the match function compiler, if feasible: Note that the generated match_1 uses .succ:
def f : Nat → Nat
  | 0 => 0
  | n + 1 => f n

/--
info: def f : Nat → Nat :=
fun x =>
  Nat.brecOn x fun x f =>
    (match (motive := (x : Nat) → Nat.below x → Nat) x with
      | 0 => fun x => 0
      | n.succ => fun x => x.1)
      f
-/
#guard_msgs in
#print f

/--
info: f.match_1.{u_1} (motive : Nat → Sort u_1) : (x : Nat) → (Unit → motive 0) → ((n : Nat) → motive n.succ) → motive x
-/
#guard_msgs in
#check f.match_1

If that’s infeasible we can of course do an ad-hoc clean-up later.

authors: TwoFX nomeata


text:
simp only [Option.some_bind] -> maximum recursion depth has been reached

Prerequisites
Please put an X between the brackets as you perform the following steps:

[x] Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues
[x] Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries.
[x] Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)

Description
theorem extracted_1 (e : Option (BitVec 32)) :
  none =
    Option.bind e fun x =>
      if x ≥ 32 then none
      else
        (some ((BitVec.ofInt 32 (-33)).sshiftRight x.toNat)).bind fun y =>
          if y = 0#32 then none else some 0#32 := by
  simp only [Option.some_bind]
/-
tactic 'simp' failed, nested error:
maximum recursion depth has been reached
use `set_option maxRecDepth <num>` to increase limit
use `set_option diagnostics true` to get diagnostic information
-/

Context
I checked with @hargoniX and this seems to be a bug.
Steps to Reproduce

Copy into live.lean-lang.org
Observe the error

Expected behavior: No error recursion error
Actual behavior: Either simp successfully terminating or reporting that it could not find a simp-lemma to apply
Versions
Lean 4.14.0-nightly-2024-11-03
Target: x86_64-unknown-linux-gnu
Further information
On our dataset, this (or a similar) simp error fires 82 times.
Impact
Add :+1: to issues you consider important. If others are impacted by this issue, please ask them to add :+1: to it.

Brief inspection: seems to be a complex isDefEq after application of the simp theorem
  [Meta.Tactic.simp.rewrite] Option.some_bind:1000, (some ((BitVec.ofInt 32 (-33)).sshiftRight x.toNat)).bind fun y =>
      if y = 0#32 then none
      else some 0#32 ==> if (BitVec.ofInt 32 (-33)).sshiftRight x.toNat = 0#32 then none else some 0#32
  [Meta.Tactic.simp.unify] eq_self:1000, failed to unify
      ?a = ?a
    with
      (BitVec.ofInt 32 (-33)).sshiftRight x.toNat = 0#32
  [Meta.Tactic.simp.congr] ite_congr not modified
  [Meta.isDefEq] [0.031529] 💥 ?h₃ =?= fun a => Eq.refl (if (BitVec.ofInt 32 (-33)).sshiftRight x.toNat = 0#32 then none else some 0#32) ▶

seal BitVec.sshiftRight turns it into a (kernel) deep recursion detected

Thank you for investigating. Let me know if I can help in some way to get this resolved.

Fallout from https://github.com/leanprover/lean4/pull/5479 maybe? Maybe that defeq check needs to run at reduced transparency? (But this being in the simplifier isn't the transparency already reduced?)

Brief inspection: seems to be a complex isDefEq after application of the simp theorem
  [Meta.Tactic.simp.rewrite] Option.some_bind:1000, (some ((BitVec.ofInt 32 (-33)).sshiftRight x.toNat)).bind fun y =>
      if y = 0#32 then none
      else some 0#32 ==> if (BitVec.ofInt 32 (-33)).sshiftRight x.toNat = 0#32 then none else some 0#32
  [Meta.Tactic.simp.unify] eq_self:1000, failed to unify
      ?a = ?a
    with
      (BitVec.ofInt 32 (-33)).sshiftRight x.toNat = 0#32
  [Meta.Tactic.simp.congr] ite_congr not modified
  [Meta.isDefEq] [0.031529] 💥 ?h₃ =?= fun a => Eq.refl (if (BitVec.ofInt 32 (-33)).sshiftRight x.toNat = 0#32 then none else some 0#32) ▶

seal BitVec.sshiftRight turns it into a (kernel) deep recursion detected

We get the same error in https://github.com/leanprover/lean4/issues/5724, where this is due to the kernel trying to reduce a rfl lemma.

https://github.com/leanprover/lean4/issues/5724

Ok, not due to #5479 likely, and maybe just a duplicate of #5724: The following avoids the problem:

def Option.some_bind' := (fun () => @Option.some_bind) ()

theorem extracted_1 (e : Option (BitVec 32)) :
  none =
    Option.bind e fun x =>
      if x ≥ 32 then none
      else
        (some ((BitVec.ofInt 32 (-33)).sshiftRight x.toNat)).bind fun y =>
          if y = 0#32 then none else some 0#32 := by
  simp only [Option.some_bind']

This redefinition of the lemma makes it a non-rfl lemma, so we effectively get the effect of Leo’s #4595 and the kernel is happy.

It’s still somewhat surprising that this is an elab-time timeout, and not (just) a kernel-time timeout, so more debugging to be done.
We’ll probably going to merge #4595 (off by default) so that in these cases you can at least set a flag and hopefully make progress in your work, and maybe it can be on by default eventually.

Merging #4595 would be incredibly useful. This would also allow us to gather data at a bit wider scale, which can then potentially inform a more complete solution.

authors: Kha nomeata tobiasgrosser


text:
chore: refactor pr-release.yml to avoid 'await'

#3066 is causing CI failures, e.g. here.
Although there are plenty of examples of using await in a Github workflow script block, the error seems to be about this. This refactor hopefully works around that, but I'm still uncertain of a root cause.

I really need PR releases up and running again, so I am going to merge this now and test in production.


text:
Confusing text on “suppose” vs. “assume” in Section 4.6

I found the following text rather confusing in Section 4.6 More on the Proof Language:

Using the keyword assume for this purpose would result in a syntactic ambiguity, since the expression assume h k could mean "assume h and assume k", leaving Lean to infer the relevant hypotheses from the context, or "assume proposition h k without a label". Using suppose avoids the problem. As with the anonymous have, the assumption can also be invoked by enclosing the assertion in backticks later in the proof.

First, it wasn't clear what “this” was referring to in the first sentence. Only later did I realize that it was referring to the following example code (I think). If so, then that fact should be made more clear, since “this” usually refers to something already referenced.
Second, I don't understand how assume results in syntactic ambiguity. Either (1) you are talking about something that you haven't introduced yet (one can assume proposition h k without a label?), or (2) you are comparing apples to oranges by comparing suppose with hypotheses to assume without hypotheses, or (3) there is something else or some combination of the above going on.

You are right, it is a lousy explanation. I'll fix it. The issue is that there is an asymmetry: you can write both
have H : x = 0, ...

and
have x = 0, ...

but for assumptions, you have to write either
assume H : x = 0

or
suppose x = 0

I was trying to explain why we cannot allow anonymous "assume". The problem is Lean also lets you write
assume H, ...

to introduce the hypothesis with label H, and let Lean infer the proposition that is being asumed. I is equivalent to
assume H : _, ...

But if we were to allow anonymous assume, there would be ambiguity with assume H: it could mean, infer the proposition that we are assuming, and label it H, or assume the proposition H, with implicit label this.
Does that make sense?

Does that make sense?

Yep. Thanks!

Actually, I think it's important that this is a question of language design rather than user usage. In other words, you explained here why the language designer would not allow for an anonymous assume. But from a tutorial perspective, it should perhaps be more of a “Hey, watch out for this potential syntax gotcha!”
(It just occurred to me that one shouldn't just assume one can be anonymous with assume. Punny!)

authors: avigad spl

repo: leanprover/tutorial


text:
Small Bug fixes and Refactors to extend functionality

This PR makes the following changes

Show Error log only when debug is true
Refactor initialization routes function to smaller extendable functions
Add requiredRefreshPostParams
Add bodyparser.json()
Fix authenticatedRoute.post()
Fix code check in validateResponseType() since token is not supported

I would close this in favour of #19 and #21

authors: RaviTmg jankapunkt


text:
Remove old apis from LeapCSharp

The upcoming release deprecates several fields in LeapC, and these edits are required to maintain consistency.

@yeswalrus in develop I can receive hands from the service, but after this change I cannot.  I believe this might have to do with the fact that removing the fields from LEAP_TRACKING_EVENT has desynced the event structs layout from the layout of LeapC.h.  Might this PR also need an update to the LeapC dll?

Only thing that works for me is to move the .so file into the x86 folder.  @jselstad @testmasterbright is this solution acceptable to you / works for you as well?  Don't know if it will still work for different brands of phone.....

authors: Amarcolina yeswalrus

repo: leapmotion/UnityModules


text:
Added LoPolyHands to Android Module

Swapped Capsule Hands out for LoPolyHands (also copied them from the Hands module into the Android Module)
NOTE: LoPolyHand Scripts are duplicated (with different names)!
This is not a permanent solution!  At some point we're going to have the talk (about intermodule dependencies).

iHandModels need to be dragged from hierarchy into the HandPool slots.

authors: jselstad protodeep


text:
Create walkthrough's / readme's for Credential Registry

Create and publish an envelope

Examples for credential and envelope
Integration with envelope
Signing with JWT
Publishing

What happens when a document has an error/fails validation

Retrieve an envelope
Other docs / info that @andersoncardoso thinks will improve the developer experience

https://github.com/learningtapestry/learningregistry/blob/master/docs/credential_registry_walkthrough.md
We will improve on this iteratively.

authors: andersoncardoso science

repo: learningtapestry/learningregistry


text:
KubeSail is no longer free

Kubesail no longer provides users with free clusters.

Thanks for letting us know!

KubeSail has been removed in https://github.com/learnk8s/free-kubernetes/commit/59ea03080dde0d37632b05087e72538cf4ea2102. Please close this issue

authors: ilovelinux salaboy tzchz


text:
Our results are better with tensorflow movenet

Hello- Nice work on this. We've run some initial tests and are finding that the results from the original tensorflow movenet (https://colab.research.google.com/github/tensorflow/hub/blob/master/examples/colab/movenet.ipynb) are different than the results we're seeing with your implementation.
Original movenet:

This implementation:

We're running both with the "thunder" model. Is there something we're doing incorrectly or a modification we need to make?
Best Regards.

It may due to the subtle difference in implementation of up-sampling in https://github.com/lee-man/movenet-pytorch/blob/main/movenet/models/feature_pyramid_network.py
Or the difference in post-processing. I have no clear idea.

@jigratz Another possible reason is the difference in the version you used for the demo. The weights I extracted are from MoveNet Version 3.

authors: jigratz lee-man

repo: lee-man/movenet-pytorch


text:
Update on merge part

added a few bug fix

The merge part has been updated.


text:
Fix atom engine semver

This was a typo in Atom's docs for upgrading packages. The current semver >=0.174.0, <2.0.0 is not valid and is skipped when installing via apm. See https://github.com/atom/atom/pull/5417 for more details. You'll need to publish a new version of the package after merging this.

Thanks!

authors: hmatsuda izuzak

repo: leejarvis/block-travel


text:
the after() function should execute after a failed test as well as after a passing test

If failfast is true, it probably doesn't matter if the after function executes, but when failfast is false, it's often more important to execute cleanup steps in the after function when a test fails than when it passes.

I did it by passing the after function to the function that checks failfast, prints the stack for failing tests, etc. Added the call just after the stack print
Diane Law [11:09 AM]
From run () (in runner .fs):
with
| ex when failureMessage <> null && failureMessage = ex.Message -> pass()
| ex -> fail ex test.Id suite.After
from fail  (also in runner.fs):
let fail (ex : Exception) id after =
try
if failFast = ref true
then failed <- true
failedCount <- failedCount + 1
contextFailed <- true
let f = DateTime.Now.ToString("MMM-d_HH-mm-ss-fff")
let ss = screenshot configuration.failScreenshotPath f
reporter.fail ex id ss
after()
Diane Law [11:09 AM]
This would call it regardless of the value of failfast, You could call it conditionally as well.

thanks I will work on getting something like this in tonight.

Jeremy just added his version as a pull request too. :-) Thanks, Chris!

https://www.nuget.org/packages/canopy/0.9.25

This has the fix in, 9.25 did not because I forgot to merge the change before building the package.
https://www.nuget.org/packages/canopy/0.9.26

authors: dianelaw lefthandedgoat

repo: lefthandedgoat/canopy


text:
Multiple OCLC Accounts

This is just something I thought of during your presentation to MM SIG. We are a consortium where we have 6 OCLC accounts, one for each school and one for our depository. We are migrating to a single instance of FOLIO where we are sharing srs and instance records. An institution can add a holdings to an instance already there because they now have that resource. What we have been doing until recently was to add a 938 to our MARC bib records that triggered an action to set/remove holdings in OCLC and then remove the 938 so it wouldn't be picked up again. We stopped this because we just weren't sure how to do this in FOLIO.
If there is no 938 trigger, you would have to use a trigger for new instances and their holdings, and newly created holdings since we share bibs. This seems rather complex.

Just some basic questions or maybe ideas?

Do each of your institutions within the consortium still need to maintain their own holdings in OCLC even though you are sharing an instance in FOLIO?
If so, is there any possibility of the "trigger" being on your holdings record and for that to be the starting point?

Each institution does maintain their own holdings, even when we'll be sharing. We can use the trigger on the holdings record. We're using FOLIO holdings. Would it make sense to have a note with note type of "Action", that is flagged as staff only, where we have language such as "set OCLC" and "remove OCLC"? This staff note could then be removed once the action is done.

That makes sense to me. Is there any value in keeping that so you know by looking at your FOLIO record if the holdings were set or not? Is the reason for removing it so it does not get "triggered" unnecessarily, or is it just useless info to you at that point?

I was thinking that we wouldn't want to trigger the process again. It's not really information needed after the action is done really. I'm not sure if others would have a use case for keeping that information.

Thanks for the suggestion and for thinking through the metadata details.  From the implementation side, and scopes of work:

Check an instance's holdings record(s) for some indication of whether OCLC holdings should be set/withdrawn, and (perhaps) an indication of which OCLC account to use.
Write data back to FOLIO (whether on the instance or holding record) to indicate it's been processed already.

I'm open to implementing the first, assuming you metadata experts can figure out the fields/values to look for.  Would be hoping there's still a date field to query on so that we could maintain the default behavior of "items updated yesterday".
Actually writing back to FOLIO is not something the app does currently and would require a ton more testing.  So at first look, I'm inclined to consider that as a pull request if someone else wants to implement.

With the first one, if you go with FOLIO Holdings Note with a type of Action flagged as staff only, then using the language of set or withdrawn, we could use our school prefixes that we have implemented in FOLIO. In the 5C, we have UM (UMass), AC (Amherst College), HC (Hampshire), SC (Smith), MH (Mount Holyoke). This could be something that people could change based on the institutions that have different OCLC accounts too.
In this scenario, it might be good to take the extra step to make sure to avoid case because people might enter things in upper or lower case. I took a screen shot of this idea. And of course, this is just an idea.

authors: jenmawe lmccoll44 maccabeelevine


text:
🛑 VePhim API hf is down

In dc56051, VePhim API hf (https://api.vephim.online/api/ping) was down:

HTTP code: 503
Response time: 488 ms

Resolved: VePhim API hf is back up in 9555363 after 5 minutes.


text:
Please Add a License

I know this project is meant to be use as part of Lem, but it is a separate project. Just to clear things up, please add a license file and a :license field in the system definition.
If I understand correctly, the absence of a license implies all rights reserved which is not desirable for open source and free software. As the author copyright holder (@Sasanidas), you can choose to do what you want with it, including using it in Lem. Since Lem has multiple authors though, things could become legally ambiguous.
I suggest using a copyleft license like the GPL 3 or AGPL 3 as these licenses provide the most freedoms to the end user and keep your software free. This would require Lem to also switch to a compatible copyleft license in a future version, so I understand if you do not want to go this route.

Thanks for pointing out the license problem, I changed to license to MIT mostly because of the compatibility with the Lem project.
I'm a supported of Copyleft licenses, but I'm not the one who deiced the license for the Lem project so compatibility it's more important for this project :+1:

authors: Sasanidas charJe

repo: lem-project/lem-mailbox


text:
no tmux session/window is spawned

I've configured test repo like this:
[merge]
	tool = kakmerge
[mergetool "kakmerge"]
	trustExitCode = true
	cmd = env LOCAL=\"${LOCAL}\" BASE=\"${BASE}\" REMOTE=\"${REMOTE}\" MERGED=\"${MERGED}\" kakmerge

Invoking git mergetool spawns no new tmux session or window.
I'm on macOS, iterm2 and tmux v3.1c

Thanks for the report, it's indeed broken for me too. I'll look into it!

Thanks for the report, it's indeed broken for me too. I'll look into it!

I released a fix. Note that the documentation was incorrect, the cmd bit is unnecessary, you should only need path. This is what I have in my configuration:
[merge]
    tool = kakmerge

[mergetool "kakmerge"]
    trustExitCode = true
    path = kakmerge

I released a fix. Note that the documentation was incorrect, the cmd bit is unnecessary, you should only need path. This is what I have in my configuration:
[merge]
    tool = kakmerge

[mergetool "kakmerge"]
    trustExitCode = true
    path = kakmerge

authors: lenormf vbauerster

repo: lenormf/kakmerge

license: Unlicense


text:
fix: CommonNavigator isCurrent was always returning false

Description of the changes

There was a problem with the isCurrent method of the CommonNavigator which was causing the result to not be correct on nested routes. I changed the check to use namedLocation instead which returns the full path for a route with the necessary parameters.
Checklist

[x] I didn't over-scope my PR
[x] My PR title matches the commit convention
[x] I did not include breaking changes
[x] I made my own code-review before requesting one

I included unit tests that cover my changes

[ ] 👍 yes
[x] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

I added/updated the documentation about my changes

[ ] 📜 README.md
[ ] 📕 docs/*.md
[ ] 📓 docs.lenra.io
[x] 🙅 no documentation needed

Technical highlight/advice

There is no description in this PR...
You should add unit tests to prevent regression. See this article that explains how to handle GoRouter unit tests: https://guillaume.bernos.dev/testing-go-router/

We'll see later to create the GoRouter Unit tests

authors: jonas-martinez taorepoara

repo: lenra-io/client-common


text:
[Task] CI: Replace semantic release by convco

What should be done
Since semantic release does not manage multiple pre-release channels (https://github.com/semantic-release/semantic-release/pull/2416), replace it by a simpler tool: convco.
Technical recommandation
Define the allowed channels (branches) in a file.
Use convco to generate the release note and define the next version.
Use the built-in GitHub API to create the releases.

Convco does not seem to be ready yet. I've tried to use it on two projects and it gave me bad next versions. I'll use the semantic release fix instead.


text:
Add support for customreasourcedefinitions under the v1 API

Signed-off-by: Sebastian Malton smalton@mirantis.com
Fixes #369
This PR also does some minor cleanup of ApiManager and the Nodes metrics rendering

Changes in Nodes metrics rendering causes a bit noise in this PR, so please try to do these kind of changes in separate PR i future. Btw is it fixing some issue or is it just refactoring?

repo: lensapp/lens


text:
How long is the training?

What is the GPU you are using, and how long did it run on each of the two data sets?

For S3DIS, it takes about 1 day training for each area using one Titan Xp GPU. For Semantic3D, it takes  about a week.

repo: leofansq/SCF-Net


text:
Distillation discussion

Nice work for distillation. It improved with a big number comparison with baseline. For clear what you are doing for distillation. Could I ask some question related to the pipeline of distillation?
The pipeline that I understand likes

Step 1: Teacher feature extraction

image -->teacher_backbone (eval mode, no_grad)-->save embed_eacher feature (l2_norm) to numpy with its index (emb_teacher)

Step 2: Student feature extraction

image -->student_backbone (lr 0.1, training mode)--> embed_student feature

Step 3:
Compute two losses:

L2 = MSE (embed_teacher, l2_norm(embed_student) # Same index image
L_class = Arcface (embed_student, labels)
Loss_total = alpha *L2 + L_class # alpha=64

Any step what I am missing for your distillation? Have you use hard-sample mining for distillation loss?

Yes, and that's the process I posted comparing with the baseline using arcface only.

Step1, my saved embed_teacher feature is the original value now, not normed data_distiller.py#L74
Step 3, I'm testing two distillation loss function, distiller_loss_euclidean / distiller_loss_cosine, losses.py#L374
The alpha value is not certain, as I changed distill_loss, it's now 128 equals the previous 64...

I'm now testing some other strategies:

Using  distiller_loss_euclidean / distiller_loss_cosine only, it's already implemented in the code, but I'm not sure about the results.
Using teacher model with embedding shape == 512 to distill a student model embedding shape == 256.

About the hard-sample mining:

I tested arcface + distiller_loss_cosine, using dataset mined by the teacher model, but in a way that drop those images not good in the single class:from tqdm import tqdm
from sklearn.preprocessing import normalize
def pick_by_emb_dists(min_dist, image_classes, embeddings):
    picks = np.zeros_like(image_classes).astype('bool')
    for pick_class in tqdm(np.unique(image_classes)):
        class_emb = normalize(embeddings[image_classes == pick_class])
        dists = np.dot(class_emb, class_emb.T)
        base_idx = np.sum(dists > min_dist, axis=-1).argmax()
        base_dist = dists[base_idx]
        picks[image_classes == pick_class] = base_dist > min_dist
        # print(pick_class, base_idx, base_dist.min(), base_dist.max(), np.sum(base_dist > min_dist), "/", class_emb.shape[0])
    print("Picks left:", picks.sum(), "/", picks.shape[0])
    return picks

aa = np.load("faces_casia_112x112_folders_shuffle_label_embs_512.npz")
image_names, image_classes, embeddings = aa["image_names"], aa["image_classes"], aa["embeddings"]
picks = pick_by_emb_dists(0.3, image_classes, embeddings)
np.savez("a_new_dataset_name", image_names=image_names[picks], image_classes=image_classes[picks], embeddings=embeddings[picks])

We can also combine distill_loss with triplet loss, if teacher_model_interf is provided train.py#L40. It will extract teacher embedding data online, but the efficiency is not tested...

Thanks so much for your information. For dropout, you means you are using it for student model, right?
For distillation, have you try logits consistency loss? it means we also constrain the prediction of teacher and student should be same

Fourth, I want to ask one more question, have you try to finetune student by copy backbone pretrained weight from its student and head and distill on the weight, or train the student from scratch?

For dropout, yes, it's used for student model. Actually you can see it below the brown line, that the training accuracy is pretty high.
No, I haven't try logits consistency loss, as most high accuracy model provided by MXNet / pytorch not containing the output fc7 layer.
The student model is trained from scratch, as I'm comparing the efficiency there.

This figure shows some of my results, using MXNet r100 as teacher model, training mobilenet on CASIA dataset, with different optimizer SGDW / AdamW + different losses, detailed in the labels.


text:
Support for OR-Tools

Closes #26.

Logbook

Pretty unfortunate that OR-Tools relies on pandas...

It would be nice if we can introduce a SequenceVar-like class and model the NoOverlap and Previous constraints.

repo: leonlan/flexible-job-shop


text:
Local hosted fonts are not exported

We are using this great plugin to make all fonts local: https://wordpress.org/plugins/embed-google-fonts/
But not a single font file is exportet, even if i add them manually to the "Include additional URLs"-List, like so:

/wp-content/cache/embed-google-fonts/tangerine/tangerine-v12-latin-700.woff
/wp-content/cache/embed-google-fonts/ubuntu/ubuntu-v15-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woff
/wp-content/cache/embed-google-fonts/ubuntu/ubuntu-v15-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300.woff
/wp-content/cache/embed-google-fonts/ubuntu/ubuntu-v15-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff
/wp-content/cache/embed-google-fonts/ubuntu/ubuntu-v15-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300italic.woff

The only file in those exported font folders still is the *.css file.

Just a note to say I'm also having the same issue.
My original assumption was that my CSS file was not being parsed for further URLs to crawl (@font-face).
So then I also added my font files to "Include additional URLs" too, and they are being ignored. It may be that the plugin doesn't attempt to crawl certain extensions?

Thanks for reporting, @lukearmstrong, @lukearmstrong. Leaving this issue open, as I think the Include Additional URLs function has some issues I need to resolve.
For a workaround, the Autoptimize plugin usually helps catch any missing fonts/styles, etc. I'm not sure if it will play nicely with the Embed Google Fonts plugin, but it should be able to replace it and provide the same functionality, plus more nice features.

Just to +1 on this - theme icons aren't being exported even if explicitly listed in additional URLs.

Just to +1 on this - theme icons aren't being exported even if explicitly listed in additional URLs.

I'm afraid, the same applies for CSS files and PDF files, though explicitly listed in additional URLs.
For example (names slightly adapted):
/wp-content/uploads/2021/02/XYZ_someDocument_210229.pdf
/wp-content/themes/theme-name/legacy.css
/wp-content/themes/theme-name/svgcache/base.svg

Same issue here, besides fonts reported earlier, I'm also having issues with svg, txt, etc... I tested a bunch of files and basically 'Include additional URLs' feature doesn't work at all.
I started to test back version by version and noticed that it breaks from v6.6.19 (when this was introduced: "no more txt files polluting uploads dir, slowing things down").
I also noticed that by default, v6.6.18 generates/discovers much more files than v6.6.19.
Another thing: from v6.6.19 the ability to select 'Target directory' is removed and always defaults to /wp-content/uploads/static-html-output, which to me is an important feature to have... not sure why it was removed.
In summary, I like how the latest version is faster... but unfortunately is too unreliable, so for now I think is better just to use v6.6.18 and hopefully @leonstafford can fix it some day  :)
This is such a useful and unique plugin... I really hope it can get more love as it is the only (open source) tool around.

Thanks @diegoteliz.
Most love is shifting to WP2Static in https://github.com/leonstafford/wp2static, but I want to bring in the good bits from this plugin to there.
It's a hard compromise between detecting too little and too much. I prefer to detect the minimum best-guess URLs by default, but allow the user to control adding more/less to this. Finally, allowing a crawler to discover new URLs as it crawls the initial list.
Hopefully, the best of all these processes will be merged into WP2Static upcoming versions. I've also started a new specific library for WordPress URL detection.
There is also the Simply Static plugin on GitHub (not sure if Pro features are included in that) and a few new entrants in the wp.org plugin repository.
I expect WP2Static to solidify it's spot as best open source tool for this, you can find my recent roadmap/plans: https://github.com/leonstafford/wp2static/discussions/795
For short term workaround, if your missing assets are part of WP site, you can try the Autoptimize plugin, which often makes it much easier for the plugin to crawl everything in the site.

(also, bit slowed down in development past few months, as I've taken on a fulltime role with Strattic. As I get more comfortable in that role, I'll be putting more time into my open source projects, such as WP2Static and Lokl

authors: diegoteliz fbau3r leonstafford lukearmstrong petewilcock thomasfrobieter

repo: leonstafford/static-html-output