Update UserMenu bottomsheet header min-height to 4rem

Fixes #284.

Changes proposed in this Pull Request:

Update UserMenu bottomsheet header min-height to 4rem

Screenshots:

My designer soul is finally rescued


Small changes to 'BngSimulator.run' to support optional arguments to

BNG's 'generate_network' method. Added a new optional argument, 'netgen_args', to the 'BngSimulator.run' call signature. This is a dictionary that gets passed to 'bngfile.action' when the 'generate_network' command is called.

One other thing: netgen_kwargs is ignored if method=='nf'. Should probably raise a ValueError in that case, stating that the arguments are incompatible.


RequestValidationError handler when using NATS and FastAPI

I'm not sure if this is a bug or just a usage issue but I can't handle RequestValidationError when messages are invalid.
I tried the FastAPI approach as documented here but the handler is never called even though RequestValidationError exception is raised and not handled except by FastAPI's logger, in our case.
Please assist.

I agree. It's very annoying

Sorry, missed this case. We can't use fastapi.exception_handler logic here, but we are working on FastStream-native way to process errors.
Now you can use our middlewares for it, but built-in mechanism should be released next week


onInput event says handler not valid

I want to use a character by character event for a field validation  (date time/cron with a regex)
so I added an onInput field to my form element..
it get registered to fire, and fires, but the function cannot be called for some reason..
will have to debug..

ok, my fault.. my UI is separated from my server.. so I have to ship the form in ascii format to the client, and then reconstruct the functions.. before calling jsonform
oops.. didn't check for onInput  in the converter..


AzCopy hangs after printing version

Which version of the AzCopy was used?
10.2.1
Which platform are you using? (ex: Windows, Mac, Linux)
Windows 10 VM
What command did you run?
AzCopy.exe --version or with no arguments
What problem was encountered?
AzCopy hangs after returning the version (or if no arguments the entire help text)
How can we reproduce the problem in the simplest way?
Not sure, it worked before.  The only thing that I can think of is that I am on a different network.  I was looking at https://github.com/Azure/azure-storage-azcopy/issues/517 but it seems slightly different.  Tried to pull the logs but there were none from today.  I then tried deleting the logs and re-running and nothing.
Have you found a mitigation/solution?
Not yet

This may be a duplicate of #517 after looking at it closer


zenith: 0.8.1 -> 0.8.2

Motivation for this change
Things done

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

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

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

/nix/store/h0181nkivr54fal5czspwj2cifapgcsz-zenith-0.8.1	  34.8M
/nix/store/8g2ddb86m5w1piz3630d3j9ddchrn666-zenith-0.8.2	  34.8M

thanks!


Add struct field usage

Part of #37

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 99.21875% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.92%. Comparing base (25fbaae) to head (38b997b).

Files with missing lines
Patch %
Lines

crates/shad_analyzer/src/registration/idents.rs
96.42%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##              main      #50      +/-   ##
===========================================
- Coverage   100.00%   99.92%   -0.08%
===========================================
  Files           56       57       +1
  Lines         2641     2685      +44
===========================================
+ Hits          2641     2683      +42
- Misses           0        2       +2

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


⚠ Bofrost.at has degraded performance

In 9aaa684, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 991 ms

Resolved: Bofrost.at performance has improved in c892ce7.


Shrink unsafe blocks for the Drop impl

The scope of the unsafe block needs to be as small as possible, and there are fewer areas to focus on when reviewing unsafe-related errors.

LGTM, please fix the DCO with git commit --amend --signoff

OK✔


pull request for e2e test at 12/09/2016 11:26:01

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


kargs: More cleanups

deploy: Centralize karg computation
I happened to be looking at this code for an unrelated reason.
We had 3 copies of the function calling karg computation.
But that can just be pushed to a much lower level, right
before we tell ostree what to do.
Signed-off-by: Colin Walters<EMAIL_ADDRESS>
kargs: Use merge deployment
This is in general for us right now a no-op, but is closer
to technically correct. In ostree the "merge deployment"
concept started out as "deployment we use for the original /etc"
which may be different from the booted deployment. For example,
when one wants to do a "factory reset", we want to start
from a fresh /etc.
The other important case here is when we're doing a fresh
install (or into a new stateroot) there may be no merge
deployment at all! It wouldn't be correct to look at /.
We only sidestep this issue right now because the install
logic bypasses this to directly gather kargs...and doesn't
use the same deploy API as inplace updates. But we
want to get closer to doing things that way.
Signed-off-by: Colin Walters<EMAIL_ADDRESS>
kargs: Use type inference
No need for explicit types in most of these places.
Signed-off-by: Colin Walters<EMAIL_ADDRESS>

Fixed textual conflict with https://github.com/containers/bootc/pull/675


DX: use PHP 8.1 polyfill

Coverage decreased (-0.002%) to 92.302% when pulling 83efc88779cc1da9bae6a9d2a034b07fa0158d7f on keradus:3.0_polyfill81 into e9aa4c8c1d71de791c605cab0f6e358686dab38d on FriendsOfPHP:3.0.

Thank you @keradus


Implicit arguments total fail, F* can't even prove transitivity of <<

