The output of halvm-cabal sandbox hc-pkg list does not include locally installed packages

For example
$ halvm-cabal sandbox hc-pkg list | cat
/home/conathan/.stack/programs/x86_64-linux/ghc-7.8.4/lib/ghc-7.8.4/package.conf.d:
    Cabal-<IP_ADDRESS>
    array-<IP_ADDRESS>
    base-<IP_ADDRESS>
    bin-package-db-<IP_ADDRESS>
    binary-<IP_ADDRESS>
    rts-1.0
    bytestring-<IP_ADDRESS>
    containers-<IP_ADDRESS>
    deepseq-<IP_ADDRESS>
    directory-<IP_ADDRESS>
    filepath-<IP_ADDRESS>
    (ghc-7.8.4)
    ghc-prim-<IP_ADDRESS>
    haskeline-<IP_ADDRESS>
    (haskell2010-<IP_ADDRESS>)
    (haskell98-<IP_ADDRESS>)
    hoopl-<IP_ADDRESS>
    hpc-<IP_ADDRESS>
    integer-gmp-<IP_ADDRESS>
    old-locale-<IP_ADDRESS>
    old-time-<IP_ADDRESS>
    pretty-<IP_ADDRESS>
    process-<IP_ADDRESS>
    template-haskell-<IP_ADDRESS>
    terminfo-<IP_ADDRESS>
    time-1.4.2
    transformers-<IP_ADDRESS>
    unix-<IP_ADDRESS>
    xhtml-3000.2.1

/home/conathan/cc/cyber-chaff.git/.halvm-sandbox/x86_64-linux-ghc-7.8.4-packages.conf.d:
    (no packages)

whereas
$ ls /home/conathan/cc/cyber-chaff.git/.halvm-sandbox/x86_64-halvm-ghc-7.8.4-packages.conf.d
binary-<IP_ADDRESS>-1e93a8b7d4d7782296d47013aef3ced0.conf  bytestring-<IP_ADDRESS>-91a09239b0ef4609bfd1e180ec9a7479.conf  package.cache

Note that the empty local DB with "(no packages)" in the halvm-cabal sandbox hc-pkg list output is a linux DB, not a halvm DB. I.e., compare the the two paths:
/home/conathan/cc/cyber-chaff.git/.halvm-sandbox/x86_64-linux-ghc-7.8.4-packages.conf.d
/home/conathan/cc/cyber-chaff.git/.halvm-sandbox/x86_64-halvm-ghc-7.8.4-packages.conf.d

Not sure where the linux path came from, but hopefully the fix is as easy a replacing "linux" with "halvm" in some path generation code.

It appears that halvm-cabal sandbox hc-pkg unregister is also broken -- it can't unregister the local packages -- presumably due to the same path problem.