Problem while working on wf.fst. Basically had to hoist two type arguments to the very top level so that they can be shared among 2 definitions, otherwise F* can't even prove transitivity of <<. No time to minimize, but I'll return to this.
(* Working around silly implicit argument stuff in F*,
   can't name these things otherwise in function body
   + putting this just before fix_F also causes lots of troubles
     (see all the commented out admitPs in fix_F;
      even transitivity doesn't work) *)
assume type aa : Type
assume type r : (aa -> aa -> Type)

The minimal counterexample for this is this:
assume val acc_inv : aa:Type -> a:int -> Tot (e:int{e = a})
val fix_F : a:int -> Tot unit
let fix_F a = assert(acc_inv a = a)

The problem seems to be caused by incompleteness in the SMT encoding of polymorphic functions. Removing the aa argument to acc_inv makes this work.

Turning the a:int into a:aa in the signature of acc_inv in the minimal code above (in bug210c.fst) makes this work again:
assume val acc_inv : aa:Type -> a:aa -> Tot (e:int{e = a})

Same thing if I explicitly pass the type argument explicitly when calling acc_inv:
let fix_F a = assert(acc_inv #unit a = a)

I'm starting to think that for a start we might want to reject this because of unbound unification variables before SMT encoding anything.

This is no longer reproducible. fstar complains about an unresolved unification variable in the argument of acc_inv now.


Implementation of MHFP and SECFP Fingerprints

MHFP / SECFP implementations based on the MHFP Python project. Associated publication: https://jcheminf.biomedcentral.com/articles/10.1186/s13321-018-0321-8

Thanks.  I added some comments to the pull request.  As a side note, this fingerprinting scheme is quite similar to one I developed for Frowns back in (gasp) 2002.  Although my hashing technique was sub optimal.
http://frowns.sourceforge.net

@daenuprobst : just to give you an update on this one
I'm not ignoring this, but between finishing up the 2019.09 release and catching up from vacation and the UGM I am overly busy.
I will put some time into reviewing this PR after we've finished the last push for the release; hopefully next week.

Hi @daenuprobst : Are you going to have time to address the comments here or should we just close this?

Hey @greglandrum, yes I will, probably later this week or on the weekend (thesis-writing has kept me from work recently, sorry)

@daenuprobst: no worries, and no pressure. I just wanted to check to see if this was dead. I had hoped not, so I'm glad to hear that you'll try to make some time. And, yes, I agree that the thesis is probably more important than this. :-)

Hello Guys, just to push some stress on this PR. Any update so far ?

I wonder, if you will also add my name in the sha part I did one year ago to start this cpp conversion ?
#include
#include     // std::unique_copy, std::sort, std::distance
#include
#include <GraphMol/MolOps.h>
#include <GraphMol/GraphMol.h>
#include <GraphMol/SmilesParse/SmilesParse.h>
#include <GraphMol/SmilesParse/SmilesWrite.h>
#include <GraphMol/Subgraphs/Subgraphs.h>
#include <GraphMol/Subgraphs/SubgraphUtils.h>
#include "sha1.hpp"
#include <boost/uuid/sha1.hpp>
using namespace RDKit;
struct compare
{
int key;
compare(int const &i): key(i) { }
bool operator()(int const &i)
{
    return (i == key);
}

};
struct distrib{
std::vector<uint64_t> da;
std::vector<uint64_t> db;
long int max_hash;
long long int prime;
};
// generator of distribution for Hashing
distrib generatordistrib(int seed, int distribsize){
distrib dab;
long int max_hash = std::llround(std::pow(2,32)) - 1; // fix
long long int prime = std::llround(std::pow(2,61)) -1; // fix
std::vector<uint64_t> v1;
std::vector<uint64_t> v2;

// generator 1:
std::mt19937::result_type myseed = seed;
std::mt19937 e1(myseed); //_64 to have 64 bits double not needed
std::uniform_int_distribution<long long int> dist1(1, max_hash); // fix dist1
while (v1.size()<distribsize) {
	long long int a = dist1(e1);
    bool result = !std::any_of(v1.begin(),v1.end(),compare(a));
    if (result) {
    	v1.push_back(a);

	}
}

// generator 2:
std::mt19937 e2(myseed); //_64 to have 64 bits double not needed
std::uniform_int_distribution<long long int> dist2(0, max_hash); // fix dist2
while (v2.size()<distribsize) {
	long long int b = dist2(e2);
    bool result = !std::any_of(v2.begin(),v2.end(),compare(b));
    if (result) {
    	v2.push_back(b);
	}
}

dab.da=v1;
dab.db=v2;
dab.prime=prime;
dab.max_hash=max_hash;
return dab;

}
std::vectorstd::string shingling_from_mol(RDKit::ROMol *in_mol, int radius, bool rings, bool kekulize) {
std::vectorstd::string shingling;
if (rings){
PATH_TYPE bonds;
RDKit::VECT_INT_VECT molrings;
RDKit::MolOps::symmetrizeSSSR(*in_mol, molrings);
for (const auto molring : molrings) {
for (const auto index1: molring) {
//std::cout << "index1 : "<< index1 << std::endl;
for (const auto index2: molring) {
//std::cout << "index2 : "<< index2 << std::endl;
if(index2!=index1) {
const Bond *bnd = in_mol->getBondBetweenAtoms(index1, index2);
if (bnd) {
bool result = !std::any_of(bonds.begin(),bonds.end(),compare(bnd->getIdx()));
if (result) {
bonds.push_back(bnd->getIdx());
}
}
}
}
}
}
	// by default canonical MolToSmiles
	RDKit::ROMol *submol = Subgraphs::pathToSubmol(*in_mol, bonds);
	std::string subsmi = RDKit::MolToSmiles(*submol);
    shingling.push_back(subsmi);
}

PATH_TYPE p;
std::string smiles;
for (int index = 0; index < in_mol->getNumAtoms(); index++){
  for (int i = 1; i < radius + 1;  i++){
  	p = RDKit::findAtomEnvironmentOfRadiusN(*in_mol, i, index);
    INT_MAP_INT amap; // map
    ROMol *submol = Subgraphs::pathToSubmol(*in_mol, p, false, amap);
    // check if the atomindex match the current index value!
    if (amap.count(index) > 0){
        smiles = RDKit::MolToSmiles(*submol, true, false, amap[index], true);
        if (!smiles.empty()){
           shingling.push_back(smiles);
        }
    }
  }
}
// remove duplicates then!
sort (shingling.begin(), shingling.end());
shingling.erase(std::unique(shingling.begin(), shingling.end()), shingling.end());
return shingling;

}
std::vector<uint32_t> from_molecular_shingling(std::vectorstd::string token, distrib dab, int FPsize){
// set the hash_values
std::vector<uint32_t> hash_values;
for (int i=0;i<FPsize;i++){
	hash_values.push_back(dab.max_hash);
}
// generate hashes
for(const auto res : token){
	boost::uuids::detail::sha1 sha1;
    unsigned int hash[5];
    sha1.process_bytes(res.c_str(), sizeof(res.c_str())-1);
    sha1.get_digest(hash);
    uint32_t t_h = hash[0];

	//SHA1 checksum;
	//checksum.update(res);
	//uint32_t t_h = checksum.Hash(); // not same as in python
    std::cout << "t_h : "<< t_h << std::endl;

	for (int j=0;j<FPsize;j++){
		hash_values[j] = fmin( hash_values[j] , remainder( remainder( dab.da[j] * t_h + dab.db[j], dab.prime) , dab.max_hash) );
	}
}
return hash_values;

}
int main()
{
int FPsize = 2048;
distrib dab = generatordistrib(42, FPsize);
//std::cout << dab.da.size()<< ", " << dab.db.size()<< std::endl ;
std::cout << "prime : "<< dab.prime << std::endl;
std::cout << "maxhash : "<< dab.max_hash << std::endl;
RDKit::ROMol *mol1 = RDKit::SmilesToMol("c1ccccc1");

std::vector<std::string> res = shingling_from_mol(mol1, 3, true, true);

std::vector<uint32_t> hash_values = from_molecular_shingling(res, dab, FPsize);
for (int i=0;i<FPsize;i++){
	std::cout <<  hash_values[i]  << ",";
}

std::cout << std::endl;

}

Hi @daenuprobst, I know you're probably super busy with other things (potentially still working on finishing the thesis/defense?), but I wanted to just let you know: we will do the feature freeze for the 2020.03 release next Monday (the 23rd). If this is going to make that release, it would be good if we were done with this PR by the end of this week.

Thanks for the info, I will be done by tomorrow.

Thanks for the contribution @daenuprobst !


Pin pandas to 2.2.1 for a single release

We will remove the hard pin in a subsequent release.

pandas was pinned and unpinned in 0.28.1 and 0.28.2, respectively, so closing.


[feature] Stretched graphs

This PR implements the functionality to build stretched graphs only in an area of interest (AOI).
This includes:

The aoi_mask_builder objects is renamed to area_mask_builder.
A new node builder, StretchedTriNodes, which allows to create a stretched graph.
Expanding the MultiScaleEdges functionalities to support multi-scale connections in stretched graphs.

Checklist before requesting a review

[x] I have performed a self-review of my code
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have updated the documentation and docstrings to reflect the changes
[ ] I have added tests that prove my fix is effective or that my feature works
[x] I have ensured that the code is still pip-installable after the changes and runs
[ ] I have ran this on single GPU
[ ] I have ran this on multi-GPU or multi-node

Issue ticket number and link
Issues #8
This work would not have been possible without @theissenhelen  and @JesperDramsch and the rest of the AIFS team! Thanks also to Magnus, Håvard and the MetNorway team for their contributions to this PR.

📚 Documentation preview 📚: https://anemoi-graphs--51.org.readthedocs.build/en/51/

Overall this looks really good, and we're pretty much able to reproduce the stretched grid graphs from the old graphgen in aifs-mono. I do have two suggestions:

Add a keyword argument min_distance_km to CutOutZarrDatasetNodes so this can be set in the config (Or add functionality for passing any kwargs to CutOutZarrDatasetNodes through the config).
Change how edge_length.invert works:

Currently the edge length normalization looks weird when used with invert; in the encoder / decoder I get edgelengths between [0.96,1] and in the processor some of them have negative edge weight. I'm guessing this happens because edgelengths are inverted before the call to super().post_process(values) in EdgeLenght.post_process().
Change the default value of invert to be True, giving shorter edges higher weight by default.

Thanks for taking the time to review the PR.

The CutOutZarrDatasetNodes will be refactored to receive a dict-like argument dataset directly from the configuration file. This change will be merged in #52 .
We left invert=False as the default because we didn't see any difference (in performance). Regarding the difference between encoder/decoder and processor edge lengths, do you use the same norm in both cases? Would you expect to invert after normalisation?

The issue should now be resolved. Invert is applied after normalization, and a new method called "unit-range" has been introduced to map values to the [0, 1] interval, as "unit-max" only scales by dividing by the maximum.

Great! The edge lengths with invert and unit max now look like what I would expect.


[Lint] Reintroduce rule identifier_name & fix warnings

Description
This is the third follow-up smaller PR to https://github.com/corona-warn-app/cwa-app-ios/pull/104. Together with the other PRs I will be posting, all SwiftLint warnings should be fixed to allow us to enable the --strict mode of SwiftLint on the CI to prevent any new warnings getting merged in the future.
In this specific PR, I've turned on the identifier_name rule which is enabled by default in SwiftLint for a reason (and was turned off for some reason) and the many cases where it was violated show really nicely why the rule is a good rule that should be kept turned on. Many variables were not really speaking and too short, this rule will prevent that in the future.
I've added a few exceptions for the common 2-character English words in development within the configuration (like id and db) but the many appearances of vc, nc, i and other too short and not very concise names were fixed.
Note also that I fixed variable names where for example keys was used for an Optional and _keys for the strong typed variable. I used speaking names in such cases like keysOptional and keys, removing the need for the leading underscore, which is not very Swifty (more Obj-C like).
Related PRs
https://github.com/corona-warn-app/cwa-app-ios/pull/516, https://github.com/corona-warn-app/cwa-app-ios/pull/518, https://github.com/corona-warn-app/cwa-app-ios/pull/527, https://github.com/corona-warn-app/cwa-app-ios/pull/531, https://github.com/corona-warn-app/cwa-app-ios/pull/534.
Note that all these PRs are completely independent and can be merged in any order.

Thank you very much for this PR. I will put this on hold for the next couple of days because we are in a critical phase in the project at the moment. I hope you understand. We will come back to you once this phase is over.

@inf2381 Why was this closed? Could you please give an explanation instead of just closing it? Thank you.


No matching version found for<EMAIL_ADDRESS>

Summary
When running npm install in my project folder, I encounter the following error:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for<EMAIL_ADDRESS>npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
When I go to the npm site for prettier-plugin-apex, the latest version there is 1.10.0.
Steps To Reproduce:
Repository to reproduce: dreamhouse-lwc
NOTE: If your issue is not reproducable by dreamhouse-lwc, i.e. requires specific metadata or files, we require a link to a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem.

Open the project in VS Code.
Run npm install in the terminal.
Installer runs, then errors out with the above message

Expected result
The process should have completed without an error.
Actual result
The above mentioned error occurred.
System Information
{
"cliVersion": "sfdx-cli/7.127.0",
"architecture": "win32-x64",
"nodeVersion": "node-v16.13.0",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.2.3 (core)",
"@oclif/plugin-not-found 1.2.4 (core)",
"@oclif/plugin-plugins 1.10.1 (core)",
"@oclif/plugin-update 1.5.0 (core)",
"@oclif/plugin-warn-if-update-available 1.7.0 (core)",
"@oclif/plugin-which 1.0.3 (core)",
"@salesforce/sfdx-diff 0.0.6",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"alias 1.1.22 (core)",
"apex 0.3.0 (core)",
"auth 1.7.5 (core)",
"config 1.2.47 (core)",
"custom-metadata 1.0.12 (core)",
"data 0.6.4 (core)",
"generator 1.2.1 (core)",
"limits 1.2.3 (core)",
"org 1.9.0 (core)",
"salesforce-alm 53.4.2 (core)",
"schema 1.0.10 (core)",
"sfdmu 4.10.2",
"sfdx-cli 7.127.0 (core)",
"source 1.4.0 (core)",
"telemetry 1.2.8 (core)",
"templates 52.6.0 (core)",
"trust 1.0.10 (core)",
"user 1.5.2 (core)"
],
"osVersion": "Windows_NT 10.0.18363"
}
Additional information
_Feel free to attach a screenshot
2021-11-18T21_52_46_951Z-debug.log
_

I am also getting same issue.

@carlthress @abhishekalekar  1.1.10 will work fine

How do I get the command npm update to look for 1.1.10 instead of 1.1.11? I'm literally just typing two words in to the command line. npm is doing the rest. Is there a file/script somewhere I can edit?

@carlthress you can edit the package.json file to change the line "prettier-plugin-apex": "^1.10.1" to "prettier-plugin-apex": "^1.10.0"

@carlthress can u please give me complete solution/command for this. I am facing same issue with the same trailhead.

@Nik6204 - follow the advice given by @Hrafven. Edit the prettier version number in the package.json file for your project.

@carlthress you can edit the package.json file to change the line "prettier-plugin-apex": "^1.10.1" to "prettier-plugin-apex": "^1.10.0"

please check @Hrafven whether God's post is available!? your solution worked like a charm!


How could you convert pytorch model to keras

@harish2704 I can not convert pytorch lstmcell to keras, Could you please provide some help?
Here is pytorch lstmcell,
self.att_lstm = nn.LSTMCell(1536,512)
h_att, c_att = self.att_lstm(att_lstm_input, (state[0][0], state[1][0]))
state[0][0], state[1][0] is the tensor(2, 512)

@shuguohe  Pytorch => Keras conversion was done manually using hand-crafted python script.
This script you can see @ https://github.com/harish2704/pottan-ocr/blob/master/tools/torch_to_keras.py
As you can see, it is written specifically for this project, but you can see many reusable functions in that file.
The basic logic behind the conversion is this https://github.com/harish2704/pottan-ocr/blob/c698f40b71bc9e0288205d65b7a5421120c03025/tools/torch_to_keras.py#L68
You can also see my SF question and its answer @ https://stackoverflow.com/questions/48361376/converting-state-parameters-of-pytorch-lstm-to-keras-lstm

@harish2704 not sure if you have the email address, I am not familiar with pytorch and keras, if I have some questions, maybe I can ask you. Thanks.

@harish2704 Get another issue when trying to do predict, File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 76, in _standardize_input_data
data = [np.expand_dims(x, 1) if x is not None and x.ndim == 1 else x for x in data]
AttributeError: 'Tensor' object has no attribute 'ndim'

I would suggest to use python3 for the development of this project


eval-config.nix: set nixpkgs.pkgs instead of _module.args.pkgs

This allows nixpkgs.overlays to work, and also the nixpkgs.config check.
Description of changes

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, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.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

[x] Fits CONTRIBUTING.md.

Works on my system. Maybe we should deprecate that pkgs argument entirely and suggest setting config.nixpkgs.pkgs (possibly with a deprecation period during which a warning is shown).

Works with my weird config.

The withExtraArgs stuff still works fine for me, though I'm not super convinced we should be propagating pkgs like that - it's probably a better idea to (eventually) plumb the final pkgs to toplevel.config.pkgs or whatever and then make toplevel.pkgs an alias for that.

not super convinced we should be propagating pkgs like that

pkgs is there for convenience and historical reasons (I guess we could call it that). I don't think having it is all that problematic, albeit unnecessary.
I would think that the main benefit is that you get a pkgs in your nix repl <nixpkgs/nixos>.

pkgs is there for convenience and historical reasons (I guess we could call it that). I don't think having it is all that problematic, albeit unnecessary.

The problem with that is, it doesn't have to actually be the same pkgs your system is built from.

Not super happy about changing the behavior, but considering the nixpkgs.config checks works better after this, I'm confident that it's an improvement.

I'd actually argue that changing this behavior is a good thing, even though it's unfortunately very subtle. We should really try to make things more consistent around how NixOS configurations are created.


Release v2.6.1

Pull Request Test Coverage Report for Build 716

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 93.671%

Totals

Change from base Build 692:
0.0%

Covered Lines:
102

Relevant Lines:
103

💛  - Coveralls


resilience4j 1.7.1 breaking build

as a temp fix downgraded
<version.resilience4j>1.7.0</version.resilience4j>

This was fixed as part of https://github.com/knowm/XChange/pull/4145

cool


Infinite recursion when setting parent in childTypes

Hello
To make myself clear look at the following example
class User extends Model
{
    use \Parental\HasChildren;
    protected $childTypes = [
        'admin' => App\Admin::class,
        'guest' => App\Guest::class,
        'simple' => App\User::class, // parent as child
    ];
}

At this line
src/HasChildren.php(22): $childClass::registerModelEvent($event, $callback);
an infinite recursion occurs because the parent is added to the child types.
I was already using this configuration with the previous tightenco/parental and now I moved to this package.
You can fix this by adding a check right above that line so the function will look like this
protected static function registerModelEvent($event, $callback)
    {
        parent::registerModelEvent($event, $callback);

        if (static::class === self::class && property_exists(self::class, 'childTypes')) {
            // We don't want to register the callbacks that happen in the boot method of the parent, as they'll be called
            // from the child's boot method as well.
            if (! self::parentIsBooting()) {
                foreach ((new self)->childTypes as $childClass) {
                    if ($childClass == self::class) // checking for self-inheritance
                        continue;
                    $childClass::registerModelEvent($event, $callback);
                }
            }
        }
    }

Are you going to add a fix like this in the next version?
Do you think there are any other problems with self inheritance?
Thank you for you time

It seems this has already been reported  and already fixed.
Sorry for reposting.


player height: Using currentReferenceSpace instead of currentReferenceSpaceType

The component seems to be using the wrong variable to check for the reference space type, like here:
    onXRSessionStart() {
        if (!['local', 'viewer'].includes(this.engine.xr.currentReferenceSpace)) {
            this.object.resetTranslationRotation();
        }
    }

instead of currentReferenceSpace it should be currentReferenceSpaceType

Fixed with #39


429 error when login

Hello,
My team is working on an app based on TDlib from different places (IPs). Sometimes during testing 429 error occurres after many login attempts and it is required to wait for a day to make that error gone. Because every new login for any telegram account in that case brings up error and counter always is 86400:
Error {
code = 429
message = "Too Many Requests: retry after 86400"
}
Could you please provide any help on how to avoid this? Maybe there are limits or we're testing application in non-production mode? I'm just curious because if launch the same application from other IPs this error is not displayed. And besides, if accounts that already got logged in, still can call other methods (like send message) without any errors while others cannot login.
Thanks in advance.
UPD:
Could it be caused by the fact that before we had many errors like this during login:
Error {
code = 401
message = "Initialization parameters are needed: call setTdlibParameters first"
}
Or due to we had many "PHONE_CODE_INVALID"
?
The main issue here is that not only one user cannot login, but any from the same IP.

It happens because you had to much "PHONE_CODE_INVALID" errors, which was taken as a try to brute-force authorization code. There is no way to avoid the error 429, except waiting. In the meanwhile you can use test DC to test authorization.

@levlam , thanks
So it is ok in this case that we cannot authorize even from other accounts that didn't get PHONE_CODE_INVALID errors?

Yes, it is expected.


Publish to NPM

Hey guys,
Great framework. Do you think you can publish to NPM also? I know you guys do bower, but if I am going to use materialize, then I'd have to install bower just for this.
Thank you

:+1:

would be great indeed

+1 I'm looking for this as well.

https://www.npmjs.com/package/materialize-css


docs(examples): typo in EXAMPLES.md

What: Fixing a typo spilling
Why: Better documentation
How: By updating the Examples.md
That's the beginning kent :wink:

Codecov Report

Merging #114 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #114   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          10     10
  Lines         286    286
=====================================
  Hits          286    286

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 33457ad...161c8a9. Read the comment docs.

@kentcdodds Added my self to the contributes

Thanks!


Create a text icon rear button rounded

One need to make this component using HTML and Tailwind CSS. I would suggest to use Tailwind Playgrounds to make things faster and quicker.
Here is a reference to the component.
You need to follow the design system of the button ➡ Button Design system
Make the rounded version of this Primary Button Text Rear
After building the component please raise a PR with a screenshot of the component and add the component in Button/src/Primary/text-icon-rear-button-rounded.html.
If you need to use any icon please use it from Hero Icons
Good luck.

assign this to me @Rajdip019

Sure go ahead. @itz-deepak

I have made the rounded version
Is it good

It looks awesome. @itz-deepak


Non-whitespace before first tag error

We're calling discover the following way where this._wemo is the wemo client instance without any specific options:
this._wemo.discover((error, deviceInfo) => {
   ...
});

From time to time, not always, according to our logs, this has the error parameter set with the error:
Non-whitespace before first tag

This seems to come from xml2js:
https://github.com/Leonidas-from-XIV/node-xml2js/issues/345
https://github.com/Leonidas-from-XIV/node-xml2js/issues/390
Unfortunately I can't reproduce this reliably so I can't really debug it.

Maybe https://www.screenaware.com/en/blog/xml2js-sax-js-non-whitespace-before-first-tag (found it in the node-xml2js) is a work around?

I honestly can't say, @neophob what do you think?

wondering if it would help to trim some values beforehand somewhere...


Attempt cleaning up code formatting

Currently, the code sets off multiple warnings, even with a conservative pylint configuration. This is understandable, because code formatting is annoying. black automatically does code-formatting for you.

I've done everything I wanted to do to clean up the code. You can now run black and submit a PR.


Display patent information for every chef-server-ctl command

Signed-off-by: Prajakta Purohit<EMAIL_ADDRESS>Description
[root@api vagrant]# chef-server-ctl status

Patents: https://www.chef.io/patents

run: bookshelf: (pid 4593) 18102s; run: log: (pid 30259) 18237s
run: nginx: (pid 4531) 18105s; run: log: (pid 31192) 18161s
run: oc_bifrost: (pid 4412) 18106s; run: log: (pid 29910) 18267s
run: oc_id: (pid 4528) 18105s; run: log: (pid 29934) 18257s
run: opscode-erchef: (pid 4615) 18102s; run: log: (pid 30442) 18231s
run: opscode-expander: (pid 4589) 18102s; run: log: (pid 30095) 18243s
run: opscode-solr4: (pid 4562) 18103s; run: log: (pid 30015) 18249s
run: postgresql: (pid 4389) 18106s; run: log: (pid 29389) 18279s
run: rabbitmq: (pid 5576) 18079s; run: log: (pid 31489) 18155s
run: redis_lb: (pid 4362) 18107s; run: log: (pid 4361) 18107s

[vagrant@api ~]$ chef-server-ctl status

Patents: https://www.chef.io/patents

This command must be run as root

Is it a requirement that it be added to every command?  Could we add it to help, version, and reconfigure only?  This would make it more similar to what chef-client is doing:
https://github.com/chef/chef/pull/10400/

Just help, version, etc. would be fine. The only requirement is that it is displayed somewhere.

These changes would work for the omnibus builds - Need to check for the hab builds in automate.


Fix cost_estimate.py

Fixes several bugs to get cost_estimate.py working again.  Bugs include:
python scripts/cost_estimate.py
...
  File "/data/steven_test/workspace/lm-evaluation-harness/scripts/cost_estimate.py", line 91, in main
    task_dict={taskname: tasks.get_task(taskname)()},
AttributeError: module 'lm_eval.tasks' has no attribute 'get_task'

Traceback (most recent call last):
...
  File "/data/steven_test/workspace/lm-evaluation-harness/lm_eval/utils.py", line 288, in _wrapper
    return fn(*args, **kwargs)
TypeError: simple_evaluate() got an unexpected keyword argument 'lm'

Traceback (most recent call last):
...
  File "/data/steven_test/workspace/lm-evaluation-harness/lm_eval/utils.py", line 288, in _wrapper
    return fn(*args, **kwargs)
TypeError: simple_evaluate() got an unexpected keyword argument 'task_dict'

  File "/data/steven_test/workspace/lm-evaluation-harness/scripts/cost_estimate.py", line 24, in loglikelihood
    for ctx, cont in requests:
TypeError: cannot unpack non-iterable Instance object

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@xksteven @haileyschoelkopf @lintangsutawika I wonder whether lm-eval can usefully provide this costing functionality.

Models do not all use the same tokenizer. OpenAI models use the tiktoken library, for Claude 3, Anthropic has not yet publicly provided a tokenization libarary, Cohere uses it's own etc.
Pricing information is frequently updated. Till date it's been a downward revision so that may be less of a problem (unless it stops someone from running an eval :)) Amusingly, the cost associated with the models reported by the cost estimator are double or three times the final cost at the time of their deprecation.
Even from the same organization, every model has a slightly different cost structure. For example LangChain has to manage this just for Open AI.

Perhaps it may be better to consider this functionality as a token count estimator (rather than a token cost estimator) and users could use it to determine their cost from the current pricing of the model they intend to use. Yes, this still runs up against point 1, but still as an estimate it may be useful.

@sepiatone  I am not sure I have enough time to make a proper abstraction from this into what you're suggesting.
I wanted the base code to work to then be able to edit the model pricing myself to get an estimate of the cost. After doing that I made the PR to just get the previous code working again. I'm happy to have someone else take over to convert it into a general cost estimator for running different models.
Also add a personal preference I like small PRs as they're easier to review.
As an aside once the code is working it's not difficult to swap out the pricing or the tokenizer either to whatever custom one you'd like.

@sepiatone I am not sure I have enough time to make a proper abstraction from this into what you're suggesting.

Perhaps I should've been clearer - I'm not suggesting anything specific with this PR other than what has already been done. What is being done in this PR is required whatever further direction is taken.

Perhaps it's better to take this discussion (having a token count estimator) to a separate issue.

@xksteven @sepiatone At the time we wrote this code, there was just the OpenAI ada/babbage/currie/devinci APIs and computing the costs was quite easy. Now this is a much bigger lift and I think that it would probably make sense to delete it. Maybe we can add a warning somewhere that says "this might be really expensive, enter y if you are sure you want to do it" whenever someone runs a sufficiently large eval task.


Call to action component that allows editors to place images (jpg/png/svg) as buttons

Acceptance criteria

Look into creating a unique PODCAST component (list) similar to the SOME component in the footer.
Options to add multiple links, and display reflects sketch in terms pf placement
Limit width on all displays
How to resolve spacing/padding top and bottom to correctly place with other components (particularly text component)
All call to action options should be available to editor (Internal / external / anchor link)
Alt text on image to ensure accessibility

https://www.apple.com/itunes/marketing-on-podcasts/identity-guidelines.html#listen-on-apple-podcasts-badge

won't be needed anymore


FIND LOCATION ID EXAMPLE USING FB AND FOURSQUARE

Hello Steven!
Do you have a sample for how to get the locationid using FACEBOOK_PLACES_ID and FOURSQUARE_V2_ID with the Instagram API? Issue #48 only shows how to get it by geographic coordinates.
Thanks, Alberto Zayas

Hey @albertozayas! I actually don't have a sample on hand, sorry about that.
I bet if you post your question to StackOverflow you'll get some good help though!


Extra >> << chars appear in highlight.

In my emailer, I have a recipient name variable in the A column named something like MOE and the B column is 某某 Moe Mou
However when that user gets an email, the HTML produced by this is like this:
某某>> <<Moe Mou
Which is rendered as this in Gmail:
某某>> <<Moe Mou
This could also be related to the column B being a lookup into a different sheet.  But I think the API is returning the calculated value.
=INDEX(Recipients!$B49, 1, 1)
Just mentioning that in case that's the issue.

Hmm... you are correct in that the api is currently returning the formatted/calculated value: https://github.com/WhiteHalmos/emailer/blob/master/emailer/fetcher.py#L11
It could be because the generated markdown is: <<某某>> <<Moe Mou>> and the regex is greedy: https://github.com/WhiteHalmos/emailer/blob/master/emailer/markdown.py#L16
The reason I didn't exclude < or > in the character class is to allow those characters to be in a highlight group too. One way to fix this is to figure out if both names are being highlighted switch highlighting to both, i.e. cause generated markdown to be <<某某 Moe Mou>>.

Oh so, probably because I have two names:
MM, Moe Mou
MOE, 某某 Moe Mou
I’ll try getting rid of the first one.
On Sat, Nov 3, 2018 at 3:29 AM Peter Wen<EMAIL_ADDRESS>wrote:

Hmm... you are correct in that the api is currently returning the
formatted/calculated value:
https://github.com/WhiteHalmos/emailer/blob/master/emailer/fetcher.py#L11
It could be because the generated markdown is: <<某某>> <> and the
regex is greedy:
https://github.com/WhiteHalmos/emailer/blob/master/emailer/markdown.py#L16
The reason I didn't exclude < or > in the character class is to allow
those characters to be in a highlight group too. One way to fix this is to
figure out if both names are being highlighted switch highlighting to both,
i.e. cause generated markdown to be <<某某 Moe Mou>>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/WhiteHalmos/emailer/issues/19#issuecomment-435576982,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAI6EkWJ8rZeXBZP3GFnvXAD3eByWNPZks5urW_sgaJpZM4YMmok
.

I just confirmed it is because I have two name shortcuts.  Nice catch!


Integrate with gotrue-go

Feature request
Integrate this supabase-go client with gotrue-go so that it can function more like an actual client. I plan on working on doing this and working towards adding feature parity with the supabase-js client.
Is your feature request related to a problem? Please describe.
This client is not yet finished. I am going to push it towards being finished because I am bored.
Describe the solution you'd like
I'll have to do some trial and error but for the most part I plan on making the api as similar to supabase-js as makes sense. Go is a very different language.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Any time frame on this?

Ah, I have integrated into my own internal package for now so thanks. Seems this and the postgrest-go repos aren't updated regularly which is a shame.

I've tested with the newest version; it is already integrated with GoTrue. Thank @elijahmorg, I close this issue first.


Euchre: Trump higher on 1st trick when going alone if possible

Euchre. Bot is going alone, but plays 2nd. Turns out he held RAKT, A.
Lead is next, and bot is void. Bot must play his K because a void in next is likely by other defender. If the L is protected, it doesn't matter. If it's not, the bot doesn't need RAK to take Q9.

Bot in 2nd chair goes alone, holding RLAKT. This player MUST use one of the K+ to trump the first trick because the T risks an overtrump from the Q. Fortunately, this didn't happen, but missing only 2 trump, it has to be played to guarantee taking all 5.


Custom cursor

This isn't finished yet (at the very least, the windows implementation needs testing and error handling), but I'm posting it here because I have a question: the lowest-common-denominator across platforms seems to be that we can create cursors from bitmaps in memory, so it would be really handy to have support for that in druid-shell. I've put in ImageBuf as a placeholder, but there's a ton of overlap with druid::widgets::ImageData, but I didn't want to move ImageData into druid-shell because that would entail fiddling with the "image" feature. So my questions are:

would it make sense for piet to have some kind of bitmap type?
if so, where would image loading live? Also in piet?

cool, this is definitely something on my radar, so happy to have someone else interested too.
My feeling is that this needs to be a per-platform thing in druid-shell, and shouldn't really concern piet. I think cursors are going to have to be resource files that are provided per-platform; at launch time you would load these in druid, and then you could reference them by some sort of name or id when you wanted to set the cursor.
This per-platform resource thing is something (like application icons) that we haven't really tackled, yet, and so I'm just expressing my current best-guess for how this should work.
I've skimmed this patch and it doesn't seem unreasonable, but my gut is still that cursor data should be opaque;  It may be that different platforms have different conventions around cursor size, or how you indicate a cursor's hit-position relative to the image resource, etc etc. I'll give this some more thought, though!

I looked at winit to see if they have this functionality (I think we should always try to learn from them), but it seems like they pretty much only have an enum of standard variants for now, though there is an issue to add custom cursors. Might be worth taking a closer look at that to see how they're thinking about it (again, I didn't dig in).
Getting this really clean cross-platform might be challenging, especially because it's an area where the design of the cursor maybe should be platform-specific, but yes, it seems like useful functionality within the intended scope of druid-shell. I also have no problem with this moving forward.

Regarding the cross-platform possibilities, I found the following information (mostly by googling and looking at API docs, which I didn't find particularly discoverable so I probably missed some things).

On windows, the main ways to load a cursor seem to be LoadImage, which loads a file from disk or a resource from the exe, and CreateIconIndirect, which can create a cursor from an in-memory bitmap. I couldn't find any authoritative documentation regarding the formats that LoadImage supports. There's also LoadCursor, but it's apparently superceded by LoadImage, and LoadCursorFromFile, which can load from a file but not from an exe resouce. At least that one documents the supported formats: .ani or .cur. Oh, and there's CreateCursor for creating cursors from in-memory data, but I think that one can't do color.
On mac, NSCursor can be constructed from an NSImage, which seems to be a flexible representation of in-memory images. It supports, for example, loading file from disk in a number of different formats. You can also convert an in-memory bitmap to an NSImage.
On linux, the underlying mechanism in X11 converts X pixmaps to cursors. GTK adds some convenience functions for making cursors from cairo surfaces or gdk pixbufs (which supports loading images in various formats).
Web seems to just support loading a cursor from a url? I have no idea how to package that up nicely in a wasm thing...

Leaving aside web for now, we basically seem to have a choice between 1) use platform-specific code to load image files and/or resources into a cursor, or 2) use platform-independent code to load image files into a buffer and then use platform-specific functionality to turn those buffers into a cursor. I went for 2 in this PR, partly because we already have some code for loading image files into a buffer and partly because 1 has the disadvantage of introducing extra platform-dependent packaging steps (i.e. turning say, a png cursor into a .cur on Windows).