Hm, install and configure only work properly thanks to the --with-hc-pkg arg in cabal-install (https://github.com/GaloisInc/HaLVM/blob/master/src/scripts/halvm-cabal.in). You can't just add a case for sandbox, since cabal sandbox doesn't accept that option. (It probably should, but eh)
Might be easier to intercept the halvm-cabal sandbox hc-pkg call and send it to halvm-ghc-pkg with a custom --package-db


Array#pack q/Q and buffer: kwarg support

This implements the 'q' and 'Q' directives for Array#pack and also implements the buffer: keyword arg which allows an existing buffer to be manipulated rather than starting from an empty new buffer and returning the new object.
Also, one extra xited NATFIXME was removed.
This should close issue #195 , as the percent_spec was already passing.

Cool!


Improve typings for all the project

This PR improves all the typings across the project. The following improvements are made:

export default replaced with export = to avoid transpilation errors. Since the project uses CommonJS approach, Typescript should be aware of it.
Improved typings for preact to allow using symbols.
Added type checking tests to be sure typings are correct.
Improved symbols support in Typescript in both react and preact packages.
Added @types/react and preact packages to get proper typings for them.
Fixed devtool -> devtools typo in devtools typings.
Moved false in the Module declaration to the createStore params declaration to avoid error in Typescript.

@ai, please, check the typings for devtools. For now, it is used in JS code as a function that returns module:
var store = createStore([counter1, counter2, logger, devtools()])

However, for typescript, it raises an error because the devtools function is a Module and it does not return another Module.

please, check the typings for devtools. For now, it is used in JS code as a function that returns module:

devtools was created to work in both cases:
var store = createStore([counter1, counter2, logger, devtools(options)])

var store = createStore([counter1, counter2, logger, devtools])

So, it returns a function which accepts DevTools options and returns a module. But if you missed (), the function will find that it accepted store and will call module on the store.

@ai Ok, fixed the devtools typings. Now it should work as expected. One more question: is omitting logger.browser.d.ts intended? Is it expected to be not used?

One more question: is omitting logger.browser.d.ts intended? Is it expected not to be used?

Nope. It is a mistake (I added logger after PR with typing).

@ai, ok, I think it is ready

@Lodin do we need to put tsconfig.json to npm package? Is it just a type check config or it affect on .d.ts parsing?

@ai, no, we definitely don't. It is necessary for typings consistency only on the development stage.

Released in 0.8


Precompile typical workloads with PrecompileTools.jl

We need to add examples with all file formats to precompile code during package installation.

Fixed on master.


To remove model Purchase and database table purchases

Model Purchase and database table purchases are redundant.
These were replaced by UserPricelist and user_pricelists respectively.

This Purchase class and table can be used for physical products. UserPricelist is meant for Membership subscription.


Overwrite Files doesn't work with certain Image pickers

Describe the bug
Overwrite Files is incompatible setting turned on I get error "Failed to save X image(s)." Tried both on SD card and internal storage.
To Reproduce

Set Overwrite Files to on.
Set Image source to Gallery
From Edit tab choose Resize and Convert.
Pick a few images
Choose Preset 70
Save
"Failed to save X image(s)".

Expected behavior
Expected successful overwriting save.
Observation: If Image source is set to File explorer overwriting works.
Screenshots

Smartphone (please complete the following information):

Device: Samsung A52s 5G
OS: Android 14 with OneUI 6.1

It's differs by device and app which is used as image provider, so on one it can overwrite using source, on other can't, only i can do is choose one which works


setExtraHTTPHeaders: support both object and Map as headers argument

It would be nice to support passing an object literal into setExtraHTTPHeaders as well as a Map.

The protocol already takes an object
it'll reduce the (new Map(Object.entries({}))) boilerplate for users.
objects are easier to work with.

this:
await page.setExtraHTTPHeaders(new Map(Object.entries({
  'X-Header': 'blah blah'
})));

to:
await page.setExtraHTTPHeaders({
  'X-Header': 'blah blah'
});

The use of Map is deliberate, it emphasizes that the order of the headers is going to be preserved. It does go through the object conversion, but we make sure order is intact.

await page.setExtraHTTPHeaders(new Map([
  ['X-Header', 'blah blah']
]);

Found https://github.com/GoogleChrome/puppeteer/commit/480547955cb9c0cf398cbc0b9a31840e271dc028 which supports that. However, there's a note in the docs that says order isn't guaranteed:


[backport] [branch-2.1] [Enhancement] construct row in json object order when column is sparse #5357

This is backport of #5357 to branch-2.1

run starrocks_fe_unittest


RFC: nullability (and other metadata) for input arguments / parameters to a query

What do you want to change?
Kudos
Before I start, I wanted to give a huge kudos for sqlc - I love it. As a backend developer who knows SQL very well, I fight every single ORM I have used trying to do any SQL more complicated than CRUD.  Thank you for creating this.
Background
I use sqlc alongside Postgres, as sort of a foreign function interface to SQL.  I manage a PostgreSQL database with about 100 different tables and working in Typescript and Go to support every stage of solar operations for Bright.  We do not currently use sqlc at Bright - but I do use it personally, but I am evaluating it Bright as well.
The types of problems I work on are not always CRUD-y (though sqlc works really well if they are).  And the challenge I am facing is that SQL is a little less-expressive than the target languages in some cases, and therefore using sqlc as a FFI is a little clunky.  A quick glance through the some open issues, shows that "nullability" is one of those deficiencies.  sqlc does its best to always "do the right thing" and that has gotten it very far indeed. But I think a simple change can give developers full control, and allow for sqlc to keep getting smarter (better interred mappings / types).
Say for example, instead of finding a really good GeoJSON library in my target language, I wanted to rely on PostGIS.
- name: WKBToGeoJSON :one
select ST_AsGeoJSON(ST_GeomFromWKB(sqlc.arg('wkb_bytes'))::text as output;

I would love for this Go code to be generated:
func (q *Queries) WKBToGeoJSON(ctx context.Context, db DBTX, wkbBytes []byte) (string, error) {
    // ...
}

Or perhaps a more common use case, partial updates
-- name: EditThing :exec
update thing
set
  name = coalesce(sqlc.arg('name'), name),
  description = coalesce(sqlc.arg('description'), description),
  status = coalesce(sqlc.arg('status'), status)
where thing.id = sqlc.arg(id)

-- name, description and status are all nullable arguments, id is not.

Proposal
I think sqlc should expose a way (like overrides) in the query itself to control aspects of the generated code in the target languages.
Allow sqlc.arg(name) to accept more variadic arguments (similar to jsonb_build_object) to build up string key, and json value pairs of "configuration" for that arguments.  I think sqlc itself should not really know too much about the semantics of these key/value pairs, and just pass them along to the code generators in the target language.
-- name: EditThing :exec
update thing
set
  name = coalesce(sqlc.arg('new_name', 'nullable', true, 'type', 'string'), name),
  description = coalesce(sqlc.arg('description', nullable, true), description),
  status = coalesce(sqlc.arg('status', 'nullable', true), status)
where thing.id = sqlc.arg(id)

This also allows the developer to control the API interface much better, even if the database is a little wacky.  Imagine if there was a column name that was nullable for historical reasons, but any new insert to name it should be non null.  sqlc should support that use case too.
I am not a super-polyglot, but if there were a C++ backend for sqlc, you probably wouldn't just want nullable but also maybe an option for the type of pointer that should be generated raw pointer? std::shared_ptr? std::unique_ptr? boost::? std::optional ?
-- name: GetThingForCpp :one
select
  id,
  first_name,
  last_name,
  sqlc.output(concat(first_name, ' ', last_name), 'nullable', false, 'ref_counted', true) as display_name
where ....

This is very similar to overrides, but on a query-by-query basis, and expressed directly in SQL instead of away from the code in a config file.
Implementation
I got pretty far along in the implementation, and I'd be happy to push it all the way through - but I hit a big snag at the SQL rewriting. Rewriting the AST is no big deal (and I had the code working for that). But the way in which sqlc rewrites the original source seems to be engine independent, and a little hacky.  Performing the source rewrites with an AST "deparse" (like in pg_query_go) would solve this with almost no problem.  Or if the AST has more source location info in it (not just a start location, but also an end location), that might work too. But this seemed like a bigger refactor, and I wanted to get feedback on it first.
I'd love to know your thoughts @kyleconroy and from the general sqlc community too.  I'd be happy to help and make this a reality.
What database engines need to be changed?
PostgreSQL, MySQL
What programming language backends need to be changed?
No response

I just learned about named parameters in postgres thanks to https://github.com/kyleconroy/sqlc/issues/1446
I think that would be a significantly better API, but I think the rest can remain the same.

ya, I think "arg json" could be nice.  I don't know if I'd want to refer to them by their position like in your example (since that is something I had been trying to get away from with using sqlc in the first place).
But conceptually, that's a good option to consider - maybe something like this:
-- name: EditThing :exec
-- args.new_name: {nullable: true, type: string}
-- args.status: {nullable: true}
-- args.id could be omitted, since the default behavior is OK
update thing
set
  name = coalesce(sqlc.arg('new_name'), name),
  status = coalesce(sqlc.arg('status'), status)
where thing.id = sqlc.arg(id)

Alternatively I was thinking that maybe an easier change, that solves 95% of the issue people are having would be to skip the extra metadata, and simply focus on nullability only at first.
sqlc.arg('new_name')  -- new_name's type is inferred and nullability is inferred
sqlc.arg('new_name!') -- new_name's type is inferred, and is non-null
sqlc.arg('new_name?') -- new_name's type is inferred, and is nullable

@skabbes Thanks for such a detailed proposal. There's a lot to unpack, so I'll tackle each part

I think sqlc itself should not really know too much about the semantics of these key/value pairs

One of the goals of sqlc is to be a compiler. Compilers enforce rules and prevent users from making mistakes, so I'm going to shy away from features like this. You can always cast the sqlc.arg() function to a type and sqlc will choose that type.

I am not a super-polyglot, but if there were a C++ backend for sqlc,

C++ is strictly out of scope for now. I'd love to support more languages in the future (#296, #373), but we should only consider the three languages sqlc supports today. It's difficult to speculate what future language support might look like.

But the way in which sqlc rewrites the original source seems to be engine independent, and a little hacky.

Indeed it is :(. We'll be moving to an AST-based rewriter at some point in the future, just not there yet.

And, have you thought of using the comments for configuring the args?

I've come to regret using comments to power sqlc. They work great at the start, but quickly make it difficult to support more structured data. In the future, we'll implement more features using macros (design very TBD) without having to touch comments.

Alternatively I was thinking that maybe an easier change, that solves 95% of the issue people are having would be to skip the extra metadata, and simply focus on nullability only at first.

Agreed! I think the biggest impact we can have is to implement https://github.com/kyleconroy/sqlc/issues/1155. Syntactic sugar can always come later, so I think a named nullable parameter is the way to go.

One of the goals of sqlc is to be a compiler [...]

Great appreciate you sticking to your vision.

You can always cast the sqlc.arg() function to a type and sqlc will choose that type.

Ya, I think I was worried about a theoretical case (particularly with like jsonb) where you might want a different concrete type depending on the query (for 1 database type (jsonb) to generate different target language types).  I think the column overrides probably cover the 99% use case here.

We'll be moving to an AST-based rewriter [...]

I think implementing sqlc.arg(name, nullable => true) will itself be difficult without the AST serialization.  I think something like sqlc.narg(name) (nullable arg) would** be a lot simpler to inject into the codebase as it is now.
@kyleconroy do you have any thoughts between those 2?
And if the first one - do you have a branch started for AST serialization I can take a look at?
And if not... Is your vision for rewritten AST serialization to be based on the individual AST's of each target database (PostgreSQL, MySQL, SQLite?), or do you intend to transform them into some kind of sqlc intermediate representation?

In light of #1536, @skabbes did you consider exposing a new function like sqlc.narg(name)? Does not having AST serialization specifically prevent it?
I personally find a new function simpler to understand. It would be more discoverable for an end user and avoids needing to keep in mind additional syntax (sure, ?! is simple enough).
Lastly, thank you for the detailed write up and first pass! Really excited to see this move forward as I'd love to leverage the coalesce pattern to have flexible, partial UPDATE parameters, as others have shown.

I think at this point - just waiting to here back from @kyleconroy  on what his preferred next step would be, in the meantime - we can have a good discussion here.
!? has the added benefit that it allows for 2 different options, inferred nullability, explicitly nullable, explicitly NOT nullable.
sqlc.arg kind of has to be the "inferred nullability" option for historical reasons.
sqlc.narg is great, but it doesn't allow for specifying NOT nullable.  So I think there need to be a sibling to narg if that path is chosen:

sqlc.rarg required arg
sqlc.nnarg - non-null arg (probably too easy to typo from narg).

Some other options that have come to mind as I've been thinkingn about this are:
using casts to define nullability
select sqlc.arg('arg_name')::sqlc.null;
select sqlc.arg('arg_name')::sqlc.nonnull;

-- define arg_name to be nullable string / non-null string
select sqlc.arg('arg_name')::text::sqlc.null;
select sqlc.arg('arg_name')::text::sqlc.nonnull;

using modifier functions to define nullability
select sqlc.nonnull(sqlc.arg('arg_name'));
select sqlc.null(sqlc.arg('arg_name'));
select sqlc.narg('arg_name'); -- equivalent to select sqlc.null(sqlc.arg('arg_name'));

Both of the above have the added benefit that you should be able to use them for outputs as well.  For example
create table authors (name text );

-- change authors.name from nullable string to non-null string
select name::sqlc.nonnull as name from authors;

-- change authors.name from nullable string to non-null string
select sqlc.nonnull(name) as name from authors;

I've found that it's best to add new features slowly, especially when they're related to SQL syntax. While using !? inside the name is clever, it will cause issues for people that have those characters in their column names. PostgreSQL will let you put almost anything in a column name if it's in double quotes.
I'm not convinced of the need for a non-nullable argument type. Going forward, let's add support for sqlc.narg which has the same signature as sqlc.arg but always generated a nullable parameter.

Going forward, let's add support for sqlc.narg which has the same signature as sqlc.arg but always generated a nullable parameter.

Cool cool cool.  This PR is 95% of the way there, I'll just need some time over the coming week(s) to finish it.  Or anyone else can pick up where I left off if they'd like.  No need to block on the below "=" comments, but I wanted to see if I could articulate the cases I had in mind better for user-defined-non-nullability.
====================================================================

I'm not convinced of the need for a non-nullable argument type.

Let me see if I can convince you with a few different scenarios.  If one of these strikes you as "oh yea, I'd probably want that". Then I'd argue that non-nullability is a good addition too (and we should incorporate that into the design, so the sqlc.* api is consistent and cohesive).
  In order to implement that feature, you realize you need to track the user's timezone.  You will populate this column lazily, since you need them to login to get that info from their Browser / mobile device.
-- first, add the nullable timezone column
ALTER TABLE "user" ADD COLUMN "timezone" TEXT;

-- next, write an an endpoint and sqlc query to update it.
-- name: UserUpdateTimezone :exec
UPDATE "user"
SET timezone = sqlc.arg('timezone')
WHERE id = sqlc.arg('id');

As an API designer, I'd want UserUpdateTimezone.timezone to be non-nullable, even if the database column is (temporarily) nullable.  Of course any select queries on the user table would still need a nullable timezone.
Scenario 2
You are still a SaaS company, and in the past you have received requests to delete personally identifiable info.  You did this by nulling out those columns, and adding a __deleted flag.  Doing this instead of deleting the data outright maintained the referential integrity of other systems.
You wanted to maintain that name and email were not nullable for active users, so you added an additional check constraint to ensure that.
-- I didn't double check my SQL here, it is just to illustrate.
CREATE TABLE "user" (
  id primary key,
  name text, -- nullable
  email text, -- nullable
  __deleted boolean default false
)

ALTER TABLE "user" ADD CONSTRAINT nullable_only_when_deleted CHECK (
  __deleted = true OR (name is not null and email is not null)
);

Your "update profile" sqlc query, should only allow non-null name and email.
-- name: UserUpdateProfile :exec
UPDATE "user" SET
  name = sqlc.arg('name'),  -- I personally would want this to be non-null
  email = sqlc.arg('email') -- I personally would want this to be non-null too
WHERE id = sqlc.arg('id')
and __deleted = false;

This example also kind of shows why non-nullable output might be desirable too (I know that it is completely out of scope right now, but I think it helps inform a good design thinking about nullability in sqlc holistically).
-- name: ActiveUsers :many
select
  id,
  name, -- i want this to be non-null
  email -- I want this to be non-null
from "user"
where __deleted = false;

Thanks for writing out a few different scenarios. I'm still not convinced due to how Go handles default values for structs.
-- name: UserUpdateTimezone :exec
UPDATE "user"
SET timezone = sqlc.arg('timezone')
WHERE id = sqlc.arg('id');

In this query, if you force the timezone and id arg to be non-null, but use struct-based params, the values will be the zero value of the field. I'd argue that you want these to default to NULL if not passed so that you don't add empty strings to your database. COALESCE can also be used to pick default values if none are provided.

So, are you advocating that every single struct param generated by sqlc be nullable? That way we can protect then end users from accidentally missing them in struct params?  🤔   I think the "Go way" here is that it is up to the developer to make the 0 value have meaning.  "meaning" is an application specific thing, so I feel it should be the up to the developer, not sqlc.
I kind of see the question not as

Should we allow user-defined non-nullable arguments?

But more like

We have decided to allow developers to specify nullable parameters, but sqlc believes that specifying non-nullable parameters is the source of so errors - we have decided that sqlc is a better product by disallowing these.

So anyyyyyyway....
I think 2 is what I am hearing you say. But I probably that it needs more time and feedback to get confidence one way or another.  I think that's cool and exactly what these discussions are for.
FWIW - Typescript has first-class support for  "struct optionality" so maybe if sqlc gets a Typescript generator, this discussion will resurface.

Alright - "weeks' turned into hours.  PR for sqlc.narg available here https://github.com/kyleconroy/sqlc/pull/1536

Closing this, after we all use narg for a while, we'll see if it is necessary to revisit any of these.

Coming back around to extend my gratitude to @skabbes & @kyleconroy for landing this. Thanks! Not having this functionality was the last major tradeoff we faced for migrating to sqlc 🎉.

same here, this is super useful, I don't have to change my schema, and am still able to let sql error out on inserts for NOT NULL columns


Anonymizer engine stub

An abstract class (stub) containing the interface for anonymizers to implement

If you want to merge before me, check your code with the new flake8 plugins

If you want to merge before me, check your code with the new flake8 plugins


zbar: disable dbus by default because the implementation is buggy

Motivation for this change
See comment, the dbus support is super experimental and produces spurious errors.
cc @7c6f434c @delroth
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Do you have evidence that the support is "super experimental" or that the errors are spurious? To me this just sounds like the dbus configuration isn't installed, which would happen if e.g. running from a nix-shell instead of something like environment.systemPackages.

I have not much experience with dbus, but the feature was merged in https://github.com/mchehab/zbar/commit/a8be6a7bbb7d12ed0f6535b0e201a594416c77d3 and as far as I could see there have been no changes to this code since.
The bug report has a report from OpenSUSE as well, and the warning is always printed, so my conclusion was that it’s not been tested very well.

Oh, and also it happens not only with the zbarcam tool, but with the “pure” zbarimg as well, which is another indication that the code is buggy.
Honestly, having a hard dbus server dependency for a simple library tool to decode qr codes from images is kind of worrying feature creep.


Fixing the travis build.

Trying the newest versions to see if it's fixed.

Ok this fixes the build. I also need to change the way we use the credentials.

LGTM


Update book.html

Fixes: #1682
Description
Improved text visibility by adjusting the text color to enhance contrast and readability.
Type of PR

[x] Bug fix
[ ] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / Videos (if applicable)
BEFORE ::

After:

Checklist:

[x] I have made this change independently.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, especially in hard-to-understand areas.
[x] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@PriyaGhosal
You can Review this ...


Errors with COCO targets

I am using the COCO dataset for training with annotations available at the COCO website.
I use this dataloader:
train_dataloader = torch.utils.data.DataLoader(train_dataset, batch_size=1, shuffle=True, num_workers=4, collate_fn=collate_fn)
Running one iteration:
image, target = next(iter(train_dataloader))
gives 'image' and 'target' of type 'tuple'
To convert the 'target' into the desired type (list of dicts), I use:
target = [[{k: v for k, v in obj.items()} for obj in t] for t in target]
Now when I run:
loss_dict = model(image,target)
It gives:

/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/transform.py in resize(self, image, target)
73             return image, target
74
---> 75         bbox = target["boxes"]
76         bbox = resize_boxes(bbox, (h, w), image.shape[-2:])
77         target["boxes"] = bbox
TypeError: list indices must be integers or slices, not str

I try to play around:
new_target = {}
new_target['boxes'] = [t['bbox'] for t in target[0]]
new_target['labels'] = [t['category_id'] for t in target[0]]
new_target = [new_target]

And it gives another error:

/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/transform.py in resize_boxes(boxes, original_size, new_size)
135     ratios = tuple(float(s) / float(s_orig) for s, s_orig in zip(new_size, original_size))
136     ratio_height, ratio_width = ratios
--> 137     xmin, ymin, xmax, ymax = boxes.unbind(1)
138     xmin = xmin * ratio_width
139     xmax = xmax * ratio_width
AttributeError: 'list' object has no attribute 'unbind'

Can anyone please help?

Hi,
I think this error is related to https://github.com/pytorch/vision/issues/1699#issuecomment-571991699
You shouldn't convert the target via
target = [[{k: v for k, v in obj.items()} for obj in t] for t in target]

Instead, the target is already in the correct format in the code, and shouldn't be changed, so just do
image, target = next(iter(train_dataloader))
loss_dict = model(image, target)


Add guest page for Shirley Wu

I added the guest page for Shirley Wu and added my community contribution.

Community Contribution
Link to live project, video, or image:

Observable Notebook
Sharing

[X] I would be happy to have my project shared on The Coding Train's social media!

Thanks for adding this page! Will have to update it when the edited video comes out but looks like everything else is great.

@violetcraze I don't think we are going to do an edited version of this, but rather just leave it as a live stream in all it's raw glory! There is the question of what to do about the fact that her appearance was two episodes. I suppose we could just do the usual Part 1 and Part 2 as separate pages, but something to consider for long-term is whether we want to approach multi-part videos differently?


Is there a way to ignore a "*_id" field?

Basically, I have table field ends with "_id", but there is no table related to that field. So is there any way to not parsing that field please? Currently what I can only do is rename that field.
Error message is below:
(node:724) UnhandledPromiseRejectionWarning: Error: Model with tweets does not exist
    at findModelKey (node_modules/tuql/dist/utils/index.js:57:9)
    at node_modules/tuql/dist/builders/schema.js:107:47
    at Array.forEach (<anonymous>)
    at node_modules/tuql/dist/builders/schema.js:100:18
(node:724) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:724) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Thanks for your work!

Let's generalize a bit.
I would like tuql to also be able also to ignore some tables and make them inaccessible via GraphQL, for example due to security reasons.
So let's define a configuration file format, which will allow the user to tell tuql to subject tables and fields to special handling.
An example of what I have in mind (syntax being similar to that of CSS):
django_admin_log.object_id { // Special handling of a table field.
    foreignkey: false;  // Do not look for a table named object or objects.
    rename: object_notid; // Rename the field name as far as the GraphQL schema is concerned.
}
django_migrations,auth_user_groups.auth_user { // Special handling of a table and a table field.
    access: readonly;
}
django_content_type,auth_group,auth_user { // Special handling of tables.
    access: none; // hide those tables
}


Model outputs

Are raw model outputs for models on the existing leaderboard hosted anywhere?

model generations are stored at https://huggingface.co/spaces/livecodebench/code_generation_samples/tree/main


Broken link

File: engine/admin/logging/overview.md, CC @mstanleyjones
The link for logging driver plugins (https://docs.docker.com/engine/admin/reference/logging/plugins/) in Supported logging drivers section is broken.

Yes, this is a known issue. For now you can view the content at https://github.com/docker/docker.github.io/blob/vnext-engine/engine/admin/logging/plugins.md.  This is currently an Edge-only feature. Thanks!


stm32-usb isochronous fix and overall better isochronous support

This pull request fixes the stm32 isochronous issue that we have to set the odd/even frame bit every time.
If we don´t the usb frame is rejected.
Also update EndpointType because isochronous endpoint also needs synchronication and usage type information.
EndpointType is copied from https://github.com/rust-embedded-community/usb-device
embassy-usb/src/descriptor.rs is not done yet.
For class specific properties like USB AUDIO CLASS two extra bytes have to be added to the endpoint description.
Hacked example: https://github.com/vDorst/embassy/blob/i2s-no-mclk/embassy-usb/src/builder.rs#L467 and https://github.com/vDorst/embassy/blob/i2s-no-mclk/embassy-usb/src/builder.rs#L509.
What could be a good way to provide this information in a generic way?

I think your are right about that the hardware is only interested in the endpointtype.
Thanks for the information.
I have a better understanding where and how to fix it.


TextField is not displayed correctly on iOS after using microphone to speak input

Steps to Reproduce

Run the Flutter Gallery application on an iPhone 6.
Select the "Text field" demo.
Click on the "Name" field.
Click on the microphone icon on the iOS keyboard and say something.
The text displays in the text field.
Click "Done" in the keyboard area to dismiss the keyboard.
Only the last character of the spoken text is displayed in the text field. All other characters disappear.

Logs
N/A
Flutter Doctor
[✓] Flutter (on Mac OS X 10.12.4 16E195, locale en-US, channel master)
• Flutter at /Users/?/Development/flutter
• Framework revision 767ab66c25 (32 hours ago), 2017-05-27 00:45:25 -0700
• Engine revision 75c74dc463
• Tools Dart version 1.24.0-dev.3.0
[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
• Android SDK at /Users/?/Library/Android/sdk
• Platform android-25, build-tools 25.0.3
• ANDROID_HOME = /Users/?/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] iOS toolchain - develop for iOS devices (Xcode 8.3.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.2, Build version 8E2002
• ios-deploy 1.9.1
• CocoaPods version 1.2.1
[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Gradle version 3.2
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] IntelliJ IDEA Community Edition (version 2017.1.3)
• Dart plugin version 171.4424.63
• Flutter plugin version 13.1

@cbracken would know.

Thanks for reporting! Definitely a bug. I'll take a look!

Found a duplicate: https://github.com/flutter/flutter/issues/13771

@matthewtsmith thanks!
Closing as dup of #13771


add support for Wagtail 5.0

Current dependencies on/for this PR:

main

PR #2   👈

This comment was auto-generated by Graphite.


UndefVarError: AllocationOpt not defined

I followd the doc and built my own binary, but got error when run the binary:
bin/AllocationOpt ./config.toml
UndefVarError: `AllocationOpt` not defined

julia version 1.9.5

change to version 1.8.5, but got error when I add allocation-optimizer
(@v1.8) pkg> add https://github.com/graphprotocol/allocation-optimizer.git
     Cloning git-repo `https://github.com/graphprotocol/allocation-optimizer.git`
    Updating git-repo `https://github.com/graphprotocol/allocation-optimizer.git`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package TheGraphData [871720c8]:
 TheGraphData [871720c8] log:
 ├─TheGraphData [871720c8] has no known versions!
 └─restricted to versions 0.2 by AllocationOpt [e2472b13] — no versions left
   └─AllocationOpt [e2472b13] log:
     ├─possible versions are: 2.5.0 or uninstalled
     └─AllocationOpt [e2472b13] is fixed to version 2.5.0

What does your config look like?

I think the issue is not relate to config, becuase the TheGraphData is not included in package registery


fix picture serve multi images issue

This PR should fix #92 though it is not complete yet.
I haven't figure out a way of preloading the right image out of a picture srcset.

Fixed in v. 1.7.0.


Error on Two Text Blocks

Have an RTF report Arial Font with a text block, a table, and another text block.  Is erroring on write_report:
Error in if (i == 1 & content_blank_row %in% c("both", "above")) a <- "\par" :
argument is of length zero
See user test 15.

And HTML.  PDF is fine.


Location and Disabling Cookies Help

I'm not sure how to make the call back hook work, what do we replace //enable cookies with if at all?
Also the location filter seems to not be working at times and then works at others please help me! hahaha

You need to enter the cookie tracker code into the section for //enable cookies i.e. your Google Analytics code goes here.

Code below checks the consent cookie, adds the google script and adds/removes the Google cookies as required:
var consent = getCookie('cookieconsent_status');
if (consent==='allow'){
console.log('Cookie Accept Status : ' + consent);
var script = document.createElement('script');
script.setAttribute('src','https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-1');
document.head.appendChild(script);

}else if (consent==='deny'){
console.log('Cookie Accept Status : ' + consent);
delete_cookie('_ga','/','.example.com');
delete_cookie('_gat_gtag_UA_XXXXXXXXX_1','/','.example.com');
delete_cookie('_gid','/','.example.com');
}else{
console.log('Cookie Accept Status : not set');
}

You'll also need the getCookie function:
function getCookie(cname) {
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for(var i = 0; i <ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}

This is discussed further here


[question] Where is the assemblies locations on mobile apps? How to load them?

I have a component implementation for managing the resource manager in blazor app called Resourcer.
The resourcer is working properly on regular blazor but when installed in android as an app the resourcer location goes missing and the resourcer doesn't load the resource file.
Here you can find the resourcer implementation: https://github.com/arivera12/OneLine/blob/master/OneLine.Blazor/Components/Resourcer/Resourcer.cs
This is how I load it which works properly on blazor on browser but not on blazor mobile:
<Resourcer OnLoadCompleted="OnResoureManagerLoadCompleted"
              Resourcers=@Resourcers
              DefaultResourcerAssembly=@typeof(Languages).Assembly
              DefaultResourcerSource="Relax.Common.Translations.en" />

[Parameter] public IReadOnlyDictionary<string, Tuple<string, string, Assembly>> Resourcers { get; set; } = Languages.Resourcers;

public class Languages
    {
        public static IReadOnlyDictionary<string, Tuple<string, string, Assembly>> Resourcers = new Dictionary<string, Tuple<string, string, Assembly>>()
        {
            { "en", Tuple.Create("English", "Relax.Common.Translations.en", typeof(Languages).Assembly) },
            { "es", Tuple.Create("Español", "Relax.Common.Translations.es", typeof(Languages).Assembly) }
        };
    }

It's seems there are issue loading the assemblies on blazor mobile as far as a I can see.
Btw, I tried working with some assemblies yesterday and doing some reflection stuff to override Http Services base address after blazor loads the IConfiguration file and didn't never worked as I wanted to be.
I wanted to load all HttpServices from a specific assembly and override by a loop all the Http Services base address in that assembly that were already loaded in the service provider of blazor.
I ended doing something else to workaround using explicit override for this but for my Resourcer I don't find any other way to work around it.
Any thoughts?

Before going further, how is your plugin working ? Is it used as a Razor Class Library ?
Generally, keep in mind that while you are working in Visual Studio in Debug (or even Release), under the hood, some Microsoft components for Razor / Blazor are soft linking some packages and assemblies even if they are not located in the right place you would see when your app is in publish mode. Example, that's why linking a Razor Class Library within your app work even if the file is not yet published in the _component folder (if my memory is right) that don't exist yet as the app is not published. Instead there is some kind of soft linking within the NuGet packages cache folder instead that simulate that everything is linked as expected.
My first assumption would be: Try to publish your regular Blazor app (right click on the project, then publish), and try to launch it from a webserver you like (IIS for example).
If you see that it doesn't work either for the same reason you mentionned, that mean that some files are maybe missing while using the publishing process, and the idea would be to check that the files are in facts present in the folder published by Visual Studio.
BlazorMobile use the publishing feature before packaging, so it should have the same content as a regular published Blazor app.

My first assumption would be: Try to publish your regular Blazor app (right click on the project, then publish), and try to launch it from a webserver you like (IIS for example).

Already done this and it works properly but for blazor mobile seems to be broken.

Before going further, how is your plugin working ? Is it used as a Razor Class Library ?

It's a component that its already included some others components and working as expected but my resourcer works for regular blazor but is still broken for blazor mobile.
I am changing this implementation to use a simple *.json file using the IConfiguration and reading the locales from the wwwroot since this its very well supported and works everywhere.
Also .json are more lightweight and more portable to other platforms than *.resx.

Did you test was on WASM or Server side implementation project ?

Yes, and they work as expected there.

For your informations, i'm already using .resx localization assemblies on a Business project for a client, and i had no issue. I don't use any specific plugin to use it, i use it "as is" like a regular .RESX resource manager, i just change the global thread UI before rendering in order to localize the app in the expected language.

using blazor mobile? or regular blazor web?

Both.

I builded a new repository to manage translation using .json file using IConfiguration under the hood. This will be an alternative to Microsoft ResourceManager. Take a look https://github.com/arivera12/JsonLanguageLocalizerNet. I already test it reading remote json files and works as expected.

Both.

Still weird to me since this loads on web but not on blazor mobile for me.
Anyway I am changing my current implementation to use json files instead.
Since I found .json translations more flexible and lightweight than .resx files.

Just for feedback, resources are working as expected on my business project.
Before rendering the UI, with this event:
BlazorMobileService.OnBlazorMobileLoaded

If have written this part of code in my delegate:
                string culture = await AppMetadata.GetXamarinBridge().GetDeviceCulture();

                //WARNING: This must be done before BrowserHelper.InitAsync, as this method will cache current ressource for Javascript
                //so returned resources values must be set in the correct Thread Culture !
                if (culture != string.Empty)
                {
                    ConsoleHelper.LogInfo($"New thread culture is: {culture}");

                    CultureInfo currentCulture = new CultureInfo(culture);

                    CultureInfo.DefaultThreadCurrentCulture = currentCulture;
                    CultureInfo.DefaultThreadCurrentUICulture = currentCulture;
                    CultureInfo.CurrentCulture = currentCulture;
                    CultureInfo.CurrentUICulture = currentCulture;
                    Thread.CurrentThread.CurrentCulture = currentCulture;
                    Thread.CurrentThread.CurrentUICulture = currentCulture;
                }

Where the culture returned in GetDeviceCulture is the culture configured in Native / Xamarin.Forms, not what is detected in the browser or the default language whatever in Blazor.
Then i render the app.

I started interfacing xamarin apis specially the ones that are on Xamarin.Essentials some of them works and some of them not. When the xamarin.essential object is a static property for some reason xamarin bridge doesn't work but when it's a static method it works out of the box. I think xamarin bridge need to support this at some moment. I will open another issue later with this and actual cases that works and somes that doesn't work.

btw I use to manage the current culture and language selected using the SecureStorage class from xamarin.essentials and works flawless! Cake!


Pedantic nitpickery regarding proper man page markdown formatting

Been going through the podman man pages, and a couple questions about proper markdown formatting (not being an expert at markdown).
First, commonly, one sees a pair of options rendered in bold thusly:
**--help, -h**
However, would it not make more sense to not bold the intervening comma and render that as:
**--help**, **-h**
I've definitely seen that second variant and it makes more logical sense to me.
Also, in podman-container-exists.1.md, I read:
# SYNOPSIS
**podman container exists** [*-h*|*--help*] *container*

For the same markdown results, would you not use double asterisks instead of single in the last part of that line? Again, I am not a markdown expert so I might just not understand the effect you're going after.

The only difference between --help, -h  and --help, -h is the "," will be boded in the first and not in the second.  I think using the first throughout is preferable.
podman container exists [-h|--help] container
Should be
podman container exists [-h|--help] container
The extra "*" make no sense.

OK, so based on my example, your preferred way of writing it would be:
# SYNOPSIS
**podman container exists** [*-h*|*--help*] *container*

that is, two asterisks around the command, single asterisks around the subsequent things?

Oh, and just to be pedantic, my normal preferred way to render that comma would have it not bolded, but that requires a bunch more asterisks and it's not worth it.

Actually it should be
podman container exists [options] container
None of the --help ones should exist.

@rpjday Any update on this?

Sorry, I've been distracted, will get to this at some point.

@rpjday Any update on this?

Ashley could you look into this also.

It seems like the man pages for podman are split, some using [options] and others listing it all out. I took a look at man man and it gave an outline of how manual pages should be written. It looks like all the options were written on top, not just [options]. However, as seen in podman-image-trust, this can look pretty messy.
Here are some of the usages:
       **bold text**          type exactly as shown.        _italic text_        replace with appropriate argument.        [**-abc** ]            any or all arguments within [ ] are optional.        **-a**|**-b**              options delimited by | cannot be used together.        _argument .._.       argument is repeatable.        [_expression_] ...   entire expression within [ ] is repeatable.

@ashley-cui Yes we are just looking for you to run through them and make them consistent.

So should I just change them all to the [options] format?

I think so, Could you show me an example of the change?

So instead of
# SYNOPSIS
**podman image trust** set|show
[**-h**|**--help**]
[**-j**|**--json**]
[**--raw**]
[**-f**|**--pubkeysfile** KEY1 [**-f**|**--pubkeysfile** KEY2,...]]
[**-t**|**--type** signedBy|accept|reject]
REGISTRY[/REPOSITORY]

# OPTIONS
**-h** **--help**
  Print usage statement.
etc

I have
## SYNOPSIS
podman image trust set|show [options]

## OPTIONS
**-h,--help**
Print usage statement

**-j,--json **
Output trust as JSON for machine parsing

**--raw**
Output trust policy file as raw JSON

Yup SGTM.

Sorry for the lack of attention, I've been pre-occupied with a current contract. If @ashley-cui has a handle on this, I'm more than happy to hand it off, and go find something else nitpicky to whine about.

@rpjday No problem.  @ashley-cui is a summer intern and we are bringing her up to speed on the whole libpod/podman process.  Grabbing issues for her to work on.
Thanks for the issue.

The only nitpick I would have with the above is, instead of
-h,--help
I would avoid bolding the comma, as in:
-h,--help
as any punctuation like that is not formally part of the option string.


No support for international character encoding when saving WorkFlow Image > Export > PNG

Hello! Please add Unicode for saving of all text fields when exporting Workflow to PNG! Now every time I have to save both versions of Workflow in PNG and JSON, because when I open PNG all non-Latin text characters turn into garbage - it's not comfy!

Can you provide an example please, using this unicode test file, the results after loading match.
https://www.w3.org/2001/06/utf-8-test/UTF-8-demo.html

Hello! I downloaded both images in png and svg and then saved both in png. As you can see, when I opened the png, the characters opened incorrectly and I saved the result to a new png. When I opened the svg the characters were read correctly, but after saving to png and reopening, the characters open incorrectly.
workflow in png opened and resaved in png:

workflow in svg opened and resaved in png:

workflow in svg opened and twice resaved in png:


Enable Windows store locator watcher

Useful for getting started experience, so that user doesn't have to reload after installing Python, discussed here: https://github.com/microsoft/vscode-python/pull/16709#discussion_r675839696
Enable watcher tests too: https://github.com/microsoft/vscode-python/blob/1392508c7bc045c851d9181c191070185a0ce6cf/src/test/pythonEnvironments/base/locators/lowLevel/windowsStoreLocator.test.ts#L99.

No longer needed.


Filter by content of PDF file

I've just found this nice little tool which would almost perfectly fit what I need except for filtering based on content of a file. In my particular use case I'd like to move PDF files to different folders based on its text content.
I've found https://github.com/tfeldmann/organize/issues/10 and the related entry in https://github.com/tfeldmann/organize/projects/4 concerning the use of textract.
If there is any interest I might implement this and submit a PR. To prevent unnecessary work I'd like to discuss the implementation before starting. Would integrating textract as a generic solution be OK or are there other ideas?

I think textract fits the usecase very well and would be a great addition!
I'd propose FileContent as the filter's name and a regular expression as argument? Then the implementation should be relatively straight-forward and quite similar to the Regex-filter.
Any other ideas / enhancements?

Thanks for your feedback. I try to have a look at it the next days. I will open a PR when I got something working.


Small performance improvement in attention module

Hi @zhanghang1989, thanks for the great models.
I recently added your ResNeST models to my collection. I made a small tweak to the the attention module that improved forward throughput by approx 10%, did not check backward. Basically I changed the split/python sum to reshape + torch sum. I actually started making the change to allow torchscript compatibility of your model and noticed it had a positive impact on img/s.
https://github.com/rwightman/pytorch-image-models/blob/master/timm/models/layers/split_attn.py

Awesome. Thank you very much for pointing out the implementation!
We will test the training time and get back to you.


[INLONG-6428][Sort] Add connector to support elasticsearch-5.X

Prepare a Pull Request
(Change the title refer to the following example)

Title Example: [INLONG-6428][Sort] Add connector to support elasticsearch-5.X
(The following XYZ should be replaced by the actual GitHub Issue number)

Fixes #6428

Motivation
Add connector to support elasticsearch-5.X
Modifications
Add connector to support elasticsearch-5.X
Verifying this change
(Please pick either of the following options)

[ ] This change is a trivial rework/code cleanup without any test coverage.

[ ] This change is already covered by existing tests, such as:
(please describe tests)

[ ] This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation

Since elasticsearch6 use restapi to insert data and is the api is compatible with es5, you can use elasticsearch6 connector to  insert data to es5.

Please update the doc for elasticsearch connector


Dynamic schemas or how to react to user input on select

I'd like to be able to have a select and if a user chooses certain (or any) options, a sub form of sorts would pop up, asking for more input. Is there already a way to do this?

It's not yet possible to that. This will be added soon

Would the place to have this functionality work best in /src/components/FormSchemaField.js ? I was thinking a subForm object within an input that has an enum could have a property called dependsOn which is any array. If it's empty, any option would trigger showing the sub-question, otherwise a list of values from enum would be the ones to trigger that functionality.

The best way to implement this feature is to use the JSON Schema's dependencies keyword to be compatible with the official specification

This project has been moved to https://gitlab.com/formschema/native


Drop support for python 3.8

Since pymc-marketing doesn't support python 3.8 anymore, we need to update the CI's to reflect that, otherwise they will keep failing, blocking other current CI's

:books: Documentation preview :books:: https://pymc-marketing--331.org.readthedocs.build/en/331/

Need to update this line as well: https://github.com/pymc-labs/pymc-marketing/blob/main/pyproject.toml#L8

Looks like you need to update PYMC oldest support version because the pymc-experimental requires 5.6.1

@ricardoV94, can I have thumbs up on that one?

Did you mean to bump pymc-experimental as well?

here the pymc-experimental is still kept at 0.0.8, (bump to 0.0.9 is in the notebook PR). When it comes to the 5.6.1 req, I think its something you've added

I don't understand the point of this PR then? Why is Python 3.8 not supported in pymc-marketing anymore? Which PR changed that?

@ricardoV94 any idea how to solve that? Locally I can't reproduce this fail of Pareto_nbd test

@ricardoV94 any idea how to solve that? Locally I can't reproduce this fail of Pareto_nbd test

It detected the just released pymc==5.7.0. Can you reproduce if you update pymc?


[Bug]: Buy airtime transaction status not updated

Description
When I buy airtime using Mpesa, the transaction status remains as pending even after the airtime has been topped up.
Steps to reproduce

Open Stax app
Click buy airtime
Buy and pay with Mpesa
Enter Pin
After the transaction is successful and airtime topped up, check the history tab
The transaction status will remain as pending and waiting for confirmation message.

Expected result
After the airtime has been topped up, the transaction status should be updated to successful.
Actual result
After the airtime has been topped up, the transaction remains  in pending state.
Link to screenshots/screen recordings
https://drive.google.com/file/d/1Kn_hq2V6cFzhf1XyKdhRhclZWregGsSu/view?usp=sharing
Device name
Redmi 9A
Android OS
10
Is your phone dual SIM or single SIM?
Dual SIM
Which telco are you using for this test?
Safaricom
Stax device ID or email address
5ea7f09261718216

Still experiencing the same


[WIP] swappable Abstract base models

@slurms @stevelacey

We'll need to ensure we're using the swapped model everywhere we would use the action/follow models previously. Also lots of documentation about how to change the default model to one of your own (including examples).

apart from your suggestion. the remaining parts looks good?

I was trying to follow something like this actually https://github.com/django/django/blob/master/django/conf/global_settings.py#L497

@cb109 could you check the migration and related approach of this PR? and the newer one?

@auvipy If I understand correctly, this PR adds the option to use a custom Action and/or Follow model, giving finer control on what data and behaviour these models can carry by being able to migrate them as needed inside my own app.
Sounds like a good idea. This PR seems to be a prototype, with #390 being the actual implementation of the idea. I was able to run tests on both without failure.
However, this puts all effort and maintenance into userland. As a user of this library, I would wish for a simpler solution, e.g. with having a predefined way to attach json data as currently is the case.
I do not see any conflicts with #417 in migrations or code. Do you still see a chance of it being merged? I am willing to help finalize #390, but it would require more time to dive into it and check if it covers my use case.


Allow customization of the placeholder tag

Pull Request for the issue: https://github.com/egoist/vue-no-ssr/issues/8
Replace the placeholder default markup by a span (instead of a div) and allow the customization of the placeholder with the tag attribute.
Exemple 1:

<no-ssr>Lorem</no-ssr>

Exemple 2:
<no-ssr placeholder="Hi" tag="h1"">
Title
</no-ssr>

Hi

Maybe rename to placeholderTag

Sorry I didn't merge your PR, I also changed the entire implementation in the latest release https://github.com/egoist/vue-no-ssr/commit/fa116940930e713704960b2c1d05a45c378a9b1f


fix: do not register tenant controller\webhook\indexer until CA is created

closes #440

@prometherion @MaxFedotov is this PR ready for merging?
We faced #440 again on the customer setup during Capsule upgrade. Was still able to recover manually tenants but it seems quite a critical issue, imho. Thanks.


Can faster-whisper support TPU?

Kaggle and colab both supply TPU, it is much faster than T4. So can faster-whisper support it?

We would be interested in TPU acceleration as well.

kaggle is v3-8 physical device, colab is cloud tpu.

AWS inferentia would also be a nice plus


No dump cookies for security reasons

We've noticed that on 500 errors there's some sensitive data logged to our Sentry. I guess user HTTP_COOKIES should not be made publically available as it has some major security risks. Maybe you will find this patch useful for securing Pulsar

looks good, thanks 👍


FragmentDescriptors

Hi everyone! I would ask to you if there is a way to modify the "FragmentDescriptors.csv", as I have to add a new fragment not included in this list. (any other suggestions to do so are welcome!)
Thanks to everyone in advance.
PS: i'm using rdkit 2020.03.2 version on python3.7.
Nico

Do you have the ability to edit the file in $RDBASE/Data/FragmentDescriptors.csv ?
RDBASE varies on platform to platform, you can find it via:
from rdkit import RDConfig
print(RDConfig.RDDataDir)

It doesn't look like there is an easy way to reload the fragments, but this can be fixed.

Do you have the ability to edit the file in $RDBASE/Data/FragmentDescriptors.csv ?
RDBASE varies on platform to platform, you can find it via:
from rdkit import RDConfig
print(RDConfig.RDDataDir)

First of all, thanks for the answer!
As for what you said, I tried to edit the file FragmentDescriptors.csv in two different ways:

I tried to add a new line with my new fragment code and SMARTS, but it didn't work.
I tried (cheating) to modify only the SMARTS code of another fragment already existing, and in this work, but I think that it isn't the right way! :D
So I'll try to figure out somehow!

What exactly are you trying to do?  If you add a new fragment, I'm not sure it is used by default.


Github release apk's are downloading as .bin

Steps to reproduce:

Go to any repo's release section, for example github.com/DuckDuckGo/Android/releases
Select any .apk release, for example duckduckgo-5.1.0-release.apk
It'll be downloaded as .bin

DuckDuckGo version: 5.1.0

Implemented in https://github.com/duckduckgo/Android/pull/265


publish test results in standard data structure

Would like to use a data structure like this one: https://github.com/hyperledger/indy-hipe/tree/master/text/0015-agent-test-suite-interface#interop-profile-json
This PR against the aries-rfcs repo calls for implementations to formally publish test results; I'd like this data structure to be the embodiment of what's published. That is, a hyperlink to a JSON file containing this structure should be how Aries RFC implementations report their interoperability.
It might also be nice (but is less important) for this data structure to be returned as part of the disclose message of the Discover Features protocol.

Merged with #12


docker-machine scp ignores symbolic links without warning user

If the remote machine has a symlink , and you do something like:
docker-machine scp -r mybox:my_remote_folder my_local_folder

then any symlink files in my_remote_folder will be silently ignored. Is there a method to trigger downloading these? Or at least some way to get the SCP command to warn/fail if it encounters files it cannot download?

Workaround (if your remote machine has rsync) -
rsync -av --rsh='docker-machine ssh mybox' :my_remote_folder my_local_folder

As a workaround, you can use docker-machine scp --delta (which uses rsync to do the copy)


#164694226 Implement like or dislike an article functionality

What does this PR do?

Adds like or dislike feature to an article

Description of Task to be completed?

[x] add likes endpoint

[x]  update models, add ArticleLikes model

[x] update views

[ ] test feature functionality

How should this be manually tested?

Move into project directory on your local computer

Run server using python manage.py runserver command
Login using verified login_credentials
Fetch existing articles using endpoint  GET/ api/articles/
Fetch specific articles using endpoint  GET/ api/articles/<slug>

What are the relevant pivotal tracker stories?
#164694226

Coverage decreased (-1.6%) to 94.05% when pulling e7b0279bab26c352d2970dbb86d0a31f19703f13 on ft-like-and-or-dislike-articles-164694226 into 70e436b8093e80cdf48cf8b049d1d0a902bc8e80 on develop.

@Rhytah, could you please include the relevant screenshots.


Is possible if I use two traineddata

I created my own traineddata since i Can't combine it to the eng.traineddata. Is it possible for the app to use  use two or more traineddata at the same time.

Yes. Combine them with a plus sign in init: "eng+hin" for example.
See https://rmtheis.github.io/tess-two/javadoc/com/googlecode/tesseract/android/TessBaseAPI.html#init(java.lang.String, java.lang.String)

Thanks a lot. This really helped me :)

where is the init?


Lost logs

Hi,
it seems logs are not pseudo real time with some plugins (like junit-platform-maven-plugin:1.1.0:launch or exec:java/exec:exec), is it because the plugin uses a handler to spy logs? Any way to capture stdout/stderr too and add them in the rolling window?

Maybe junit-platform-maven-plugin:launch and exec:java/exec:exec suffer from the same problem as quarkus:dev discussed in  discussed in https://github.com/mvndaemon/mvnd/issues/241 Do they spawn a child process using inheritIO() on the ProcessBuilder? Maybe you see a better/easier solution as the ones proposed by @gnodet in https://github.com/mvndaemon/mvnd/issues/241 ?

@ppalaga yes they do manipulate them and for 3 of the 2 cases I mentionned it is through inheritIO. I was thinking mvnd launcher (ie distro) could add a javaagent to switch System.setOut/System.setErr to a custom impl which would enable mvnd to control it and kind of stack it to track it properly.

mvnd launcher (ie distro) could add a javaagent to switch System.setOut/System.setErr to a custom impl which would enable mvnd to control it and kind of stack it to track it properly.

I wonder whether the effect would be any different from what we already do around here by setting System.out/err to our custom impl?

@rmannibucau in order to support multithreaded builds and have a clean output, we need to correlate each log entry to the corresponding plugin execution. We do that with a few hacks in the logging system.  In addition, we do override the System.out and System.err to capture the output and do the correlation.  However, the whole thing works because we can link a given thread to a plugin execution (that's what the custom system streams do).  When forking the JVM, there's no easy way to grab the output and correlate things anymore.  Any attempt to capture the output without any threading information is bound to fail as the information about which plugin is writing to the stream is lost.  So my initial thought of using to redirect the output to a know file using dup2 and have the inherited processes output there too won't fully work.
I think if the plugins that do fork a process (there aren't too many of them) could be updated to poll the output and write it to the JVM System.out and System.err instead, that would work in a much better way and would allow those plugins to be run concurrently too.

@rmannibucau in order to support multithreaded builds and have a clean output, we need to correlate each log entry to the corresponding plugin execution. We do that with a few hacks in the logging system.  In addition, we do override the System.out and System.err to capture the output and do the correlation.  However, the whole thing works because we can link a given thread to a plugin execution (that's what the custom system streams do).  When forking the JVM, there's no easy way to grab the output and correlate things anymore.  Any attempt to capture the output without any threading information is bound to fail as the information about which plugin is writing to the stream is lost.  So my initial thought of using to redirect the output to a know file using dup2 and have the inherited processes output there too won't fully work.
I think if the plugins that do fork a process (there aren't too many of them) could be updated to poll the output and write it to the JVM System.out and System.err instead, that would work in a much better way and would allow those plugins to be run concurrently too.

@gnodet if I'm not mistaken mvnd can instrument Process/ProcessBuilder - very worse case with an agent on mvnd jvm - to have the context at start() call time so all the logs from this process can be redirected to mvnd system no? It is actually more and more common to have such fork in plugins so I don't think that updating them all is easy. Worse case a degraded mode where a new bucket "unknown module logs" is shown would be fine too.

@gnodet if I'm not mistaken mvnd can instrument Process/ProcessBuilder - very worse case with an agent on mvnd jvm - to have the context at start() call time so all the logs from this process can be redirected to mvnd system no? It is actually more and more common to have such fork in plugins so I don't think that updating them all is easy. Worse case a degraded mode where a new bucket "unknown module logs" is shown would be fine too.

@rmannibucau ah, I see what you meant now with the agent.  Yes, instrumenting ProcessBuilder class could work I suppose.  I'll have a look.

@rmannibucau ah, I see what you meant now with the agent.  Yes, instrumenting ProcessBuilder class could work I suppose.  I'll have a look.

Actually, the problem with the exec-maven-plugin is slightly different from the one mentioned in #241.
In this case, the problem is that the output stream is not related to a given mojo execution while when forking with inherited IO, the problem is that the java system streams are bypassed completely.

Actually, the problem with the exec-maven-plugin is slightly different from the one mentioned in #241.
In this case, the problem is that the output stream is not related to a given mojo execution while when forking with inherited IO, the problem is that the java system streams are bypassed completely.

Hi @gnodet , seems it does not fix the issue for junit-platform-maven-plugin and friends but only exec plugin which does not use inheritIO :(.

Hi @gnodet , seems it does not fix the issue for junit-platform-maven-plugin and friends but only exec plugin which does not use inheritIO :(.

Pushed https://github.com/mvndaemon/mvnd/pull/299 to show the issue I hit ATM.
Indeed turning  to false will workaround it but is not desired for other reasons in the real project.
Let's discuss how to solve it in the PR now :).

Pushed https://github.com/mvndaemon/mvnd/pull/299 to show the issue I hit ATM.
Indeed turning  to false will workaround it but is not desired for other reasons in the real project.
Let's discuss how to solve it in the PR now :).


instruction on using data_handler with local data

Hi, thanks for sharing your code. Can you tell me how to use the rt-polarity data in the data foler with data_handler? Currently, sentiment_cnn.py would not work if the line loading the imdb data is replaced with loading data supplied by data_handler.  Thanks in advance

Hi,
this directory became redundant since I switched to keras data source. But if you browse the repository at pre March 29 state  you will get an idea how to use it


CFN template modified when deploying 2nd environment

Describe the bug
The following block of my infrastructure code was modified when I deployed a new environment. I do not expect my template to change because the template is under version control.
"Code": {
  "S3Bucket": "amplify-foo-dev-212449-deployment",
  "S3Key": "amplify-builds/foo-786931524e3951785a44-build.zip"
},

Amplify CLI Version
$ amplify --version
4.19.0

To Reproduce
After running these, the template was modified.
amplify init .... dev
amplify function add...
amplify push
amplify env add qa
amplify push

Expected behavior
I think these values should be passed via CFN parameters for each environment instead of changing the template.
Desktop (please complete the following information):

OS: Mac
Node Version:

$ node -v
v12.16.2

@cyrfer This behavior is due to the dynamic S3Bucket and key which is required in the CloudFormation template for the CloudFormation service to detect for any changes to the Lambda function and deploy the Lambda function. This is generated dynamically on every push and due to this change you can see an "update" status when switching environments since these values are different between environments. This shouldn't affect any of your deployments as we dynamically re-generate it during an amplify push.
We're working on a better way to handle this - but at this point this is the way we're handling uploading updates to the Lambda function via CloudFormation.

I don't like seeing git changes to templates. It makes me nervous. If you must change something, please change a parameters file, specific to the environment. Parameter changes still cause CF to deploy.
Can you link me to the issue where you're tracking "a better way to handle this" ?
@kaustavghosh06

Here is the duplicate issue which we're tracking for the issue - https://github.com/aws-amplify/amplify-cli/issues/3068


mmap cannot be turned off

I'd like to know if there's a way to load a large BoltDB database without having to mmap it.
The issue is that some of our windows machines have only 8GB of RAM, which is not upgradable and as a result of this they can't load large bolt databases.
I dug through the code and found that the initial map size option is ignored if less than the file size.
https://github.com/boltdb/bolt/blob/master/db.go#L257
what would be a feasible quick-fix i could implement?
Cheers!

Is your Windows machine 32-bit or 64-bit? The mmap() will put the database into virtual memory but that is not limited to your physical RAM. The OS will page data in and out of physical RAM automatically. However, if you have a 32-bit machine then your virtual memory is limited to 2GB.

It's a 64 bit machine running windows 10.
The returned error is:
"Not enough storage is available to process this command."
I'll have a look to see if i can replicate this in a unit test without boltdb, might be a Go problem.

Bolt without mmap would be a completely different library; direct reading is pretty much the point of the design.
Instead, this seems to be a question of how to get Windows mmap to behave sanely -- mmapping a terabyte-size should be completely doable, as mmap consumes virtual memory not physical. Searches seem to provide nothing of value, beyond a vague hint that memory fragmentation might be the cause: http://kb.tableau.com/articles/issue/error-not-enough-storage-is-available-to-process-this-command-refreshing-extract -- or that Windows might require that you have sufficient temp disk space to page out dirty pages (of a PAGE_READONLY mapping? derp).

Hrmm, http://stackoverflow.com/questions/726471/how-big-can-a-memory-mapped-file-be "at most 2GB minus [...]" sounds like https://www.youtube.com/watch?v=YxYvzVxJtYM

Yup, you're right there's not much that can be done from bolts side to fix this kind of issue.
Our fix was to increase the amount of virtual memory available and turn it on and off again.


Add upload options

Coverage remained the same at 100.0% when pulling 36777c4a574728badf9f9b50095ea23e47fb433c on add_file_type into ce8c5ee82a722dc029e1264a9e2ed644bcab732e on master.


chore: add linter to integration build tag

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b0bc8b9) 32.89% compared to head (de25206) 32.89%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1102   +/-   ##
=======================================
  Coverage   32.89%   32.89%
=======================================
  Files         103      103
  Lines       12839    12839
=======================================
  Hits         4223     4223
  Misses       8207     8207
  Partials      409      409

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


make origin view available

#56

I highly encourage you to submit PR, but your code has some problems.
The methos is:
public abstract VH onCompatCreateViewHolder(View realContentView, View originView, int viewType);

But when you call this method is:
return onCompatCreateViewHolder(contentView, viewType, originView);

This is an unauthenticated code, it is easy to see the compiled exception.
And the direct modification of the method that requires the developer to implement is not correct and should provide a transition:
public VH onCompatCreateViewHolder(View realContentView, View originView, int viewType) {
        return onCompatCreateViewHolder(realContentView, viewType);
}

public abstract VH onCompatCreateViewHolder(View realContentView, int viewType);

We should call this method:
return onCompatCreateViewHolder(contentView, originView, viewType);

ok, so should I submit another PR?

但是按你这样的改法，api确实不变了。但是真想用originView的人貌似也挺烦的啊。需要实现一个空的onCreateContentView，然后再重载onCompatCreateViewHolder，挺奇怪的。


Dqfd agorithm

Write dqfd algorithm. This commits include

the algorithm policy
the entry file (serial_entry_dqfd.py)
the env configs (include cartpole, lunarlander, pong, space_invaders)

To run

First generate your own expert model
get the model path and add to the env_dqfd_config.py where env is one of the four
run with the command ding -m serial_dqfd -c env_dqfd_config.py -s 0

Todo:

add test files for the algorithm
add more env config
add expert config instead of expert model

Codecov Report

Merging #48 (d4739c9) into main (11cc97e) will decrease coverage by 0.83%.
The diff coverage is 20.49%.

@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   88.93%   88.10%   -0.84%
==========================================
  Files         347      351       +4
  Lines       25857    25917      +60
==========================================
- Hits        22995    22833     -162
- Misses       2862     3084     +222

Flag
Coverage Δ

unittests
88.10% <20.49%> (-0.84%)
:arrow_down:

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

Impacted Files
Coverage Δ

ding/rl_utils/__init__.py
100.00% <ø> (ø)

ding/rl_utils/td.py
81.43% <7.14%> (-7.46%)
:arrow_down:

ding/entry/serial_entry_dqfd.py
14.54% <14.54%> (ø)

ding/policy/dqfd.py
26.00% <26.00%> (ø)

ding/entry/__init__.py
100.00% <100.00%> (ø)

ding/policy/command_mode_policy_instance.py
96.61% <100.00%> (+0.11%)
:arrow_up:

ding/worker/learner/comm/flask_fs_learner.py
83.12% <0.00%> (-7.50%)
:arrow_down:

ding/entry/tests/test_parallel_entry.py
45.45% <0.00%> (-4.55%)
:arrow_down:

ding/utils/data/dataloader.py
43.52% <0.00%> (-2.60%)
:arrow_down:

ding/entry/tests/test_serial_entry.py
77.04% <0.00%> (-2.22%)
:arrow_down:

... and 129 more

Continue to review full report at Codecov.

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


update prod github app url

Fixes

Related to rebranding: https://issues.redhat.com/browse/PLNSRVCE-1171
Description

As part of the brand update, the prod github app was republished to url: https://github.com/apps/red-hat-trusted-app-pipeline
Type of change

[ ] Feature
[x] Bugfix
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

Screen shots / Gifs for design review

How to test or reproduce?
Customize a build pipeline.
Ensure that the install github app link goes to a valid page.
After installing the app and sending a PR.
Ensure the merge in github link is a valid filter in github for the sent PR.
Browser conformance:

[x] Chrome
[ ] Firefox
[ ] Safari
[ ] Edge

/lgtm


Is it possible to split params to several pages

I have too much settings in project and the page with them is not comfortable to edit.
Is it possible to make several pages with certain settings and make not only "config" page, but "common config", "applications config", "templates config" for example?

or maybe there is an ability to group fields in fieldsets and make them collapse?

Found the solution:
make new template with name admin/constance/change_list.html with the same html as in original template and modify it to make div.fieldset -> div.fieldset.collapse and include collapse js


Question: serializing a list of objects

Question
For bugs/questions:

OS: Ubuntu 19.04
Python version 3.7.3
Pydantic version 0.30.1

Hi, based on one of your examples let's say I have this
from datetime import datetime
from typing import List
from pydantic import BaseModel

class User(BaseModel):
    id: int
    name = 'John Doe'
    signup_ts: datetime = None
    friends: List[int] = []

The thing is I want to be to serialize a list of users, like this one:
users_list = [
    {'id': '123', 'signup_ts': '2017-06-01 12:22', 'friends': [1, '2', b'3']},
    {'id': '456', 'signup_ts': '2017-06-02 12:22', 'friends': ['you']},
]

But the only way I found to be able to do it, was by creating a second class to nest User as a list inside,
class UserList(BaseModel):
    users: List[User]

But I don't want my response nested inside a users key, I want my response just to be the list, so I can paginate it, etc. Normally, using drf this can be achieved by setting many=True when instantiating the serializer:
serializer = UserSerializer(data=users_list, many=True)
users = serializer.data

Is there a pydantic way to achieve this like I would with drf?
(Of course, this is a simple example, the real scenario will be to use Django ORM to query all objects and serialize them, but for simplicity I will stick to a simpler example)

The "right" way to do this in pydantic is to make use of "Custom Root Types". You still need to make use of a container model:
class UserList(BaseModel):
    __root__: List[User]

but then the following will work:
UserList.parse_obj([
    {'id': '123', 'signup_ts': '2017-06-01 12:22', 'friends': [1, '2', b'3']},
    {'id': '456', 'signup_ts': '2017-06-02 12:22', 'friends': ['you']},
])

(and will put the values inside the __root__ property).
Unfortunately, I think there is not good serialization support for this yet, so I think when you go to return the results, if you want to return just a list you'll still need to return UserList.__root__.
I don't think there is currently a unified interface that gets you a serialized/unstructured version of the model that respects the __root_model__, but if this is what you are looking for, it could be worth building.

Thank you @dmontagu !
So based on what you suggested, I ended up with this:
    def list(self, request, *args, **kwargs):
        queryset = self.filter_queryset(self.get_queryset())

        page = self.paginate_queryset(queryset)
        if page is not None:
            serializer = MyModelList.parse_obj(page)
            return self.get_paginated_response(dict(serializer)['__root__'])

        serializer = MyModelList.parse_obj(list(queryset.values()))
        return Response(dict(serializer)['__root__'])

This actually works well with Django + DRF using a ListCreateAPIView class-based view and it returns a proper paginated response from a Django QuerySet.
Maybe this isn't an optimal way to integrate it with DRF, but still is a working proof of concept.

Another solution from pydantic/main.py:DataModel.json is
json_str = MyModel.__config__.json_dumps(data, default=MyModel.__json_encoder__, **dumps_kwargs)

The "right" way to do this in pydantic is to make use of "Custom Root Types". You still need to make use of a container model:...

E   RuntimeError: no validator found for <class 'typing._GenericAlias'>, see `arbitrary_types_allowed` in Config

pydantic/validators.py:723: RuntimeError

The "right" way to do this in pydantic is to make use of "Custom Root Types". You still need to make use of a container model:

Whoever finds this during pydantic2 migration:
The answer is nearly right, but outdated. There are now pydantic.RootModels available.
They've got a specifically designed root attribute for this very purpose:
from pydantic import RootModel

class UserList(RootModel):
    root: List[User]

The "right" way to do this in pydantic is to make use of "Custom Root Types". You still need to make use of a container model:

Whoever finds this during pydantic2 migration: The answer is nearly right, but outdated. There are now pydantic.RootModels available. They've got a specifically designed root attribute for this very purpose:
from pydantic import RootModel

class UserList(RootModel):
    root: List[User]

Excellent @AiyionPrime, thanks for that!

I found the use of TypeAdapter here to be more 'natural' or intuitive, as this allows me to directly parse to list rather than having to access the root value for another Model instance. Here's a small example:
from pydantic import BaseModel, TypeAdapter

class Fruit(BaseModel):
    name: str
    season: str

fruits_raw_data = [{"name": "Apple", "season": "Winter"}, {"name": "Watermelon", "season": "Summer"}]

ta = TypeAdapter(list[Fruit])
fruits_data = ta.validate_python(fruits_raw_data)

print(fruits_data)

this outputs
[Fruit(name='Apple', season='Winter'), Fruit(name='Watermelon', season='Summer')]
and also performs all Pydantic functions, validations, etc. like normal.

pydantic_models = parse_obj_as(List[ExampleModel], example_models)  How do I turn a future pydantic model list into a pydantic model list? Example:
ExampleModel contains the variables a and b, example_models is a list of dicts of a and b.

Hey, I think TypeVar would get this done.


feat: Snyk integration

feat: Snyk vulnerability badge

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Fix parsing of URLs

With this change, we now support all of the likely URLs, including
<EMAIL_ADDRESS>https://github.com/ORG/REPO.git
git://github.com/ORG/REPO.git
git@github.com:ORG/REPO.git

!ci-build-me

!ci-build-me

!approved-for-mainnet


Implement ctrl + scroll wheel for increasing and decreasing font size

For improved accessibility.

I'm not sure if this should be a temporary zoom feature, or actually change the
font size and be persisted in the settings file.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 13 Apr 2012 at 7:24

Blocked on: #23

fixed by pr #51


Prevent ticket transfer by freezing attendee details

A lot of events (in particular those with wait lists) sell non-transferable tickets. Presently it is trivial to transfer a ticket just by changing the attendee details to match the new attendee. This should be preventable. Events with non-transferable tickets cannot currently use Dancerfly safely.
I personally think the best approach to preventing this would be to freeze certain attendee details (name and email) after the first save. (Or give the organizers the option of forcing those details to freeze by marking their passes as non-transferable.)

I think this is more urgent than #332, since #332 is mostly a convenient alternative to something that's already possible (editing attendee details), though it may be fruitful to work on them together.

We should link to transfer page from attendee detail page probably.

Even if we freeze details, they could add a new attendee, transfer the items, and then delete the old attendee. I don't think we can fully prevent it. But I suppose every bit harder we make it results in more people doing it "right".

We could freeze already purchased items alongside the details.
On Wed, Sep 16, 2015 at 5:58 PM, Stephen Burrows<EMAIL_ADDRESS>wrote:

Even if we freeze details, they could add a new attendee, transfer the items, and then delete the old attendee. I don't think we can fully prevent it. But I suppose every bit harder we make it results in more people doing it "right".
Reply to this email directly or view it on GitHub:
https://github.com/littleweaver/django-brambling/issues/413#issuecomment-140907032

Though that could be another ticket maybe.
On Wed, Sep 16, 2015 at 6:47 PM, Harris Lapiroff<EMAIL_ADDRESS>wrote:

We could freeze already purchased items alongside the details.
On Wed, Sep 16, 2015 at 5:58 PM, Stephen Burrows<EMAIL_ADDRESS>wrote:

Even if we freeze details, they could add a new attendee, transfer the items, and then delete the old attendee. I don't think we can fully prevent it. But I suppose every bit harder we make it results in more people doing it "right".
Reply to this email directly or view it on GitHub:
https://github.com/littleweaver/django-brambling/issues/413#issuecomment-140907032

This is somewhat related to #403, since freezing purchased items (which I do think falls under this ticket) could also relate to the UI changes for purchased items.


This pr is to add pkg/utils/label_test.go.

Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?

fixes #XXXX
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

/assign cheyang

/assign TrafalgarZZZ


Color picker do not show focus borders

Refs: #31457
When you click on the color picker (which you surely will) we show a blue focus border. This is not needed, as it is there to indicate when the focus swtichtes to some element, hover in this case it is quite obvious that you are woring with the color picker.
We are also disabling focus boxes in the repl input for example.

This outline color is coming from hover itself, not colour picker, and I think is is there for accessibility reasons.
We have the same when clicking on a hover without a colour picker, do you still think we should remove it?

Color picker using the hover is an implementation detail. I believe these two experiences are different.
Also we should be careful with using colors in the color picker and removing this one would give us one less color.
So yes I still think we should remove it for the color picker

I see. Apparently that is not as easy as it sounds. We define focus for all elements with tabIndex 0 in https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/electron-browser/shell.ts#L557 and I am not sure about the logic pipeline to assign tabIndex to the hover. Seems like any editor contribution receives that from the builder class in https://github.com/Microsoft/vscode/blob/master/src/vs/base/browser/builder.ts#L849.
How do you disable it in the REPL?

@michelkaporin there are some synthethic focus tricks, try something like this
https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/electron-browser/repl.ts#L212


Swap volume and brightness swipers

Please consider swapping the volume & brightness control quick gestures such that volume is on the right and brightness is on the left.
Why? Both VLC and NewPipe have it this way around, which makes it confusing.

Thank you very much for your feedback!
You make an excellent point I missed while developing this feature. I will look into it for the next release of Zapp.

VLC and NewPipe is not alone, also MX Player (probably the most downloaded player on android out there), has it that way.

This issue will be fixed in version 2.2.0, which will hit F-Droid in a view days. Please reopen if you still experience any issues.

I found the gestures, they are very close to the edges ...
Spielmops


Change pipenv install to update the lock file first

(Breaking out another substep of #1255)
When a specific package to install is passed to pipenv install, the current logical flow is as follows:

for each package requested on the command line:

install the package into the current environment
if that fails, abort the operation
update Pipfile with the new or revised dependency

after all requested packages have been installed, regenerate the lock file (as long as --skip-lock was omitted)

This creates some opportunities for the environment and the lock file to become inconsistent with each other:

the individual install commands don't use the lock file as a source of constraints, so they may install different versions of dependencies from those that would be installed when using the lock file
because the installation happens before the lock file generation, there's a race condition where the lock file generation may see a newer release than the install operation did
installing individual packages will resolve environment markers inside the virtual environment, while lock file generation will resolve them outside the virtual environment (this point means we may need to resolve #857 before we can safely make the logic change proposed below)

The proposed change to the installation logic would be as follows:

for each package requested on the command line:

check that the requested package is available from one of the source repositories listed in Pipfile
if it's missing, abort the operation
don't make any changes to Pipfile until all the requested packages have been checked

for each package requested on the command line:

update Pipfile with the new or revised dependency

update Pipfile with the new pre-release setting (if --pre is specified)
assuming all requested packages are available and --skip-lock was omitted, regenerate the lock file
run do_init (just as the command already does for the case where no packages are specified, which means this approach also already handles the --ignore-pipfile and --skip-lock options)

my only concern with this is something shouldn't be added to the lockfile if it can't be installed.

The simplest alternative that comes to mind would be to leave the current logic alone, and just add the do_init call at the end after the lock file is updated: in the typical case, that call would be a no-op, but in the cases where a version discrepancy had arisen, it should fix it implicitly as part of the command.
If discrepancies happen frequently enough for users to complain about the extra output from the sync operation, then it may also be feasible to convert Pipfile.lock to a constraints file that gets passed to the install command.

Sounds like a plan :)

@kennethreitz Are there any other parameters that might need to be passed to the new do_init call? The one earlier in the function for the "no arguments" case seems to pass down pretty much every parameter that do_init accepts.