I had a quick look at the winit PR.

They have a "pixel buffer" type, but it only supports ARGB (whereas the one in this PR supports multiple formats)
They expose a cross-platform API for turning pixel buffers into cursors (and window icons, too)
On windows, they expose an API for loading cursors from resources or files.
Windows cursors automatically resize themselves sometimes. I don't know the best way to expose this (and it isn't fully implemented in the winit PR)

Sorry to let this sit. Your summary sounds accurate to me, and I think you describe the possible implementation approaches well. My gut prefers doing platform-specific stuff, but that would be blocked on resource bundles, so I'm okay with the other approach for the time being?
I'm not sure if we could use the piet::Image type to store our buffer, but that would be a nice advantage if we could. Otherwise I'm fine with adding some generic buffer type to druid to handle this, and we can consider moving it to piet in the future?

Ok, I think this is ready for another look. I couldn't use RenderContext::Image because it doesn't have an easy way to extract the pixel data. Also, I'm still not sure what's the right place for ImageBuf and the image loading code, but I have them in their own modules now, so they should be easy to move later.

Ok, I think this addresses the druid comments. I'll make a separate piet pr.
I'll let this sit until at least tomorrow in case of further comments, and then if I haven't heard any objections I'll merge.


Bug: StaticRoute returning old file contents

I am running aiohttp in an Ubuntu Docker container within a Vagrant (VirtualBox) CentOS 7 VM within Windows 8.1. The static files are served from a mounted directory in the CentOS VM, which is again a synced folder to a Windows directory.
This setup causes old file contents to be served even though the date-modified and content-length headers are correct.
The immediate fix is not to use add_static on the router, but do this:
static_route = web_urldispatcher.StaticRoute(None, '/static/', '/home/web/static/')
static_route._sendfile = static_route._sendfile_fallback
app.router.register_route(static_route)

Bug is present in v0.18.3, but I'm not sure which part of my setup is to blame.

I suspect you've caught filesystem desynchronization  effect between Docker, Vagrant and Windows.
After tiny delay you are able to get required file content, isn't it?
P.S. You software stack is not looking production ready :)

If you're talking about a delay of ~20mins, you might be right. I got the files to refresh once, but when it happened again, I investigated further.
This is obviously for development :). I would not use aiohttp to serve static files in production. And that makes it an even more important bug, because files while developing change so frequently.

Sounds bad.
Well, we can add an option for switching off sendfile capacity even if it's available.
I cannot reproduce the issue on Linux box BTW

Mhhh...this is an odd bug.
So @imbusy, after you cat the file, does aiohttp starting serve the new content?

@jashandeep-sohi , no, it still serves the old file.

My guess what's happening: after saving a file, a new file may be created, but the old file handle still kept open by some process. When requesting the file handle ID, the old file handle ID is returned and the old file contents are served. This is just a guess, BTW.

That's what I was thinking too, but I don't think Python caches the file object returned by open("/path/file.dat", "rb") (or the file handle referenced by that object). aiohttp creates a brand new file object & thus a new file handle on every request, so I don't quite understand how it might be holding on to the old handle.
But it seems the problem even affects ningx, so aiohttp is not alone:
https://github.com/fideloper/docker-nginx-php/issues/17

@asvetlov I propose StaticRoute should fallback to sendfile_fallback if environment variable AIOHTTP_SENDFILE" is set & equal to 0`.

It cannot be aiohttp or python issue because the code always open new file
descriptor by given filename on every file transfer.
Thus we have 2 options:

Leave the issue as wontfix
Support downgrading to not using sendfile even it is available, add to
doc a cryptic message like "If you use docker on windows the option may
help you somehow, forgot about the option otherwise".

On Mon, Nov 9, 2015, 13:12 Jashandeep Sohi<EMAIL_ADDRESS>wrote:

That's what I was thinking too, but I don't think Python caches the file
object returned by open("/path/file.dat", "rb") (or the file handle
referenced by that object). aiohttp creates a brand new file object &
thus a new file handle on every request, so I don't quite understand how it
might be holding on to the old handle.
But it seems the problem even affects ningx, so aiohttp is not alone:
fideloper/docker-nginx-php#17
https://github.com/fideloper/docker-nginx-php/issues/17
—
Reply to this email directly or view it on GitHub
https://github.com/KeepSafe/aiohttp/issues/628#issuecomment-154930667.

--
Thanks,
Andrew Svetlov

Environment variable sounds good but I'm inclined to AIOHTTP_NOSENDFILE=x

Yea, that's better.

@jashandeep-sohi would you provide a patch?

@asvetlov Yea, tomorrow.
BTW, apparently this is a well known bug for VirtualBox, with the recommended "fix" being "turning off sendfile". I wouldn't call that "fix".
https://www.virtualbox.org/ticket/12597
https://www.virtualbox.org/ticket/9069

Yes, it's not a fix but workaround for virtualbox bug
On Mon, Nov 9, 2015, 13:41 Jashandeep Sohi<EMAIL_ADDRESS>wrote:

@asvetlov https://github.com/asvetlov Yea, tomorrow.
BTW, apparently this is a well known bug for VirtualBox, with the
recommended "fix" being "turning off sendfile". I wouldn't call that "fix".
https://www.virtualbox.org/ticket/12597
https://www.virtualbox.org/ticket/9069
—
Reply to this email directly or view it on GitHub
https://github.com/KeepSafe/aiohttp/issues/628#issuecomment-154938987.

--
Thanks,
Andrew Svetlov

If I have voting rights, I'd go for AIOHTTP

Sorry, I was on mobile and clicked something accidentally. Not sure how to delete comments.

Fixed by #629


Windows: Support loading WIM images

Windows base layers are distributed by Microsoft in the WIM file format.
This change allows Docker to read them natively so that it can load
Windows base layers directly.
To preserve tar as the format of choice throughout Docker, this change
works by converting WIM files to tar streams on demand.
Currently this blocks docker save and docker push for images that use a
Docker-managed Windows base layer. This is because there is no equivalent
to tar-split for WIMs. Fixing this would probably require storing the WIM
separately.
This also adds a small tool that takes a WIM and produces a tar file
suitable for passing to docker load. This is currently the only way to
ingest WIM files.
Signed-off-by: John Starks<EMAIL_ADDRESS>@aaronlehmann I think this, combined with an ability of images to reference layers by URL, will allow us to support docker pull of Windows base images. Does this match what you were thinking? Any progress on the "foreign" layer support?
cc/@jhowardmsft

/cc @dmp42

Nice! Minor comments.

Being able to load/pull and not save/push an image later is quite breaking to the current docker ux. If this is only for the technical reasons then I think we should find a workaround(probably store wim on disk). If it also has some legal issues then it's more complicated.
@aaronlehmann Maybe the format detection would make more sense on the layerstore level? The ReaderAt could be replaced with Peek().

I agree that I'd like to see a plan for how to support pushing base layers. Since the WIM is converted to a tar internally, I wonder if it's possible to store tar-split metadata for this converted tar, and then preserve the ability to push the base layer in tar format. This would also involve hashing the tar stream to determine a layer ID instead of hashing the WIM directly. But I don't know if the converted tar is somehow machine-specific.
As for legal issues, my recollection from the last time we talked about this is that it should be okay to provide the capability to push base layers, as long as we are careful about UI and make it difficult to do accidentally (i.e. don't push bsae layers by default, and add an appropriate set of flags/prompts to make sure the user really wants to push the base layer and is aware of the copyright implications). I think it is important to preserve the technical ability to push or export a base layer even if the typical use case won't involve doing it.
I haven't had a chance to work on "foreign" layer support. I imagine the way this would work is that Docker associates with each base layer the URL where it can be publicly downloaded, and the cryptographic hash of the file at that URL. Then, when it creates a manifest for an image and doesn't actually push the base layer as part of it, it includes that source URL and the hash instead of referencing a blob that's local to the registry. Is that what you have in mind?

The converted tar is not machine-specific, so that tar (or its tar-split + contents) could be used as a base layer on any machine. The trouble is that the construction of this tar may not be byte-for-byte deterministic, since future changes to the tar package or wim package may result in semantically equivalent but different tar streams. So if I understand the content addressability requirements, this will be problematic -- the layer ID would be different on different machines if the machine got the layer purely in WIM format.
I guess in theory we could support a model where the public repository distributes just the tar-split portion but not the file contents, and provides the URL of the WIM to use to get the contents. This would mean that when a new WIM is available, we (Microsoft) would sideload the WIM in some way locally and then push it to the public repo, which would push just the tar-split and the WIM URL. If a user wanted to push to a private repo for an air-gapped scenario, perhaps we could allow them to push a full tar and not just the tar-split data.
I'm not sure if this meets the legal requirements. @taylorb-microsoft FYI.

@tonistiigi WIM files cannot be streamed -- they are inherently a random access format. So even though Peek() could be used to detect a WIM, it can't be used to read a WIM. We need ReaderAt to read the contents, which means we need to do the reading before the file gets passed through the various helper Reader wrappers (progress.Reader, etc.).

Would it be possible for Microsoft to distribute the base layer preconverted to tar format? That way the engine would not need to support a second format, and the content-addressability requirements would be fulfilled by tar-split.

@aaronlehmann I don't think we'll realistically be able to distribute tar images of these, at least for a while.

CI is failing;
02:04:40 # github.com/docker/docker/contrib/wim2img
02:04:40 contrib/wim2img/wim2img.go:91: undefined: wimutils.TarFromWIM
02:04:40 contrib/wim2img/wim2img.go:165: undefined: image.FeatureWin32k
02:05:33 # github.com/docker/docker/distribution/xfer
02:05:33 distribution/xfer/download_test.go:213: cannot use mockDownloadDescriptor literal (type *mockDownloadDescriptor) as type DownloadDescriptor in array element:
.....

@thaJeztah Thanks. I'm going to hold off making more changes to this until we can determine what design changes should be made.

We're going to distribute tar files natively.


translate_el.sh: fail to chroot

For both Centos 7 and RHEL 7 I get the error below, I'll dig more to find a solution.
The exist point is when it tries to execute the following and fails:
chroot ${MNT} yum -y install google-compute-engine google-compute-engine-init google-config
Other errors are also present
Debian GNU/Linux 9 inst-translator-translate-centos-7-translate-disk-stvzt ttyS0

inst-translator-translate-centos-7-translate-disk-stvzt login: Aug 22 20:52:46 localhost google_metadata_script_runner[705]: Copying gs://main-nucleus-128012-daisy-bkt/daisy-translate-centos-7-20170822-20:51:58-stvzt/sources/translate_el.sh...
Aug 22 20:52:46 localhost google_metadata_script_runner[705]: / [0 files][    0.0 B/  4.0 KiB]                                                #015/ [1 files][  4.0 KiB/  4.0 KiB]
Aug 22 20:52:46 localhost google_metadata_script_runner[705]: Operation completed over 1 objects/4.0 KiB.
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + URL=http://metadata/computeMetadata/v1/instance/attributes
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: ++ curl -f -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/el_release
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url:                                  Dload  Upload   Total   Spent    Left  Speed
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: #015  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0#015100     1  100     1    0     0     66      0 --:--:-- --:--:-- --:--:--    71
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + EL_RELEASE=7
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: ++ curl -f -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/install_gce_packages
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url:                                  Dload  Upload   Total   Spent    Left  Speed
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: #015  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0#015100     4  100     4    0 [   37.194660] SGI XFS with ACLs, security attributes, realtime, no debug enabled
    0    671      0 --:--:-- --:[   37.205338] XFS (sdb1): Mounting V4 Filesystem
--:-- --:--:--   800
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + INSTALL_GCE=true
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: ++ curl -f -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/use_rhel_gce_license
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url:                                  Dload  Upload   Total   Spent    Left  Speed
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: #015  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0#015100     5  100     5    0     0    835      0 --:--:-- --:--:-- --:--:--  1000
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + RHEL_LICENSE=false
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + MNT=/mnt/imported_disk
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + mkdir /mnt/imported_disk
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + '[' -b /dev/sdb1 ']'
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + echo 'Trying to mount /dev/sdb1'
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: Trying to mount /dev/sdb1
Aug 22 20:52:46 localhost startup-script: INFO startup-script-url: + mount /dev/sdb1 /mnt/imported_disk
Aug 22 20:52:47 localhost kernel: [   37.194660] SGI XFS with ACLs, security attributes, realtime, no debug enabled
Aug 22 20:52:47 localhost kernel: [   37.205338] XFS (sdb1): Mounting V4 Filesystem
[   38.631959] random: crng init done
Aug 22 20:52:48 localhost kernel: [   38.631959] random: crng init done
[   40.274745] XFS (sdb1): Ending clean mount
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + '[' 0 -ne 0 ']'
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + for f in proc sys dev run
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + mount -o bind /proc /mnt/imported_disk/proc
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: mount: mount point /mnt/imported_disk/proc does not exist
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + for f in proc sys dev run
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + mount -o bind /sys /mnt/imported_disk/sys
Aug 22 20:52:50 localhost kernel: [   40.274745] XFS (sdb1): Ending clean mount
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: mount: mount point /mnt/imported_disk/sys does not exist
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + for f in proc sys dev run
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + mount -o bind /dev /mnt/imported_disk/dev
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: mount: mount point /mnt/imported_disk/dev does not exist
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + for f in proc sys dev run
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + mount -o bind /run /mnt/imported_disk/run
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: mount: mount point /mnt/imported_disk/run does not exist
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + cp /etc/resolv.conf /mnt/imported_disk/etc/resolv.conf
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: cp: cannot create regular file '/mnt/imported_disk/etc/resolv.conf': No such file or directory
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + oot /mnt/imported_disk restorecon /etc/resolv.conf
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: /startup-N0dtKF/tmpnDsYM_: line 47: oot: command not found
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + [[ '' == \t\r\u\e ]]
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + [[ true == \t\r\u\e ]]
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + echo 'Installing GCE packages.'
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: Installing GCE packages.
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + cat
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: /startup-N0dtKF/tmpnDsYM_: line 64: /etc/yum.repos.d/google-cloud.repo: No such file or directory
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + [[ 7 == \7 ]]
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + cat
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: /startup-N0dtKF/tmpnDsYM_: line 76: /etc/yum.repos.d/google-cloud.repo: No such file or directory
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + chroot /mnt/imported_disk yum -y install google-cloud-sdk
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: chroot: failed to run command â€˜yumâ€™: No such file or directory
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + chroot /mnt/imported_disk yum -y install google-compute-engine google-compute-engine-init google-config
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: chroot: failed to run command â€˜yumâ€™: No such file or directory
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + '[' 127 -ne 0 ']'
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + echo 'TranslateFailed: GCE package install failed.'
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: TranslateFailed: GCE package install failed.
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: + exit 1
Aug 22 20:52:50 localhost startup-script: INFO startup-script-url: Return code 1.
Aug 22 20:52:50 localhost startup-script: INFO Finished running startup scripts.
Aug 22 20:52:50 localhost systemd[1]: Started Google Compute Engine Startup Scripts.
Aug 22 20:52:50 localhost systemd[1]: Reached target Multi-User System.
Aug 22 20:52:50 localhost systemd[1]: Reached target Graphical Interface.
Aug 22 20:52:50 localhost systemd[1]: Starting Update UTMP about System Runlevel Changes...
Aug 22 20:52:50 localhost systemd[1]: Started Update UTMP about System Runlevel Changes.
Aug 22 20:52:50 localhost systemd[1]: Startup finished in 1.170s (kernel) + 38.823s (userspace) = 39.993s.

Is this an LVM disk or a disk with the boot loader on a separate partition from the root file system? If so, that would be why. Right now everything just fails miserably in those cases. We actually need to do a bunch more work here to sort out if we have mounted a valid root partition and where the boot loader is- if its not there maybe its on another partition etc. If you have any ideas how to sanely do that we're open :) I haven't come up with anything that makes sense yet.

I see, yes, I have /boot in a different partition indeed.
The rootfs in a linux system needs to have at least the file /sbin/init (imposed by the kernel), so it shouldn't be too difficult to identify which partition rootfs is by looping through all the partitions, mounting them and searching for this file, it should also be possible to mount a LVM disk and check its content (I'll do a better research on this).
For the boot partition, the script already assumes that grub is being used, so we could do the same and look for the grub.cfg file.
Another solution is to ask the user to run a helper/hint tool in the machine to analyze the system and upload the collected information to a gs bucket, but this requires one more interaction from the user (not good for UX).
We could also parse /etc/fstab, but if it uses labels instead of UUIDs for the disks, then it is not reliable, but we could use it as a hint.

I was hoping to come up with some common library functions to do this- because all of the Linux imports need to figure out the same thing. I was looking at https://pypi.python.org/pypi/lvm2py/ as a possibility for LVM but it wasn't very helpful.

The only usage I see about using a common library is to retrieve the FS uuid or label, the partitions would still need to be mounted in the right location to allow chroot. Let me know if you were thinking in something else.
I was thinking in something like this https://gist.github.com/helen-fornazier/4cc431d79c523d8cfb4131e8d19c833f
i.e, to probe all the partitions, and then mount the rootfs and the boot in the right place to allow chroot.
This still need to be polished and discussed, but this would solve the LVM problem and also the /boot in a separated partition, the limitation is still if the system have other weird partitions, but this covers most of the cases.
What do you think?

Or we could use libguestfs (there are python and go libraries for that), with it we can find the rootfs with the function inspect_os(), check the mount points with inspect_get_mountpoints() and also mount the disk. This seems more portable and reliable.
http://libguestfs.org/
http://libguestfs.org/guestfs-golang.3.html
http://libguestfs.org/guestfs-python.3.html

We could also use guestfs to manage this.
I was able to mount the entire disk using
$ guestmount --pid-file guestmount.pid -a /dev/sdb -i /mnt
There are libraries in several languages, python and go included.
This tool uses the help of qemu to access the filesystem, it should be more reliable then the previous suggested approach.
There are some other ways to access the filesystem and to customize it without mounting it in the host using this tool, I am digging a bit more into this.
http://libguestfs.org/

That looks promising. I never heard of guestfs- lets see if that will work for the common cases.

I played around with the CLI tools a bit. virt-filesystems is sort of useful in that it can identify all the LVM volumes. It looks like you still need to mount everything and figure out where the boot loader lives. It is also a bit wonky in terms of displaying block devices with filesystems. For example, from a CentOS disk I have around.
~# virt-filesystems --filesystems -a /dev/sdb
/dev/sda1
/dev/centos/root

/dev/sda1 contains the boot loader (although in this case, its actually /dev/sdb1)
/dev/centos/root contains the root filesystem on an LVM volume

I tested with
$ guestmount -a /dev/sdb -i /mnt
I was able to complete the translate script with success, but I encountered other problems along the way:

For Debian with LVM: It mounted the disk, ran the chroot commands and finished successfully, but the disk didn't boot, I think this is another problem not directly related to guestmount, but to the boot configs, I am still investigating this.

For Centos 7: The script has other problems (wrong prefix and paths), and the boot config.
I was able to finish the translate script and boot the machine partially because the major problem is when it has an initramfs which needs to be regenerated with the tool dracut, the problem is that dracut checks which kernel it runs so it can look for the modules at /lib/modules/, but as it is running through chroot, it get the wrong kernel information (basically it executes uname -r). I could probe which kernel version it uses and execute the command:
$ dracut -f --kern-ver 3.10.327.el # For example
But this doesn't seem ideal
So I am checking the virt-customize tool, it uses qemu to access the system, and it allows me to execute a script inside the vm machine to install packages and do other changes. I am still investigating if it solves the entire problem but seems promising.
So the idea would be, instead of mounting the disk and performing changes with chroot, we could use virt-customize directly to make all the changes, as it is in a isolated qemu environment, it should be more reliable.
For example, it is possible to execute a command with:
$ virt-customize -v -a /dev/sdb --run-command "ls -1 /"
It shouldn't matter if the disk has multiple partitions with or without LVM. I am doing more tests.
http://libguestfs.org/virt-customize.1.html#log-file

In the python-guestfs library, there is also the possibility to execute shell script inside the VM to customize it. So I was thinking we could write a script in bash, python or golang or any language you prefer that has a guestfs library (which language do you prefer?) and use virt-customize to mount and customize the image, if I understand correct (I am still doing more tests), this should deal with the LVM problems, several partition problems and also the uname -r problem.
What do you think?

Oh yeah that worked!
Debian translations- are you sure its not booting or just not outputting anything to the serial console (which is a grub kernel cmd line option).
For CentOS, yes I found several bugs in the current script (will make a PR shortly to address those). This is the first time I have been able to test it on an actual imported disk. Will have to look into this dracut problem a bit more though.
I will have to think about the idea of using qemu- we don't currently have the ability of running a KVM VM inside of a GCE VM.
Language wise- I don't have a strong preference but given that we try to stay close to what our users would know, bash or python are preferable here. I did have intention to make common python libraries for all of these things and share them between the various translations.

FYI: https://github.com/GoogleCloudPlatform/compute-image-tools/pull/143

The problem of using guestmount, is that grub2-mkconfig generates the wrong rootfs parameter, so the system doesn't boot and only the dracut shell is loaded. Using virt-customize for this solves the problem, but it is not that easy to pass a bash script to virt-customize.
So I wrote a script in python that seems to solve most of our problems, the only ugly thing is that I mixed bash with python for now to be able to install the python libraries before executing the python script (but this is temporary, only for the proof of concept)
@zmarano please check: https://github.com/helen-fornazier/compute-image-tools/blob/translate_el/daisy_workflows/image_import/enterprise_linux/translate_el.sh
To not mix bash with python in the same file, I was thinking in adding the python in the Source list in translate_el.wf.json (a translate_el.py besides the translate_el.sh), but I am not exactly sure how to retrieve the translate_el.py from the translate_el.sh script inside the staging VM, do you have any recommendation regarding this?

The problem of using guestmount is that grub2-mkconfig generates the wrong rootfs parameter, so the system doesn't boot and only the dracut shell is loaded. Using virt-customize for this solves the problem, but it is not that easy to pass a bash script to virt-customize.
So I wrote a script in python that seems to solve most of our problems and seems to be working fine.
@zmarano please see #148

Resolved by #148


Update go verkle to match latest EIP draft

The new EIP draft for Verkle trees introduces the concept of "last level node" that is reminiscent of the MPT's "extension" node. This PR implements it.

Wrong base branch, closing

Closed the wrong PR :sweat:


Create: 1929-Concatenation-of-Array.dart

File(s) Modified: 1929-Concatenation-of-Array.dart
Language(s) Used: Dart
Submission URL: _https://leetcode.com/problems/concatenation-of-array/submissions/981350875/_

@codewithsatyam Thanks for your contribution 👍


Fixed #2: Syntax checking with syntastic

Nothing will happen if Syntastic not installed.

Nothing will happen if crystal not installed.

Currently it parses three types of message from crystal compiler:
Syntax error in line...

Syntax error in ...

Error in ...

Otherwise Syntastic will not highlight  line and provide balloon, only "Syntax: line(..)" in status bar will be shown.
Let me know if you are aware about other messages from crystal compiler.

Thank you, @veelenga !
It looks good for me except for above typos.

Thanks. Good catch!

@veelenga
Thanks!


Hide console window on Mac OSX?

I've tried the solutions given here:
https://github.com/AvaloniaUI/Avalonia/issues/1705
None of them hide the console on published OSX builds. I would like the user to launch the program and only see the GUI window. Is there a solution for this?

NSubsys is for Windows EXE files only so theres currently no solution for that, that i know of :(

You need to construct an app bundle. Here is an example one with our control catalog: bundle.tar.gz
It will unpack a directory with .app "extension"
The output of dotnet publish should go to Contents/MacOS (just delete existing files from the archive), icon to Resources/icon.icns.
Make sure to also edit Info.plist file.

Is this file signed in any way? I'm trying to bundle my own application (https://github.com/PhantomGamers/SFP) for Mac to avoid the terminal window popup, however when I do my users are reporting that when they go to run the application they get the error "SFP_UI" is damaged and can't be opened. You should move it to the Bin., however they aren't getting that when running the control catalog app you posted.
The test build for SFP that triggers this error can be found here https://nightly.link/PhantomGamers/SFP/actions/runs/5236489809/SFP_UI-osx-x64-SelfContained-5cbf9872f3871b4aa45d6c7fbf23412e1285e172.zip, I'm not sure what I'm missing as the structure seems identical to the file you posted. @kekekeks


Add Workarounds To Readme.md

I combined them all in the readme file.
https://github.com/PierfrancescoSoffritti/android-youtube-player/issues/885#issuecomment-1279762405

Thanks for putting this together! can you send the PR to the dev branch? i will review it sometime this week :)

thanks for the help @Serkali-sudo


GIFs not working

Very strange issue is that GIFs are not working with glide. They are being returned like this:

Got the exception:
League\Glide\Filesystem\FilesystemException: Could not read the image

Broken GIF: https://cdn.athliit.com/images/9c541649656b9dde4ab5032bbbcf83ba.gif
Direct, working GIF: https://cdn.athliit.com/images/sponsors/9c541649656b9dde4ab5032bbbcf83ba.gif
What is wrong?

using gd as driver

Wrong headers from Glide or whatever you use on top of Glide ;) right now its returned as text
header('Content-type:image/gif');

If the FilesystemException is thrown, then somehow the underlying Flysystem library cannot read the image, and that is most likely the problem. Is it working for other images?

It is working fine for other images. I am using GlideServer to serve the images.

Can you do me a favour and try a different Gif image?

Already tried that and it didn't work either..
//Mattias
Sendt fra min mobil
Mattias Siø Fjellvang
CTO - Athliit
(+45) 26 78 98 88

Den 17. jun. 2016 kl. 19.06 skrev Jonathan Reinink<EMAIL_ADDRESS>Can you do me a favour and try a different Gif image?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hmm, so if Gif images are the ones not working, it's possible that this could be an issue with either Intervention, or even GD/ImageMagick, depending on the one you're using.
However, the fact that the file cannot be read makes me think that your image never actually hits GD/ImageMagick. Is it possible that your Gif files are saved in a different folder than the other images you're trying? And that folder potentially could have different permissions set? Is it possible that the files have different permissions set?

Any update here?

Hi  - no images are being served from the exact same folder. No tweaks done here.


Support Capybara >= 3.37

Commit https://github.com/phillbaker/capybara-mechanize/commit/3341388eee5762222407d9602af6b96d6960ff45 restricted Capybara versions to <= 3.36. Capybara has released 3.38 already and the Gems will get more out of sync as time progresses.
Breaking change in Capybara:
https://github.com/teamcapybara/capybara/commit/ec5a50f93318a1d080347f88e5d8dbfc072f1862

fixed in https://github.com/phillbaker/capybara-mechanize/pull/74 and released in 1.13.0

Thank you very much for your hard work and dedication! It runs great for me...


Adds abort error handling

Removes internal os.Exit calls in favor of an abort channel;
sending an error on the abort channel tells top-level code that
it should exit. At the moment, this does not unwind all that
quickly, it just means that a failed build operation will result
in the outer "hugo server" or "hugo --watch" exiting.
This also removes utils.StopOnErr - it was only used in one
place and it had an os.Exit call in it.
There are remaining os.Exit calls but they are being used to
return non-zero status from main. Ideal future code would return
exit status to main and it would use os.Exit if the exit status
is non-zero.

I did some testing of this by forcing an error that would have resulted in os.Exit previously, and verifying that the server stopped with an error visible to the user. I'm not sure how to write actual test cases for this. I could test that the enableAbort function actually creates the right channels and that the spawned goroutine properly signals.

I'm not sure how to write actual test cases for this.

Me, neither. I have been pondering about getting some end-to-end tests with a server and a site up and running. The file system events etc. are a black spot on the test coverage.
I will get back to this PR in a few days; I will let 0.38 live in the wild for a few more days before I start adding more stuff.

I contributed a test framework for webhook that does end-to-end testing (builds webhook and a separate hookecho binary, runs webhook, and does test HTTP calls).  Specifically, start in TestWebhook (ignore TestStaticParams -- someone else added that, and it needs to be incorporated into the TestWebhook framework).  Hugo is a much bigger animal, but this kind of setup may be what we need.  Food for thought.

OK.
On Mon, Apr 9, 2018 at 7:27 AM, Bjørn Erik Pedersen <
<EMAIL_ADDRESS>wrote:

@bep commented on this pull request.
In commands/commandeer.go
https://github.com/gohugoio/hugo/pull/4571#discussion_r180112140:

@@ -93,6 +99,29 @@ func (c *commandeer) initFs(fs *hugofs.Fs) error {
return nil
}

+// enableAbort allows deep calls to abort program execution.
+// If we have a command that is persistant (e.g. "hugo --watch" or "hugo server"),
+// we set up a channel that callers can use to request that execution be
+// aborted. A deep caller does "c.abort <- err" to send an abort request;
+// the error is received by the high-level caller by either polling c.stoperr
+// or selecting on c.stop (only one receiver can do that, of course).
+func (c *commandeer) enableAbort() {

c.abort = make(chan error)
c.stop = make(chan error)

// Gather any async errors - the first one results in a stop-operation
go func(c *commandeer) {

var didstop bool

for err := range c.abort {

	if !didstop {

I don't think you can call this a race condition.
So, sending on the abort channel is a friendly variant of os.Exit -- aka
a stop the world type of error. It is an unbuffered channel, but if, by
chance, two goroutines want to abort at the same time, the channel send is
thread safe, and we kind of want only one of them to win. Having the
other(s) blocked is semantically what we want here.
I think we could make this much simpler by just create 1 channel, and I
would much prefer that we name that channel exit. It is more in line with
the cousin in os.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gohugoio/hugo/pull/4571#discussion_r180112140, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEMqMBbZ8laOYucVJQB2fkrFvokLCAD7ks5tm2_UgaJpZM4THsID
.


Wrong type, expected boolean for query parameter stream

Elixir 1.13.4 (compiled with Erlang/OTP 25)
Erlang/OTP Erlang/OTP 25 [erts-13.0.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

When I run this function
ExOpenAI.FineTunes.list_fine_tune_events("ft-XXXXX")

I got this error message
{:error,
 %{
   "error" => %{
     "code" => nil,
     "message" => "Wrong type, expected 'boolean' for query parameter 'stream'",
     "param" => nil,
     "type" => "invalid_request_error"
   }
 }}

and I added option like this and it's work
ExOpenAI.FineTunes.list_fine_tune_events("ft-XXXXX", stream: false)

Thanks for reporting, let me look into this. It looks like the client is appending the stream parameter when it shouldn't:
iex(8)> ExOpenAI.FineTunes.list_fine_tune_events "ft-AF1WoRqd3aJAHsqc9NY7iL8F"
"/fine-tunes/ft-AF1WoRqd3aJAHsqc9NY7iL8F/events?stream="
{:error,
 %{
   "error" => %{
     "code" => nil,
     "message" => "Wrong type, expected 'boolean' for query parameter 'stream'",
     "param" => nil,
     "type" => "invalid_request_error"
   }
 }}

Fixed in https://github.com/dvcrn/ex_openai/commit/4023cadc641f4c62b7b95b762d653357bacb6755. Please give 1.2.1 a go


Replace blob storage key property using Tabular Editor command line

Hi I have a Structured Data source Azure Blob Storage and the TMSL script is as follows - this TMSL script works when executed in SSMS.
{
    "createOrReplace": {
        "object": {
            "database": "AAS Database Name",
            "dataSource": "MyDataSource"
        },
        "dataSource": {
            "type": "structured",
            "name": "MyDataSource",
            "connectionDetails": {
                "protocol": "azure-blobs",
                "address": {
                    "account": "mystorageaccountdev",
                    "domain": "blob.core.windows.net"
                },
                "authentication": null,
                "query": null
            },
            "credential": {
                "AuthenticationKind": "Key",
                "kind": "AzureBlobs",
                "key": "gHQxxxxxxxxxxxxxxxxxxxxxxxxxxxd2Jwc0huw=="
            }
        }
    }
}

Using Tabular Editor - I am trying to replace the key property (also tried Key - K caps) using following C# script and call this in Tabular Editor command line.
var dataSource = (Model.DataSources["MyDataSource"] as StructuredDataSource);
dataSource.Account = "mystorageaccount" + Environment.GetEnvironmentVariable("environmentcode");
dataSource.key = "gHQxxxxxxxxxxxxxxxxxxxxxxxxxxxd2Jwc0huw==";

But is throws following error - what am I missing? How can I replace blob storage key in data source when deploying across environments (dev -> test -> prod) using Tabular Editor command line?
'TabularEditor.TOMWrapper.StructuredDataSource' does not contain a definition for 'key' and no extension method 'key' accepting a first argument of type 'TabularEditor.TOMWrapper.StructuredDataSource' could be found (are you missing a using directive or an assembly reference?)
##vso[task.complete result=Failed;]Done.
Any help appreciated. Thanks.

2.11.6 now exposes a Credential object on StructuredDataSources. If you click this, you can add/remove property-value pairs to the TOM Credential object:

You can also access this object through scripting. So for example, to set the key value in your example, use the following script:
var dataSource = (Model.DataSources["MyDataSource"] as StructuredDataSource);
dataSource.Account = "mystorageaccount" + Environment.GetEnvironmentVariable("environmentcode");
dataSource.Credential["key"] = "gHQxxxxxxxxxxxxxxxxxxxxxxxxxxxd2Jwc0huw==";


CLOUDP-167771: events commands migration

Migration for events commands

Because of only single event support, we have integration tests failing.

This is still blocked until we find a way to ensure the parameter array schema is included on the generated spec CLOUDP-173481

Closing this one and opening a separate PR as the branch has become a bit messy


Selected date's colors are not working with Tailwind CSS

I've installed this package and I use Tailwind CSS in my project (v3). However when I go to select a date it appears as white rather than the colors showed in the README.
https://i.imgur.com/5dDRbIf.png

Hey @safeboot you may need to include this packages' blade files to your purge list in tailwind.


libvirt: Fix assignment of PCI addresses

Current code fails with:
Traceback (most recent call last):
  File "/root/github.com/SUSE-Cloud/automation/scripts/lib/libvirt/vm-start", line 16, in <module>
    main()
  File "/root/github.com/SUSE-Cloud/automation/scripts/lib/libvirt/vm-start", line 12, in main
    libvirt_setup.vm_start(args)
  File "/root/github.com/SUSE-Cloud/automation/scripts/lib/libvirt/libvirt_setup.py", line 279, in vm_start
    conn.defineXML(xml)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3629, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirt.libvirtError: XML error: Invalid PCI address slot='0x30', must be <= 0x1F

So let's just not pick addresses above 0x1F...

Thanks for fixing it, lgtm in principle although we need to fix the unit test fixtures accordingly..

although we need to fix the unit test fixtures accordingly..

Hadn't noticed that earlier, fixed.

+1


Per-container seccomp profile generation

Have some option to turn off ptrace, legacy syscalls, ... as security.* options.

This has been implemented by Tycho.


Feature-Request: Don't open about:newtab in temporary container

Hi,
it would nice if about:newtab isn't opened in a temporary container (maybe via an option) because this creates some annoying flickering if you open a page from there which is set-up to use a specific container.

Hi, you can do that by deactivating the "Automatic Mode" in the preferences. Hope that helps.

Or more general: all about: urls - I don't see an advantage in containering them.

I see. That makes sense - glad you want to use Automatic Mode.
It's actually an interesting UX question. I feel like that opening a new Tab and seeing that it actually is already inside a Temporary Container feels good - at least for me. When disabling that you get the flickering on first navigation instead of when opening the Tab. I'll look into adding it as preference - not sure about making it a default tho.

One thing that might make it worth a default setting is that sometimes when the reopening of a New Tab isn't fast enough and you already started typing into the address bar, what you typed will disappear and you have to start over. That actually annoyed me from time to time.

Just published version 0.33 with the feature. Hope you like it. Please let me know if something doesn't work as expected.

This is now default with version 0.39

Turns out that about:newtabs sets a cookie in the container it gets opened in depending on the search-engine used - so with the "Don't reopen tabs"-configuration, those cookies are permanent in the default-container. This happens for default-search-engines in Firefox: Google, Yahoo, Bing and Wikipedia. This doesn't happen with e.g. startpage.

I'm going to change the default back to "Reopen" and force all users that currently have "Don't reopen" back to "Reopen". The preference will have a warning attached explaining that you should trust your search-engine to not set a cookie and that most will set a cookie.

Affected users (with Automatic Mode on and "Don't reopen" active) will see this notification upon update to the upcoming version 0.58:

Published version 0.58 accordingly


feat: higress gateway support hostnetwork

Ⅰ. Describe what this PR did
Higress Gateway support hostNetwork.
Tested:

kind 1.25 (Linux Kernel 5.x)
kubeadm 1.23 (Linux Kernel 3.10)
kubeadm 1.20 (Linux Kernel 3.10)

net.ipv4.ip_unprivileged_port_start some cases start at 1024，gateway need bind port 80.
Bakgroud
Setting hostNetwork only, will cause

Solution

securityContext: When use hostNetwork, remove sysctl configuration or setting provide by user.
containerSecurityContext:
a. In Linux Kernel 5.x, NonRoot or Root all operating normally.
b. In Linux Kernel 3.10, can only be run with Root.
dnsPolicy setting ClusterFirstWithHostNet, because of gateway start need coredns resolve.

Ⅱ. Does this pull request fix one issue?

fixes #39
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
helm upgrade --install higress . -n higress-system --set gateway.hostNetwork=true <--set global.kind=true>

Ⅴ. Special notes for reviews

Codecov Report

Merging #96 (e74a74c) into main (cf50b6e) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   24.80%   24.80%
=======================================
  Files          24       24
  Lines        4076     4076
=======================================
  Hits         1011     1011
  Misses       3008     3008
  Partials       57       57


PageView with viewportFraction < 1 snaps back on the last page

Hey!
Pageview with viewportFraction <1, wraped in NotificationListener still does not working properly on Flutter versions newer than 1.9.1, when changing orientation. It's snaps back on the last page and pages are not centred. Buggy on both Android and iOS. Also tested in actual stable, beta, dev and master branches.
Here is the short video:
https://youtu.be/XNPMiRO6hCA
Here is simple example:
https://gist.github.com/tsinis/4733f4a147e7e02686cf9913846ec7c4
Similar to:
https://stackoverflow.com/questions/59312394/pageview-with-viewportfraction-1-snaps-back-on-the-last-page
Please take a look, thanks!

Hi @tsinis thank you for reporting the issue!
Could you elaborate on what "snaps back on the last page" means? Is the page view snapping to the second last page when it is supposed to snap to the last page (doesn't seem to be the case in the video)? When I tried I was able to land on the last page in landscape mode, and after rotating my phone to portrait mode the page view stayed at the last page (although a bit off-center).

Hi @tsinis thank you for reporting the issue!
Could you elaborate on what "snaps back on the last page" means? Is the page view snapping to the second last page when it is supposed to snap to the last page (doesn't seem to be the case in the video)? When I tried I was able to land on the last page in landscape mode, and after rotating my phone to portrait mode the page view stayed at the last page (although a bit off-center).

Hi @LongCatIsLooong
Thank you for response! On Android, a slightly different behavior — the position of last card is fixed there, but then it’s almost impossible to return the penultimate card. In any case, the cards are not centered.
You can see on video what I'm talking about, start code in portrait mode, rotate device to landscape: cards are not centered and last one cannot fix it's position.


Cancel transition when no matching choice

The original logic was separately checking if 1) there were any valid defined transitions for the current state, and 2) if any of the transitions' conditions matched. By doing this separately, the check for whether an event transition was valid would provide incorrect results when the only transitions that had conditions that all passed were not defined transitions from the current state.
Once that check returned an incorrect result, the call later down the line to pull out the supposed "matching" transition would come up with air (or nil, in this case).
This bug fix originated from the discussion here: https://github.com/peter-murach/finite_machine/issues/35.

Coverage increased (+1.61%) to 99.22% when pulling d978300bf7f1bd08821fc7244a25d3d3330ec0a1 on craiglittle:fix-choice-bug into 636f180eca1cbb2c4c8ac34976745d40198a2296 on peter-murach:master.

Hey, @peter-murach! We've been using the gem in a project recently, and it's been working great.
I had a little time this weekend, and this issue has continued to be a thorn in my side, so I decided to tackle it myself. Let me know when you think!

Note: This relies on the changes in https://github.com/peter-murach/finite_machine/pull/39. I'll rebase this PR once the other is merged.

Hi Craig, I'm not ingnoring you, i've been traveling for few weeks in Norway and came back few days ago. I will definietly work with you on this and review things as soon as possible. My plan is to review your stuff and work on few other things, once done I should release new version this coming weekend. Again please allow me some time.

No worries! Thanks for the heads up.

Thanks for merging! Were you planning on cutting a new release soon?

Hi Craig! I've released version 0.10.2 that includes your patches. Thank you for fixing the issues and being extremely patient. I'm aware that internals are not ideal and hence started refactoring to help with maintenance and prepare for future features that I'm planning on adding.